Archive: Setting script name and compiled script name dynamically


Setting script name and compiled script name dynamically
I'd like the script name (Usually set with Name instruction) and the compile exe (set with OutFile) to include the version of the installed file.

Something like
1. ${GetFileVersion} "MyApp.exe" $var
2. OutFile "MyApp $var"
3. Name "MyApp $var"

Of course this way is not possible as GetFileVersion cannot be used out side a Function / Section.

Is that possible?

Also - I found the in one of the installed NSIS nsi the variable called: $(^NameDA) which holds the script name.

What is this syntax? this is not a "regular" variable. right?

Tx

Jammusi


GetDLLVersionLocal gives you the version, but it is packed, and not really usable at compile time.

Try http://nsis.sourceforge.net/GetDLLVe...ocal_as_define

$(^xx) Is built-in langstring, NameDA means double amperstand (& > &&)


GetDLLVersionLocal gives you the version, but it is packed, and not really usable at compile time.
I'm not sure what you meant but I Copy-Paste the macro into my script and used it in the OutFile command and the Name Command and it worked.
Why did you say "it is not usable at compile time"? And what did you mean "it is packed"


I actually found an additional way to do that:
nsis.sourceforge.net/How_can_I_let_the_compiled_script_depend_on_something_dynamic (add http:// - if I do it it is being replaced with URL submitted by user message - any idea why?)

$(^xx) Is built-in langstring, NameDA means double amperstand (& > &&)
Is the ^ sign a special character or just a regular use as part of the langstring name?