Re: MODULE_VERSION and CFBundleVersion synchronization?
Re: MODULE_VERSION and CFBundleVersion synchronization?
- Subject: Re: MODULE_VERSION and CFBundleVersion synchronization?
- From: David Ewing <email@hidden>
- Date: Mon, 20 Jun 2005 16:24:48 -0600
On Jun 16, 2005, at 3:30 PM, Kris Daniel wrote:
Greetings.
I work on a driver project, which includes the following targets: a
kext, a MIDI CFPlugin, and a Preference Pane. I have a need to
keep all three targets displaying the same version information in
their Info.plist files (as a single "driver release" updates all
three), and a kext is required to have its Info.plist's
CFBundleVersion match its binary's MODULE_VERSION. So, I have at
least four version fields that need to stay in sync whenever I want
to increment the version.
In moving to XCode 2.1, I've found that performing this
synchronization feat has gotten more complicated. Formerly, there
was only one setting of MODULE_VERSION per target, now there is a
MODULE_VERSION per build configuration per target, and an extra one
floating around in the project.pbxproj file. I'd like to have just
one place to update the version and have it affect all targets and
all configurations, so I don't have to hunt down every version
entry in the config pages when I need to increment the version.
What is the recommended approach for doing this? (In XCode 1.5, I
was deleting the extra MODULE_VERSION entries on the non-kext
targets, and using perl in a post-build script to find
MODULE_VERSION in project.pbxproj and substitute it into the
respective Info.plist files. This has gotten more complicated now
that there are several MODULE_VERSIONs found in the project.pbxproj
file). Considering how useful this is for kext developers, I'm
hoping there is a more straightforward route to follow.
There are a number of ways to skin this cat. One would be to define a
single build setting in your project's settings and refer to it in
each of the other places (e.g. "MODULE_VERSION = $
(MY_PROJECT_LEVEL_VERSION_SETTING)" in each of the targets/configs).
But a more interesting answer is that even though MODULE_VERSION is
defined in a bunch of places, that doesn't mean that you have to edit
it more than once to change it. Simply select all the targets with
the setting and do a "Get Info". You're now editing the settings for
all the targets at once! Now, also choose "All Configurations" from
the popup. You can edit the settings in the whole range of targets/
configurations this way. Edit the value for MODULE_VERSION. It gets
changed everywhere.
And it wasn't obvious if you were doing this or not, but you can
refer to $(MODULE_VERSION) in the Info.plist files. Build settings
are expanded in these files.
Dave
_______________________________________________
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