• 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: Running a Build Phase as Root
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Running a Build Phase as Root


  • Subject: Re: Running a Build Phase as Root
  • From: Chris Hanson <email@hidden>
  • Date: Sat, 26 Dec 2009 18:15:22 -0600

On Dec 23, 2009, at 1:24 AM, James Murdza wrote:

For Xcode projects that have to installed, not run, (like plug-ins) I find it helpful to make a Build and Install aggregate target. I add  a copy files build phase to my Build and Install target to copy my product into the installation directory. However this becomes difficult when I do not have permission to the installation directory.

Most Mac OS X applications that use plug-ins generally support more than one plug-ins directory.  They’ll typically use a search path based on the Mac OS X concept of “domains,” e.g. they’ll look for plug-ins in some order like this:

~/Library/Application Support/MyApp/Plug-ins (User domain)
/Library/Application Support/MyApp/Plug-ins (Local domain)
/Network/Library/Application Support/MyApp/Plug-ins (Network domain)
/System/Library/Application Support/MyApp/Plug-ins (System domain, not normally used)
MyApp.app/Contents/PlugIns (plug-ins embedded in the app)

This way you can copy a plug-in (or put a symbolic link to the plug-in in your build directory) into a directory you do have access to, rather than copy it somewhere you don’t.

Most such applications will also support a user default for specifying an additional path or collection of paths to add to the front of the plug-in search paths.  That way you don’t even need to copy your built plug-in or add a symbolic link anywhere, you can just pass “-UserDefaultName Path/To/Build/Directory” as command-line arguments to the host application via a custom executable within Xcode.  For example, passing the argument pair “-ExtraPlugInPaths ~/Developer/Projects/MyPlugIn/build” if that’s your build directory.

Check your host application’s plug-in architecture documentation for what it supports, and if it doesn’t support something like this, ask the developer to add it.  It’ll make their lives easier too.

  — Chris

 _______________________________________________
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: 
 >Running a Build Phase as Root (From: James Murdza <email@hidden>)

  • Prev by Date: Re: Forcing resources update
  • Next by Date: Re: How to keep Xcode from putting 500MB in /var/folders?
  • Previous by thread: Re: Running a Build Phase as Root
  • Next by thread: how to get signed/unsigned comparison warning with CLANG (and get rid of a spurious ; warning)
  • Index(es):
    • Date
    • Thread