Finished instructions for docs

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@1027 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
rainwater 2002-09-18 16:34:39 +00:00
parent 18fd5c60b8
commit a69dbb9401
11 changed files with 301 additions and 2 deletions

View file

@ -1,4 +1,4 @@
bin\halibut.exe config.but intro.but usage.but script.but attributes.but compilerflags.but sections.but functions.but labels.but basic.but registry.but generalpurpose.but flowcontrol.but file.but history.but license.but
bin\halibut.exe config.but intro.but usage.but script.but attributes.but compilerflags.but sections.but functions.but labels.but basic.but registry.but generalpurpose.but flowcontrol.but file.but misc.but string.but stack.but int.but reboot.but uninstall.but log.but sec.but var.but history.but license.but
@del *.hlp
@del *.cnt
@copy Contents.html index.html

View file

@ -2,6 +2,8 @@
\e{v2.0b0}
\b SendMessage can send strings (put STR: before a param) and supports timeouts
\b Right mouse button "Copy to clipboard" context menu for the Details window
\b PluginDir is an attribute, not an instruction, corrected makensis.htm
@ -12,7 +14,7 @@
\b Return key still works with initial focus licence text change ;)
\b EDIT ME - made win9x move/delete on reboot support proper and function like on win2k (in that shit is deleted in order)
\b Made win9x move/delete on reboot support proper and function like on win2k
\b Now always loads RichEdit v2 if present (links work on Win9x)

37
Docs/src/int.but Normal file
View file

@ -0,0 +1,37 @@
\H{intinst} Integer Support
\S{IntOp} IntOp
IntOp \e{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:
\b + ADDs value1 and value2
\b - SUBTRACTs value2 from value1
\b * MULTIPLIES value1 and value2
\b / DIVIDEs value1 by value2
\b % MODULUSs value1 by value2
\b | BINARY ORs value1 and value2
\b & BINARY ANDs value1 and value2
\b ^ BINARY XORs value1 and value2
\b ~ BITWISE NEGATEs value1 (i.e. 7 becomes 4294917288)
\b ! LOGICALLY NEGATEs value1 (i.e. 7 becomes 0)
\b || LOGICALLY ORs value1 and value2
\b && LOGICALLY ANDs value1 and value2
\S{IntFmt} IntFmt
IntFmt \e{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"

13
Docs/src/log.but Normal file
View file

@ -0,0 +1,13 @@
\H{installlog} Install Logging Instructions
\S{LogSet} LogSet
LogSet \e{on|off}
Sets whether install logging to $INSTDIR\\install.log will happen. Note that NSIS_CONFIG_LOG must be set in the installer configuration (it is not by default) to support this.
\S{LogText} LogText
LogText \e{text}
If installer logging is enabled, inserts text "text" into the log file.

67
Docs/src/misc.but Normal file
View file

@ -0,0 +1,67 @@
\H{miscinst} Miscellaneous Instructions
\S{SetDetailsView} SetDetailsView
SetDetailsView \e{show|hide}
Shows or hides the details, depending on which parameter you pass. Overrides the default details view, which is set via ShowInstDetails
\S{SetDetailsPrint} SetDetailsPrint
SetDetailsPrint \e{none | listonly | textonly |both}
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).
\S{SetAutoClose} SetAutoClose
SetAutoClose \e{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.
\S{DetailPrint} DetailPrint
DetailPrint \e{user_message}
Adds the string "user_message" to the details view of the installer.
\S{Sleep} Sleep
Sleep \e{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".
\S{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).
\S{HideWindow} HideWindow
HideWindow
Hides the installer.
\S{SetBrandingImage} SetBrandingImage
SetBrandingImage \e{[/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!
\S{SetStaticBkColor} SetStaticBkColor
SetStaticBkColor \e{hwnd color}
Sets a background color for a static control. Use GetDlgItem to get the handle (HWND) of the static control.
\S{SetShellVarContext} SetShellVarContext
SetShellVarContext \e{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.
\S{CreateFont} CreateFont
CreateFont \e{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().

19
Docs/src/reboot.but Normal file
View file

@ -0,0 +1,19 @@
\H{rebootinst} Reboot Support
\S{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.
\S{IfRebootFlag} IfRebootFlag
IfRebootFlag \e{[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.
\S{SetRebootFlag} SetRebootFlag
SetRebootFlag \e{true|false}
Sets the reboot flag to either true or false.

25
Docs/src/sec.but Normal file
View file

@ -0,0 +1,25 @@
\H{secmanage} Section Management
\S{SectionSetFlags} SectionSetFlags
SectionSetFlags \e{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 file 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.
\S{SectionGetFlags} SectionGetFlags
SectionGetFlags \e{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.
\S{SectionSetText} SectionSetText
SectionSetText \e{section_index section_text}
Sets the description for the section section_index. The error flag will be set if an out of range section is specified.
\S{SectionGetText} SectionGetText
SectionGetText \e{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.

19
Docs/src/stack.but Normal file
View file

@ -0,0 +1,19 @@
\H{stackinst} Stack Support
\S{Push} Push
Push \e{string}
Pushes a string onto the stack. The string can then be Popped off of the stack.
\S{Pop} Pop
Pop \e{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.
\S{Exch} Exch
Exch \e{[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 :).

13
Docs/src/string.but Normal file
View file

@ -0,0 +1,13 @@
\H{stringinst} String Manipulation Instructions
\S{StrCpy} StrCpy
StrCpy \e{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).
\S{StrLen} StrLen
StrLen \e{user_var(length output) str}
Sets user variable $x with the length of str.

7
Docs/src/uninstall.but Normal file
View file

@ -0,0 +1,7 @@
\H{uninst} Uninstaller Instructions
\S{WriteUninstaller} WriteUninstaller
WriteUninstaller \e{[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.

97
Docs/src/var.but Normal file
View file

@ -0,0 +1,97 @@
\C{var} Variables
\H{var1} Modifiable variables usded in Instructions
\e{$INSTDIR}
The installation directory ($INSTDIR is modifiable using StrCpy, ReadRegStr, ReadINIStr, etc. - This could be used, for example, in the .onInit function to do a more advanced detection of install location).
\e{$OUTDIR}
The current output directory (set implicitly via SetOutPath or explicitly via StrCpy, ReadRegStr, 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).
\e{$CMDLINE}
The command line of the installer. The format of the command line can be one of the following:
\b "full\\path to\\installer.exe" PARAMETER PARAMETER PARAMETER
\b installer.exe PARAMETER PARAMETER PARAMETER
\b For parsing out the PARAMETER portion, see GetParameters on the utility functions page. It's worth noting that if /D= is specified on the command line (to override the install directory), it won't be in $CMDLINE.
\e{$LANGUAGE}
The identifier of the language that is currently used. For example, English is 1033. You can change this variable in .onInit.
\H{var2} Constant Variables used in Instructions and InstallDir
\e{$PROGRAMFILES}
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.
\e{$EXEDIR}
The location of the installer executable. (technically you can modify this variable, but it is probably not a good idea)
\e{$WINDIR}
The windows directory (usually C:\\windows or C:\\winnt but detected at runtime)
\e{$SYSDIR}
The windows system directory (usually C:\\windows\\system or C:\\winnt\\system32 but detected at runtime)
\e{$TEMP}
The system temporary directory (usually C:\\windows\\temp but detected at runtime)
\e{$STARTMENU}
The start menu folder (useful in adding start menu items using CreateShortCut)
\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.
\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.
\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.
\e{$HWNDPARENT}
The decimal HWND of the parent window.
\e{$$}
Use to represent $.
\H{var3} Variables used Strings
\e{$\\r}
Use to represent a carriage return (\\r).
\e{$\\n}
Use to represent a newline (\\n).
\e{$\{SYMBOL\}}
Where SYMBOL is the name of something globally defined, this will be replaced with the value of that symbol. If the symbol is not defined, no replace occurs (i.e. if $\{POOP\} is encountered, and POOP is not defined, $\{POOP\} is output).
\e{$\{NSISDIR\}}
A symbol contains the path where NSIS is installed.