From 4103e6cd77cb8d1b60fd2c4f91023cd30c88b8e9 Mon Sep 17 00:00:00 2001 From: joostverburg Date: Sat, 9 Nov 2002 17:58:22 +0000 Subject: [PATCH] initplugins, start menu folder selection, new paging system, fixes git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@1644 212acab6-be3b-0410-9dea-997c60f758d6 --- Contrib/Modern UI/Changelog.txt | 4 +- Contrib/Modern UI/Language files/English.nsh | 5 + Contrib/Modern UI/Readme.html | 37 +++++-- Contrib/Modern UI/System.nsh | 111 ++++++++++++++----- Examples/Modern UI/InstallOptions.nsi | 15 +-- Examples/Modern UI/MultiLanguage.nsi | 10 +- 6 files changed, 123 insertions(+), 59 deletions(-) diff --git a/Contrib/Modern UI/Changelog.txt b/Contrib/Modern UI/Changelog.txt index 4cde9361..e7a2784e 100644 --- a/Contrib/Modern UI/Changelog.txt +++ b/Contrib/Modern UI/Changelog.txt @@ -1,10 +1,12 @@ NSIS Modern User Interface - VERSION HISTORY -1.5 - Novermber 8, 2002 +1.5 - Novermber 9, 2002 * New language file format * Language strings can be changed in the script without editing language files * Install Options macro's updated. MUI_INSTALLOPTIONS_DISPLAY is the standard macro now. Use MUI_INSTALLOPTIONS_INITDIALOG and MUI_INSTALLOPTIONS_SHOW if you want to customize dialog controls. +* Start Menu Folder selection page +* Compatible with new paging system * Renamed macro's and defines * Some small fixes diff --git a/Contrib/Modern UI/Language files/English.nsh b/Contrib/Modern UI/Language files/English.nsh index 61cc24e7..ddff5dff 100644 --- a/Contrib/Modern UI/Language files/English.nsh +++ b/Contrib/Modern UI/Language files/English.nsh @@ -34,6 +34,11 @@ !insertmacro MUI_LANGUAGEFILE_STRING MUI_TEXT_FINISHED_TITLE "Finished" !insertmacro MUI_LANGUAGEFILE_STRING MUI_TEXT_FINISHED_SUBTITLE "Setup was completed successfully." + !insertmacro MUI_LANGUAGEFILE_STRING MUI_TEXT_STARTMENU_WINDOWTITLE "Start Menu Folder" + !insertmacro MUI_LANGUAGEFILE_STRING MUI_TEXT_STARTMENU_TITLE "Choose Start Menu Folder" + !insertmacro MUI_LANGUAGEFILE_STRING MUI_TEXT_STARTMENU_SUBTITLE "Choose a Start Menu folder for the program's shortcuts." + !insertmacro MUI_LANGUAGEFILE_STRING MUI_INNERTEXT_STARTMENU "Select the Start Menu folder in which you would like to create the program's shotcuts. You can also enter a name to create a new folder. Click Install to start the installation." + !insertmacro MUI_LANGUAGEFILE_STRING MUI_TEXT_ABORTWARNING "Are you sure you want to quit ${MUI_PRODUCT} Setup?" !insertmacro MUI_LANGUAGEFILE_STRING MUI_TEXT_WINDOWTITLE "${MUI_NAME} Setup" diff --git a/Contrib/Modern UI/Readme.html b/Contrib/Modern UI/Readme.html index 5f203fe1..d2e44093 100644 --- a/Contrib/Modern UI/Readme.html +++ b/Contrib/Modern UI/Readme.html @@ -137,14 +137,17 @@ with a custom user interface.

!define MUI_COMPONENTSPAGE ;Component-selection page !define MUI_DIRECTORYPAGE ;Directory-selection page !define MUI_LICENSEPAGE ;License page +!define MUI_STARTMENUPAGE ;Start Menu-selection page + !define MUI_ABORTWARNING ;Abort warning messagebox -!define MUI_INSTALLOPTIONS ;Install Options + !define MUI_CUSTOMPAGECOMMANDS ;Use customized pages +!define MUI_WINDOWTITLE ;Insert string for the window title !define MUI_UNINSTALLER ;Uninstaller -!define MUI_UNINSTALLOPTIONS ;Install Options in Uninstaller -!define MUI_CUSTOMPAGECOMMANDS ;Use customized uninstaller pages +!define MUI_UNCUSTOMPAGECOMMANDS ;Use customized uninstaller pages +

MUI_WINDOWTITLE is required by MUI_(UN)INSTALLOPTIONS_WRITETITLE.

4. Insert language files

Insert the Modern UI language files for the languages you are using:

!insertmacro MUI_LANGUAGE "English"
@@ -158,6 +161,11 @@ with a custom user interface.

Have a look at the language files for a complete list of all the names. +

NOTE: Not all language files contain strings for the + new Start Menu-selection page yet. If you are using a language file which does not contain + these strings, you should always define them.
Please help to translate the new strings and + post them at the NSIS + Forum.

5. Define interface settings (optional)

You can change the settings of the interface by usings defines:

!define MUI_UI "${NSISDIR}\Contrib\UIs\modern2.exe"
@@ -217,9 +225,8 @@ SectionEnd

Have a look at the Install Options documentation for info about creating Install Options INI Files.

Custom page commands

-

If you want add custom pages to your installer using Install Options, -you should insert you own page commands to set the order of the pages and the names -of the page functions.

+

If you want add custom pages to your installer, you should insert you +own page commands to set the order of the pages and the names of the page functions.

 !insertmacro MUI_PAGECOMMAND_LICENSE
 !insertmacro MUI_PAGECOMMAND_COMPONENTS
@@ -242,19 +249,23 @@ LangString TEXT_IO_TITLE ${LANG_ENGLISH} "Install Options Page"
 LangString TEXT_IO_SUBTITLE ${LANG_ENGLISH} "Create your own dialog!"
 
 Function [function name]
-  !insertmacro MUI_HEADER_TEXT $(TEXT_IO_TITLE) $(TEXT_IO_SUBTITLE)
+  !insertmacro MUI_HEADER_TEXT "$(TEXT_IO_TITLE)" "$(TEXT_IO_SUBTITLE)"
   !insertmacro MUI_INSTALLOPTIONS_SHOW "ioFile.ini"
 FunctionEnd
 
-

Write title and abortwarning

+

Write title to Install Options INI Files

Use these macro's in .onInit to write the page -title and abortwarning to an INI File.

+title to an Install Options INI File.

 LangString TEXT_IO_PAGETITLE ${LANG_ENGLISH} "Page Title"
 
 !insertmacro MUI_INSTALLOPTIONS_WRITETITLE "ioFile.ini" "$(TEXT_IO_PAGETITLE)"
-!insertmacro MUI_INSTALLOPTIONS_WRITEABORTWARNING "ioFile.ini" \
-"$(TEXT_IO_PAGETITLE)"
+
+

For the uninstaller, use:

+
+LangString UNTEXT_IO_PAGETITLE ${LANG_ENGLISH} "Uninstaller Page Title"
+
+!insertmacro MUI_UNINSTALLOPTIONS_WRITETITLE "ioFile.ini" "$(UNTEXT_IO_PAGETITLE)"
 

Examples

Basic: Basic.nsi
@@ -283,7 +294,7 @@ The 'verifying installer' and 'unpacking data' texts are defined in To change them, you need to edit this file and recompile NSIS.

Version history