Re: Specifying build location
Re: Specifying build location
- Subject: Re: Specifying build location
- From: Michael Cashwell <email@hidden>
- Date: Wed, 22 Sep 2004 15:02:30 -0400
Scott:
I just went through this with an overall package that had one target
that built a KEXT. To prepare the installation root needed for package
maker (which is invoked as script build phase that does this and makes
the disk image) I had to use a .command file to invoke xcodebuild via
sudo. While tedious, I do understand why this is so. However it
conflicted with Xcode saving the build products' path per user as the
"root" user didn't have the settings even though the Xcode UI make it
look like I was setting them in the project. Very misleading!
It seems to me that the per-user paths would be where I want Xcode
build and intermediate products to go _by default_. Any project that
has the default location chosen would thus use each user's preferred
location. But if a project specifies something other than the default
location then it's likely doing so for a reason and the settings should
apply regardless of who opened the project or invoked xcodebuild.
So ultimately the reason why is workflow.
(I also at the same time used this approach to separate Development,
Deployment and Deploy-Install products and intermediates so they didn't
stomp on each other when switching the build action.)
Matt:
You can do this by adding OBJROOT and SYMROOT settings to your styles.
As long as the "per user" location is left default these will work. The
only confusing this is that when you add OBJROOT or SYMROOT and then
click in the value area the symbol name will magically change to an
expanded form "Development Build Products Path" and "Development
Intermediates Path" and sort to the top of the list. At first I thought
it was rejecting the addition of the variable but in fact it was just
jumping to the top of the list. Odd.
I have these in my styles:
Deployment:
SYMROOT = "$(SOURCE_ROOT)/build/Deployment"
OBJROOT = "$(SOURCE_ROOT)/build/Deployment"
Development:
SYMROOT = "$(SOURCE_ROOT)/build/Development"
OBJROOT = "$(SOURCE_ROOT)/build/Development"
And then I use this .command file to do the Deploy-Install build. It
overrides the same two variables:
#!/bin/sh
cd "`dirname "${0}"`"
sudo xcodebuild -target 'Build All' -buildstyle Deployment install \
OBJROOT='$(SOURCE_ROOT)/build/Deploy-Install' \
SYMROOT='$(SOURCE_ROOT)/build/Deploy-Install'
Enjoy!
-Mike
On Sep 22, 2004, at 2:15 PM, Scott Tooker wrote:
Yes, the location set in the project inspector is perproject, but also
per-user. In the future we'd like to add UI for per-project settings,
but there is no way to do this in the current Xcode (1.5).
I'm curious why you need this to be per-project but not per-user since
file hierarchies usually vary from developer to developer (one of the
big reasons we make the setting per-project per-user).
Scott
On Sep 22, 2004, at 11:03 AM, Matt Gillette wrote:
Is there a way to specify a build location for an individual project?
I want to set the build location for a deployment build for one
project. This setting must be stored in the project, and not be based
on user. It seems like the option in the project setting should be
per project, not per user as it is.
Matt
_______________________________________________
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