Updated RMDIR command Syntax, added internal Referencies, rearanged order of some commands (by letter), new css file (no underlines for links)

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@2393 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
flizebogen 2003-03-29 17:33:48 +00:00
parent 4df5cb4fac
commit 8bf38c08ba
11 changed files with 72 additions and 70 deletions

View file

@ -112,6 +112,12 @@ Specifies a string that is above the directory selection area. If this command i
Replaces the default text that comes up when a file cannot be written to. This string can contain a reference to $0, which is the filename ($0 is temporarily changed to this value). Example: "Can not write to file $\\r$\\n$0$\\r$\\ngood luck, bitch.".
\S2{aicon} Icon
\c [path\]icon.ico
Sets the icon of the installer. Every icon in the icon file will be included in the installer. Note that if you use different icons for installer and uninstaller the file size and structure of the icons has to match otherwise the build of your installer will fail.
\S2{ainstallbuttontext} InstallButtonText
\c [/LANG=lang_id] install button text
@ -162,18 +168,18 @@ Specifies a text file or a RTF file to use for the license that the user can rea
If you make your license file a RTF file it is recommended you edit it with WordPad and not MS Word. Using WordPad will result in a much smaller file.
\S2{alicensetext} LicenseText
\c [[/LANG=lang_id] text [button_text]]
Specifies a string that is above the license text. Omit this to not have a license displayed. If button_text is specified, it will override the default button text of "I Agree".
\S2{alicenseforceselection} LicenseForceSelection
\c [/LANG=lang_id] (checkbox [accept_text] | radiobuttons [accept_text] [decline_text] | \\<b\\>off\\</b\\>)
Specifies if the displayed license must be accept explicit or not. This can be done either by a checkbox or by radiobuttons. By default the "next button" is disabled and will only be enabled if the checkbox is enabled or the right radio button is selected. If off is specified the "next button" is enabled by default.
\S2{alicensetext} LicenseText
\c [[/LANG=lang_id] text [button_text]]
Specifies a string that is above the license text. Omit this to not have a license displayed. If button_text is specified, it will override the default button text of "I Agree".
\S2{amiscbuttontext} MiscButtonText
\c [[/LANG=lang_id] back button text [next button text] [cancel button text] [close button text]]
@ -186,12 +192,6 @@ Replaces the default text strings for the four buttons (< Back, Next >, Cancel a
Sets the name of the installer. The name is usually simply the product name such as 'MyApp' or 'CrapSoft MyApp'.
\S2{aicon} Icon
\c [path\]icon.ico
Sets the icon of the installer. Every icon in the icon file will be included in the installer. Note that if you use different icons for installer and uninstaller the file size and structure of the icons has to match otherwise the build of your installer will fail.
\S2{aoutfile} OutFile
\c [path\]install.exe

View file

@ -10,6 +10,24 @@ The instructions that NSIS uses for scripting are sort of a cross between PHP an
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.
\S2{exec} Exec
\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.
\S2{execshell} ExecShell
\c action command [parameters] [SW_SHOWNORMAL | SW_SHOWMAXIMIZED | SW_SHOWMINIMIZED]
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.
\S2{execwait} ExecWait
\c command [user_var(exit code)]
Execute the specified program and wait for the executed process to quit. See Exec for more information. If no output variable is specified ExecWait sets the error flag if the program executed returns a nonzero error code, or if there is an error. If an output variable is specified, ExecWait sets the variable with the exit code (and only sets the error flag if an error occurs; if an error occurs the contents of the user variable are undefined). Note, if the command could have spaces, you should put it in quotes to delimit it from parameters. e.g.: ExecWait '"$INSTDIR\\command.exe" parameters'. If you don't put it in quotes it will \e{not} work on Windows 9x with or without parameters.
\S2{file} File
\c [/nonfatal] [/a] ([/r] (file|wildcard) [...] | /oname=file.dat infile.dat)
@ -30,36 +48,12 @@ Adds file(s) to be extracted to the current output path ($OUTDIR).
\b If the /nonfatal switch is used, a warning will be issued if no files found instead of an error.
\S2{exec} Exec
\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.
\S2{execshell} ExecShell
\c action command [parameters] [SW_SHOWNORMAL | SW_SHOWMAXIMIZED | SW_SHOWMINIMIZED]
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.
\S2{execwait} ExecWait
\c command [user_var(exit code)]
Execute the specified program and wait for the executed process to quit. See Exec for more information. If no output variable is specified ExecWait sets the error flag if the program executed returns a nonzero error code, or if there is an error. If an output variable is specified, ExecWait sets the variable with the exit code (and only sets the error flag if an error occurs; if an error occurs the contents of the user variable are undefined). Note, if the command could have spaces, you should put it in quotes to delimit it from parameters. e.g.: ExecWait '"$INSTDIR\\command.exe" parameters'. If you don't put it in quotes it will \e{not} work on Windows 9x with or without parameters.
\S2{rename} Rename
\c [/REBOOTOK] source_file dest_file
Rename source_file to dest_file. Functions just like the Win32 API MoveFile, which means you can move a file from anywhere on the system to anywhere else, and you can move a directory to somewhere else on the same drive. If /REBOOTOK is specified, and the file cannot be overwritten, then the file is moved when the system reboots -- if the file will be moved on a reboot, the reboot flag will be set. The error flag is set if the file cannot be renamed (and /REBOOTOK is not used) or if the source file does not exist.
\S2{rmdir} RMDir
\c [/r] directory
Remove the specified directory (which should be a full path). 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. The error flag is set if the directory cannot be removed.
\S2{reservefile} ReserveFile
\c [/nonfatal] [/r] file [file...]
@ -68,8 +62,14 @@ Reserves a file in the data block for later use. As files are added in the order
See \R{file}{File} for more information about the parameters.
\S2{rmdir} RMDir
\c [/r|/REBOOTOK] directory_name
Remove the specified directory (which should be a full path). 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, and the directory cannot be overwritten, then the directory will be deleted when the system reboots -- if the directory will be removed on a reboot, the reboot flag will be set. The error flag is set if the directory cannot be removed.
\S2{setoutpath} SetOutPath
\c outpath
Sets the output path ($OUTDIR) and creates it (recursively if necessary), if it does not exist. Must be a full pathname, usually is just $INSTDIR (you can specify $INSTDIR if you are lazy with a single "-").
Sets the output path ($OUTDIR) and creates it (recursively if necessary), if it does not exist. Must be a full pathname, usually is just $INSTDIR (you can specify $INSTDIR if you are lazy with a single "-").

View file

@ -22,7 +22,7 @@ Example:
\S3{oninit} .onInit
This callback will be called when the installer is nearly finished initializing. If the '.onInit' function calls Abort, the installer will quit instantly.
This callback will be called when the installer is nearly finished initializing. If the '.onInit' function calls \R{abort}{Abort}, the installer will quit instantly.
Here are two examples of how this might be used:
@ -44,7 +44,7 @@ or:
\S3{oninstfailed} .onInstFailed
This callback is called when the user hits the 'cancel' button after the install has failed (if it could not extract a file, or the install script used the Abort command).
This callback is called when the user hits the 'cancel' button after the install has failed (if it could not extract a file, or the install script used the \R{abort}{Abort} command).
Example:
@ -54,7 +54,7 @@ Example:
\S3{oninstsuccess} .onInstSuccess
This callback is called when the install was successful, right before the install window closes (which may be after the user clicks 'Close' if AutoCloseWindow is set to false).
This callback is called when the install was successful, right before the install window closes (which may be after the user clicks 'Close' if \R{aautoclosewindow}{AutoCloseWindow} is set to false).
Example:
@ -83,11 +83,11 @@ Example:
\S3{onselchange} .onSelChange
Called when the selection changes on the component page. Useful for using with SectionSetFlags and SectionGetFlags.
Called when the selection changes on the \R{pages}{component page}. Useful for using with \R{sectionsetflags}{SectionSetFlags} and \R{sectiongetflags}{SectionGetFlags}.
\S3{onuserabort} .onUserAbort
This callback is called when the user hits the 'cancel' button, and the install hasn't already failed. If this function calls Abort, the install will not be aborted.
This callback is called when the user hits the 'cancel' button, and the install hasn't already failed. If this function calls \R{abort}{Abort}, the install will not be aborted.
Example:
@ -99,7 +99,7 @@ Example:
\S3{onverifyinstdir} .onVerifyInstDir
This callback enables control over whether or not an installation path is valid for your installer. This code will be called every time the user changes the install directory, so it shouldn't do anything crazy with MessageBox or the likes. If this function calls Abort, the installation path in $INSTDIR is deemed invalid.
This callback enables control over whether or not an installation path is valid for your installer. This code will be called every time the user changes the install directory, so it shouldn't do anything crazy with \R{messagebox}{MessageBox} or the likes. If this function calls \R{abort}{Abort}, the installation path in $INSTDIR is deemed invalid.
Example:
@ -140,7 +140,7 @@ or:
\S3{unonuninstfailed} un.onUninstFailed
This callback is called when the user hits the 'cancel' button after the uninstall has failed (if it used the Abort command or otherwise failed).
This callback is called when the user hits the 'cancel' button after the uninstall has failed (if it used the \R{abort}{Abort command} or otherwise failed).
Example:
@ -150,7 +150,7 @@ Example:
\S3{unonuninstsuccess} un.onUninstSuccess
This callback is called when the uninstall was successful, right before the install window closes (which may be after the user clicks 'Close' if AutoCloseWindow is set to false).
This callback is called when the uninstall was successful, right before the install window closes (which may be after the user clicks 'Close' if \R{aautoclosewindow}{AutoCloseWindow} is set to false).
Example:
@ -168,4 +168,4 @@ Example:
\c MessageBox MB_YESNO "Abort uninstall?" IDYES NoCancelAbort
\c Abort ; causes uninstaller to not quit.
\c NoCancelAbort:
\c FunctionEnd
\c FunctionEnd

View file

@ -2,9 +2,11 @@
\e{v2.0b4}
\b Added \R{rmdir}{RMDir /REBOOTOK}
\b Controls can be transparent using \R{setbkcolor}{SetBkColor}
\b Added LicenseForceSelection
\b Added \R{alicenseforceselection}{LicenseForceSelection}
\e{v2.0b3}

View file

@ -2,7 +2,7 @@
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.
An instruction is every command that is executed at run-time, when the installer is running. \R{messagebox}{MessageBox}, \R{goto}{Goto}, \R{getdllversion}{GetDLLVersion}, \R{FileRead}{FileRead}, \R{setshellvarcontext}{SetShellVarContext} are all instructions. \R{saddsize}{AddSize}, \R{ssection}{Section}, \R{ssubsection}{SubSection}, \R{ssectionend}{SectionEnd}, \R{asetoverwrite}{SetOverwrite} (and everything under \R{flags}{Compiler Flags}), \R{aname}{Name}, \R{asetfont}{SetFont}, \R{langstring}{LangString}, are not instructions because they are executed at compile time.
Examples:
@ -17,4 +17,4 @@ Examples:
\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.
\\<b\\>Note:\\</b\\> relative jumps don't work with \R{Exch}{Exch}, \R{file}{File}, \R{plugindlls}{plug-ins (Plugin::Function)}, \R{initpluginsdir}{InitPluginsDir}, \R{getfiletimelocal}{GetFileTimeLocal} or \R{getdllversionlocal}{GetDLLVersionLocal}. Do \e{not} try to jump over them using relative jumps, you will not get the result you were expecting.

View file

@ -1,8 +1,8 @@
\S0{labels} Labels
Labels are the targets of Goto instructions, or of the various branching instructions (such as IfErrors, MessageBox, IfFileExists, and StrCmp). Labels must be within a Section or a Function. Labels are local in scope, meaning they are only accessible from within the Section or Function that they reside in.
Labels are the targets of Goto instructions, or of the various branching instructions (such as \R{iferrors}{IfErrors}, \R{messagebox}{MessageBox}, \R{iffileexists}{IfFileExists}, and \R{strcmp}{StrCmp}). Labels must be within a Section or a Function. Labels are local in scope, meaning they are only accessible from within the Section or Function that they reside in.
To declare a label, simply do:
\e{MyLabel:}
Labels cannot begin with a -, +, !, $, or 0-9. When specifying labels for the various instructions that require them, remember that both an empty string ("") and 0 both represent the next instruction (meaning no Goto will occur). Labels beginning with a period (.) are global, meaning you can jump to them from any function or section (though you cannot jump to an uninstall global label from the installer, and vice versa).
Labels cannot begin with a -, +, !, $, or 0-9. When specifying labels for the various instructions that require them, remember that both an empty string ("") and 0 both represent the next instruction (meaning no Goto will occur). Labels beginning with a period (.) are global, meaning you can jump to them from any function or section (though you cannot jump to an uninstall global label from the installer, and vice versa).

View file

@ -1,6 +1,6 @@
\H{pages} Pages
Each (non-silent) NSIS installer has a set of pages. Each page can be a NSIS built-in page or a custom page created by a user's function (with InstallOptions for example).
Each (non-silent) NSIS installer has a set of pages. Each page can be a NSIS built-in page or a custom page created by a user's function (with \W{../contrib/Installoptions/readme.html}{InstallOptions} for example).
\S{pageoreder} Ordering
@ -15,9 +15,9 @@ This code will show the license page, then the components selection page, then t
You can specify the same page type more than once, just make sure you know what you are doing.
Please note that you must still use LicenseText and LicenseData for the license page to show, ComponentText for the components selection page to show and DirText for the directory page to show.
Please note that you must still use \R{alicensetext}{LicenseText} and \R{alicensedata}{LicenseData} for the license page to show, \R{acomponenttext}{ComponentText} for the components selection page to show and \R{adirtext}{DirText} for the directory page to show.
If you don't use any Page command the installer pages order will be just as in older version: license (if LicenseText and LicenseData were specified), components (if ComponentText was specified and there is more than one visible section), directory (if DirText was specified), instfiles.
If you don't use any Page command the installer pages order will be just as in older version: license (if \R{alicensetext}{LicenseText} and \R{alicensedata}{LicenseData} were specified), components (if \R{acomponenttext}{ComponentText} was specified and there is more than one visible section), directory (if \R{adirtext}{DirText} was specified), instfiles.
\S{pagecallbacks} Callbacks

View file

@ -20,7 +20,7 @@ Tells the installer that the current section needs an additional "size_kb" kilob
\c [/e] [section_name] [section index output]
Begins and opens a new section. If section_name is empty, omitted, or begins with a -, then it is a required section and the user will not see it, nor have the option of disabling it. If the section name is 'Uninstall', then it is a special Uninstall Section. If section index output is specified, the parameter will be !defined with the section index (that can be used for SectionSetText etc). If the section name begins with a !, the section will be displayed as bold. If /e is present, the sub sections of the section will be expanded by default.
Begins and opens a new section. If section_name is empty, omitted, or begins with a -, then it is a required section and the user will not see it, nor have the option of disabling it. If the section name is 'Uninstall', then it is a special Uninstall Section. If section index output is specified, the parameter will be !defined with the section index (that can be used for \R{sectionsettext}{SectionSetText} etc). If the section name begins with a !, the section will be displayed as bold. If /e is present, the sub sections of the section will be expanded by default.
\S2{ssectionend} SectionEnd

View file

@ -9,4 +9,4 @@ A special Section named 'Uninstall' must be created in order to generate an unin
\c DeleteRegKey HKLM SOFTWARE\myApp
\c SectionEnd
The first Delete instruction works (deleting the uninstaller), because the uninstaller is transparently copied to the system temporary directory for the uninstall.
The first \R{delete}{Delete} instruction works (deleting the uninstaller), because the uninstaller is transparently copied to the system temporary directory for the uninstall.

View file

@ -10,11 +10,11 @@ The installation directory ($INSTDIR is modifiable using \R{StrCpy}{StrCpy}, \R{
\e{$OUTDIR}
The current output directory (set implicitly via SetOutPath or explicitly via StrCpy, ReadRegStr, ReadINIStr, etc)
The current output directory (set implicitly via \R{setoutpath}{SetOutPath} or explicitly via \R{StrCpy}{StrCpy}, \R{readregstr}{ReadRegStr}, \R{readinistr}{ReadINIStr}, etc)
\e{$0, $1, $2, $3, $4, $5, $6, $7, $8, $9, $R0, $R1, $R2, $R3, $R4, $R5, $R6, $R7, $R8, $R9}
User variables (set via StrCpy, ReadRegStr, ReadINIStr, etc, and use like any other variable). It is recommended (but not required) that you use $R1-$R9 as local registers, and $0-$9 as global values. Note that any function that lets you specify one of these variables as an output, can use $INSTDIR or $OUTDIR as well (but has different implications).
User variables (set via \R{StrCpy}{StrCpy}, \R{readregstr}{ReadRegStr}, \R{readinistr}{ReadINIStr}, etc, and use like any other variable). It is recommended (but not required) that you use $R1-$R9 as local registers, and $0-$9 as global values. Note that any function that lets you specify one of these variables as an output, can use $INSTDIR or $OUTDIR as well (but has different implications).
\e{$CMDLINE}
@ -38,7 +38,7 @@ The program files directory (usually C:\\Program Files but detected at runtime).
\e{$DESKTOP}
The windows desktop directory (usually C:\\windows\\desktop but detected at runtime). The context of this variable (All Users or Current user) depends on the SetShellVarContext setting. The default is the current user.
The windows desktop directory (usually C:\\windows\\desktop but detected at runtime). The context of this variable (All Users or Current user) depends on the \R{setshellvarcontext}{SetShellVarContext} setting. The default is the current user.
\e{$EXEDIR}
@ -62,19 +62,19 @@ The system temporary directory (usually C:\\windows\\temp but detected at runtim
\e{$STARTMENU}
The start menu folder (useful in adding start menu items using CreateShortCut). The context of this variable (All Users or Current user) depends on the SetShellVarContext setting. The default is the current user.
The start menu folder (useful in adding start menu items using \R{createshortcut}{CreateShortCut}). The context of this variable (All Users or Current user) depends on the \R{setshellvarcontext}{SetShellVarContext} setting. The default is the current user.
\e{$SMPROGRAMS}
The start menu programs folder (use this whenever you want $STARTMENU\\Programs). The context of this variable (All Users or Current user) depends on the SetShellVarContext setting. The default is the current user.
The start menu programs folder (use this whenever you want $STARTMENU\\Programs). The context of this variable (All Users or Current user) depends on the \R{setshellvarcontext}{SetShellVarContext} setting. The default is the current user.
\e{$SMSTARTUP}
The start menu programs / startup folder. The context of this variable (All Users or Current user) depends on the SetShellVarContext setting. The default is the current user.
The start menu programs / startup folder. The context of this variable (All Users or Current user) depends on the \R{setshellvarcontext}{SetShellVarContext} setting. The default is the current user.
\e{$QUICKLAUNCH}
The quick launch folder for IE4 active desktop and above. If quick launch is not available, simply returns the same as $TEMP. The context of this variable (All Users or Current user) depends on the SetShellVarContext setting. The default is the current user.
The quick launch folder for IE4 active desktop and above. If quick launch is not available, simply returns the same as $TEMP. The context of this variable (All Users or Current user) depends on the \R{setshellvarcontext}{SetShellVarContext} setting. The default is the current user.
\e{$HWNDPARENT}
@ -82,7 +82,7 @@ The decimal HWND of the parent window.
\e{$PLUGINSDIR}
The path to a temporary folder created upon the first usage of a plugin or a call to \R{initpluginsdir}{InitPluginsDir}. This folder is automatically deleted when the installer exits. This makes this folder the ideal folder to hold INI files for InstallOptions, bitmaps for the splash plugin, or any other file that a plugin needs to work.
The path to a temporary folder created upon the first usage of a plugin or a call to \R{initpluginsdir}{InitPluginsDir}. This folder is automatically deleted when the installer exits. This makes this folder the ideal folder to hold INI files for \W{../Contrib/InstallOptions/Readme.html}{InstallOptions}, bitmaps for the splash plugin, or any other file that a plugin needs to work.
\e{$$}

View file

@ -8,17 +8,17 @@ pre {
padding: 1px;
}
a,a:visisted {
color: #656CA3;
text-decoration: underline;
color: #7A7272;
text-decoration: none;
}
a:hover {
background-color: #656CA3;
color: #FFFFFF;
text-decoration: none;
background-color: #F4F4F4;
color: #303030;
text-decoration: underline;
}
.btitle {
color: #000000;
text-decoration: underline;
text-decoration: none;
}
.btitle:hover {
background-color: #F4F4F4;