Little rearranging and new section above relative jumps

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@2145 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
kichik 2003-02-10 18:38:08 +00:00
parent 2f8b6f5c25
commit b85fdf27fe
2 changed files with 21 additions and 1 deletions

View file

@ -1,4 +1,4 @@
bin\halibut.exe config.but intro.but usage.but script.but functions.but callback.but var.but labels.but pages.but attributes.but compilerflags.but sections.but usection.but basic.but registry.but generalpurpose.but flowcontrol.but file.but uninstall.but misc.but string.but stack.but int.but reboot.but log.but sec.but ui.but langs.but plugin.but compiler.but defines.but modernui.but usefulfunc.but history.but credits.but license.but
bin\halibut.exe config.but intro.but usage.but script.but var.but labels.but jumps.but functions.but callback.but pages.but attributes.but compilerflags.but sections.but usection.but basic.but registry.but generalpurpose.but flowcontrol.but file.but uninstall.but misc.but string.but stack.but int.but reboot.but log.but sec.but ui.but langs.but plugin.but compiler.but defines.but modernui.but usefulfunc.but history.but credits.but license.but
@copy Contents.html index.html
@copy index.html IndexPage.html
@copy *.html ..\\

20
Docs/src/jumps.but Normal file
View file

@ -0,0 +1,20 @@
\S0{jumps} Relative Jumps
Unlike labels, relative jumps are, as the name suggests, relative to the place they are called from. You can use relative jumps wherever you can use labels. Relative jumps are marked by numbers. +1 jumps to the next instruction (the default advancement), +2 will skip one instruction and go to the second instruction from the current instruction, -2 will jump two instructions backward, and +10 will skip 9 instructions, jumping to the tenth instruction from the current instruction.
An instruction is every command that is executed at run-time, when the installer is running. MessageBox, Goto, GetDLLVersion, FileRead, SetShellVarContext are all instructions. AddSize, Section, SubSection, SectionEnd, SetOverwrite (and everything under Compiler Flags), Name, SetFont, LangString, are not instructions because they are executed at compile time.
Examples:
\c Goto +2
\c MessageBox MB_OK "You will never ever see this message box"
\c MessageBox MB_OK "The last message was skipped, this one should be shown"
\c Goto +4
\c MessageBox MB_OK "The following message will be skipped"
\c Goto +3
\c MessageBox MB_OK "You will never ever see this message box"
\c Goto -3
\c MessageBox MB_OK "Done"
\\<b\\>Note:\\</b\\> relative jumps don't work with Exch, File, plug-ins (Plugin::Function), InitPluginsDir, GetFileTimeLocal or GetDLLVersionLocal. Do \e{not} try to jump over them using relative jumps, you will not get the result you were expecting.