Re: proprocessing info.plist files
Re: proprocessing info.plist files
- Subject: Re: proprocessing info.plist files
- From: David Ewing <email@hidden>
- Date: Mon, 5 Dec 2005 11:09:15 -0700
I have gotten this to work with some contortion of preprocessor
magic, but there's a much easier way. Just add "-traditional" to
INFOPLIST_OTHER_PREPROCESSOR_FLAGS. Then you should be able to just do:
<key>CFBundleVersion</key>
<string>kMajor.kMinor.kBugFix</string>
(I hope I got that right. Working from memory here.)
Dave
On Dec 1, 2005, at 8:46 PM, Steve Mills wrote:
So has anyone figured out a way to do this in an info.plist file
with preprocessing turned on?
#define kMajor 1
#define kMinor 2
#define kBugFix 3
#define kBuild 987
#define kAppVersion(aa,bb,cc,dd) aa.bb.cc
<key>CFBundleVersion</key>
<string>kAppVersion(kMajor,kMinor,kBugFix,kBuild)</string>
That ends up "1 . 2 . 3". I tried:
#define kAppVersion(aa,bb,cc,dd) #aa.#bb.#cc
And that generated '"kMajor"."kMinor"."kBugFix"'. I then tried:
#define kAppVersion(aa,bb,cc,dd) #aa##.#bb##.#cc
That generated the error "error: pasting ""kMajor"" and "." does
not give a valid preprocessing token". I guess I don't know enough
about how # and ## work.
Apple took a nice first step in offering preprocessing of
info.plist files, but it still has a long way to go. At one point I
#included a file at the top of my Info.plist, but the file couldn't
be found, even though the dir it's in is in my "Header Search
Paths" and "Rez Search Paths".
Steve Mills
Drummer, Mac geek
http://sjmills5.home.mchsi.com/
_______________________________________________
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
_______________________________________________
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