NSIS/Docs/src/compiler.but

54 lines
1.8 KiB
Text
Raw Normal View History

\C{comptime} Compile Time Commands
\S0{compcommands} Compiler Utility Commands
These commands are similar to the C preprocessor in terms of purpose and functionality. They allow file inclusion, conditional compilation, executable header packing, and processes execution during the build process. Note: none of these commands allow use of variables.
\S1{include} !include
\c file
This command will include 'file' as if it was part of the original script. Note that if a file is included in another directory, the current directory is still where the script was compiled from (not where the included file resides).
\S1{cd} !cd
\c new_path
This command will change the compiler to the new directory, new_path. new_path can be relative or absolute.
\S1{echo} !echo
\c message
This command will echo a message to the user compiling the script.
\S1{error} !error
\c [message]
This command will issue an error to the script compiler and will stop execution of the script. You can also add a message to this error.
\S1{packhdr} !packhdr
\c tempfile command
This option makes the compiler an external EXE packer (such as Petite or UPX) to compress the executable header. Specify a temporary file name (such as "temp.dat") and a command line (such as "C:\\program files\\upx\\upx -9 temp.dat") to compress the header.
\S1{system} !system
\c command [compare comparevalue]
This command will execute 'command' using a call to system(), and if the return value compared (using 'compare') to 'comparevalue' is false, execution will halt. 'compare' can be '<' or '>' or '<>' or '=' or 'ignore'.
\S1{warning} !warning
\c [message]
This command will issue a warning to the script compiler. You can also add a message to this warning.
\S1{verbose} !verbose
\c level
This command will set the level of verbosity. 4=all, 3=no script, 2=no info, 1=no warnings, 0=none