• 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: xcodebuild
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: xcodebuild


  • Subject: Re: xcodebuild
  • From: Chris Espinosa <email@hidden>
  • Date: Fri, 17 Jun 2005 12:13:05 -0700

On Jun 17, 2005, at 11:15 AM, Dix Lorenz wrote:

I've finally got my projects to build well in Xcode 2.1, using build configurations, project-wide xcconfig-files and generally cleaning up the mess from maintaining projects over the years. Mainly I managed to get around bugs in Xcode, I hope they will be fixed soon (bugs are filed, more to come).


What I still don't get (and which is hardly documented) is what xcodebuild exactly does. Especially: what does "install" do? I guess it inherently sets some flags ("Deployment location"? "Deployment Postprocessing"? Anything else?). How exactly does it determine where to install the binaries? I have one project where I have set the "Release" Configuration to have an Installation Directory of "/dldev/bin". That setting is not overridden in my targets, but xcodebuild installs in ".../Uninstalled Products". Only when I also set this same setting in the target it installs where it's supposed to install.


The xcodebuild tool is a corollary to the traditional Unix 'make' tool.  It's utterly familiar if you've used make all your life, and completely foreign if you've used CodeWarrior or other pure-IDE solutions.  

http://developer.apple.com/documentation/DeveloperTools/Conceptual/XcodeUserGuide21/Contents/Resources/en.lproj/05_07_bs_building_product/chapter_34_section_6.html

http://developer.apple.com/documentation/Darwin/Reference/ManPages/man1/xcodebuild.1.html

There are four actions.  Build and Clean are just like the corresponding actions in the Xcode IDE.  install and installsrc are administrative actions used to prepare products for distribution.  They often involve steps that require administrator privileges or want to be run on a central build machine, which is why they're not available in the IDE.

The install action sets DEPLOYMENT_POSTPROCESSING to YES so the three deployment tasks (install in DSTROOT, strip executables, and set permissions) take place.  (You can set this yourself in the project or target configuration for the Release build configuration and get the same results, but you have to make sure that you have administrator privileges to do these actions).  The Installation Build Products Location (DSTROOT) is usually passed in a command-line argument to xcodebuild, and is / for installation on the running system, or some temporary place in preparation for creating a root that will be used in PackageMaker.

So if you want the IDE to "build and put the executable where it belongs," check Deployment Postprocessing and Deployment Location, set Installation Build Products Location to / , and Installation Directory to the place you want your executables to be installed.

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: 
 >xcodebuild (From: Dix Lorenz <email@hidden>)

  • Prev by Date: Re: GCC Warning Options
  • Next by Date: Re: GCC Warning Options
  • Previous by thread: xcodebuild
  • Next by thread: Problem with protocols using gcc 4
  • Index(es):
    • Date
    • Thread