diff --git a/Contrib/InstallOptions/Install Options.html b/Contrib/InstallOptions/Install Options.html index ab3347c6..c22d9381 100644 --- a/Contrib/InstallOptions/Install Options.html +++ b/Contrib/InstallOptions/Install Options.html @@ -1,32 +1,32 @@
To use the DLL, you should include it as part of your installation.
-Extract it to known location (probably $TEMP), and then load it using CallInstDLL, passing one parameter on the stack.
+Introduction:
Installer Options was a quick
+application Michael Bishop threw together so he could prompt the user for some information
+during the install process. This version is a highly modified version of it that is designed
+as a NSIS extension DLL for the NSIS installer. Installer Options will create a
+dialog box which will be displayed inside of the NSIS window. The dialog box is
+defined by an INI file, which allows you to define the layout of controls by
+changing the INI file.
+
To use the DLL, you should include it as part of your installation. +Extract it to known location (probably $TEMP), and then load it using CallInstDLL, passing one parameter on the stack. The one parameter is a name of an .ini file that defines the window. Example:
SetOutPath $TEMP @@ -34,7 +34,7 @@ Example:File InstallOptions.dll Push $TEMP\inst.ini CallInstDLL $TEMP\InstallOptions.dll dialog - Pop $0 + Pop $0 ; ($0 would be "success" "cancel" "back" or some other value on error. ReadINIStr $1 $TEMP\inst.ini "Field 1" State ; $1 = field #1's state @@ -43,23 +43,23 @@ Example:Delete $TEMP\InstallOptions.dllIt is often very useful to call InstallOptions from the NSIS callback functions .onNextPage and .onPrevPage. -The INI file has one required section. This section includes the number of controls to be created as well as general window attributes. The INI file also -includes a variable number of Field sections which are used to create the -controls to be displayed. -
The required section is named "Settings". It will contain the -following values: +
The INI file has one required section. This section includes the number of controls to be created as well as general window attributes. The INI file also +includes a variable number of Field sections which are used to create the +controls to be displayed. +
The required section is named "Settings". It will contain the +following values:
NumFields | (required) | -The number of control elements to be + | The number of control elements to be displayed on the dialog window. |
Title | (optional) | -If specified, gives the text to set the + | If specified, gives the text to set the titlebar to. Otherwise, the titlebar text is not changed. |
CancelConfirm | @@ -98,33 +98,33 @@ following values:(optional) | Overrides the text for the back button. If not specified, the back button text will not be changed. Recommended value: "< Back" |
Each field section has the heading "Field #" where # must be sequential -numbers from 1 to NumFields. Each Field section contains the following values: +
Each field section has the heading "Field #" where # must be sequential +numbers from 1 to NumFields. Each Field section contains the following values:
Type | (required) | -Type of control to be created. Valid - values are "Label", "Text", "Password", + | Type of control to be created. Valid
+ values are "Label", "Text", "Password",
"Combobox", "DropList", "Listbox", "CheckBox",
"RadioButton",
- "FileRequest", or "DirRequest". A - "label" is used to display static text. (i.e. a caption for a - textbox) A "textbox" and "password" accept text input - from the user. "password" masks the input with * characters. A - "combobox" allows the user to type text not in the popup list, a - "droplist" only allows selection of items in the list. A - "listbox" shows multiple items and can optionally allow the user + "FileRequest", or "DirRequest". A + "label" is used to display static text. (i.e. a caption for a + textbox) A "textbox" and "password" accept text input + from the user. "password" masks the input with * characters. A + "combobox" allows the user to type text not in the popup list, a + "droplist" only allows selection of items in the list. A + "listbox" shows multiple items and can optionally allow the user to select more than one item. A "CheckBox" control displays a check box with label. A "RadioButton" control displays a radio button with label. - A "FileRequest" control displays - a textbox and a browse button. Clicking the browse button will display a - file requester where the user can browse for a file. A - "DirRequest" control displays a textbox and a browse button. - Clicking the browse button will display a directory requester where the + A "FileRequest" control displays + a textbox and a browse button. Clicking the browse button will display a + file requester where the user can browse for a file. A + "DirRequest" control displays a textbox and a browse button. + Clicking the browse button will display a directory requester where the user can browse for a directory. "Icon" control displays an icon. Use no Text to use the installer icon. "Bitmap" control displays a bitmap. | |||||||||||||||||||||||||||
State | (optional) | -Specifies the state of the control. This is updated when the user closes the window, + | Specifies the state of the control. This is updated when the user closes the window, so you can read from it from NSIS. For edit texts and dir and file request boxes, this is the string that is specified. For radio button and check boxes, this can be '0' or '1' (for unchecked or checked). | |||||||||||||||||||||||||||
ListItems | (optional) | -A list of items to display in a combobox,
- droplist, or listbox. This is a single line of text with each item + | A list of items to display in a combobox,
+ droplist, or listbox. This is a single line of text with each item separated by a pipe character '|' | |||||||||||||||||||||||||||
MaxLen | (optional) | -Causes validation on the selected control
- to limit the maximum length of text. If the user specifies more text - than this, a message box will appear when they click "OK" and the dialog - will not be dismissed. You should not use this on a - "combobox" since the user can not control what is - selected. This should be set to a maximum of 260 - for "FileRequest" and "DirRequest" - controls. Ignored on "label" + | Causes validation on the selected control
+ to limit the maximum length of text. If the user specifies more text + than this, a message box will appear when they click "OK" and the dialog + will not be dismissed. You should not use this on a + "combobox" since the user can not control what is + selected. This should be set to a maximum of 260 + for "FileRequest" and "DirRequest" + controls. Ignored on "label" controls. | |||||||||||||||||||||||||||
MinLen | (optional) | -Causes validation on the selected control
- to force the user to enter a minimum amount of text. If the user - specifies less text than this, a message box will appear when they click - "OK" and the dialog will not be dismissed. Unlike MaxLen, this is - useful for "Combobox" controls. By setting this to a value of "1" - the program will force the user to select an item. Causes validation on the selected control + to force the user to enter a minimum amount of text. If the user + specifies less text than this, a message box will appear when they click + "OK" and the dialog will not be dismissed. Unlike MaxLen, this is + useful for "Combobox" controls. By setting this to a value of "1" + the program will force the user to select an item. Ignored on "label" controls. | ||||||||||||||||||||||||||||
ValidateText | (optional) | -If a particular field fails the test for
- "MinLen" or "MaxLen", a messagebox will be displayed with
- this text. NOTE: The only formatting performed on this - text is "\n" will be replaced with a newline in the + | If a particular field fails the test for
+ "MinLen" or "MaxLen", a messagebox will be displayed with
+ this text. NOTE: The only formatting performed on this + text is "\n" will be replaced with a newline in the messagebox. | |||||||||||||||||||||||||||
Left Right Top Bottom |
(required) | -The position on the dialog where this
- control appears. Sorry, no GUI here to help you. NOTE: For combobox or droplist, the "bottom" value is not - used in the same way. In this case, the bottom value is the maximum - size of the window when the pop-up list is being displayed. All other - times, the combobox is automatically szed to be one element tall. If you - have trouble where you can not see the combobox drop-down, then check - the bottom value and ensure it is large enough. NOTE (2): - FileRequest and DirRequest controls will allocate 20 pixels to the - browse button. Make this control wide enough the contents of the textbox + | The position on the dialog where this
+ control appears. Sorry, no GUI here to help you. NOTE: For combobox or droplist, the "bottom" value is not + used in the same way. In this case, the bottom value is the maximum + size of the window when the pop-up list is being displayed. All other + times, the combobox is automatically szed to be one element tall. If you + have trouble where you can not see the combobox drop-down, then check + the bottom value and ensure it is large enough. NOTE (2): + FileRequest and DirRequest controls will allocate 20 pixels to the + browse button. Make this control wide enough the contents of the textbox can be seen. Note that you can specify negative coordinates to specify the distance from the right or bottom edge. | |||||||||||||||||||||||||||
Filter | (optional) | -Specifies the filter to be used in the
- "FileRequest" control. This is constructed by putting pairs of - entries together, each item seperated by a | character. The first - value in each pair is the text to display for the filter. The second - value is the pattern to use to match files. For example, you might + | Specifies the filter to be used in the
+ "FileRequest" control. This is constructed by putting pairs of + entries together, each item seperated by a | character. The first + value in each pair is the text to display for the filter. The second + value is the pattern to use to match files. For example, you might specify: -
NOTE: you should not put any extra +
NOTE: you should not put any extra spaces around the | characters. | |||||||||||||||||||||||||||
Root | (optional) | -Used by DirRequest controls to - specify the root directory of the search. By default, this allows the - user to browse any directory on the computer. This will limit the search + | Used by DirRequest controls to + specify the root directory of the search. By default, this allows the + user to browse any directory on the computer. This will limit the search to a particular directory on the system. | |||||||||||||||||||||||||||
Flags | (optional) | -This specifies additional flags for the - display of different controls. Each value should be seperated by a | - character, and you should be careful not to put any spaces around the | + | This specifies additional flags for the
+ display of different controls. Each value should be seperated by a |
+ character, and you should be careful not to put any spaces around the |
character.
|