If you didn't have Rosetta 2 installed, the Background Music installer
would tell you that it's required and prompt you to install it.
Background Music doesn't actually need Rosetta 2; macOS just assumes
that it does unless told otherwise.
The previous fix was removing the quarantine attribute from the
BGMXPCHelper.xpc dir, but in 14.5 its contents also get the attribute.
(I haven't tested in earlier versions.) This new fix removes the
attribute from the contents as well.
`launchctl kickstart -k` is no longer permitted for `coreaudiod`. See
<https://developer.apple.com/documentation/macos-release-notes/macos-14_4-release-notes>.
(Thanks to @gchilds.)
As explained in those release notes, `kill` still works. `postinstall`
was using `killall coreaudiod` if `launchctl kickstart -k` failed, but
that was failing as well because it had to be `sudo killall coreaudiod`.
I haven't been able to reproduce this on macOS 14.4, only 14.5. Not sure
why.
See #705.
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.