| NSIS Home > NSIS Discussion Forum > NSIS Archive > NSIS Programmer's Reference |
|
Adds an installer page to the installer. SyntaxPage (pagetype [pre_function] [show_function] [leave_function]) | (custom custom_function [caption]) [define_if_last] The Page instruction syntax has these parts:
NotesThe default order that is used when no Page instructions are used is: license, components, directory and then instfiles. You can use the function specified at show_function to tweak the user interface. You can use the Abort instruction from the pre_function function to skip the page, and you can use the Abort instruction from the leave_function function to abort leaving the page, thus stay in the page. You should use the function custom_function to load the custom page using the InstallOptions.dll, like this: Page custom customPage ": custom page" Function customPage GetTempFileName $R0 File /oname=$R0 customPage.ini InstallOptions::dialog $R0 Pop $R1 StrCmp $R1 "cancel" done StrCmp $R1 "back" done StrCmp $R1 "success" done error: MessageBox MB_OK|MB_ICONSTOP "InstallOptions error:$\r$\n$R1" done: FunctionEnd RemarksYou can specify a page more than once, just make sure that you know what you are doing. You must still use the LicenseText and LicenseData instructions for a license (license) page to show. You must also use the ComponentText instruction for a component selection (components) page and the DirText instruction for a directory selection (directory) page to show. The Page instruction may only be used outside a function, section or macro. ExamplesThe following example demonstrates the use of the Page instruction: Page license Page component Page directory Page instfiles See AlsoUninstPage, LicenseText, LicenseData, ComponentText, DirText and InstallOptions.dll Reference. |