proprocessing info.plist files
proprocessing info.plist files
- Subject: proprocessing info.plist files
- From: Steve Mills <email@hidden>
- Date: Thu, 1 Dec 2005 21:46:37 -0600
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/
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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