With Xcode schemas, you can do it very nicely. Edit the Run action of the circuit as follows:
- Install the executable in System Preferences.app
- Click the Arguments tab and pass the start argument:
$USER_LIBRARY_DIR/PreferencePanes/$FULL_PRODUCT_NAME - Now expand the Run / Debug scheme and click "Pre-actions"
- Add a preliminary script action with the following body:
cp -a "$TARGET_BUILD_DIR/$FULL_PRODUCT_NAME" "$USER_LIBRARY_DIR/PreferencePanes/"
Bingo. Launch will now launch the system settings and go directly to your preliminary panel.
By default, the schemes are for each user and, therefore, you are likely to exclude them from your repository, and even if other users will not see them. Go to "Schema Management ..." and mark the prefPane schema as general if you want others to get these settings.
NB: For some reason, I seem to get random crashes when starting prefPane as an argument. Just disable the argument and manually run it once - from now on you can use the argument again ...
source share