Project Home
Project Home
Trackers
Trackers
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Build Versioning: (5 Items)
   
Build Versioning  
I would like to add a build version (application release number) to our product. In Visual Studio, I would use the 
project properties (Project->Properties->Publish Version) and enter the Version values for Major, Minor, Build, Revision
. These would then become part of the exe file properties, which I could access later programatically. Is there a 
similar option inside QNX? Or is there a recommended way for adding version information to a build?

Re: Build Versioning  
I do not know of any automatic solution to this.

What we do is build all our releases from Jenkins.  Jenkins provides build number and subversion revision as environment
 variables.
The make files then has statements for putting these into defines that will be built in to the executable.

Here is the common.mk make file changes we hav done.
<code>
ifdef JENKINS_URL 
CCFLAGS+= -D'SVN_REVISION="$(SVN_REVISION)"' -D'BUILD_NUMBER="$(BUILD_NUMBER)"' 
else
#Buiding on a dev machine
CCFLAGS+= -D'SVN_REVISION="$(shell svnversion -n $(PROJECT_ROOT))"' -D'BUILD_NUMBER="XXX"' 
endif
</code>

To display the version info we have added a -v option to our executable.  This simply prints the build info and 
terminates.
Re: Build Versioning  
In qnx we use the "usemsg" tool to put version information into executables.  Most of this comes from the "pinfo" file 
located in each project.  Run "use -i <path of binary or shared object>" on the device to see an example.

----- Original Message -----
From: Chris Medeiros [mailto:community-noreply@qnx.com]
Sent: Thursday, August 30, 2012 06:05 PM
To: general-ide <general-ide@community.qnx.com>
Subject: Build Versioning

I would like to add a build version (application release number) to our product. In Visual Studio, I would use the 
project properties (Project->Properties->Publish Version) and enter the Version values for Major, Minor, Build, Revision
. These would then become part of the exe file properties, which I could access later programatically. Is there a 
similar option inside QNX? Or is there a recommended way for adding version information to a build?





_______________________________________________

General
http://community.qnx.com/sf/go/post95303
To cancel your subscription to this discussion, please e-mail general-ide-unsubscribe@community.qnx.com
Re: Build Versioning  
Thanks David,

This got me digging into the documentation, and I do agree that using "use -i " is the correct solution for qnx.
I ended up with these changes in the common.mk file:

define PINFO
PINFO DESCRIPTION=A fabulous display of version information
PINFO VERSION=$(APP_VERSION).$(BUILD_NUMBER).$(SVN_REVISION)
endef

Where the variables are defined earlier in the make file.
Re: Build Versioning  
Thank you all for the help. I will use the usemsg implementation.