Old 10th February 2009, 13:33   #1
jhunt
Junior Member
 
Join Date: Feb 2009
Posts: 1
Dynamic OutFile based on GetDllVersionLocal

Hi, I'm looking to generate the OutFile name based on the result of a GetDllVersionLocal call, I've made a function that gets the version fomated how I want and places it in $0, but it doesn't seem I can call functions outside sections, and this wouldn't be done on the remote system, its only local.

The logic is that I want the OutFile to be named "Setup App 1.0.0.exe", but want to automate this. I saw an example on the wiki on how to specify it externally on the command line, but that would still require me getting the version number from somewhere else.

Any ideas? Thanks!
jhunt is offline   Reply With Quote
Old 10th February 2009, 14:34   #2
Animaether
Major Dude
 
Join Date: Jun 2001
Posts: 1,173
you can't generally mix runtime and compile time commands.

Your best bet - short of a third party utility - is to (compile and) run one installer that uses GetDllVersionLocal on the file you need, and writes out the single line:
'OutFile <result of that GetDllVersionLocal call>' to, say 'outfile.nsc' ('c' for 'clipping' - I dunno, you pick something).

Then in your main installer script, include that file where you would otherwise have the 'OutFile' instruction.

Done! Have coffee

You can launch that first 'installer' (that does nothing more than get the version and writes out the little file for inclusion) from the first installer using !execute or !system, so you wouldn't have to worry about running that manually.
Animaether is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump