Commit graph

40 commits

Author SHA1 Message Date
Lawrence Warren
ca3c497940
feat(docs): Update references to System Preferences
As of MacOS 13, System Preferences is known as System Settings. This
commit updates all user facing references to System Preferences, using
the new nomenclature.
2022-11-26 12:52:44 +11:00
Kyle Neideck
7afb8a6c12
GH Actions: Re-enable the UI tests.
GitHub Action's macOS image has been updates and UI tests might work
now: <https://github.com/actions/virtual-environments/pull/5417>.

Also, remove some supporting files/code for CI builds that we don't need
anymore.
2022-05-13 20:53:12 +10:00
Kyle Neideck
b2770f1793
Installer: Fix post-install check for BGMDriver failing unnecessarily. 2022-05-13 15:46:53 +10:00
Muneeb Ahmed
01217d2d8c
Remove python 2 usage 2022-03-30 19:06:35 -07:00
Kyle Neideck
df02aae263
Fix some spurious error messages in build_and_install.sh.
Also, update the Xcode versions for CI builds.
2020-07-11 17:30:02 +10:00
Kyle Neideck
026558d974
Disable UndefinedBehaviorSanitizer in debug build packages.
Debug builds from CI have been crashing because they can't find the
UBSan dylib (even though it was in the bundles).
2020-06-22 01:36:56 +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
bab1ec9e96
build_and_install.sh: Update the Xcode Command Line Tools check.
The current method of checking the CLI Tools are installed doesn't seem
to work with newer versions of Xcode.
2019-10-17 12:41:47 +11: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
94f13e747c
Clarify some comments in BGMPreferredOutputDevices. 2018-10-28 18:11:40 +11:00
Kyle Neideck
08fdef6084
Workaround some Xcode 10 bugs in build_and_install.sh.
Also, update the Xcode versions in .travis.yml.
2018-09-23 18:19:58 +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
ac2130c3c3
build_and_install.sh: Fix printing the last command in error_handler. 2017-12-27 18:23:25 +11:00
Kyle Neideck
f64cf41f8a
Add a volume slider for system sounds.
System sounds are UI-related sounds like mail notifications or terminal
bells.

Xcode 9.2 doesn't support saving .xib files in Xcode 7 format any more,
so building Background Music now requires Xcode 8 or above.

Also, fix some of the tooltips that would only work if BGMApp was the
foreground app, which it shouldn't be.
2017-12-26 23:10:57 +11:00
Kyle Neideck
243c798ccd
Disable AddressSanitizer in release builds. 2017-06-24 22:28:11 +10:00
Kyle Neideck
a4a9530513
Change build dir back in build_and_install.sh to fix package.sh. 2017-06-24 21:40:17 +10:00
Kyle Neideck
9aec1aed34
Enable AddressSanitizer by default in debug builds and tests.
Except when running BGMDriver because you have to change coreaudiod's
sandbox profile for that. And you have to disable SIP (rootless) to do
that.
2017-06-24 20:20:16 +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
Kyle Neideck
728a3a7331
build_and_install.sh: Offer fix when xcodebuild can't find Xcode.app.
If the Xcode command line tools were set to use a "command line tools
instance", which can be installed without having Xcode installed,
build_and_install.sh would fail. It prints an error message with a
command that can fix it if you do have Xcode installed, but the message
was kind of confusing and the command would fail if you didn't run it as
root.

build_and_install.sh now offers to run the command for you and then
continues the installation. I've also tried to make the message a bit
clearer and cleaned up some of the code.

Also fixes another bug that occurred with this configuration problem,
where the error from xcodebuild would be printed at an unintended (and
confusing) point in the script.

Fixes #108.
2017-04-09 17:35:27 +10:00
Kyle Neideck
6a26afe47a
Fix nullability warning in BGMXPCHelper. Also add Xcode 8.3 to .travis.yml.
Fixes #107.
2017-04-05 22:15:54 +10:00
Kyle Neideck
523ad02761
Add -w option to build_and_install.sh, which passes -Wno-error to the compiler.
-Wno-error tells the compiler not to treat warnings as errors.

Using the option in the one-liner install command in README.md, since it's
mostly used by users rather than developers.

Also, log the options passed to build_and_install.sh in build_and_install.log.
2017-02-16 22:54:38 +11:00
Kyle Neideck
b5cf6de2ac
Update OSX image versions in .travis.yml. Add some files to the Xcode project. 2017-02-15 22:53:02 +11:00
Kyle Neideck
129c21a180
Add BGM_STOP_DEBUGGER_ON_LOGGED_EXCEPTIONS preprocessor flag. Also, add...
an option to build_and_install.sh for passing extra options to xcodebuild.
2017-01-16 23:58:19 +11:00
Kyle Neideck
da74e5ea1d Check that the user's accepted the Xcode license before installing.
If they haven't, xcodebuild would fail.
2016-10-08 19:33:38 +11:00
Kyle Neideck
c91af08d54 Enable more warnings in BGMDriver.
The PublicUtility classes are now built as a separate target so we can
disable some of those warnings for it.
2016-09-08 00:24:57 +10:00
Kyle Neideck
1ee9fa348e Fix build failure on case-sensitive file systems. Fixes #64.
It seems that BGMDriver was failing to compile on case-sensitive file
systems because BGM_Types.h included "AudioServerPlugin.h" instead of
"AudioServerPlugIn.h". (Lowercase "i".)

I tried building with the project and Xcode on a case-sensitive disk
image and it would fail without this patch. So I figure it should at
least build now. I haven't had time to test Background Music on a system
running on a case-insensitive file system yet, so I added a TODO about
it in TODO.md.

Also, some unrelated tidying up.
2016-06-16 18:38:29 +10:00
Kyle Neideck
d827e7e0d8 Fix build script printing a git error when run outside of a git repo. 2016-04-29 13:29:19 +10:00
Kyle Neideck
34071e633f Add an install "one-liner" to the README.
Also fix a bug when running build_and_install.sh from a directory other
than the root of the project.
2016-04-29 13:18:52 +10:00
Kyle Neideck
e95f371305 Add debug build option to build script.
Also add info about logging to CONTRIBUTING.md.
2016-04-29 12:09:37 +10:00
Kyle Neideck
3f62b012c3 Fix build script failure if Xcode check finishes before install starts. 2016-04-29 07:41:06 +10:00
Kyle Neideck
480d769c26 Fix race condition in build script. Also avoid 'sudo -v' on Travis CI. 2016-04-28 09:33:23 +10:00
Kyle Neideck
f2a0898590 Build script: Check Xcode version in the background to launch quicker. 2016-04-27 02:28:47 +10:00
Kyle Neideck
b707513e49 Lots of small improvements to the build script.
- Clean before installing. (Mostly to get full logs every time.)
- Clearer error messages.
- Better checking for Xcode/xcodebuild.
- Log extra system info.
- A number of minor bug fixes.
2016-04-26 21:04:13 +10:00
Kyle Neideck
99421ada1d Code clean up in build_and_install.sh.
It also now properly handles the user cancelling the script at the
password prompt, instead of throwing an error.
2016-04-23 15:34:01 +10:00
Kyle Neideck
0178644417 Try several commands to restart coreaudiod in build_and_install.sh.
build_and_install.sh is failing for some people because their versions
of launchctl don't support the command we were using to restart
coreaudiod. This commit adds several fallback versions of the command.
build_and_install.sh tries each until one works.

Fixes #10, #19 and #29.
2016-04-20 02:35:58 +10:00
Kyle Neideck
1ada18fd16 Fix repeating error message in build_and_install.sh 2016-04-14 11:38:52 +10:00
Kyle Neideck
f3151e3159 BGMXPCHelper now runs as an unprivileged user, instead of root.
BGMXPCHelper's install script now creates a user and group for
BGMXPCHelper to run as. This reduces the risk of BGMXPCHelper being used
for privilege escalation.
2016-04-07 00:48:36 +10:00
Kyle Neideck
690d6221d7 Add script that builds and installs BGMApp, BGMDriver and BGMXPCHelper 2016-04-05 16:56:38 +10:00