where is $PATH set in xcode?

前端 未结 9 725
半阙折子戏
半阙折子戏 2020-12-03 07:16

It looks like xcode\'s $PATH environment setting is different from my user shell environment.

Where does xcode get the $PATH setting from and what\'s the best way t

相关标签:
9条回答
  • 2020-12-03 07:40

    In Xcode 5 you can add your PATH as a variable to either a target or the project settings.

    1. Add a custom variable with the +sign on the top of the page
    2. Edit the name of the variable to be PATH and add your preferred value (e.g. /usr/local/bin for a default install of homebrew.

    Target Build Settings

    0 讨论(0)
  • 2020-12-03 07:44

    XCode gets its environment variables the same way as other OS X processes, from ~/.MacOSX/environment.plist.

    Check developer.apple.com/qa/qa2001/qa1067.html for details on how to set things.

    0 讨论(0)
  • 2020-12-03 07:45

    if you're writing a Run Shell Script build phase, you can just do:

    PATH=${PATH}:/opt/local/bin
    

    or whatever inside the script content.

    0 讨论(0)
提交回复
热议问题