debopamg
18th February 2011 06:00 UTC
Having multiple OutFiles in a single script
Hi,
I want to create two outfiles each time I run a script. The outfiles will basically be Java launchers, one with java <options> and another with javaw <options>. Is there a way this can be done in NSIS?
Thanks in advance,
MSG
18th February 2011 06:10 UTC
You can use !system to execute the NSIS compiler a second time on another .nsi file.
debopamg
18th February 2011 09:22 UTC
thanks for the pointer. !system did not work. Instead, !execute did the trick. had some issues with quotes and spaces (C:\Program Files\ ..etc), but its working now.
Thanks a lot!
zivha
19th February 2011 05:45 UTC
Maybe this is a bit dirty solution but you could create a batch file that runs makensis twice for your script, each time create some .nsh file that is included by your script and defines which outfile to create, then have in the main script something like:
!ifdef MAKEJAVAW
Outfile java.exe
!else
Outfile javaw.exe
!endif