Re: Sync active target and active executable
Re: Sync active target and active executable
- Subject: Re: Sync active target and active executable
- From: Scott Tooker <email@hidden>
- Date: Wed, 17 Jun 2009 09:22:39 -0700
On Jun 17, 2009, at 2:56 AM, Dirk Becker wrote:
Hi,
a larger share of my work is moving from CodeWarrior to XCode. So
please forgive if this question has been discussed earlier on,
archive search turned up nothing useful.
In CodeWarrior the executables were remembered by target. Is there
any way to achieve the same for XCode?
My plugin projects have plenty targets, each matching one of the
combination of several executables, multiple major and minor
versions and debug/release, a subset also with different locales.
Whenever I switch the active target, I also have to switch the
active executable. Of course, both lists are growing at a rapid
pace. Instead I would prefer if each of the targets had an
associated executable.
One could say there is more flexibility with the curent way, but if
you want to keep the ability to manually override, you could do that
by adding an entry "from target" in the active executables,
referring to anything provided by setting / xcconfig. Otherwise it
would be just another target.
By default, any target already has an executable associated with it's
product (for example, if I create a Cocoa application target, then the
associated executable is the Cocoa application product). If your
target doesn't produce an actual executable (for example, a Cocoa
plugin target) then you'll need to create a custom executable to run
it (unless another target in the project that produces an executable
also uses the produced framework). Unfortunately, it sounds like you
are in the latter camp :( I'd file a request for the ability to
associate a "default executable" with a given target.
However, there are some things you can do today to try and reduce the
number of targets you have.
One key difference between CodeWarrior and Xcode is how build products
are dealt with. CodeWarrior never had the idea of build
configurations, so every variant of your product needed a separate
target (so in the simple case of a debug and release version of your
product, you needed two targets). Xcode has the concept of a build
configuration, which allows you to have different sets of build
settings associated with one target (one caveat: build configurations
cannot alter the set of files being built in a target). In addition,
Xcode (currently) works best when building everything into the same
"Build Products Location" (this also applies to other targets
referenced via cross-project references).
In my experience converting developers from CodeWarrior to Xcode, this
different approach to build products bites developers familiar with
CodeWarrior when they try and impose the way CodeWarrior built
products on Xcode. I'd personally suggest trying to have a minimal
number of targets and then use build configurations to deal with the
variations. Put another way, if you are creating targets in Xcode that
only differ in their build settings (they have identical sources and
resources), then those targets should be combined into one target with
multiple configurations. For more advanced uses, you can use run
script build phases to perform some modifications of resources after
fact (so you could avoid needing a whole new target where you might
just differ in the included resources).
Scott
_______________________________________________
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