In NSIS, how do I jump to a label from within another label?
Note: I am not sure if what I am talking about is actually called a label so correct me if I am wrong.
In the following code I want to jump to the label ‘InstallFiles’, see the line ‘# SEE HERE’:
# the following code is from within a macro
# Check the directory exists
IfFileExists $installDirectory InstallFiles CreateDirThenInstall
CreateDirThenInstall: # this is a label...I think? :P
file $installDirectory
# SEE HERE: HOW DO I call the label 'InstallFiles'?
InstallFiles:
DetailPrint "SetOverwrite on."
SetOverwrite try
SetOutPath "${dir}"
file "Attributes_to_trees_panel.4do"
file "ATTRIBUTES_TO_TREES_PANEL.hlp"
You have nothing to do for going to the
InstallFileslabel from the line belowCreateDirThenInstall: just let the execution reach the following line.You might have misunderstood that labels do not actually declare sub programs, they only put “signs” that can be reached from any flow control instruction (in the current Function or Section) like
StrCmp,IntCmpandGotos. If there are statements above a label and there is no jump orReturnjust before it, the execution continues to the next statement after the label.