Re: Versioning / increasing build number
Re: Versioning / increasing build number
- Subject: Re: Versioning / increasing build number
- From: Stefan Wolfrum <email@hidden>
- Date: Fri, 5 Feb 2010 18:26:27 +0100
Okay, found & read Chris Hanson's blog article from 2005:
http://chanson.livejournal.com/125568.html
I totally agree with the guy who wrote the first comment!
So, looks like agvtool is the wrong path to follow if I want an integer build number that just increases everytime I hit cmd-R or cmd-Y or cmd-B or variations of those.
:-(
Am 05.02.2010 um 11:40 schrieb Stefan Wolfrum:
> A question about versioning. Information seems a bit sparse on this according to a few Google/cocoa-dev archives/ADC/Apple Discussions searches.
>
> I want to have a consecutive build number (an integer counting up each new build) displayed in my application (in an NSTextField, About dialog).
> Now I know how to access the Main/Major program version (string) from the main bundle (CFBundleVersion). But that's not the constantly increasing integer I am looking for.
>
> What I did so far:
> - in my project settings I set "Versioning System" to "Apple Generic"
> - in my project settings I set "Current Project Version" to 1
>
> I now get a file $(PRODUCT_NAME)_vers.c built in the folder
> build/$(PRODUCT_NAME).build/Debug/$(PRODUCT_NAME).build/DerivedSources
>
> It contains two variables and it looks like I'm interested in the second
> const double $(PRODUCT_NAME)VersionNumber __attribute__ ((used)) = (double)1.;
>
> However, I still have two questions:
> 1) How do I get access to this const in my source code? I guess I have to declare a const as "extern" somehow somewhere?! agvtool doc says this generated c file gets linked into the binary...
> 2) Right now the file doesn't get built new every time I build my application. So the number isn't increasing yet. How can this be achieved?
>
> Thanks a lot!
> Stefan._______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden