Flikky
18th September 2003 01:50 UTC
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 :)
pengyou
18th September 2003 02:54 UTC
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:
StrCmp "${StandAlone}" "true" 0 skip_files
SetOutPath "$RootDirectory"
File "blah.dll"
File /r "some_folder"
skip_files: