Commit graph

14 commits

Author SHA1 Message Date
Kyle Neideck
6d2fd39296
Split uninstall.sh into an interactive and non-interactive version.
The non-interactive version can be called by a Homebrew Cask formula.

Also, change some AppleScript to reference applications by their IDs
rather than their names, which should make them slightly more robust.
2017-06-17 21:56:42 +10:00
Kyle Neideck
ed2f356570
Try to fix Travis not finding the files to release.
Also, make sure commands in uninstall.sh use the binaries that ship with
OS X and add the release files to .gitignore.
2017-06-12 14:38:26 +10:00
Kyle Neideck
6fc46c7943
uninstall.sh: Increase the filesize limit for deletion.
As a safety check, uninstall.sh refuses to delete a file if it's over a
certain size. With debug symbols, Background Music.app was just over the
previous 5MB limit.
2017-06-01 23:54:36 +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
f254e8c58d
uninstall.sh: Open System Preferences pane by ID instead of by name.
The Applescript that opened System Preferences at the end of the process
was failing to find the "Sound" pane. It might have been because I don't
have OS X set to English, but it's always worked for me in the past.
Either way, it's less fragile to use the ID and it fixes the problem (on
my machine, at least).

Also, added a short pause before restarting coreaudiod because the step
before that makes Finder to play a short sound. It probably wouldn't
cause any problems, but why risk it?
2017-04-09 15:44:46 +10:00
Kyle Neideck
d7e3980af8
Warn if uninstall.sh is run as root.
Also, add some fallback commands so it will work correctly, more or less, when
run as root in case someone ever wants to do that.

Fixes #95.
2016-12-31 21:56:00 +11: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
ccb709fc02 Fix "sudo -v" in uninstall.sh causing Travis builds to fail. 2016-04-28 10:11:19 +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
7f136586dc Add versions of launchctl commands for OS X 10.9 and 10.10.
The launchctl commands in our scripts should now all work on any version
of OS X from 10.9. But I haven't actually tested that.

Fixes #35.
2016-04-21 01:48:14 +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
90dd4d6cbb Add a few small things to uninstall.sh.
- Move files to the trash instead of deleting them, just in case we
  accidentally delete the wrong thing.
- Added some fallback variants of launchctl commands for old versions.
- Check the size of files before deleting them, just to be safe.
- Added license/copyright heading.
2016-04-20 01:57:17 +10:00
Nick Jacques
3aebb12f41 Invalidate sudo ticket 2016-04-19 09:49:20 -05:00
Nick Jacques
f7abfcc4ab Initial development of uninstall script 2016-04-17 21:39:53 -05:00