PDA

View Full Version : Using WordReplace at compile time ?


Vic_Gent
24th October 2006, 15:05
I'm calling makensis.exe from the command line as part of an overnight build script and am using the /X! switch to pass in some !defined variables. These are used to set VersionKey information etc. All good there, but I'd also like to change the name of the compiled nsi executable based upon a label that I've passed in at the command line. It's got '.' in it (e.g. XXX.6.0_061024) so was trying to use the WordReplace function to strip them out, set a variable and then use it in the OutFile command. However it looks like WordReplace only executes at the Installer run time and not compile time. I could just hack the string in my build script and pass it in as another /X!, but I'd prefer to avoid it if possible. Any ideas?

goldy1064
24th October 2006, 15:52
You would have to write a standalone executable or batch script to do that parsing as WordReplace only works during run-time.

Afrow UK
24th October 2006, 15:55
http://nsis.sourceforge.net/Invoking_NSIS_run-time_commands_on_compile-time

-Stu

Vic_Gent
24th October 2006, 16:13
Great. Will do. Thanks :)