Archive: Command Line compile with \D


Command Line compile with \D
OK, I found the post:

SpacesInCommandLine

But I think I've got a slightly different situation. I compile and such using NAnt, and inside of NAnt call NSIS to create my installer. I don't seem to fit the mold in the noted conversation because I have to reference the NSI file in the compile. So my command would look like this:

<exec
program="C:\Program Files\NSIS\makensis.exe"
commandline='/V3 /OInstall.log /DOUT_FILE="D:\Program Files\MyApp\MyApp.exe" InstallMyApp.nsi'
/>

This won't work because /D doesn't support spaces. I also can't make the /D the last argument because InstallMyApp.nsi has to be. Any help? Wouldn't it be easiest to allow quotes on the \D?

Thanks,
Eric


Are you sure it does not support quotes?
Using 2.15:
D:\PROGRA~1\NSIS>makensis /DJa="D:\Program Files\MyApp\MyApp.exe" C:\test.nsi

Test.exe shows a MessageBox displaying ${Ja} and shows it as being:
D:\Program Files\MyApp\MyApp.exe

-Stu


May be even >makensis /DJa=D:\Progra~1\MyApp\MyApp.exe C:\test.nsi ;)