Dick4
31st March 2002 15:46 UTC
changing the filename created by NSIS
I've written a vbscript to create NSIS installers based off of some already created .nsi scripts. The vbscript simply copies a file, dumps it in a directory and then NSIS makes the installer for that one file. It works great currently, however I'd like the .nsi to be able to generate a dynamic name, is this possible? If not through NSIS, I think I can get the vbscript to simply edit the .nsi and give it the name I want, but it would be a lot easier on me if NSIS could do it. :D
Thanks in advance and BIG THANKS to Nullsoft for NSIS, it has saved me and the company I work for hours and hours of time and money.
Smile2Me
31st March 2002 16:17 UTC
If not through NSIS, I think I can get the vbscript to simply edit the .nsi and give it the name I want, but it would be a lot easier on me if NSIS could do it.
Not possible with NSIS right now (as far as I know), so you should do it with vbscript.
Good luck,
-Hendri.
kichik
31st March 2002 17:38 UTC
If I understand you correctly it is possible.
Just use:
File/oname=dynamicName.ext yourfile.ext
>
This will output the file with a different name (in this example dynamicName.ext) and you can make it dynamic (using processed strings).
If you want the installer file to get a dynamic name just edit (with the vbscript) your "OutFile installer.exe" line.
KiCHiK
(edit) An easier way would be:
OutFile ${INSTALLERNAME}
and then calling makensis with this switch: /DINSTALLERNAME=whatever.exe
You can do the same with File /oname=${INSTALLERNAME} of course...
Dick4
31st March 2002 22:33 UTC
hmmmm, I'm not sure if I understand everything you just said, but are you saying that I can pass the "Outfile" param thru the command line of makensis.exe?
What I'm probly going to do I think is make the installer make the same filename every time (bob.exe or whatever) and then simply rename it as I copy it in my vbscript (mary.exe, jane.exe, etc).
*edit* ok, so I reread your post and it makes more sense. I can name a variable in my nsis script and pass the value of it through the command line? Cool!
justin
1st April 2002 02:05 UTC
Try this:
makensis filename.nsi "/XOutFile myfile.exe"
The last command will override the output file to myfile.exe
-Justin
Smile2Me
1st April 2002 07:06 UTC
Hey,
so I guess I learned something today.
I never used /X but it works great!
Thx Justin.
-Hendri.