• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Automate build numbers
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Automate build numbers


  • Subject: Re: Automate build numbers
  • From: Jerry Krinock <email@hidden>
  • Date: Fri, 25 Aug 2006 17:41:55 -0700
  • Thread-topic: Automate build numbers

on 06/08/25 12:02, Greg Guerin at email@hidden wrote:

> I suspect that the source text "${RELEASE_VERSION}" is being replaced
> before gcc's preprocessor ever gets run.  This would be happening because
> ${RELEASE_VERSION} looks like a replaceable Xcode variable, so if the value
> of RELEASE_VERSION is nil or empty, it gets replaced by nothing.  You're
> the victim of colliding replacement mechanisms.
>
> A way to test this hypothesis would be to define a build setting for
> RELEASE_VERSION that differs from the value you assign it in your
> preprocessor definition, and then see what the output Info.plist is.

I just put RELEASE_VERSION in the Setting column and 2.3.3 in the Value
column.  Didn't work.  Output is still an empty string.

> Gcc's C preprocessor doesn't need ${} surrounding its replaceable elements.
> It's just a normal C preprocessor working on plain text in ordinary macro
> mode.  I think if you remove the ${} from RELEASE_VERSION it will work.

YES! That worked!  Very strange.  So, as you can see from the final, working
Info.plist file which I've pasted in below, the things that Xcode replaces
DO want the ${...}, but the things that the gcc preprocessor replaces do NOT
want the ${...}.  Intuitive!!

Now I understand why Apple hasn't gotten around to writing any detailed
documentation on this.   I think I'll go clean my garage....

Thanks, Greg, and all.

<?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>asdfjkl</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>


 _______________________________________________
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

  • Follow-Ups:
    • Re: Automate build numbers
      • From: Chris Espinosa <email@hidden>
References: 
 >Re: Automate build numbers (From: Greg Guerin <email@hidden>)

  • Prev by Date: Re: linker error with Xcode 2.4
  • Next by Date: Re: Automate build numbers
  • Previous by thread: Re: Automate build numbers
  • Next by thread: Re: Automate build numbers
  • Index(es):
    • Date
    • Thread