Re: Access Build Settings in a User Script?
Re: Access Build Settings in a User Script?
- Subject: Re: Access Build Settings in a User Script?
- From: Jerry Krinock <email@hidden>
- Date: Mon, 17 Nov 2008 11:09:38 -0800
On 2008 Nov, 17, at 10:51, Etienne Guérard wrote:
Build settings are passed to your script as environment variables.
So that you can access them directly.
For example: $SRCROOT should be a simple replacement for your
Applescript. ;)
Thanks, but that doesn't seem to work....
****** USER SCRIPT ******
#!/bin/sh
echo Shortcut gives: $SRCROOT
SOURCE_ROOT=`osascript -e "tell application \"Xcode\" to return value
of flattened build setting \"SRCROOT\" of build configuration \"Release
\" of active target of item 1 of projects"`
echo AppleScript gives: $SOURCE_ROOT
***** SCRIPT OUTPUT *****
Shortcut gives:
AppleScript gives: /Users/jk/Documents/Programming/Projects/TestProject
Etienne, maybe you are thinking of a Shell Script, as in Shell Script
Build Phase. It would work there as you say. But my issue is to put
this in a "User Script"; in the User Scripts menu.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden