Changed Conditional Compilation docs to default style
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@2429 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
ab4a933943
commit
bd99b6d7dc
1 changed files with 24 additions and 10 deletions
|
@ -8,38 +8,52 @@ If symbol2 is defined when that line occurs, it will be replaced. Otherwise, any
|
|||
|
||||
Define/conditional compilation related commands:
|
||||
|
||||
\e{!define gflag [value]}
|
||||
\S1{define} !define
|
||||
|
||||
\c gflag [value]
|
||||
|
||||
This command will add 'gflag' to the global define list. This will have a similar effect as using the /D switch on the command line (only the define only becomes effective after the !define command).
|
||||
|
||||
\e{!ifdef gflag [bcheck [gflag [...]]]}
|
||||
\S1{ifdef} !ifdef
|
||||
|
||||
\c gflag [bcheck [gflag [...]]]
|
||||
|
||||
This command, when paired with an !endif command, will tell the compiler whether or not to compile the lines in between the two lines. If gflag is globally defined (using !define or the /D switch), then the contained lines will be compiled. Otherwise, they will be skipped. 'bcheck' can be specified as & (boolean and) or | (boolean or) along with more gflags -- precedence is simple, left to right.
|
||||
|
||||
\e{!ifndef gflag [bcheck [gflag [...]]]}
|
||||
\S1{ifndef} !ifndef
|
||||
|
||||
\c gflag [bcheck [gflag [...]]]
|
||||
|
||||
This command is the logical lovemonkey to !ifdef and !endif. !ifdef/!else/!endif, !ifdef/!else ifdef/!endif, !ifdef/!else ifdef/!else ifndef/!endif, etc. If ifdef or ifndef is specified as the first parameter, it behaves as expected.
|
||||
|
||||
\e{!else [ifdef|ifndef [...]]}
|
||||
\S1{else} !else
|
||||
|
||||
\c [ifdef|ifndef [...]]
|
||||
|
||||
This command is the opposite of !ifdef (If 'gflag' is not globally defined, the lines contained will be compiled). Note that when using boolean operators (& or |), 'gflag' is treated as true if it is undefined. e.g. '!ifndef X | Y' means "if either X or Y is undefined" and '!ifndef X & Y' means "if X and Y are both undefined".
|
||||
|
||||
\e{!endif}
|
||||
\S1{endif} !endif
|
||||
|
||||
This command closes a block started with !ifdef or !ifndef.
|
||||
|
||||
\e{!insertmacro macro_name [parameter] [...]}
|
||||
\S1{insertmacro} !insertmacro
|
||||
|
||||
\c !insertmacro macro_name [parameter] [...]
|
||||
|
||||
Inserts the contents of a macro that was created with !macro. If the macro was created with parameters, then you must pass as many parameters to the macro as it requires.
|
||||
|
||||
\e{!macro macro_name [parameter][...]}
|
||||
\S1{macro} !macro
|
||||
|
||||
\c !macro macro_name [parameter][...]
|
||||
|
||||
Creates a macro named 'macro_name'. All lines between the !macro and the !macroend will be saved. To insert the macro later on, use !insertmacro. !macro definitions can have one or more parameters defined. The parameters may be accessed the same way a !define would (e.g. $\{PARMNAME\}) from inside the macro.
|
||||
|
||||
\e{!macroend}
|
||||
\S1{macroend} !macroend
|
||||
|
||||
Ends a macro that was started with !macro.
|
||||
|
||||
\e{!undef gflag}
|
||||
\S1{undef} !undef
|
||||
|
||||
Removes an item from the global define list. Note that $\{SYMBOL\} where SYMBOL is undefined will be translated to "$\{SYMBOL\}".
|
||||
\c !undef gflag
|
||||
|
||||
Removes an item from the global define list. Note that $\{SYMBOL\} where SYMBOL is undefined will be translated to "$\{SYMBOL\}".
|
Loading…
Add table
Add a link
Reference in a new issue