Commit graph

10 commits

Author SHA1 Message Date
Kyle Neideck
0e0cc5fd05
Installer: Retry if opening BGMApp fails. 2021-03-30 19:03:09 +11:00
Kyle Neideck
70a64de734
Fix apps failing to start audio after upgrading Background Music.
A macOS bug was stopping BGMXPCHelper from running, which would stop
BGMDevice from starting IO. It would wait in StartIO until timing out.

I'm not sure why that didn't cause BGMDriver's XPC connection fail. If
it had, BGMDevice would have just started IO without waiting for BGMApp
to be ready. The it would have just dropped some initial frames and
logged an error instead of freezing for 30 seconds.

The fix/workaround is to delete the old version of BGMXPCHelper before
installing the new one.
2020-04-19 16:43:17 +10:00
Kyle Neideck
d95b0d8b1a
Add a repackage option (-r) to package.sh.
It takes an expanded Background Music .pkg installer and repackages it
into a new .pkg installer. It's mainly useful for code signing, since
you have to expand the unsigned package, sign each of the bundles,
repackage it and then sign the new package.

Also, fix build_and_install.sh putting the BGMXPCHelper dSYMs in the
wrong archive.
2020-02-09 20:19:41 +11:00
Kyle Neideck
8de821d4aa
Add an archive option (-a) to build_and_install.sh.
Archiving is the standard way to build a release for distribution using
Xcode. package.sh now uses this option when it creates a release
package.

This change is mainly to keep the Run settings in the Xcode schemes from
affecting the release builds, which means we can commit the schemes with
more sensible settings.

Also, disable AddressSanitizer in the BGMDevice scheme, which was
stopping coreaudiod from launching because its sandbox won't allow the
process to load the AddressSanitizer dylib.
2020-02-05 00:09:14 +11:00
Kyle Neideck
4c7eba30af
Make sure the installer launches BGMApp as the logged-in user. 2019-08-17 15:20:47 +10:00
Kyle Neideck
e6e784b013
Add an additional method for restarting coreaudiod.
The install and uninstall scripts try to restart coreaudiod in a number
of ways until one works. Despite that, it still wasn't always successful
when I tested it on macOS Catalina. This commit will hopefully fix that.
2019-08-17 15:17:51 +10:00
Kyle Neideck
ac33909b51
Fix pkg installer not opening BGMApp if relocated.
If the user moved BGMApp and then installed a new version from a .pkg,
BGMApp would be installed to the same place the old version had been
moved to. When pkg/postinstall tried to open BGMApp, it would fail
because it assumed BGMApp would be installed to /Applications.

Also, the installer now fails with an error message if it can't open
BGMApp after finishing the install.

Fixes #164.
2018-10-04 21:24:29 +10:00
Kyle Neideck
cb9cdb00b6
Support creating .pkg installers using the debug build configuration.
Users reporting bugs will be able to use these packages to install debug
builds of Background Music without having to install from source. This
is mainly useful because debug builds have more detailed logging.
Hopefully we'll get around to adding an option to enable debug logging
at runtime, but this should work well enough for now.

Also:
 - Use newer macOS images in Travis CI builds.
 - Fix an xcrun command in build_and_install.sh that was accidentally
   being started in the background.
 - Fix build_and_install.sh building libPublicUtility.a twice for no
   reason.
2018-06-05 00:40:21 +10:00
Kyle Neideck
d322c3ac9b
Never show warning dialog box in command-line pkg installs.
Also,
 - add Background Music Device.driver to the array of bundles in
   pkgbuild.plist, and
 - don't warn about the permissions of the install dir for BGMXPCHelper
   in build_and_install.sh if it's only building.
2017-06-13 23:18:10 +10:00
Kyle Neideck
5e4556b49d
Add packaging script and (possibly) support for OS X 10.9. 2017-06-11 19:19:31 +10:00