Hi,
I save the build number of my program in an ini file (which is all automatically and such).
from now on I have always renamed the installer files to version1.0.0.exe and version1.0.1.exe and such.
Is there any way to dynamically create the filename of the installer according to that INI file?
Dynamic filename
3 posts
You can call makensis.exe with a /D parameter to define a version. For example, have this in your script:
OutFile version${VERSION}.exeand then call makensis.exe from your automatic build system like this:If it must be according to that INI file, you can create another program which will read this INI (can be a NSIS installer itself) and call makensis.exe as exaplined above.makensis.exe /DVERSION=1.0.0 script.nsi
Same "problem" here. My solution is a little helper exe.
buildDefinesNsh reads my ini and writes _defines.nsh
; take version number from ini file
!system 'if exist _defines.nsh del _defines.nsh'
!system 'helpers\buildDefinesNsh.exe'
!include '_defines.nsh'
;this file will be overwritten (automatically generated)
!define PROGRAM_VERSION "2.0.0.1"