Documentation fixes and clarifications
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6728 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
2b5baa3639
commit
e7ac6581e4
39 changed files with 315 additions and 429 deletions
|
@ -2,13 +2,13 @@
|
|||
|
||||
\S1{basicinstructions} Basic Instructions
|
||||
|
||||
The instructions that NSIS uses for scripting are sort of a cross between PHP and assembly. There are no real high level language constructs, but the instructions themselves are (for the most part) high level, and you have handy string capability (i.e. you don't have to worry about concatenating strings, etc). You essentially have 25 registers (20 general purpose, 5 special purpose), and a stack.
|
||||
The instructions that NSIS uses for scripting are sort of a cross between PHP and assembly. There are no real high level language constructs but the instructions themselves are (for the most part) high level, and you have handy string capability (i.e. you don't have to worry about concatenating strings, etc). You essentially have 25 registers (20 general purpose, 5 special purpose), and a stack.
|
||||
|
||||
\S2{delete} Delete
|
||||
|
||||
\c [/REBOOTOK] file
|
||||
|
||||
Delete file (which can be a file or wildcard, but should be specified with a full path) from the target system. If /REBOOTOK is specified and the file cannot be deleted then the file is deleted when the system reboots -- if the file will be deleted on a reboot, the reboot flag will be set. The error flag is set if files are found and cannot be deleted. The error flag is not set from trying to delete a file that does not exist.
|
||||
Delete file (which can be a file or wildcard, but should be specified with a full path) from the target system. If /REBOOTOK is specified and the file cannot be deleted then the file is deleted when the system reboots -- if the file will be deleted on a reboot, the reboot flag will be set. The error flag is set if files are found and cannot be deleted. The error flag is not set when trying to delete a file that does not exist.
|
||||
|
||||
\c Delete $INSTDIR\somefile.dat
|
||||
|
||||
|
@ -16,7 +16,7 @@ Delete file (which can be a file or wildcard, but should be specified with a ful
|
|||
|
||||
\c command
|
||||
|
||||
Execute the specified program and continue immediately. Note that the file specified must exist on the target system, not the compiling system. $OUTDIR is used for the working directory. The error flag is set if the process could not be launched. Note, if the command could have spaces, you should put it in quotes to delimit it from parameters. e.g.: Exec '"$INSTDIR\\command.exe" parameters'. If you don't put it in quotes it will \e{not} work on Windows 9x with or without parameters.
|
||||
Execute the specified program and continue immediately. Note that the file specified must exist on the target system, not the compiling system. $OUTDIR is used as the working directory. The error flag is set if the process could not be launched. Note, if the command could have spaces, you should put it in quotes to delimit it from parameters. e.g.: Exec '"$INSTDIR\\command.exe" parameters'. If you don't put it in quotes it will \e{not} work on Windows 9x with or without parameters.
|
||||
|
||||
\c Exec '"$INSTDIR\someprogram.exe"'
|
||||
\c Exec '"$INSTDIR\someprogram.exe" some parameters'
|
||||
|
@ -25,7 +25,7 @@ Execute the specified program and continue immediately. Note that the file speci
|
|||
|
||||
\c action command [parameters] [SW_SHOWDEFAULT | SW_SHOWNORMAL | SW_SHOWMAXIMIZED | SW_SHOWMINIMIZED | SW_HIDE]
|
||||
|
||||
Execute the specified program using ShellExecute. Note that action is usually "open", "print", etc, but can be an empty string to use the default action. Parameters and the show type are optional. $OUTDIR is used for the working directory. The error flag is set if the process could not be launched.
|
||||
Execute the specified program using ShellExecute. Note that action is usually "open", "print", etc, but can be an empty string to use the default action. Parameters and the show type are optional. $OUTDIR is used as the working directory. The error flag is set if the process could not be launched.
|
||||
|
||||
\c ExecShell "open" "http://nsis.sf.net/"
|
||||
\c ExecShell "open" "$INSTDIR\readme.txt"
|
||||
|
@ -53,9 +53,9 @@ Adds file(s) to be extracted to the current output path ($OUTDIR).
|
|||
|
||||
\b Wildcards are supported.
|
||||
|
||||
\b If the /r switch is used, matching files and directories are recursively searched for in subdirectories. If just one path segment is specified (e.g. \c{File /r something}), the current directory will be recursively searched. If more than one segment is specified (e.g. \c{File /r something\\*.*}), the last path segment will be used as the matching condition and the rest for the directory to search recursively. If a directory name matches, all of its contents is added recursively. Directory structure is preserved.
|
||||
\b If the /r switch is used, matching files and directories are recursively searched for in subdirectories. If just one path segment is specified (e.g. \c{File /r something}), the current directory will be recursively searched. If more than one segment is specified (e.g. \c{File /r something\\*.*}), the last path segment will be used as the matching condition and anything before it specifies which directory to search recursively. If a directory name matches, all of its contents is added recursively. Directory structure is preserved.
|
||||
|
||||
\b Use the /x switch to exclude files or directories.
|
||||
\b Use the /x switch to exclude files and directories.
|
||||
|
||||
\b If the /a switch is used, the attributes of the file(s) added will be preserved.
|
||||
|
||||
|
@ -92,7 +92,7 @@ with the following \e{File} usage:
|
|||
|
||||
\c File /r something
|
||||
|
||||
will match the directory named \e{something} on the root directory, the file named \e{something} in the directory named \e{dir} and the directory named \e{something} in the directory named \e{another}. To match only the directory named \e{something} on the root directory, use the following:
|
||||
will match the directory named \e{something} in the root directory, the file named \e{something} in the directory named \e{dir} and the directory named \e{something} in the directory named \e{another}. To match only the directory named \e{something} in the root directory, use the following:
|
||||
|
||||
\c File /r something\*.*
|
||||
|
||||
|
@ -122,7 +122,7 @@ See \R{file}{File} for more information about the parameters.
|
|||
|
||||
\c [/r] [/REBOOTOK] directory_name
|
||||
|
||||
Remove the specified directory (fully qualified path with no wildcards). Without /r, the directory will only be removed if it is completely empty. If /r is specified, the directory will be removed recursively, so all directories and files in the specified directory will be removed. If /REBOOTOK is specified, any file or directory which could not have been removed during the process will be removed on reboot -- if any file or directory will be removed on a reboot, the reboot flag will be set. The error flag is set if any file or directory cannot be removed.
|
||||
Remove the specified directory (fully qualified path with no wildcards). Without /r, the directory will only be removed if it is completely empty. If /r is specified the directory will be removed recursively, so all directories and files in the specified directory will be removed. If /REBOOTOK is specified, any file or directory which could not be removed during the process will be removed on reboot -- if any file or directory will be removed on a reboot, the reboot flag will be set. The error flag is set if any file or directory cannot be removed.
|
||||
|
||||
\c RMDir $INSTDIR
|
||||
\c RMDir $INSTDIR\data
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue