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.
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.
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.
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.
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.
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.
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.