Permalink
Browse files

Add PublicUtility to manual build instructions and...

...make them less likely to fail because of permissions errors.
  • Loading branch information...
1 parent 6a26afe commit 5f9487deb07aca04ae94b9e6284d6b9a0013c639 @kyleneideck committed Apr 9, 2017
Showing with 26 additions and 9 deletions.
  1. +15 −2 DEVELOPING.md
  2. +11 −7 MANUAL-INSTALL.md
View
@@ -102,11 +102,14 @@ real-time safe.
To test your changes, build `Background Music Device.driver`, either inside Xcode (set the active scheme to "BGMDevice",
go `Product > Build For > Running` and look in the `products` folder) or with something like
```shell
+xcodebuild -project BGMDriver/BGMDriver.xcodeproj -target "PublicUtility" -configuration Debug
xcodebuild -project BGMDriver/BGMDriver.xcodeproj -configuration Debug
```
And then run `BGMDriver/BGMDriver/quick_install.sh` to install. Or if you'd rather install manually, copy `Background
Music Device.driver` to `/Library/Audio/Plug-Ins/HAL` and restart coreaudiod.
+You might have to delete `BGMDriver/build` first if you're using `xcodebuild` and run into permissions problems.
+
Before you build, Xcode might show incorrect warnings on the `#pragma clang assume_nonnull` lines for some reason. They
go away after you build and don't seem to cause any problems.
@@ -191,12 +194,22 @@ From [main.m](BGMApp/BGMXPCHelper/main.m):
### Building
-Build and run `Background Music.app` either inside Xcode or with something like
+Build and install/run BGMXPCHelper and `Background Music.app` either inside Xcode or with something like
```shell
-xcodebuild -project BGMApp/BGMApp.xcodeproj -configuration Debug
+sudo xcodebuild -project BGMApp/BGMApp.xcodeproj \
+ -target BGMXPCHelper \
+ DSTROOT="/" \
+ INSTALL_PATH="$(BGMApp/BGMXPCHelper/safe_install_dir.sh)" \
+ -configuration Debug \
+ install
+sudo chown -R $(whoami):staff BGMApp/build # Fix build dir ownership
+xcodebuild -project BGMApp/BGMApp.xcodeproj \
+ -configuration Debug
open "BGMApp/build/Debug/Background Music.app"
```
+You might have to delete `BGMApp/build` first if you're using `xcodebuild` and run into permissions problems.
+
To test with Address Sanitizer, you might have to set the environment var `ASAN_OPTIONS=detect_odr_violation=0` to work
around [Issue #647](https://github.com/google/sanitizers/issues/647). (In Xcode, go `Product` > `Scheme` > `Edit
Scheme...`, select the Background Music scheme, and add the environment var in Run > Arguments.)
View
@@ -6,10 +6,14 @@
```shell
sudo xcodebuild -project BGMDriver/BGMDriver.xcodeproj \
+ -target "PublicUtility" \
+ RUN_CLANG_STATIC_ANALYZER=0 \
+ clean build
+ sudo xcodebuild -project BGMDriver/BGMDriver.xcodeproj \
-target "Background Music Device" \
RUN_CLANG_STATIC_ANALYZER=0 \
DSTROOT="/" \
- install
+ clean install
```
- Install the XPC helper.
@@ -19,16 +23,16 @@
RUN_CLANG_STATIC_ANALYZER=0 \
DSTROOT="/" \
INSTALL_PATH="$(BGMApp/BGMXPCHelper/safe_install_dir.sh)" \
- install
+ clean install
```
- Install `Background Music.app` to `/Applications` (or wherever).
```shell
- xcodebuild -project BGMApp/BGMApp.xcodeproj \
- -target "Background Music" \
- RUN_CLANG_STATIC_ANALYZER=0 \
- DSTROOT="/" \
- install
+ sudo xcodebuild -project BGMApp/BGMApp.xcodeproj \
+ -target "Background Music" \
+ RUN_CLANG_STATIC_ANALYZER=0 \
+ DSTROOT="/" \
+ clean install
```
- Restart `coreaudiod`: <br>
(Audio will stop working until the next step, so you might want to pause any running audio apps.)

0 comments on commit 5f9487d

Please sign in to comment.