Archive: command line parameters to the .nsi script??


command line parameters to the .nsi script??
Hi all,
I have written a script which works fine with the release mode. I want to run the script with debug mode by passing a command line parameter to the script.

For exp:

a.nsi "Debug/Release"

I searched the following from NSIS User document. But could not find a clue.

http://nsis.sourceforge.net/Docs/

Could anybody help me in this regard?

Cheers
Pradeep


Re: command line parameters to the .nsi script??
Hi.

In order to compile .nsi script with command line args, you have to use the makensis.exe utility, which is present in your nsis installation directory.

In general :
<command prompt>:\ makensis.exe /D<command_line_arg>="DEBUG or RELEASE " <path to your nsi script>

For eg:
C:\ makensis.exe /DBUILD_MODE="DEBUG" D:\your_folder\yourscript.nsi

Within your script u can use the command line arg in the following way:

${BUILD_MODE}

For eg
${If} ${BUILD_MODE} == "DEBUG"
<your statements>