Old 17th February 2008, 13:20   #1
jakobsch
Junior Member
 
Join Date: Feb 2008
Posts: 1
dynamic outfile name?

How can I accomplish the following: I have several installer options, all of which determine a part of the outfile name I want to give.

How can I concatenate the bits $0, $1, $2, ... to one string $res and then do something like

OutFile $res?

I know that I can use !define etc and set the Outfilename statically, but I'm having 4 options, so this would give 2*2*2*2 nested !ifdef etc, which is cumbersome.

Thank you!
jakobsch is offline   Reply With Quote
Old 17th February 2008, 13:30   #2
fabian.rap.more
Senior Member
 
Join Date: Dec 2007
Posts: 111
Send a message via Yahoo to fabian.rap.more
is this it???

StrCpy $res "$0,$1,$2,$3"

What some invent the rest enlarge
fabian.rap.more is offline   Reply With Quote
Old 17th February 2008, 14:13   #3
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
You can't use variables at compile time.

Stu
Afrow UK is offline   Reply With Quote
Old 17th February 2008, 14:15   #4
Red Wine
Forum King
 
Red Wine's Avatar
 
Join Date: Mar 2006
Location: Ath. GR
Posts: 2,078
You can't use variables to tell the compiler where to write the installer.
Use defines instead.

Quick AVI Creator - Quick and easy convert from DVD/MPEG/AVI/MKV to AVI/MP4/MKV
Quick AVI Creator entirely edited with NSIS and entirely upgraded to Unicode NSIS
Red Wine is offline   Reply With Quote
Old 17th February 2008, 14:27   #5
fabian.rap.more
Senior Member
 
Join Date: Dec 2007
Posts: 111
Send a message via Yahoo to fabian.rap.more
Quote:
Originally posted by Afrow UK
You can't use variables at compile time.
i keep forgeting these things.

but then is a dynamic outfile name possible???

What some invent the rest enlarge
fabian.rap.more is offline   Reply With Quote
Old 17th February 2008, 15:18   #6
demiller9
Senior Member
 
Join Date: Mar 2006
Location: Dallas
Posts: 462
You are talking about compile time, so variables are definitely out, but defines will work.

You can use !if, !ifdef, and !else. You also can !execute an external program (exe, bat, vbs, etc) to create an nsh file with !defines in it. All of these would count as 'dynamic' actions.
demiller9 is offline   Reply With Quote
Old 17th February 2008, 16:25   #7
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
http://nsis.sourceforge.net/Invoking...n_compile-time

Stu
Afrow UK 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