• 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 Run Terminal.app from Xcode
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How To Run Terminal.app from Xcode


  • Subject: Re: How To Run Terminal.app from Xcode
  • From: Jens Alfke <email@hidden>
  • Date: Thu, 03 Nov 2011 13:20:59 -0700


On Nov 3, 2011, at 8:51 AM, Andreas Grosam wrote:

export DYLD_FRAMEWORK_PATH=/Users/path/to/library
cd ${BUILT_PRODUCTS_DIR}
open -a Terminal.app AllTests
This above also fails when launched from within Terminal. It seems, the environment variables will not be inherited.

The OS doesn’t launch a new app as a child process of the process that launched it, rather as a child process of launchd. So apps won’t inherit environment variables this way.

You could tell Terminal to run a shell script, pass the desired framework path as a parameter to the script, and then set the environment variable in the script, with something like
export DYLD_FRAMEWORK_PATH=“$1”
./AllTests

—Jens
 _______________________________________________
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

  • Follow-Ups:
    • Re: How To Run Terminal.app from Xcode
      • From: Andreas Grosam <email@hidden>
References: 
 >How To Run Terminal.app from Xcode (From: Andreas Grosam <email@hidden>)

  • Prev by Date: Re: NSLog
  • Next by Date: Re: Advice on converting this C++ code to Objective-C
  • Previous by thread: Re: How To Run Terminal.app from Xcode
  • Next by thread: Re: How To Run Terminal.app from Xcode
  • Index(es):
    • Date
    • Thread