Go Back   Winamp Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 18th September 2003, 00:50   #1
Flikky
Junior Member
 
Join Date: Sep 2003
Posts: 1
Skipping the File command

Is it possible to skip File commands? The following code doesn't let me skip it no-matter what I try.

!define StandAlone "false"

; this should be skipped if StandAlone is "false"
StrCmp "${StandAlone}" "true" 0 +4
SetOutPath "$RootDirectory"
File "blah.dll"
File /r "some_folder"

i.e. if StandAlone include blah.dll and some_folder, else don't
Flikky is offline   Reply With Quote
Old 18th September 2003, 01:54   #2
pengyou
Major Dude
 
Join Date: Mar 2003
Posts: 569
Relative jumps do not work with "File". See Section 4.4 (Relative Jumps) in the NSIS User Manual for a list of the cases where you cannot use relative jumps.

The solution to your problem is to use a label. For example:
code:
StrCmp "${StandAlone}" "true" 0 skip_files
SetOutPath "$RootDirectory"
File "blah.dll"
File /r "some_folder"
skip_files:

pengyou is offline   Reply With Quote
Reply
Go Back   Winamp 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