Archive: build number ?


build number ?
hello!

my question is:

is it posible to add somehow an automated build number to my nsis project (in the 'file version' stuff)?

i mean, i compile it once - so it's build1, i compile it again, it's build2, and so on.
if this is posible how to do this ?

thanks.


You can add a date/time using the standard predefines.

To automatically add a build number you will have to create an external application (or installer created by NSIS) and execute it using !system.


thanks for the quick reply. good idea with the date predefine.

you said something about an external app. i do not folow. can you be a little more explicit ?

thanks again.


You can create a NSIS installer (or other application) that will increase the build number in a certain file and run that application using !system.

If you make this application generate a file that defines a symbol and include this file in your script. Then you can use the defined symbol in your script.


thank you very much !

i will try that.


Originally posted by Joost Verburg
If you make this application generate a file that defines a symbol and include this file in your script. Then you can use the defined symbol in your script.
hello again,

the first part is ready. i created an nsis program that increments a number in a text file. now what i don't understand is the second part. the quoted one. i have the file.
define a symbol and include the file in the script, then i can use the defined symbol in my script !?! :igor:
this is chinese for me.

can you help me a little ?

thanks.

You should make that program write a little NSIS script that you can include in your own script using !include. The script should look something like:

!define BUILD_NUMBER 6

After you call that program using !system in the script, !include the file it outputs.