Archive: MakeNsis with values


MakeNsis with values
Hi,
When compiling a script through the command line, can you also pass values into the script, such as version number or target directory of the .exe?
Thanks,
Howard


Create defines with /D or execute commands with /X

It's all in the manual


Well I just had to do the same thing some time ago and here is an easy to modify example:
In a .bat -
SET STPNAME=test1
SET BASENSIS=%SOME_ROOT%\installMaker\config\installerBase.nsi
SET SETUPNAME=%SOME_ROOT%\installMaker\setup\%STPNAME%
makensis /DSectionsPath="%SETUPNAME%.nsh" /DOutFile="%SETUPNAME%" /V4 /PAUSE %BASENSIS%
(don't forget the "" thingies oherwise it won't work... sometimes)

then at the top of your nsi script put

!ifndef SectionsPath
!define SectionsPath "installerSections.nsh"
!endif
!include "${SectionsPath}"

!ifndef OutFile
!define OutFile "setup.exe"
!endif
OutFile "${OutFile}_${PRODUCT_VERSION}.exe"

you got the idea


Maybe you could try my tool - Visual & Installer if you are using Visual Studio 2010.

You can set many MakeNsis options via Project Properties:

http://www.unsigned-softworks.sk/vis...s-property.jpg

Download here: http://www.unsigned-softworks.sk/visual-installer/