Old 16th November 2009, 08:37   #1
Junior Member
Join Date: Oct 2009
Posts: 19
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.


Could anybody help me in this regard?

bubunia2000 is offline   Reply With Quote
Old 16th November 2009, 09:04   #2
Junior Member
Join Date: Jan 2008
Posts: 18
Re: command line parameters to the .nsi script??


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:


For eg
${If} ${BUILD_MODE} == "DEBUG"
<your statements>
pillairohit is offline   Reply With Quote
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump