Features list updated, some links added and command parameters are now shown alone with a light background behind them.
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@1476 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
2bb6c55b0f
commit
41a03f754c
24 changed files with 497 additions and 464 deletions
|
@ -4,43 +4,43 @@ The commands below all adjust attributes of the installer. These attributes cont
|
|||
|
||||
\H{aaddbrandingimage} AddBrandingImage
|
||||
|
||||
AddBrandingImage \e{(left|top) (width|height)}
|
||||
\c (left|top) (width|height)
|
||||
|
||||
Adds a branding image on the top of the installer or on the left. Its size will be set according to the width/height sepcified, the installer width/height and the installer font. Because this depends on the installer font, you should put SetFont before AddBrandingImage.
|
||||
|
||||
\H{aallowrootdirinstall} AllowRootDirInstall
|
||||
|
||||
AllowRootDirInstall \e{true|false}
|
||||
\c true|false
|
||||
|
||||
Controls whether or not installs are enabled to the root directory of a drive, or directly into a network share. Set to 'true' to change the default (safe) behavior, which prevents users from selecting C:\\ or \\\\Herver\\Hhare as an install (and lataer on, uninstall) directory. For additional directory selection page customizability, see .onVerifyInstDir
|
||||
|
||||
\H{aautoclosewindow} AutoCloseWindow
|
||||
|
||||
AutoCloseWindow \e{true|false}
|
||||
\c true|false
|
||||
|
||||
Sets whether or not the install window automatically closes when completed. Can be 'false' or 'true'. This is overrideable from a section using SetAutoClose.
|
||||
|
||||
\H{abggradient} BGGradient
|
||||
|
||||
BGGradient \e{[off]|[topc botc [textcolor|notext]]}
|
||||
\c [off]|[topc botc [textcolor|notext]]
|
||||
|
||||
Specifies whether or not to use a gradient background window. If 'off', the installer will not show a background window, if no parameters are specified, the default black to blue gradient is used, and otherwise the top_color or bottom_color are used to make a gradient. Top_color and bottom_color are specified using the form RRGGBB (in hexadecimal, as in HTML, only minus the leading '#', since # can be used for comments). 'textcolor' can be specified as well, or 'notext' can be specified to turn the big background text off.
|
||||
|
||||
\H{abrandingtext} BrandingText
|
||||
|
||||
BrandingText \e{[/LANG=lang_id] /TRIM(LEFT|RIGHT|CENTER) text}
|
||||
\c [/LANG=lang_id] /TRIM(LEFT|RIGHT|CENTER) text
|
||||
|
||||
Sets the text that is shown (by default it is 'Nullsoft Install System vX.XX') in the bottom of the install window. Setting this to an empty string ("") uses the default; to set the string to blank, use " " (a space). If it doesn't matter to you, leave it the default so that everybody can know why the installer didn't suck. heh. Use /TRIMLEFT, /TRIMRIGHT or /TRIMCENTER to trim down the size of the control to the size of the string.
|
||||
|
||||
\H{acaption} Caption
|
||||
|
||||
Caption \e{[/LANG=lang_id] caption}
|
||||
\c [/LANG=lang_id] caption
|
||||
|
||||
Sets what the titlebars of the installer will display. By default, it is 'Name Setup', where Name is specified with the Name command (See \k{aname}). You can, however, override it with 'MyApp Installer' or whatever. If you specify an empty string (""), the default will be used (you can however specify " " to achieve a blank string)
|
||||
|
||||
\H{achangeui} ChangeUI
|
||||
|
||||
ChangeUI \e{dialog ui_file.exe}
|
||||
\c dialog ui_file.exe
|
||||
|
||||
Replaces dialog (\e{IDD_LICENSE}, \e{IDD_DIR}, \e{IDD_SELCOM}, \e{IDD_INST}, \e{IDD_INSTFILES} or \e{IDD_UNINST}) by a dialog with the same resource ID in ui_file.exe. You can also specifiy 'all' as the dialog if you wish to load replace all 6 of the dialogs at once from the same UI file. For some example UIs look at Contrib\\UIs under your NSIS directory.
|
||||
|
||||
|
@ -60,217 +60,217 @@ Replaces dialog (\e{IDD_LICENSE}, \e{IDD_DIR}, \e{IDD_SELCOM}, \e{IDD_INST}, \e{
|
|||
|
||||
\H{acompletedtext} CompletedText
|
||||
|
||||
CompletedText \e{[/LANG=lang_id] [Completed text]}
|
||||
\c [/LANG=lang_id] [Completed text]
|
||||
|
||||
Replaces the default text ("Completed") that is printed at the end of the install if parameter is specified. Otherwise, the default is used.
|
||||
|
||||
\H{acomponenttext} ComponentText
|
||||
|
||||
ComponentText \e{[/LANG=lang_id] [text] [subtext] [subtext2]}
|
||||
\c [/LANG=lang_id] [text] [subtext] [subtext2]
|
||||
|
||||
Specifies a string that is above the component list. This can be something that notifies the user what it is they are actually installing. Note that if no parameter is specified, or if the ComponentText command is omitted, then the component page will not be visible, and all of the sections will be installed. Note: if text is specified and non-empty and you leave subtext or subtext2 empty, the defaults will be used (to set one to blank, use a string like " "). empty strings mean default on subtext and subtext2. Likewise, if you wish to enable the component page, but don't want any text on the top line, set text to " ".
|
||||
|
||||
\H{acrccheck} CRCCheck
|
||||
|
||||
CRCCheck \e{on|off|force}
|
||||
\c on|off|force
|
||||
|
||||
Specifies whether or not the installer will perform a CRC on itself before allowing an install. Valid options are 'on','off', and 'force'. Note that if the user uses /NCRC on the command line when executing the installer, and you didn't specify 'force', the CRC will not occur, and the user will be allowed to install a (potentially) corrupted installer.
|
||||
|
||||
\H{adetailsbuttontext} DetailsButtonText
|
||||
|
||||
DetailsButtonText \e{[/LANG=lang_id] [show details text]}
|
||||
\c [/LANG=lang_id] [show details text]
|
||||
|
||||
Replaces the default details button text of "Show details", if parameter is specified (otherwise the default is used).
|
||||
|
||||
\H{adirshow} DirShow
|
||||
|
||||
DirShow \e{show|hide}
|
||||
\c show|hide
|
||||
|
||||
Specifies whether or not the user will see the directory selection page. Note that if 'hide' is specified, the installer will still check the validity of the installation path (using internal logic and .onVerifyInstDir if it is declared). If the path is deemed invalid, the directory page will be shown. To completely disable the Directory page (and install without prompting, even if a valid installation path is not available), specify DirText with no parameter (this might be useful if the installer installs everything into $SYSDIR or something like that).
|
||||
|
||||
\H{adirtext} DirText
|
||||
|
||||
DirText \e{[/LANG=lang_id] [text] [subtext] [browse text]}
|
||||
\c [/LANG=lang_id] [text] [subtext] [browse text]
|
||||
|
||||
Specifies a string that is above the directory selection area. If this command is not specified, or no parameter is specified, then the directory page is never visible to the user (even if DirShow show is specified). If subtext is specified and not empty, it overrides the default text above the path entry box ("Select the directory to install MyApp in:"). If browse button text is specified but not empty, it overrides the default browse button text ("Browse...").
|
||||
|
||||
\H{a} FileErrorText
|
||||
|
||||
FileErrorText \e{[/LANG=lang_id] [file error text]}
|
||||
\c [/LANG=lang_id] [file error text]
|
||||
|
||||
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.".
|
||||
|
||||
\H{ainstallbuttontext} InstallButtonText
|
||||
|
||||
InstallButtonText \e{[/LANG=lang_id] [install button text]}
|
||||
\c [/LANG=lang_id] [install button text]
|
||||
|
||||
If parameter is specified, overrides the default install button text (of "Install") with the specified text.
|
||||
|
||||
\H{ainstallcolors} InstallColors
|
||||
|
||||
InstallColors \e{/windows | foreground background}
|
||||
\c /windows | foreground background
|
||||
|
||||
Sets the colors to use for the install info screen (the default is 00FF00 000000. Use the form RRGGBB (in hexadecimal, as in HTML, only minus the leading '#', since # can be used for comments). Note that if "/windows" is specified as the only parameter, the default windows colors will be used.
|
||||
|
||||
\H{ainstalldir} InstallDir
|
||||
|
||||
InstallDir \e{definstdir}
|
||||
\c definstdir
|
||||
|
||||
Sets the default installation directory is. See the variables section for variables that can be used to make this string (especially $PROGRAMFILES). Note that the part of this string following the last \\ will be used if the user selects 'browse', and may be appended back on to the string at install time (to disable this, end the directory with a \\ (which will require the entire parameter to be enclosed with quotes)). If this doesn't make any sense, play around with the browse button a bit.
|
||||
|
||||
\H{ainstalldirregkey} InstallDirRegKey
|
||||
|
||||
InstallDirRegKey \e{root_key subkey key_name}
|
||||
\c root_key subkey key_name
|
||||
|
||||
This attribute tells the installer to check a string in the registry, and use it for the install dir if that string is valid. If this attribute is present, it will override the InstallDir attribute if the registry key is valid, otherwise it will fall back to the InstallDir default. When querying the registry, this command will automatically remove any quotes. If the string ends in ".exe", it will automatically remove the filename component of the string (i.e. if the string is "C:\\program files\\poop\\poop.exe", it will know to use "C:\\program files\\poop"). For more advanced install directory configuration, set $INSTDIR in .onInit.
|
||||
|
||||
\H{ainstprogressflags} InstProgressFlags
|
||||
|
||||
InstProgressFlags \e{[flag [...]]}
|
||||
\c [flag [...]]
|
||||
|
||||
Valid values for flag are "smooth" (smooth the progress bar) or "colored" (color the progress bar with the colors set by InstallColors. Examples: "InstProgressFlags" (default old-school windows look), "InstProgressFlags smooth" (new smooth look), "InstProgressFlags smooth colored" (colored smooth look whee).
|
||||
|
||||
\H{ainsttype} InstType
|
||||
|
||||
InstType \e{install_type_name | /NOCUSTOM | ([/LANG=lang_id] /CUSTOMSTRING=str)| /COMPONENTS.. ..ONLYONCUSTOM}
|
||||
\c install_type_name | /NOCUSTOM | ([/LANG=lang_id] /CUSTOMSTRING=str)| /COMPONENTS.. ..ONLYONCUSTOM
|
||||
|
||||
Adds an install type to the install type list, or disables the custom install type. There can be as many as 8 types, each one specifying the name of the install. The first type is the default (generally 'Typical'). Each type is numbered, starting at 1. See SectionIn for information on how those numbers are used. If the /NOCUSTOM switch is specified, then the "custom" install type is disabled, and the user has to choose one of the pre-defined install types. Alternatively, if the /CUSTOMSTRING switch is specified, the parameter will override the "Custom" install type text. Alternatively, if the /COMPONENTSONLYONCUSTOM flag is specified, the component list will only be shown if the "Custom" install type is selected.
|
||||
|
||||
\H{alicensebkcolor} LicenseBkColor
|
||||
|
||||
LicenseBkColor \e{color}
|
||||
\c color
|
||||
|
||||
Sets the background color of the license data.
|
||||
|
||||
\H{alicensedata} LicenseData
|
||||
|
||||
LicenseData \e{[/LANG=lang_id] licdata.txt}
|
||||
\c [/LANG=lang_id] licdata.txt
|
||||
|
||||
Specifies a text file to use for the license that the user can read. Omit this to not have a license displayed. Note that the file must be in the evil DOS text format (\\r\\n, yeah!)
|
||||
|
||||
\H{alicensetext} LicenseText
|
||||
|
||||
LicenseText \e{[/LANG=lang_id] text [button_text]}
|
||||
\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".
|
||||
|
||||
\H{aloadlanguagefile} LoadLanguageFile
|
||||
|
||||
LoadLanguageFile \e{lang_file.nlf}
|
||||
\c lang_file.nlf
|
||||
|
||||
Loads a NLF (NSIS Language File) that will be used to create a string table for the specific language in that NLF.
|
||||
|
||||
\H{amiscbuttontext} MiscButtonText
|
||||
|
||||
MiscButtonText \e{[/LANG=lang_id] [back button text] [next button text] [cancel button text] [close button text]}
|
||||
\c [/LANG=lang_id] [back button text] [next button text] [cancel button text] [close button text]
|
||||
|
||||
Replaces the default text strings for the four buttons (< Back, Next >, Cancel and Close). If parameters are omitted, the defaults are used.
|
||||
|
||||
\H{aname} Name
|
||||
|
||||
Name \e{[/LANG=lang_id] name}
|
||||
\c [/LANG=lang_id] name
|
||||
|
||||
Sets the name of the installer. The name is usually simply the product name such as 'MyApp' or 'CrapSoft MyApp'.
|
||||
|
||||
\H{aicon} Icon
|
||||
|
||||
Icon \e{path_to_icon.ico}
|
||||
\c path_to_icon.ico
|
||||
|
||||
Sets the icon of the installer.
|
||||
|
||||
\H{aoutfile} OutFile
|
||||
|
||||
OutFile \e{install.exe}
|
||||
\c install.exe
|
||||
|
||||
Specifies the output file that the MakeNSIS should write the installer to. This is just the file that MakeNSIS writes, it doesn't effect the contents of the installer.
|
||||
|
||||
\H{aplugindir} PluginDir
|
||||
|
||||
PluginDir \e{directory}
|
||||
\c directory
|
||||
|
||||
Causes the NSIS compiler to scan the given directory for Plugin DLLs.
|
||||
|
||||
\H{asetfont} SetFont
|
||||
|
||||
SetFont \e{font_face_name font_size}
|
||||
\c font_face_name font_size
|
||||
|
||||
Sets the installer font. Please remember that the font you choose must be present on the user's machine as well. Don't use rare fonts that only you have.
|
||||
|
||||
\H{ashowinstdetails} ShowInstDetails
|
||||
|
||||
ShowInstDetails \e{hide|show|nevershow}
|
||||
\c hide|show|nevershow
|
||||
|
||||
Sets whether or not the details of the install are shown. Can be 'hide' (the default) to hide the details by default, allowing the user to view them, or 'show' to show them by default, or 'nevershow', to prevent the user from ever seeing them. Note that sections can override this using SetDetailsView.
|
||||
|
||||
\H{ashowuninstdetails} ShowUninstDetails
|
||||
|
||||
ShowUninstDetails \e{hide|show|nevershow}
|
||||
\c hide|show|nevershow
|
||||
|
||||
Sets whether or not the details of the uninstall are shown. Can be 'hide' (the default) to hide the details by default, allowing the user to view them, or 'show' to show them by default, or 'nevershow', to prevent the user from ever seeing them. Note that sections can override this using SetDetailsView.
|
||||
|
||||
\H{asilentinstall} SilentInstall
|
||||
|
||||
SilentInstall \e{normal|silent|silentlog}
|
||||
\c normal|silent|silentlog
|
||||
|
||||
Specifies whether or not the installer should be silent. If it is 'silent' or 'silentlog', all sections are installed quietly, with no screen output from the installer itself (MessageBoxes are still displayed on error, and the script can still display whatever it wants). Note that if this is set to 'normal' and the user runs the installer with /S on the command line, it will behave as if SilentInstall 'silent' was used. Note: see also LogSet.
|
||||
|
||||
\H{asilentuninstall} SilentUnInstall
|
||||
|
||||
SilentUnInstall \e{normal|silent}
|
||||
\c normal|silent
|
||||
|
||||
Specifies whether or not the uninstaller should be silent.
|
||||
|
||||
\H{aspacetexts} SpaceTexts
|
||||
|
||||
SpaceTexts \e{[/LANG=lang_id] [req text] [avail text]}
|
||||
\c [/LANG=lang_id] [req text] [avail text]
|
||||
|
||||
If parameters are specified, overrides the space required and space available text ("Space required: " and "Space available: " by default). If 'none' is specified as the required text no space texts will be shown.
|
||||
|
||||
\H{asubcaption} SubCaption
|
||||
|
||||
SubCaption \e{[/LANG=lang_id] page_number subcaption}
|
||||
\c [/LANG=lang_id] page_number subcaption
|
||||
|
||||
Overrides the subcaptions for each of the installer pages (0=": License Agreement",1=": Installation Options",2=": Installation Directory", 3=": Installing Files", 4=": Completed"). If you specify an empty string (""), the default will be used (you can however specify " " to achieve a blank string)
|
||||
|
||||
\H{auninstallbuttontext} UninstallButtonText
|
||||
|
||||
UninstallButtonText \e{[/LANG=lang_id] [button text]}
|
||||
\c [/LANG=lang_id] [button text]
|
||||
|
||||
Changes the text of the button that by default says "Uninstall" in the uninstaller. If no parameter is specified, the default text is used. See also WriteUninstaller (replaces UninstallEXEName).
|
||||
|
||||
\H{auninstallcaption} UninstallCaption
|
||||
|
||||
UninstallCaption \e{[/LANG=lang_id] caption}
|
||||
\c [/LANG=lang_id] caption
|
||||
|
||||
Sets what the titlebars of the uninstaller will display. By default, it is 'Name Uninstall', where Name is specified with the Name command. You can, however, override it with 'MyApp uninstaller' or whatever. If you specify an empty string (""), the default will be used (you can however specify " " to achieve a blank string)
|
||||
|
||||
\H{auninstallicon} UninstallIcon
|
||||
|
||||
UninstallIcon \e{path_to_icon.ico}
|
||||
\c path_to_icon.ico
|
||||
|
||||
Sets the icon of the uninstaller.
|
||||
|
||||
\H{auninstallsubcaption} UninstallSubCaption
|
||||
|
||||
UninstallSubCaption \e{[/LANG=lang_id] page_number subcaption}
|
||||
\c [/LANG=lang_id] page_number subcaption
|
||||
|
||||
Overrides the subcaptions for each of the uninstaller pages (0=": Confirmation",1=": Uninstalling Files",2=": Completed"). If you specify an empty string (""), the default will be used (you can however specify " " to achieve a blank string)
|
||||
|
||||
\H{auninstalltext} UninstallText
|
||||
|
||||
UninstallText text \e{[/LANG=lang_id] [subtext]}
|
||||
\c t \e{[/LANG=lang_id] [subtext]
|
||||
|
||||
Specifies the text on the first page of the uninstaller. If subtext is specified and not empty, it will replace the default secondary text on that page, "Uninstall from:".
|
||||
|
||||
\H{awindowicon} WindowIcon
|
||||
|
||||
WindowIcon \e{on|off}
|
||||
\c on|off
|
||||
|
||||
Sets whether or not the installer's icon is in the upper left corner of the installer.
|
||||
|
||||
\H{axpstyle} XPStyle
|
||||
|
||||
XPStyle \e{on|off}
|
||||
\c on|off
|
||||
|
||||
Sets whether or not an XP manifest will be added to the installer. Default value is off. This affects the uninstaller too.
|
||||
|
||||
|
|
|
@ -4,13 +4,13 @@ The instructions that NSIS uses for scripting are sort of a cross between PHP an
|
|||
|
||||
\H{delete} Delete
|
||||
|
||||
Delete \e{[/REBOOTOK] file}
|
||||
\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.
|
||||
|
||||
\H{file} File
|
||||
|
||||
File \e{[/a] ([/r] file|wildcard [...]) | (/oname=file.dat infile.dat)}
|
||||
\c [/a] ([/r] file|wildcard [...]) | (/oname=file.dat infile.dat)
|
||||
|
||||
Adds file(s) to be extracted to the current output path ($OUTDIR).
|
||||
|
||||
|
@ -28,36 +28,36 @@ Adds file(s) to be extracted to the current output path ($OUTDIR).
|
|||
|
||||
\H{exec} Exec
|
||||
|
||||
Exec \e{command}
|
||||
\c command
|
||||
|
||||
Execute the specfied 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 may with to put it in quotes to delimit it from parameters. i.e.: Exec '"$INSTDIR\\command.exe" parameters'.
|
||||
|
||||
\H{execshell} ExecShell
|
||||
|
||||
ExecShell \e{action command [parameters] [SW_SHOWNORMAL | SW_SHOWMAXIMIZED | SW_SHOWMINIMIZED]}
|
||||
\c action command [parameters] [SW_SHOWNORMAL | SW_SHOWMAXIMIZED | SW_SHOWMINIMIZED]
|
||||
|
||||
Execute the specfied 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.
|
||||
|
||||
\H{execwait} ExecWait
|
||||
|
||||
ExecWait \e{command [user_var(exit code)]}
|
||||
\c command [user_var(exit code)]
|
||||
|
||||
Execute the specfied 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 may with to put it in quotes to delimit it from parameters. i.e.: ExecWait '"$INSTDIR\\command.exe" parameters'
|
||||
|
||||
\H{rename} Rename
|
||||
|
||||
Rename \e{[/REBOOTOK] source_file dest_file}
|
||||
\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.
|
||||
|
||||
\H{rmdir} RMDir
|
||||
|
||||
RMDir \e{[/r] directory}
|
||||
\c [/r] directory
|
||||
|
||||
Remove the directory (which should be a full path). If /r is specified, it will recursively remove the directory. The error flag is set if the directory exists and cannot be removed.
|
||||
|
||||
\H{setoutpath} SetOutPath
|
||||
|
||||
SetOutPath \e{outpath}
|
||||
\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 "-").
|
||||
|
|
|
@ -4,48 +4,48 @@ These commands are similar to the C preprocessor in terms of purpose and functio
|
|||
|
||||
\H{include} !include
|
||||
|
||||
\e{!include file}
|
||||
\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).
|
||||
|
||||
\H{cd} !cd
|
||||
|
||||
\e{!cd new_path}
|
||||
\c new_path
|
||||
|
||||
This command will change the compiler to the new directory, new_path. new_path can be relative or absolute.
|
||||
|
||||
\H{echo} !echo
|
||||
|
||||
\e{!echo message}
|
||||
\c message
|
||||
|
||||
This command will echo a message to the user compiling the script.
|
||||
|
||||
\H{error} !error
|
||||
|
||||
\e{!error [message]}
|
||||
\c [message]
|
||||
|
||||
This commnd will issue an error to the script compiler and will stop execution of the script. You can also add a message to this error.
|
||||
|
||||
\H{packhdr} !packhdr
|
||||
|
||||
\e{!packhdr tempfile command}
|
||||
\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.
|
||||
|
||||
\H{system} !system
|
||||
|
||||
\e{!system command [compare comparevalue]}
|
||||
\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'.
|
||||
|
||||
\H{warning} !warning
|
||||
|
||||
\e{!warning [message]}
|
||||
\c [message]
|
||||
|
||||
This command will issue a warning to the script compiler. You can also add a message to this warning.
|
||||
|
||||
\H{verbose} !verbose
|
||||
|
||||
\e{!verbose level}
|
||||
\c level
|
||||
|
||||
This command will set the level of verbosity. 4=all, 3=no script, 2=no info, 1=no warnings, 0=none
|
||||
|
|
|
@ -4,30 +4,30 @@ The following commands change how the compiler generates code and compresses dat
|
|||
|
||||
\H{asetcompress} SetCompress
|
||||
|
||||
SetCompress \e{auto|force|off}
|
||||
\c auto|force|off
|
||||
|
||||
This command sets the compress flag which is used by the installer to determine whether or not data should be compressed. Typically the SetCompress flag will effect the commands after it, and the last SetCompress command in the file also determines whether or not the install info section and uninstall data of the installer is compressed. If compressflag is 'auto', then files are compressed if the compressed size is smaller than the uncompressed size. If compressflag is set to 'force', then the compressed version is always used. If compressflag is 'off' then compression is not used (which can be faster). Note that this option has no effect on bzip2 installers (compression is always used on bzip2 installers).
|
||||
|
||||
\H{asetcompressor} SetCompressor
|
||||
|
||||
SetCompressor \e{zlib|bzip2}
|
||||
\c zlib|bzip2
|
||||
|
||||
This command sets the compression algorithm used to compress files/data in the installer. Options are ZLib or BZip2. ZLib uses deflate compression, which is very good. this mode uses the least amount of overhead on the runtime side, in terms of memory usage, disk footprint, and speed. BZip2 compression can be better than deflate, especially when using NSIS_COMPRESS_WHOLE. bzip2 is much slower to decompress, and uses a LOT more memory at runtime. The disk footprint using bzip2 is also approximately 1kb more than ZLib.
|
||||
|
||||
\H{asetdatablockoptimize} SetDatablockOptimize
|
||||
|
||||
SetDatablockOptimize \e{on|off}
|
||||
\c on|off
|
||||
|
||||
This command tells the compiler whether or not to do datablock optimizations. Datablock optimizations have the compiler check to see if any data being added to the data block is already in the data block, and if so, it is simply referenced as opposed to added (can save a little bit of size). It is highly recommended to leave this option on.
|
||||
|
||||
\H{asetdatesave} SetDateSave
|
||||
|
||||
SetDateSave \e{on|off}
|
||||
\c on|off
|
||||
|
||||
This command sets the file date/time saving flag which is used by the File command to determine whether or not to save the last write date and time of the file, so that it can be restored on installation. Valid flags are 'on' and 'off'. 'on' is the default.
|
||||
|
||||
\H{asetoverwrite} SetOverwrite
|
||||
|
||||
SetOverwrite \e{on|off|try|ifnewer}
|
||||
\c on|off|try|ifnewer
|
||||
|
||||
This command sets the overwrite flag which is used by the File command to determine whether or not the file should overwrite any existing files that are present. If overwriteflag is 'on', files are overwritten (this is the default). If overwriteflag is 'off', files that are already present are not overwritten. If overwriteflag is 'try', files are overwritten if possible (meaning that if the file is not able to be written to, it is skipped without any user interaction). If overwriteflag is 'ifnewer', then files are only overwritten if the existing file is older than the new file (note that when in 'ifnewer' mode, the destination file's date is set, regardless of what SetDateSave is set to).
|
||||
|
|
|
@ -2,60 +2,60 @@
|
|||
|
||||
\H{FileClose} FileClose
|
||||
|
||||
FileClose \e{handle}
|
||||
\c handle
|
||||
|
||||
Closes a file handle opened with FileOpen.
|
||||
|
||||
\H{FileOpen} FileOpen
|
||||
|
||||
FileOpen \e{user_var(handle output) filename openmode}
|
||||
\c user_var(handle output) filename openmode
|
||||
|
||||
Opens a file named "filename", and sets the handle output variable with the handle. The openmode should be one of "r" (read) "w" (write, all contents of file are destroyed) or "a" (append, meaning opened for both read and write, contents preserved). In all open modes, the file pointer is placed at the beginning of the file. If the file cannot be opened, the handle output is set to empty, and the error flag is set.
|
||||
|
||||
\H{FileRead} FileRead
|
||||
|
||||
FileRead \e{handle user_var(output) [maxlen]}
|
||||
\c handle user_var(output) [maxlen]
|
||||
|
||||
Reads a string from a file opened with FileOpen. The string is read until either a newline (or carriage return newline pair) occurs, or until a null byte is read, or until maxlen is met (if specified). Strings are limited to 1024 characters. If the end of file is read and no more data is available, the output string will be empty, and the error flag will be set.
|
||||
|
||||
\H{FileReadByte} FileReadByte
|
||||
|
||||
FileReadByte \e{handle user_var(output)}
|
||||
\c handle user_var(output)
|
||||
|
||||
Reads a byte from a file opened with FileOpen. The byte is stored in the output as an integer (0-255). If the end of file is read and no more data is available, the output will be empty, and the error flag will be set.
|
||||
|
||||
\H{FileSeek} FileSeek
|
||||
|
||||
FileSeek \e{handle offset [mode] [user_var(new position)]}
|
||||
\c handle offset [mode] [user_var(new position)]
|
||||
|
||||
Seeks a file opened with FileOpen. If mode is omitted or specified as SET, the file is positioned to "offset". If mode is specified as CUR, then the file pointer is moved by offset. If mode is specified as END, the file pointer is set to a position relative to EOF. If the final parameter "new position" is specified, the new file position will be stored to that variable.
|
||||
|
||||
\H{FileWrite} FileWrite
|
||||
|
||||
FileWrite \e{handle string}
|
||||
\c handle string
|
||||
|
||||
Writes a string to a file opened with FileOpen. If an error occurs writing, the error flag will be set.
|
||||
|
||||
\H{FileWriteByte} FileWriteByte
|
||||
|
||||
FileWriteByte \e{handle string}
|
||||
\c handle string
|
||||
|
||||
Writes the integer interpretation of 'string' to a file opened with FileOpen. If an error occurs writing, the error flag will be set. Note that the low byte of the integer is used, i.e. writing 256 is the same as writing 0, etc.
|
||||
|
||||
\H{FindClose} FindClose
|
||||
|
||||
FindClose \e{handle}
|
||||
\c handle
|
||||
|
||||
Closes a search opened with FindFirst.
|
||||
|
||||
\H{FindFirst} FindFirst
|
||||
|
||||
FindFirst \e{user_var(handle output) user_var(filename output) filespec}
|
||||
\c user_var(handle output) user_var(filename output) filespec
|
||||
|
||||
Performs a search for 'filespec', placing the first file found in filename_output (a user variable). It also puts the handle of the search into handle_output (also a user variable). If no files are found, both outputs are set to empty, and the error flag is set. Best used with FindNext and FindClose. Note that the filename output is without path.
|
||||
|
||||
\H{FindNext} FindNext
|
||||
|
||||
FindNext \e{handle user_var(filename_output)}
|
||||
\c handle user_var(filename_output)
|
||||
|
||||
Continues a search began with FindFirst. handle should be the handle_output_variable returned by FindFirst. If the search is completed (there are no more files), filename_output is set to empty, and the error flag is set. Note that the filename output is without path.
|
||||
|
|
|
@ -2,55 +2,53 @@
|
|||
|
||||
\H{Abort} Abort
|
||||
|
||||
Abort \e{user_message}
|
||||
\c user_message
|
||||
|
||||
Cancels the install, stops execution of script, and displays user_message in the status display. Note: you can use this from Callback Functions to do special things. Note 2: When using from .onNextPage or .onPrevPage, the parameter to Abort can be an integer that specifies how many pages to skip.
|
||||
Cancels the install, stops execution of script, and displays user_message in the status display. Note: you can use this from Callback Functions (\k{callbacks}) to do special things. Note 2: When using from .onNextPage (\k{onNextPage}) or .onPrevPage (\k{onPrevPage}), the parameter to Abort can be an integer that specifies how many pages to skip.
|
||||
|
||||
\H{Call} Call
|
||||
|
||||
Call \e{function_name | :label_name}
|
||||
\c function_name | :label_name
|
||||
|
||||
Calls the function named function_name. If in the Uninstall section, Call can only be used with function names beginning with "un.". If the parameter starts with a ':' it will be treated as a label (so you can call to a label in your function - this is probably not going to be used most of the time).
|
||||
|
||||
\H{ClearErrors} ClearErrors
|
||||
|
||||
ClearErrors
|
||||
|
||||
Clears the error flag.
|
||||
|
||||
\H{FindWindow} FindWindow
|
||||
|
||||
FindWindow \e{user_var(hwnd output) windowclass [windowtitle] [windowparent] [childafter]}
|
||||
\c user_var(hwnd output) windowclass [windowtitle] [windowparent] [childafter]
|
||||
|
||||
Searches for a window. Behaves like the win32 FindWindowEx(). Seaches by windowclass (and/or windowtitle if specified). If windowparent or childafter are specified, the search will be restricted as such. If windowclass or windowtitle is specified as "", they will not be used for the search. If the window is not found, the user variable returned is 0. To accomplish old-style FindWindow behavior, use FindWindow with SendMessage.
|
||||
|
||||
\H{getcurrentaddress} GetCurrentAddress
|
||||
|
||||
GetCurrentAddress \e{user_var(output)}
|
||||
\c user_var(output)
|
||||
|
||||
Gets the address of the current instruction (the GetCurrentAddress) and stores it in the output user variable. This user variable then can be passed to Call or Goto.
|
||||
|
||||
\H{GetDlgItem} GetDlgItem
|
||||
|
||||
GetDlgItem \e{user_var(output) dialog item_id}
|
||||
\c user_var(output) dialog item_id
|
||||
|
||||
Retrieves the handle of a control identified by item_id in the specified dialog box dialog.
|
||||
|
||||
\H{GetFunctionAddress} GetFunctionAddress
|
||||
|
||||
GetFunctionAddress \e{user_var(output) function_name}
|
||||
\c user_var(output) function_name
|
||||
|
||||
Gets the address of the function and stores it in the output user variable. This user variable then can be passed to Call or Goto. Note that if you Goto an address which is the output of GetFunctionAddress, your function will never be returned to (when the function you Goto'd to returns, you return instantly).
|
||||
|
||||
\H{getlabeladdress} GetLabelAddress
|
||||
|
||||
GetLabelAddress \e{user_var(output) label}
|
||||
\c user_var(output) label
|
||||
|
||||
Gets the address of the label and stores it in the output user variable. This user variable then can be passed to Call or Goto. Note that you may only call this with labels accessible from your function, but you can call it from anywhere (which is potentially dangerous). Note that if you Call the output of GetLabelAddress, code will be executed until it Return's (explicitly or implicitly at the end of a function), and then you will be returned to the statement after the Call.
|
||||
|
||||
\H{goto} Goto
|
||||
|
||||
Goto \e{label_to_jump_to | +offset| -offset| user_var(target)}
|
||||
\c label_to_jump_to | +offset| -offset| user_var(target)
|
||||
|
||||
If label is specified, goto the label 'label_to_jump_to:'.
|
||||
|
||||
|
@ -60,37 +58,37 @@ If a user variable is specified, jumps to absolute address (generally you will w
|
|||
|
||||
\H{IfErrors} IfErrors
|
||||
|
||||
IfErrors \e{jumpto_iferror [jumpto_ifnoerror]}
|
||||
\c jumpto_iferror [jumpto_ifnoerror]
|
||||
|
||||
Checks and clears the error flag, and if it is set, it will goto jumpto_iferror, otherwise it will goto jumpto_ifnoerror. The error flag is set by other instructions when a recoverable error (such as trying to delete a file that is in use) occurs.
|
||||
|
||||
\H{IfFileExists} IfFileExists
|
||||
|
||||
IfFileExists \e{file_to_check_for jump_if_present [jump_otherwise]}
|
||||
\c file_to_check_for jump_if_present [jump_otherwise]
|
||||
|
||||
Checks for existence of file(s) file_to_check_for (which can be a wildcard, or a directory), and Gotos jump_if_present if the file exists, otherwise Gotos jump_otherwise. If you want to check to see if a file is a directory, use IfFileExists DIRECTORY\\*.*
|
||||
|
||||
\H{IntCmp} IntCmp
|
||||
|
||||
IntCmp \e{val1 val2 jump_if_equal [jump_if_val1_less] [jump_if_val1_more]}
|
||||
\c val1 val2 jump_if_equal [jump_if_val1_less] [jump_if_val1_more]
|
||||
|
||||
Compares two integers val1 and val2. If val1 and val2 are equal, Gotos jump_if_equal, otherwise if val1 < val2, Gotos jump_if_val1_less, otherwise if val1 > val2, Gotos jump_if_val1_more.
|
||||
|
||||
\H{IntCmpU} IntCmpU
|
||||
|
||||
IntCmpU \e{val1 val2 jump_if_equal [jump_if_val1_less] [jump_if_val1_more]}
|
||||
\c val1 val2 jump_if_equal [jump_if_val1_less] [jump_if_val1_more]
|
||||
|
||||
Compares two unsigned integers val1 and val2. If val1 and val2 are equal, Gotos jump_if_equal, otherwise if val1 < val2, Gotos jump_if_val1_less, otherwise if val1 > val2, Gotos jump_if_val1_more. Performs the comparison as unsigned integers.
|
||||
|
||||
\H{IsWindow} IsWindow
|
||||
|
||||
IsWindow \e{HWND jump_if_window [jump_if_not_window]}
|
||||
\c HWND jump_if_window [jump_if_not_window]
|
||||
|
||||
If HWND is a window, Gotos jump_if_window, otherwise, Gotos jump_if_not_window (if specified).
|
||||
|
||||
\H{MessageBox} MessageBox
|
||||
|
||||
MessageBox \e{mb_option_list messagebox_text [return_check jumpto] [return_check_2 jumpto_2]}
|
||||
\c mb_option_list messagebox_text [return_check jumpto] [return_check_2 jumpto_2]
|
||||
|
||||
Displays a MessageBox containing the text "messagebox_text". mb_option_list must be one or more of the following, delimited by |s (i.e. MB_YESNO|MB_ICONSTOP).
|
||||
|
||||
|
@ -148,13 +146,11 @@ If the return value of the MessageBox is return_check, the installer will Goto j
|
|||
|
||||
\H{Return} Return
|
||||
|
||||
Return
|
||||
|
||||
Returns from a function or section.
|
||||
|
||||
\H{SendMessage} SendMessage
|
||||
|
||||
SendMessage \e{HWND msg wparam lparam [user_var(return value)] [/TIMEOUT=time_in_ms]}
|
||||
\c HWND msg wparam lparam [user_var(return value)] [/TIMEOUT=time_in_ms]
|
||||
|
||||
Sends a message to HWND. If a user variable $x is specified as the last parameter, the return value of SendMessage will be stored to it. Note that when specifying 'msg' you must just use the integer value of the message. Here are a few example messages and their values:
|
||||
|
||||
|
@ -165,23 +161,21 @@ Sends a message to HWND. If a user variable $x is specified as the last paramete
|
|||
\b \e{WM_USER} 1024
|
||||
|
||||
Include $\{NSISDIR\}\\Examples\\WinMessages.nsh to have all of Windows messages defined in your script.
|
||||
|
||||
To send a string param, put STR: before the parameter, for example: "STR:Some string".
|
||||
|
||||
Use /TIMEOUT=time_in_ms to specify the duration, in milliseconds, of the time-out period.
|
||||
|
||||
\H{Quit} Quit
|
||||
|
||||
Quit
|
||||
|
||||
Causes the installer to exit as soon as possible. After Quit is called, the installer will exit (no callback functions will get a chance to run).
|
||||
|
||||
\H{SetErrors} SetErrors
|
||||
|
||||
SetErrors
|
||||
|
||||
Sets the error flag.
|
||||
|
||||
\H{StrCmp} StrCmp
|
||||
|
||||
StrCmp \e{str1 str2 jump_if_equal [jump_if_not_equal]}
|
||||
\c str1 str2 jump_if_equal [jump_if_not_equal]
|
||||
|
||||
Compares (case insensitively) str1 to str2. If str1 and str2 are equal, Gotos jump_if_equal, otherwise Gotos jump_if_not_equal.
|
|
@ -2,25 +2,25 @@
|
|||
|
||||
\H{callinstdll} CallInstDLL
|
||||
|
||||
CallInstDLL \e{dllfile [/NOUNLOAD]}
|
||||
\c dllfile [/NOUNLOAD]
|
||||
|
||||
Function Calls a NSIS extension DLL. See Contrib\\ExDLL for an example of how to make one. Extension DLLs can access the stack and variables. Use /NOUNLOAD to force the installer to leave the DLL loaded.
|
||||
|
||||
\H{copyfiles} CopyFiles
|
||||
|
||||
CopyFiles \e{[/SILENT] [/FILESONLY] filespec_on_destsys destination_path [size_of_files_in_kb]}
|
||||
\c [/SILENT] [/FILESONLY] filespec_on_destsys destination_path [size_of_files_in_kb]
|
||||
|
||||
Copies files from the source to the destination on the installing system. Useful with $EXEDIR if you want to copy from installation media, or to copy from one place to another on the system. Uses SHFileOperation, so the user might see a status window of the copy operation if it is large (to disable this, use /SILENT). The last parameter specifies how big the copy is (in kilobytes), so that the installer can approximate the disk space requirements. On error, or if the user cancels the copy (only possible when /SILENT was omitted), the error flag is set. If /FILESONLY is specified, only files are copied.
|
||||
|
||||
\H{createdirectory} CreateDirectory
|
||||
|
||||
CreateDirectory \e{path_to_create}
|
||||
\c path_to_create
|
||||
|
||||
Creates (recursively if necessary) the specified directory.
|
||||
|
||||
\H{createshortcut} CreateShortCut
|
||||
|
||||
CreateShortCut \e{link.lnk target.file [parameters [icon.file [icon_index_number [start_options [keyboard_shortcut [description]]]]]]}
|
||||
\c link.lnk target.file [parameters [icon.file [icon_index_number [start_options [keyboard_shortcut [description]]]]]]
|
||||
|
||||
Creates a shortcut 'link.lnk' that links to 'target.file', with optional parameters 'parameters'.
|
||||
The icon used for the shortcut is 'icon.file,icon_index_number'; for default icon settings use empty strings for both icon.file and icon_index_number.
|
||||
|
@ -31,49 +31,49 @@ The error flag is set if the shortcut cannot be created (i.e. the path does not
|
|||
|
||||
\H{getdllversion} GetDLLVersion
|
||||
|
||||
GetDLLVersion \e{filename user_var(high dword output) user_var(low dword output)}
|
||||
\c filename user_var(high dword output) user_var(low dword output)
|
||||
|
||||
Gets the version information from the DLL in "filename". Sets the user output variables with the high and low dwords of version information on success; on failure the outputs are empty and the error flag is set.
|
||||
|
||||
\H{getdllversionlocal} GetDLLVersionLocal
|
||||
|
||||
GetDLLVersionLocal \e{localfilename user_var(high dword output) user_var(low dword output)}
|
||||
\c localfilename user_var(high dword output) user_var(low dword output)
|
||||
|
||||
This is similar to GetDLLVersion, only it acts on the system building the installer (it actually compiles into two StrCpy commands). Sets the two output variables with the DLL version information of the DLL on the build system.
|
||||
|
||||
\H{getfiletime} GetFileTime
|
||||
|
||||
GetFileTime \e{filename user_var(high dword output) user_var(low dword output)}
|
||||
\c filename user_var(high dword output) user_var(low dword output)
|
||||
|
||||
Gets the last write time of "filename". Sets the user output variables with the high and low dwords of the timestamp on success; on failure the outputs are empty and the error flag is set.
|
||||
|
||||
\H{getfiletimelocal} GetFileTimeLocal
|
||||
|
||||
GetFileTimeLocal \e{localfilename user_var(high dword output) user_var(low dword output)}
|
||||
\c localfilename user_var(high dword output) user_var(low dword output)
|
||||
|
||||
This is similar to GetFileTime, only it acts on the system building the installer (it actually compiles into two StrCpy commands). Sets the two output variables with the file timestamp of the file on the build system.
|
||||
|
||||
\H{getfullpathname} GetFullPathName
|
||||
|
||||
GetFullPathName \e{[/SHORT] user_var(output) path_or_file}
|
||||
\c [/SHORT] user_var(output) path_or_file
|
||||
|
||||
Assign to the user variable $x, the full path of the file specified. If the path portion of the parameter is not found, the error flag will be set and $x will be empty. If /SHORT is specified, the path is converted to the short filename form.
|
||||
|
||||
\H{gettempfilename} GetTempFileName
|
||||
|
||||
GetTempFileName \e{user_var(output)}
|
||||
\c user_var(output)
|
||||
|
||||
Assign to the user variable $x, the name of a temporary file. The file will have been created, so you can then overwrite it with what you please. The name of the temporary file is guaranteed to be unique. Delete the file when done with it.
|
||||
|
||||
\H{searchpath} SearchPath
|
||||
|
||||
SearchPath \e{user_var(output) filename}
|
||||
\c user_var(output) filename
|
||||
|
||||
Assign to the user variable $x, the full path of the file named by the second parameter. The error flag will be set and $x will be empty if the file cannot be found. Uses SearchPath() to search the system paths for the file.
|
||||
|
||||
\H{setfileattributes} SetFileAttributes
|
||||
|
||||
SetFileAttributes \e{filename attribute1|attribute2|...}
|
||||
\c filename attribute1|attribute2|...
|
||||
|
||||
Sets the file attributes of 'filename'. Valid attributes can be combined with | and are:
|
||||
|
||||
|
@ -95,12 +95,12 @@ The error flag will be set if the file's attributes cannot be set (i.e. the file
|
|||
|
||||
\H{regdll} RegDLL
|
||||
|
||||
RegDLL \e{dllfile [entrypoint_name]}
|
||||
\c dllfile [entrypoint_name]
|
||||
|
||||
Loads the specified DLL and calls DllRegisterServer (or entrypoint_name if specified). The error flag is set if an error occurs (i.e. it can't load the DLL, initialize OLE, find the entry point, or the function returned anything other than ERROR_SUCCESS (=0)).
|
||||
|
||||
\H{unregdll} UnRegDLL
|
||||
|
||||
UnRegDLL \e{dllfile}
|
||||
\c dllfile
|
||||
|
||||
Loads the specified DLL and calls DllUnregisterServer. The error flag is set if an error occurs (i.e. it can't load the DLL, initialize OLE, find the entry point, or the function returned anything other than ERROR_SUCCESS (=0)).
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
|
||||
\H{IntFmt} IntFmt
|
||||
|
||||
IntFmt \e{user_var(output) format numberstring}
|
||||
\c user_var(output) format numberstring
|
||||
|
||||
Formats the number in "numberstring" using the format "format", and sets the output to user variable $x. Example format strings include "%08X" "%u"
|
||||
|
||||
\H{IntOp} IntOp
|
||||
|
||||
IntOp \e{user_var(output) value1 OP [value2]}
|
||||
\c user_var(output) value1 OP [value2]
|
||||
|
||||
Combines value1 and (depending on OP) value2 into the user variable $x. OP is defined as one of the following:
|
||||
|
||||
|
@ -16,7 +16,7 @@ Combines value1 and (depending on OP) value2 into the user variable $x. OP is de
|
|||
|
||||
\b \e{-} SUBTRACTs value2 from value1
|
||||
|
||||
\b \e{*} MULTIPLIES value1 and value2
|
||||
\b \e{*} MULTIPLIEs value1 and value2
|
||||
|
||||
\b \e{/} DIVIDEs value1 by value2
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ The result of all of this is an installation system for win32 that lets you comp
|
|||
|
||||
Here's a short list of some of NSIS' features.
|
||||
|
||||
\b SuperPiMP™ technology (so advanced, so amazing, we won't even tell you what it is).
|
||||
\b SuperPiMP™ technology (so advanced, so amazing, we won't even tell you what it is).
|
||||
|
||||
\b Generates self contained, win32 executable installer.
|
||||
|
||||
|
@ -45,6 +45,56 @@ Here's a short list of some of NSIS' features.
|
|||
|
||||
\b Plug-in system (includes plug-ins for generic dialog construction and user interaction, as well as HTTP downloading)
|
||||
|
||||
\b Fully multilingual. 20 translations available including Dutch, French, Chinese and more...
|
||||
|
||||
\b Installers can be as large as 2GB (theoretically -- when building on Win9x the limit seems to be around 500MB, however building on NT then installing on Win9x works with larger sizes)
|
||||
|
||||
\b Optional Silent mode for automated installations
|
||||
|
||||
\b Installers have their own VMs that let you write code that can support:
|
||||
|
||||
\b File extraction (with configurable overwrite parameters)
|
||||
|
||||
\b File/directory copying, renaming, deletion
|
||||
|
||||
\b DLL loading (ActiveX control registration/deregistration, extension DLL calling, etc)
|
||||
|
||||
\b Executable execution (shell execute and wait options)
|
||||
|
||||
\b Shortcut creation
|
||||
|
||||
\b Registry key reading/setting/enumerating/deleting
|
||||
|
||||
\b INI file reading/writing
|
||||
|
||||
\b Generic text file reading/writing
|
||||
|
||||
\b Directory scanning
|
||||
|
||||
\b Powerful string and integer manipulation
|
||||
|
||||
\b Window finding based on class name or title (for is-application-running detection)
|
||||
|
||||
\b Window message sending.
|
||||
|
||||
\b User interaction with MessageBox.
|
||||
|
||||
\b Branching, comparisons, etc.
|
||||
|
||||
\b Error checking.
|
||||
|
||||
\b Installer behaviour commands (such as show/hide/wait/etc)
|
||||
|
||||
\b User functions in script
|
||||
|
||||
\b Callback functions that let you customize the way the installer behaves from script.
|
||||
|
||||
\b Macros in script
|
||||
|
||||
\b A primitive preprocessor
|
||||
|
||||
\b A lovely coding experience with elements of PHP and assembly (includes 20 general purpose variables, a stack, real flow control, etc)
|
||||
|
||||
\b More
|
||||
|
||||
\b Completely free for any use. See license (\k{license}).
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
|
||||
\H{LogSet} LogSet
|
||||
|
||||
LogSet \e{on|off}
|
||||
\c on|off
|
||||
|
||||
Sets whether install logging to $INSTDIR\\install.log will happen. Note that \e{NSIS_CONFIG_LOG} must be set in the installer configuration (it is not by default) to support this.
|
||||
|
||||
\H{LogText} LogText
|
||||
|
||||
LogText \e{text}
|
||||
\c text
|
||||
|
||||
If installer logging is enabled, inserts text "text" into the log file.
|
||||
|
|
|
@ -2,66 +2,62 @@
|
|||
|
||||
\H{BringToFront} BringToFront
|
||||
|
||||
BringToFront
|
||||
|
||||
Makes the installer window visible and brings it to the top of the window list (i.e. if a command was executed that shows itself in front of the installer, a BringToFront would bring the installer back in focus).
|
||||
|
||||
\H{CreateFont} CreateFont
|
||||
|
||||
CreateFont \e{user_var(handle output) face_name [height] [weight] [/ITALIC] [/UNDERLINE] [/STRIKE]}
|
||||
\c user_var(handle output) face_name [height] [weight] [/ITALIC] [/UNDERLINE] [/STRIKE]
|
||||
|
||||
Creates a font and puts its handle into user_var. For more information about the different parameters have a look at MSDN's page about the Win32 API function CreateFont().
|
||||
Creates a font and puts its handle into user_var. For more information about the different parameters have a look at \W{http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/fontext_8fp0.asp}{MSDN's page about the Win32 API function CreateFont()}.
|
||||
|
||||
\H{DetailPrint} DetailPrint
|
||||
|
||||
DetailPrint \e{user_message}
|
||||
\c user_message
|
||||
|
||||
Adds the string "user_message" to the details view of the installer.
|
||||
|
||||
\H{HideWindow} HideWindow
|
||||
|
||||
HideWindow
|
||||
|
||||
Hides the installer.
|
||||
|
||||
\H{SetAutoClose} SetAutoClose
|
||||
|
||||
SetAutoClose \e{true|false}
|
||||
\c true|false
|
||||
|
||||
Overrides the default auto window-closing flag (specified for the installer using AutoCloseWindow, and false for the uninstaller). Specify 'true' to have the install window immediately disappear after the install has completed, or 'false' to make it require a manual close.
|
||||
|
||||
\H{SetBrandingImage} SetBrandingImage
|
||||
|
||||
SetBrandingImage \e{[/IMGID=item_id_in_dialog] [/RESIZETOFIT] path_to_bitmap_file.bmp}
|
||||
\c [/IMGID=item_id_in_dialog] [/RESIZETOFIT] path_to_bitmap_file.bmp
|
||||
|
||||
Sets the current bitmap file displayed as the branding image. If no IMGID is specified, the first image control found will be used, or the image control created by AddBrandingImage. Note that this bitmap must be present on the user's machine. Use File first to put it there. If /RESIZETOFIT is specified the image will be automatically resized (very poorly) to the image control size. If you used AddBrandingImage you can get this size, by compiling your script and watching for AddBrandingImage output, it will tell you the size. SetBrandingImage will not work when called from .onInit!
|
||||
|
||||
\H{SetDetailsView} SetDetailsView
|
||||
|
||||
SetDetailsView \e{show|hide}
|
||||
\c show|hide
|
||||
|
||||
Shows or hides the details, depending on which parameter you pass. Overrides the default details view, which is set via ShowInstDetails
|
||||
|
||||
\H{SetDetailsPrint} SetDetailsPrint
|
||||
|
||||
SetDetailsPrint \e{none | listonly | textonly |both}
|
||||
\c none|listonly|textonly|both|lastused
|
||||
|
||||
Sets mode at which commands print their status. None has commands be quiet, listonly has status text only added to the listbox, textonly has status text only printed to the status bar, and both enables both (the default). For extracting many small files, textonly is recommended (especially on win9x with smooth scrolling enabled).
|
||||
|
||||
\H{SetShellVarContext} SetShellVarContext
|
||||
|
||||
SetShellVarContext \e{current|all}
|
||||
\c current|all
|
||||
|
||||
Sets the context of $SMPROGRAMS and other shell folders. If set to 'current' (the default), the current user's shell folders are used. If set to 'all', the 'all users' shell folder is used. The all users folder may not be supported on all OSes. If the all users folder is not found, the current user folder will be used.
|
||||
|
||||
\H{SetStaticBkColor} SetStaticBkColor
|
||||
|
||||
SetStaticBkColor \e{hwnd color}
|
||||
\c hwnd color
|
||||
|
||||
Sets a background color for a static control. Use GetDlgItem to get the handle (HWND) of the static control.
|
||||
|
||||
\H{Sleep} Sleep
|
||||
|
||||
Sleep \e{sleeptime_in_ms}
|
||||
\c sleeptime_in_ms
|
||||
|
||||
Pauses execution in the installer for sleeptime_in_ms milliseconds. sleeptime_in_ms can be a variable, i.e. "$0" or a number, i.e. "666".
|
||||
|
|
|
@ -2,18 +2,16 @@
|
|||
|
||||
\H{IfRebootFlag} IfRebootFlag
|
||||
|
||||
IfRebootFlag \e{[jump_if_set] [jump_if_not_set]}
|
||||
\c [jump_if_set] [jump_if_not_set]
|
||||
|
||||
Checks the reboot flag, and jumps to jump_if_set if the reboot flag is set, otherwise jumps to jump_if_not_set. The reboot flag can be set by Delete and Rename, or manually with SetRebootFlag.
|
||||
|
||||
\H{Reboot} Reboot
|
||||
|
||||
Reboot
|
||||
|
||||
Reboots the computer. Be careful with this one. If there is an error rebooting, this function sets the error flag and continues. If the reboot is sucessful, this instruction does not return.
|
||||
|
||||
\H{SetRebootFlag} SetRebootFlag
|
||||
|
||||
SetRebootFlag \e{true|false}
|
||||
\c true|false
|
||||
|
||||
Sets the reboot flag to either true or false.
|
||||
|
|
|
@ -2,91 +2,91 @@
|
|||
|
||||
\H{deleteinisec} DeleteINISec
|
||||
|
||||
DeleteINISec \e{ini_filename section_name}
|
||||
\c ini_filename section_name
|
||||
|
||||
Deletes the entire section [section_name] from ini_filename. If the section could not be removed from the ini file, the error flag is set.
|
||||
|
||||
\H{deleteinistr} DeleteINIStr
|
||||
|
||||
DeleteINIStr \e{ini_filename section_name str_name}
|
||||
\c ini_filename section_name str_name
|
||||
|
||||
Deletes the string str_name from section [section_name] from ini_filename. If the string could not be removed from the ini file, the error flag is set.
|
||||
|
||||
\H{deleteregkey} DeleteRegKey
|
||||
|
||||
DeleteRegKey \e{[/ifempty] root_key subkey}
|
||||
\c [/ifempty] root_key subkey
|
||||
|
||||
Deletes a registry key. If /ifempty is specified, the registry key will only be deleted if it has no subkeys (otherwise, the whole registry tree will be removed). Valid values for root_key are listed under WriteRegStr. The error flag is set if the key could not be removed from the registry (or if it didn't exist to begin with).
|
||||
|
||||
\H{deleteregvalue} DeleteRegValue
|
||||
|
||||
DeleteRegValue \e{root_key subkey key_name}
|
||||
\c root_key subkey key_name
|
||||
|
||||
Deletes a registry value. Valid values for root_key are listed under WriteRegStr. The error flag is set if the value could not be removed from the registry (or if it didn't exist to begin with).
|
||||
|
||||
\H{enumregkey} EnumRegKey
|
||||
|
||||
EnumRegKey \e{user_var(output) root_key subkey index}
|
||||
\c user_var(output) root_key subkey index
|
||||
|
||||
Set user variable $x with the name of the 'index'th registry key in root_key\\Hubkey. Valid values for root_key are listed under WriteRegStr. Returns an empty string if there are no more keys, and returns an empty string and sets the error flag if there is an error.
|
||||
|
||||
\H{enumregvalue} EnumRegValue
|
||||
|
||||
EnumRegValue \e{user_var(output) root_key subkey index}
|
||||
\c user_var(output) root_key subkey index
|
||||
|
||||
Set user variable $x with the name of the 'index'th registry value in root_key\\Hubkey. Valid values for root_key are listed under WriteRegStr. Returns an empty string if there are no more values, and returns an empty string and sets the error flag if there is an error.
|
||||
|
||||
\H{expandenvstrings} ExpandEnvStrings
|
||||
|
||||
ExpandEnvStrings \e{user_var(output) string}
|
||||
\c user_var(output) string
|
||||
|
||||
Expands environment variables in "string" into the user variable $x. If error, the variable is set to empty, and the error flag is set.
|
||||
|
||||
\H{readenvstr} ReadEnvStr
|
||||
|
||||
ReadEnvStr \e{user_var(output) name}
|
||||
\c user_var(output) name
|
||||
|
||||
Reads from the environment string "name" and sets the value into the user variable $x. If there is an error reading the string, the user variable is set to empty, and the error flag is set.
|
||||
|
||||
\H{readinistr} ReadINIStr
|
||||
|
||||
ReadINIStr \e{user_var(output) ini_filename section_name entry_name}
|
||||
\c user_var(output) ini_filename section_name entry_name
|
||||
|
||||
Reads from entry_name in [section_name] of ini_filename and stores the value into user variable $x. The error flag will be set and $x will be assigned to an empty string if the entry is not found.
|
||||
|
||||
\H{readregdword} ReadRegDWORD
|
||||
|
||||
ReadRegDWORD \e{user_var(output) root_key sub_key name}
|
||||
\c user_var(output) root_key sub_key name
|
||||
|
||||
Reads a 32 bit DWORD from the registry into the user variable $x. Valid values for root_key are listed under WriteRegStr. The error flag will be set and $x will be set to an empty string ("" which is 0) if the DWORD is not present. If the value is present, but is not a DWORD, it will be read as a string and the error flag will be set.
|
||||
|
||||
\H{readregstr} ReadRegStr
|
||||
|
||||
ReadRegStr \e{user_var(output) root_key sub_key name}
|
||||
\c user_var(output) root_key sub_key name
|
||||
|
||||
Reads from the registry into the user variable $x. Valid values for root_key are listed under WriteRegStr. The error flag will be set and $x will be set to an empty string ("") if the string is not present. If the value is present, but is of type REG_DWORD, it will be read and converted to a string and the error flag will be set.
|
||||
|
||||
\H{writeinistr} WriteINIStr
|
||||
|
||||
WriteINIStr \e{ini_filename section_name entry_name value}
|
||||
\c ini_filename section_name entry_name value
|
||||
|
||||
Writes entry_name=value into [section_name] of ini_filename. The error flag is set if the string could not be written to the ini file.
|
||||
|
||||
\H{writeregbin} WriteRegBin
|
||||
|
||||
WriteRegBin \e{root_key subkey key_name valuedata}
|
||||
\c root_key subkey key_name valuedata
|
||||
|
||||
This command writes a block of binary data to the registry. Valid values for root_key are listed under WriteRegStr. Valuedata is in hexadecimal (i.e. DEADBEEF01223211151). The error flag is set if the binary data could not be written to the registry. If the registry key doesn't exist it will be created.
|
||||
|
||||
\H{writeregdword} WriteRegDWORD
|
||||
|
||||
WriteRegDWORD \e{root_key subkey key_name value}
|
||||
\c root_key subkey key_name value
|
||||
|
||||
This command writes a dword (32 bit integer) to the registry (a user variable can be specified). Valid values for root_key are listed under WriteRegStr. The error flag is set if the dword could not be written to the registry. If the registry key doesn't exist it will be created.
|
||||
|
||||
\H{writeregstr} WriteRegStr
|
||||
|
||||
WriteRegStr \e{root_key subkey key_name value}
|
||||
\c root_key subkey key_name value
|
||||
|
||||
WriteRegExpandStr \e{root_key subkey key_name value}
|
||||
|
||||
|
|
|
@ -2,24 +2,24 @@
|
|||
|
||||
\H{SectionSetFlags} SectionSetFlags
|
||||
|
||||
SectionSetFlags \e{section_index section_flags}
|
||||
\c section_index section_flags
|
||||
|
||||
Sets the section's flags. The flag is a 32 bit integer. The low 30 bits represent whether the section is in the (as many as) 30 install types. The top bit (0x80000000) represents whether the section is currently enabled, and the second to top bit (0x40000000) represents whether or not the section is read-only. The error flag will be set if an out of range section is specified.
|
||||
|
||||
\H{SectionGetFlags} SectionGetFlags
|
||||
|
||||
SectionGetFlags \e{section_index user_var(output)}
|
||||
\c section_index user_var(output)
|
||||
|
||||
Retrieves the section's flags. See above for a description of the flag. The error flag will be set if an out of range section is specified.
|
||||
|
||||
\H{SectionSetText} SectionSetText
|
||||
|
||||
SectionSetText \e{section_index section_text}
|
||||
\c section_index section_text
|
||||
|
||||
Sets the description for the section section_index. To set a subsection, you must use - at the beginning of the text. The error flag will be set if an out of range section is specified.
|
||||
|
||||
\H{SectionGetText} SectionGetText
|
||||
|
||||
SectionGetText \e{section_index user_var(output)}
|
||||
\c section_index user_var(output)
|
||||
|
||||
Stores the text description of the section section_index into the output. If the section is hidden, stores an empty string. The error flag will be set if an out of range section is specified.
|
||||
|
|
|
@ -10,37 +10,32 @@ Each NSIS installer contains one or more Sections. Each These sections are creat
|
|||
|
||||
\H{saddsize} AddSize
|
||||
|
||||
AddSize \e{size_kb}
|
||||
\c size_kb
|
||||
|
||||
Tells the installer that the current section needs an additional "size_kb" kilobytes of disk space. Only valid within a section (will have no effect outside of a section or in a function).
|
||||
|
||||
\H{ssection} Section
|
||||
|
||||
Section \e{([/e] [section_name] [section index output]}
|
||||
\c ([/e] [section_name] [section index output]
|
||||
|
||||
Begins annd 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.
|
||||
|
||||
\H{ssectionend} SectionEnd
|
||||
|
||||
SectionEnd
|
||||
|
||||
This command closes the current open section.
|
||||
|
||||
\H{ssectionin} SectionIn
|
||||
|
||||
SectionIn \e{insttype_index [insttype_index] [RO]}
|
||||
\c insttype_index [insttype_index] [RO]
|
||||
|
||||
This command specifies which Install Types (see InstType) the current section defaults to the enabled state in. Multiple SectionIn commands can be specified (they are combined). If you specify RO as a parameter, then the section will be Read-Only, meaning it will always be set to install.
|
||||
|
||||
\H{ssubsection} SubSection
|
||||
|
||||
SubSection \e{[/e] Caption}
|
||||
\c [/e] Caption
|
||||
|
||||
This command inserts a subsection. The subsection must be close with SubSectionEnd, and should contain 1 or more Sections. If the subsection name begins with a !, the subsection will be displayed as bold. If /e is present, the sub sections of the sub section will be expanded by default.
|
||||
|
||||
\H{ssubsectionend} SubSectionEnd
|
||||
|
||||
SubSectionEnd
|
||||
|
||||
Closes a subsection opened with SubSection.
|
||||
|
||||
|
|
|
@ -2,18 +2,18 @@
|
|||
|
||||
\H{Exch} Exch
|
||||
|
||||
Exch \e{[user_var] | stack_index}
|
||||
\c [user_var] | stack_index
|
||||
|
||||
When no parmater is specified, exchanges the top two elements of the stack. When a parameter is specified and is a user variable, exchanges the top element of the stack with the parameter. When a parameter is specified and is a positive integer, the parameter specifies which item on the stack that the top of the stack is swapped with. If there are not enough items on the stack to accomplish the exchange, a fatal error will occur (to help you debug your code :).
|
||||
|
||||
\H{Pop} Pop
|
||||
|
||||
Pop \e{user_var(out)}
|
||||
\c user_var(out)
|
||||
|
||||
Pops a string off of the stack into user variable $x. If the stack is empty, the error flag will be set.
|
||||
|
||||
\H{Push} Push
|
||||
|
||||
Push \e{string}
|
||||
\c string
|
||||
|
||||
Pushes a string onto the stack. The string can then be Popped off of the stack.
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
|
||||
\H{StrCpy} StrCpy
|
||||
|
||||
StrCpy \e{user_var(destination) str [maxlen] [start_offset]}
|
||||
\c user_var(destination) str [maxlen] [start_offset]
|
||||
|
||||
Sets the user variable $x with str. Note that str can contain other variables, or the user variable being set (concatenating strings this way is possible, etc). If maxlen is specified, the string will be a maximum of maxlen characters (if maxlen is negative, the string will be truncated abs(maxlen) characters from the end). If start_offset is specified, the source is offset by it (if start_offset is negative, it will start abs(start_offset) from the end of the string).
|
||||
|
||||
\H{StrLen} StrLen
|
||||
|
||||
StrLen \e{user_var(length output) str}
|
||||
\c user_var(length output) str
|
||||
|
||||
Sets user variable $x with the length of str.
|
||||
|
|
|
@ -2,6 +2,6 @@
|
|||
|
||||
\H{WriteUninstaller} WriteUninstaller
|
||||
|
||||
WriteUninstaller \e{[Path\\]exename.exe}
|
||||
\c [Path\\]exename.exe
|
||||
|
||||
Writes the uninstaller to the filename (and optionally path) specified. Only valid from within an install section or function, and requires that you have an uninstall section in your script. See also Uninstall configuration. You can call this one or more times to write out one or more copies of the uninstaller.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue