• 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: How to configure the search path of a run-script build phase?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to configure the search path of a run-script build phase?


  • Subject: Re: How to configure the search path of a run-script build phase?
  • From: Roland King <email@hidden>
  • Date: Thu, 28 Jul 2011 21:19:00 +0800

If your run script uses bash, and there's only  few locations you want to add to the path, this works from the command line and I believe in a script too ..

	PATH=/usr/local/bin:/opt:$PATH eric <arguments>

in general in bash you can do

	ENV1=something ENV2=something command arguments

and it will run command after setting ENV1, ENV2 etc. So in the original case that will add /usr/local/bin and /opt to the path and attempt to find eric in either of them.


On Jul 28, 2011, at 8:32 PM, Jean-Denis MUYS wrote:

>
> Le 25 juil. 2011 à 21:20, "Jens Alfke" <email@hidden> a écrit :
>
>> I need an Xcode 4 “Run Script” build phase to invoke a nonstandard tool (erlc). I’ve installed the tool through Homebrew, so it’s in /usr/local/bin; but other people might have used MacPorts, in which case it’d be in /opt, so I don’t want to hard-code the path. But neither of those directories is in the standard $PATH, so the script can’t find it if I don’t tell it the full path.
>>
>> The root of the problem seems to be that scripts invoked by Xcode don’t read any of the usual shell configuration files (.profile, .bash_profile, .cshrc), so I don’t have an opportunity to customize their search paths. Is there any other way I can tell Xcode to customize $PATH on a per-user basis?
>>
>> —Jens
>
> Yes. You can set your path in ~/.MacOSX/environment.plist
>
> Of course you need to log out and log back in after you create/change that file.
>
> I use it to put Lion's MacRuby private framework binaries in Xcode's path.
>
> Jean-Denis _______________________________________________
> 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

 _______________________________________________
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: 
 >How to configure the search path of a run-script build phase? (From: Jens Alfke <email@hidden>)
 >Re: How to configure the search path of a run-script build phase? (From: Jean-Denis MUYS <email@hidden>)

  • Prev by Date: Re: How to configure the search path of a run-script build phase?
  • Next by Date: Xcode 4.1 - amazing!
  • Previous by thread: Re: How to configure the search path of a run-script build phase?
  • Next by thread: Re: How to configure the search path of a run-script build phase?
  • Index(es):
    • Date
    • Thread