• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Access Build Settings in a User Script?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Access Build Settings in a User Script? (From: Jerry Krinock <email@hidden>)
 >RE: Access Build Settings in a User Script? (From: Etienne Guérard <email@hidden>)

  • Prev by Date: RE: Access Build Settings in a User Script?
  • Next by Date: Re: Verifying Code Signing Identity
  • Previous by thread: RE: Access Build Settings in a User Script?
  • Next by thread: Re: Access Build Settings in a User Script?
  • Index(es):
    • Date
    • Thread