Archive: incr ${VERSION}


incr ${VERSION}
is it possible to incr the verion automatically?

thanks,


You can use some other program to do that and execute it using !system. The program should update some .nsh files that you'll later !include in your script.


can you tell me a good software/program?

thanks;


You can use a scripting language such as Python, Perl or Ruby. You can even use a NSIS installer to do the task.


Mail me at roel at riks dot nl for a program that does what you want. I've written one for my own purposes, it reads the version from an xml file and can print it or write it to another file in any form you want; you can also increment/reset parts of the version number etc.


You could consider using the date/time to version your aplication values, see below. Make sure the build computer has the correct time.

;-------------------------------------------------------------------------
!define /date cBuildYear %Y
!define /date cBuildDay %D

;this stores the time when the script was compiled;
!define /date Date "%H:%M:%S %d %b, %Y"

;-------------------------------------------------------------------------
!define VersionCopyrightCompanyName "Whatever International"

VIProductVersion "1.0.${cBuildYear}.${cBuildDay}"
VIAddVersionKey ProductName "Universal installation"
VIAddVersionKey Comments "Everything you need in one simple installer, was build on ${Date}"
VIAddVersionKey CompanyName "${VersionCopyrightCompanyName}"
VIAddVersionKey LegalCopyright "© 2004-${cBuildYear} ${VersionCopyrightCompanyName}"
VIAddVersionKey FileDescription "Starter application for onefile installations"
VIAddVersionKey FileVersion "1.0.1.1" ;Adjust to your needs
VIAddVersionKey ProductVersion "1.0"
VIAddVersionKey InternalName "Installation helper application"
VIAddVersionKey LegalTrademarks "All Rights Reserved."
VIAddVersionKey OriginalFilename "INSTALL.EXE"

;-------------------------------------------------------------------------

Well, you get the drift I hope, just adjust the date/ time values so your versioning would be to your likeing. Just as an example, toy around with it so it will fit YOUR needs.


http://nsis.sourceforge.net/Invoking...n_compile-time

-Stu


Nice, note however this only works if you create a build on a Windows system.

Make a shell or perl script on FreeBSD or Linux ;)