Re: Automate build numbers
Re: Automate build numbers
- Subject: Re: Automate build numbers
- From: Jerry Krinock <email@hidden>
- Date: Fri, 25 Aug 2006 06:08:56 -0700
- Thread-topic: Automate build numbers
on 06/08/24 8:58, Chris Espinosa at email@hidden wrote:
> I believe you need to use the build setting expansion syntax $
> {RELEASE_VERSION} here as a signal to the preprocessor that these
> are build settings, not literal strings.
Well, I remembered that I had put in my project my own shell script build
phase which overwrites the Info.plist. (Sorry, duh!!!)
So, I started a brand new "Cocoa Application" project in Xcode just to test
this, and also I used the ${...}. Result: Now, instead of getting my
placeholder in the output, I get an empty string. The Build Log shows that
the gcc is indeed reading my RELEASE_VERSION=2.2.2 and making it a -D
option, but it doesn't make it to the product's Info.plist. The
${EXECUTABLE_NAME} and ${PRODUCT_NAME} strings, by contrast, don't show up
in the Build Log but DO make it into the product!
*************************************************
******* Values in Target Build Settings:
*************************************************
Proprocess Info.plist File: [CHECKED]
Expand Build Settings in Info.plist File: [CHECKED]
Info.plist Preprocessor Definitions: RELEASE_VERSION=2.2.2
*************************************************
******* Build Log for Info.plist Preprocessing:
*************************************************
Preprocessing
/Users/jk/Documents/Programming/Projects/junk1/build/junk1.build/Debug/junk1
.build/Preprocessed-Info.plist Info.plist
cd /Users/jk/Documents/Programming/Projects/junk1
/usr/bin/gcc -E -P -x c -Wno-trigraphs -DRELEASE_VERSION=2.2.2
Info.plist -o
/Users/jk/Documents/Programming/Projects/junk1/build/junk1.build/Debug/junk1
.build/Preprocessed-Info.plist
*************************************************
******* My "Source" Info.plist:
*************************************************
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIconFile</key>
<string></string>
<key>CFBundleIdentifier</key>
<string>com.yourcompany.junk1</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>${RELEASE_VERSION}</string>
<key>NSMainNibFile</key>
<string>MainMenu</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
</dict>
</plist>
*************************************************
******* "Output" Info.plist in product Contents/, produced by Xcode:
*************************************************
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>junk1</string>
<key>CFBundleIdentifier</key>
<string>com.yourcompany.junk1</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>junk1</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string></string>
<key>NSMainNibFile</key>
<string>MainMenu</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
</dict>
</plist>
_______________________________________________
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