From 7aa623ea798bf1b902c10dd4cc1027207caaa1a9 Mon Sep 17 00:00:00 2001 From: joostverburg Date: Sun, 15 Dec 2002 21:43:38 +0000 Subject: [PATCH] fixes, multilingual brandingtext, reservefile, bgcolor git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@1960 212acab6-be3b-0410-9dea-997c60f758d6 --- Contrib/Modern UI/Changelog.txt | 9 +- Contrib/Modern UI/Readme.html | 123 +++++++++++++++------- Contrib/Modern UI/System.nsh | 142 ++++++++++++++++---------- Examples/Modern UI/Basic.nsi | 2 +- Examples/Modern UI/InstallOptions.nsi | 18 ++-- Examples/Modern UI/MultiLanguage.nsi | 8 +- Examples/Modern UI/WelcomeFinish.nsi | 11 +- 7 files changed, 198 insertions(+), 115 deletions(-) diff --git a/Contrib/Modern UI/Changelog.txt b/Contrib/Modern UI/Changelog.txt index fd1d9122..b903322e 100644 --- a/Contrib/Modern UI/Changelog.txt +++ b/Contrib/Modern UI/Changelog.txt @@ -1,10 +1,13 @@ NSIS Modern User Interface - VERSION HISTORY -1.62 - December 14, 2002 +1.62 - December 15, 2002 * No problems anymore when using both 'Run program' and 'Show Readme' on the finish page * Default state of checkboxes on the finish page can be changed -* Welcome / Finish pages compatible with custom DPI settings +* Welcome / Finish page compatible with custom DPI settings * Converted Install Options INI files to use dialog units +* Support for multilingual branding texts +* More ReserveFile macro's +* Background color can be changed with a define 1.61 - December 5, 2002 * Final version for NSIS 2 beta 0 @@ -15,7 +18,7 @@ NSIS Modern User Interface - VERSION HISTORY * Bugfixes 1.6 - November 18, 2002 -* Welcome / Finish pages +* Welcome / Finish page * Automatic ask for reboot on finish page * Create no shortcut option on the Start Menu Folder selection page * Customizing GUIInit functions easier diff --git a/Contrib/Modern UI/Readme.html b/Contrib/Modern UI/Readme.html index 638e2987..eb46c77b 100644 --- a/Contrib/Modern UI/Readme.html +++ b/Contrib/Modern UI/Readme.html @@ -31,9 +31,9 @@ table .maintable { - border: 2px solid #376EAB; + border: 2px solid #376EAB; } - + .margin { margin: 20px; @@ -50,10 +50,6 @@ table color: #303030; } -.changelog - { - } - .header { font-size: 14pt; @@ -95,10 +91,10 @@ a:hover
- +
- - +
+ @@ -113,8 +109,6 @@ with a custom user interface.

component selection page.

To use this new interface for your installer, you need to add some code to your NSIS script. Read this document for more info!

-

Requirements

-

NSIS 2 beta 0 (or later)

Screenshots

@@ -129,7 +123,7 @@ double quote (") to a Modern UI string, you should always escape it ($\"), because the Modern UI macro's use " to separate parameters.

To use the Modern UI in an existing script, you should -add the following things (in order, from the beginning of the script):

+follow these steps:

1. Include the header file

!include "${NSISDIR}\Contrib\Modern UI\System.nsh"

2. Define the name and version of your software

@@ -228,13 +222,13 @@ add the following things (in order, from the beginning of the script):

You don't need to edit the language files if you want to customize some strings. Use defines before you insert the language file:

-!define MUI_INNERTEXT_LICENSE_TOP "Text on the top of the license dialog"
-!insertmacro MUI_LANGUAGE "English"
+!define MUI_BRANDINGTEXT "French Branding Text"
+!insertmacro MUI_LANGUAGE "French"
 

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

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

@@ -251,8 +245,6 @@ add the following things (in order, from the beginning of the script):

The icon of the uninstaleller.

MUI_CHECKBITMAP (${NSISDIR}\Contrib\Icons\modern.bmp)
The bitmap with images for the checks of the component select treeview.

-

MUI_BRANDINGTEXT (Nullsoft Install System ?.??)
- The text at the bottom left corner of the window.

MUI_FONT, MUI_FONTSIZE (MS Shell Dlg, 8)
The font for the normal texts.

MUI_FONT_HEADER, MUI_FONTSIZE_HEADER, MUI_FONTSTYLE_HEADER @@ -260,15 +252,17 @@ add the following things (in order, from the beginning of the script):

The font for the title in the header. Fontstyle: [weight] [/ITALIC] [/UNDERLINE] [/STRIKE]

MUI_FONT_TITLE, MUI_FONTSIZE_TITLE, MUI_FONTSTYLE_TITLE (Verdana, 12, 700)
- The font for the title on the Welcome and Finish pages. Fontstyle: [weight] [/ITALIC] [/UNDERLINE] [/STRIKE]

+ The font for the title on the Welcome and Finish page. Fontstyle: [weight] [/ITALIC] [/UNDERLINE] [/STRIKE]

MUI_INSTALLCOLORS (/windows)
The colors of the details screen, hexadecimal ("foreground" "background").

MUI_PROGRESSBAR (smooth)
The style of the progress bar ("colored" to use the MUI_INSTALLCOLORS or "" for a old-school windows look).

MUI_SPECIALINI (${NSISDIR}\Contrib\Modern UI\ioSpecial.ini)
- Install Options INI File for the Welcome and Finish pages.

+ Install Options INI File for the Welcome and Finish page.

MUI_SPECIALBITMAP (${NSISDIR}\Contrib\Icons\modern-wizard.bmp)
- Bitmap for the Welcome and Finish pages.

+ Bitmap for the Welcome and Finish page.

+

MUI_BGCOLOR (0xFFFFFF)
+ Background color for the header, Welcome page and Finish page.

7. Insert the MUI_SYSTEM macro

!insertmacro MUI_SYSTEM

8. Insert the MUI_SECTIONS_FINISHHEADER macro @@ -303,6 +297,9 @@ Section "Section Name 1" Section1 ... SectionEnd +

10. Reserve Files

+

If you are using BZIP2 compression, you might need to +insert ReserveFile commands. More info...

Custom pages

Custom page commands

@@ -348,7 +345,38 @@ LangString TEXT_IO_SUBTITLE ${LANG_ENGLISH} "A subtitle" Function FunctionName !insertmacro MUI_HEADER_TEXT "$(TEXT_IO_TITLE)" "$(TEXT_IO_SUBTITLE)" - !insertmacro MUI_INSTALLOPTIONS_SHOW "ioFile.ini" + !insertmacro MUI_INSTALLOPTIONS_DISPLAY "ioFile.ini" +FunctionEnd + +

For custom fonts and colors, macro's for the initDialog and show +functions of InstallOptions are also available:

+
+LangString TEXT_IO_TITLE ${LANG_ENGLISH} "Install Options Page Title"
+LangString TEXT_IO_SUBTITLE ${LANG_ENGLISH} "A subtitle"
+
+Function FunctionName ;FunctionName defined with Page command
+
+  !insertmacro MUI_HEADER_TEXT "$(TEXT_IO_TITLE)" "$(TEXT_IO_SUBTITLE)"
+
+  Push $R0
+  Push $R1
+  Push $R2
+
+    !insertmacro MUI_INSTALLOPTIONS_INITDIALOG "ioFile.ini"
+    Pop $R0
+    
+    GetDlgItem $R1 $R0 1200 ;1200 + Field number - 1
+    
+    ;$R1 contains the HWND of the first field
+    CreateFont $R2 "Tahoma" 10 700 
+    SendMessage $R1 ${WM_SETFONT} $R2 0
+	
+    !insertmacro MUI_INSTALLOPTIONS_SHOW
+	
+  Pop $R1
+  Pop $R1
+  Pop $R0
+
 FunctionEnd
 

To read or write values to the INI Files on runtime, use these macro's:

@@ -356,6 +384,20 @@ FunctionEnd !insertmacro MUI_INSTALLOPTIONS_READ $VAR "ioFile.ini" "Field #" "Value Name" !insertmacro MUI_INSTALLOPTIONS_WRITE "ioFile.ini" "Field #" "Value Name" "Value" +

Reserve files

+

If you are using BZIP2 compression, it's important that +files which are being extracted in the .onInit function or in Page +functions are first in the data block, because this will make your installer +start faster.

+

If these functions are not above any other File command, +insert the ReserveFile commands or macro's above other File commands:

+
+ReserveFile "ioFile.ini" ;Your own InstallOptions INI files
+
+!insertmacro MUI_RESERVEFILE_WELCOMEFINISHPAGE ;Welcome- or Finish page
+!insertmacro MUI_RESERVEFILE_INSTALLOPTION ;InstallOptions
+!insertmacro MUI_RESERVEFILE_LANGDLL ;LangDLL (language selection page)
+

Examples

Basic: Basic.nsi
Multilanguage: MultiLanguage.nsi
@@ -368,7 +410,7 @@ FunctionEnd

There are three different versions of the Modern UI. Modern.exe contains the dialogs of the standard interface. If you have an installer with a lot of subsections or long section - names, use modern2.exe, which has a different component-selection page. + names, use modern2.exe, which has a different component selection page. Use modern3.exe if you are not using descriptions.

Customize the dialogs

To change elements on the dialogs, modify modern?.exe @@ -400,32 +442,35 @@ FunctionEnd

Version history

    -
  • 1.62 - December 14, 2002 +
  • 1.62 - December 15, 2002
    • No problems anymore when using both 'Run program' and 'Show Readme' - on the finish page -
    • Default state of checkboxes on the finish page can be changed -
    • Welcome / Finish pages compatible with custom DPI settings -
    • Converted Install Options INI files to use dialog units + on the finish page
    • +
    • Default state of checkboxes on the finish page can be changed
    • +
    • Welcome / Finish page compatible with custom DPI settings
    • +
    • Converted Install Options INI files to use dialog units
    • +
    • Support for multilingual branding texts
    • +
    • More ReserveFile macro's
    • +
    • Background color can be changed with a define

    -
  • 1.61 - December 5, 2002 +
  • 1.61 - December 5, 2002
      -
    • Final version for NSIS 2 beta 0 -
    • modern3.exe UI without description area -
    • Added define to show uninstall confirm page -
    • Added language string for finish page title and continue to uninstall -
    • Define for parameters for the application to run on the finish page +
    • Final version for NSIS 2 beta 0
    • +
    • modern3.exe UI without description area
    • +
    • Added define to show uninstall confirm page
    • +
    • Added language string for finish page title and continue to uninstall
    • +
    • Define for parameters for the application to run on the finish page
    • Bugfixes

    -
  • 1.6 - November 18, 2002 +
  • 1.6 - November 18, 2002
      -
    • Welcome / Finish pages -
    • Automatic ask for reboot on the finish page -
    • Create no shortcut option on the Start Menu Folder selection page -
    • Customizing GUIInit functions easier -
    • Minor font / UI changes +
    • Welcome / Finish page
    • +
    • Automatic ask for reboot on the finish page
    • +
    • Create no shortcut option on the Start Menu Folder selection page
    • +
    • Customizing GUIInit functions easier
    • +
    • Minor font / UI changes

Complete version history

diff --git a/Contrib/Modern UI/System.nsh b/Contrib/Modern UI/System.nsh index 8390ed33..586bb613 100644 --- a/Contrib/Modern UI/System.nsh +++ b/Contrib/Modern UI/System.nsh @@ -83,10 +83,6 @@ !define MUI_PROGRESSBAR "smooth" !endif - !ifndef MUI_BRANDINGTEXT - !define MUI_BRANDINGTEXT "" ;Default value - !endif - !ifndef MUI_SPECIALINI !define MUI_SPECIALINI "${NSISDIR}\Contrib\Modern UI\ioSpecial.ini" !endif @@ -95,6 +91,10 @@ !define MUI_SPECIALBITMAP "${NSISDIR}\Contrib\Icons\modern-wizard.bmp" !endif + !ifndef MUI_BGCOLOR + !define MUI_BGCOLOR "0xFFFFFF" + !endif + !ifdef MUI_FINISHPAGE !ifndef MUI_FINISHPAGE_NOAUTOCLOSE AutoCloseWindow true @@ -110,7 +110,6 @@ SetFont "${MUI_FONT}" "${MUI_FONTSIZE}" InstallColors ${MUI_INSTALLCOLORS} InstProgressFlags ${MUI_PROGRESSBAR} - BrandingText /TRIMRIGHT "${MUI_BRANDINGTEXT}" !ifndef MUI_NOVERBOSE !verbose 4 @@ -281,16 +280,16 @@ GetDlgItem ${MUI_TEMP1} $HWNDPARENT 1037 CreateFont ${MUI_TEMP2} "${MUI_FONT_HEADER}" "${MUI_FONTSIZE_HEADER}" "${MUI_FONTSTYLE_HEADER}" SendMessage ${MUI_TEMP1} ${WM_SETFONT} ${MUI_TEMP2} 0 - SetStaticBkColor ${MUI_TEMP1} 0x00FFFFFF + SetStaticBkColor ${MUI_TEMP1} "${MUI_BGCOLOR}" GetDlgItem ${MUI_TEMP1} $HWNDPARENT 1038 - SetStaticBkColor ${MUI_TEMP1} 0x00FFFFFF + SetStaticBkColor ${MUI_TEMP1} "${MUI_BGCOLOR}" GetDlgItem ${MUI_TEMP1} $HWNDPARENT 1034 - SetStaticBkColor ${MUI_TEMP1} 0x00FFFFFF + SetStaticBkColor ${MUI_TEMP1} "${MUI_BGCOLOR}" GetDlgItem ${MUI_TEMP1} $HWNDPARENT 1039 - SetStaticBkColor ${MUI_TEMP1} 0x00FFFFFF + SetStaticBkColor ${MUI_TEMP1} "${MUI_BGCOLOR}" Pop ${MUI_TEMP2} Pop ${MUI_TEMP1} @@ -313,16 +312,16 @@ GetDlgItem ${MUI_TEMP1} $HWNDPARENT 1037 CreateFont ${MUI_TEMP2} "${MUI_FONT_HEADER}" "${MUI_FONTSIZE_HEADER}" "${MUI_FONTSTYLE_HEADER}" SendMessage ${MUI_TEMP1} ${WM_SETFONT} ${MUI_TEMP2} 0 - SetStaticBkColor ${MUI_TEMP1} 0x00FFFFFF + SetStaticBkColor ${MUI_TEMP1} "${MUI_BGCOLOR}" GetDlgItem ${MUI_TEMP1} $HWNDPARENT 1038 - SetStaticBkColor ${MUI_TEMP1} 0x00FFFFFF + SetStaticBkColor ${MUI_TEMP1} "${MUI_BGCOLOR}" GetDlgItem ${MUI_TEMP1} $HWNDPARENT 1034 - SetStaticBkColor ${MUI_TEMP1} 0x00FFFFFF + SetStaticBkColor ${MUI_TEMP1} "${MUI_BGCOLOR}" GetDlgItem ${MUI_TEMP1} $HWNDPARENT 1039 - SetStaticBkColor ${MUI_TEMP1} 0x00FFFFFF + SetStaticBkColor ${MUI_TEMP1} "${MUI_BGCOLOR}" Pop ${MUI_TEMP2} Pop ${MUI_TEMP1} @@ -335,7 +334,7 @@ !macro MUI_WELCOMEFINISHPAGE_INIT - ;Extract Install Options INI Files + ;Extract InstallOptions INI Files !insertmacro MUI_INSTALLOPTIONS_EXTRACT_CUSTOMNAME "${MUI_SPECIALINI}" "ioSpecial.ini" !insertmacro MUI_INSTALLOPTIONS_EXTRACT_CUSTOMNAME "${MUI_SPECIALBITMAP}" "modern-wizard.bmp" @@ -623,8 +622,12 @@ !verbose 3 !endif + Push ${MUI_TEMP1} + InstallOptions::dialog "$PLUGINSDIR\${FILE}" Pop ${MUI_TEMP1} + + Pop ${MUI_TEMP1} !ifndef MUI_NOVERBOSE !verbose 4 @@ -637,7 +640,7 @@ !ifndef MUI_NOVERBOSE !verbose 3 !endif - + InstallOptions::initDialog /NOUNLOAD "$PLUGINSDIR\${FILE}" !ifndef MUI_NOVERBOSE @@ -652,19 +655,7 @@ !verbose 3 !endif - Push ${MUI_TEMP1} - InstallOptions::show - Pop ${MUI_TEMP1} - - StrCmp ${MUI_TEMP1} "cancel" "" +2 - Quit - - StrCmp ${MUI_TEMP1} "back" "" +3 - Pop ${MUI_TEMP1} - Abort - - Pop ${MUI_TEMP1} !ifndef MUI_NOVERBOSE !verbose 4 @@ -808,15 +799,15 @@ Pop ${MUI_TEMP1} - SetStaticBkColor ${MUI_TEMP1} 0x00FFFFFF + SetStaticBkColor ${MUI_TEMP1} "${MUI_BGCOLOR}" GetDlgItem ${MUI_TEMP2} ${MUI_TEMP1} 1201 - SetStaticBkColor ${MUI_TEMP2} 0x00FFFFFF + SetStaticBkColor ${MUI_TEMP2} "${MUI_BGCOLOR}" CreateFont ${MUI_TEMP3} "${MUI_FONT_TITLE}" "${MUI_FONTSIZE_TITLE}" "${MUI_FONTSTYLE_TITLE}" SendMessage ${MUI_TEMP2} ${WM_SETFONT} ${MUI_TEMP3} 0 GetDlgItem ${MUI_TEMP2} ${MUI_TEMP1} 1202 - SetStaticBkColor ${MUI_TEMP2} 0x00FFFFFF + SetStaticBkColor ${MUI_TEMP2} "${MUI_BGCOLOR}" !insertmacro MUI_INSTALLOPTIONS_SHOW @@ -1060,25 +1051,25 @@ Pop ${MUI_TEMP1} - SetStaticBkColor ${MUI_TEMP1} 0x00FFFFFF + SetStaticBkColor ${MUI_TEMP1} "${MUI_BGCOLOR}" GetDlgItem ${MUI_TEMP2} ${MUI_TEMP1} 1201 - SetStaticBkColor ${MUI_TEMP2} 0x00FFFFFF + SetStaticBkColor ${MUI_TEMP2} "${MUI_BGCOLOR}" CreateFont ${MUI_TEMP3} "${MUI_FONT_TITLE}" "${MUI_FONTSIZE_TITLE}" "${MUI_FONTSTYLE_TITLE}" SendMessage ${MUI_TEMP2} ${WM_SETFONT} ${MUI_TEMP3} 0 GetDlgItem ${MUI_TEMP2} ${MUI_TEMP1} 1202 - SetStaticBkColor ${MUI_TEMP2} 0x00FFFFFF + SetStaticBkColor ${MUI_TEMP2} "${MUI_BGCOLOR}" !ifndef MUI_FINISHPAGE_NOREBOOTSUPPORT IfRebootFlag "" noreboot_show GetDlgItem ${MUI_TEMP2} ${MUI_TEMP1} 1203 - SetStaticBkColor ${MUI_TEMP2} 0x00FFFFFF + SetStaticBkColor ${MUI_TEMP2} "${MUI_BGCOLOR}" GetDlgItem ${MUI_TEMP2} ${MUI_TEMP1} 1204 - SetStaticBkColor ${MUI_TEMP2} 0x00FFFFFF + SetStaticBkColor ${MUI_TEMP2} "${MUI_BGCOLOR}" Goto show @@ -1089,19 +1080,19 @@ !ifdef MUI_FINISHPAGE_RUN GetDlgItem ${MUI_TEMP2} ${MUI_TEMP1} 1203 - SetStaticBkColor ${MUI_TEMP2} 0x00FFFFFF + SetStaticBkColor ${MUI_TEMP2} "${MUI_BGCOLOR}" !ifdef MUI_FINISHPAGE_SHOWREADME GetDlgItem ${MUI_TEMP2} ${MUI_TEMP1} 1204 - SetStaticBkColor ${MUI_TEMP2} 0x00FFFFFF + SetStaticBkColor ${MUI_TEMP2} "${MUI_BGCOLOR}" !endif !else ifdef MUI_FINISHPAGE_SHOWREADME GetDlgItem ${MUI_TEMP2} ${MUI_TEMP1} 1203 - SetStaticBkColor ${MUI_TEMP2} 0x00FFFFFF + SetStaticBkColor ${MUI_TEMP2} "${MUI_BGCOLOR}" !endif @@ -1296,32 +1287,70 @@ ;-------------------------------- ;RESERVE FILES -!macro MUI_RESERVEFILE_INSTALLOPTIONS +!macro MUI_RESERVEFILE_WELCOMEFINISHPAGE !verbose 3 + + !define MUI_NOVERBOSE + + !insertmacro MUI_RESERVEFILE_SPECIALINI + !insertmacro MUI_RESERVEFILE_SPECIALBITMAP + !insertmacro MUI_RESERVEFILE_INSTALLOPTIONS + + !undef MUI_NOVERBOSE + + !verbose 4 + +!macroend + +!macro MUI_RESERVEFILE_INSTALLOPTIONS + + !ifndef MUI_NOVERBOSE + !verbose 3 + !endif ReserveFile "${NSISDIR}\Plugins\InstallOptions.dll" - !verbose 4 + !ifndef MUI_NOVERBOSE + !verbose 4 + !endif !macroend !macro MUI_RESERVEFILE_SPECIALINI - !verbose 3 + !ifndef MUI_NOVERBOSE + !verbose 3 + !endif ReserveFile "${NSISDIR}\Contrib\Modern UI\ioSpecial.ini" - !verbose 4 + !ifndef MUI_NOVERBOSE + !verbose 4 + !endif !macroend !macro MUI_RESERVEFILE_SPECIALBITMAP - !verbose 3 + !ifndef MUI_NOVERBOSE + !verbose 3 + !endif ReserveFile "${NSISDIR}\Contrib\Icons\modern-wizard.bmp" + !ifndef MUI_NOVERBOSE + !verbose 4 + !endif + +!macroend + +!macro MUI_RESERVEFILE_LANGDLL + + !verbose 3 + + ReserveFile "${NSISDIR}\Plugins\LangDLL.dll" + !verbose 4 !macroend @@ -1451,14 +1480,14 @@ !macro MUI_LANGUAGEFILE_NSISCOMMAND COMMAND NAME - "${COMMAND}" "${${NAME}}" + ${COMMAND} "${${NAME}}" !undef "${NAME}" !macroend !macro MUI_LANGUAGEFILE_NSISCOMMAND_MULTIPARAMETER COMMAND NAME VALUE - "${COMMAND}" ${VALUE} + ${COMMAND} ${VALUE} !undef "${NAME}" !macroend @@ -1468,17 +1497,17 @@ !ifndef "${INSTALLBUTTON}" !ifdef MUI_TEXT_CONTINUE_NEXT - "${COMMAND}" "${${NAME}} ${MUI_TEXT_CONTINUE_NEXT}" + ${COMMAND} "${${NAME}} ${MUI_TEXT_CONTINUE_NEXT}" !else - "${COMMAND}" "${${NAME}}" + ${COMMAND} "${${NAME}}" !endif !else !ifdef MUI_TEXT_CONTINUE_INSTALL - "${COMMAND}" "${${NAME}} ${MUI_TEXT_CONTINUE_INSTALL}" + ${COMMAND} "${${NAME}} ${MUI_TEXT_CONTINUE_INSTALL}" !else - "${COMMAND}" "${${NAME}}" + ${COMMAND} "${${NAME}}" !endif !endif @@ -1492,17 +1521,17 @@ !ifndef "${INSTALLBUTTON}" !ifdef MUI_TEXT_CONTINUE_NEXT - "${COMMAND}" "${${NAME}} ${MUI_TEXT_CONTINUE_NEXT}" + ${COMMAND} "${${NAME}} ${MUI_TEXT_CONTINUE_NEXT}" !else - "${COMMAND}" "${${NAME}}" + ${COMMAND} "${${NAME}}" !endif !else !ifdef MUI_UNTEXT_CONTINUE_UNINSTALL - "${COMMAND}" "${${NAME}} ${MUI_UNTEXT_CONTINUE_UNINSTALL}" + ${COMMAND} "${${NAME}} ${MUI_UNTEXT_CONTINUE_UNINSTALL}" !else - "${COMMAND}" "${${NAME}}" + ${COMMAND} "${${NAME}}" !endif !endif @@ -1549,7 +1578,12 @@ !insertmacro MUI_LANGUAGEFILE_DEFINE "MUI_${LANGUAGE}_LANGNAME" "MUI_LANGNAME" - !insertmacro MUI_LANGUAGEFILE_NSISCOMMAND Name MUI_NAME + !insertmacro MUI_LANGUAGEFILE_NSISCOMMAND "Name" "MUI_NAME" + + !ifndef MUI_BRANDINGTEXT + !define MUI_BRANDINGTEXT "" + !endif + !insertmacro MUI_LANGUAGEFILE_NSISCOMMAND "BrandingText /TRIMRIGHT" "MUI_BRANDINGTEXT" !ifdef MUI_WELCOMEPAGE !insertmacro MUI_LANGUAGEFILE_LANGSTRING "MUI_TEXT_WELCOME_INFO_TITLE" diff --git a/Examples/Modern UI/Basic.nsi b/Examples/Modern UI/Basic.nsi index 7f6b13e5..d24025b4 100644 --- a/Examples/Modern UI/Basic.nsi +++ b/Examples/Modern UI/Basic.nsi @@ -31,7 +31,7 @@ ;Descriptions LangString DESC_SecCopyUI ${LANG_ENGLISH} "Copy the modern.exe file to the application folder." - ;Folder-selection page + ;Folder selection page InstallDir "$PROGRAMFILES\${MUI_PRODUCT}" ;-------------------------------- diff --git a/Examples/Modern UI/InstallOptions.nsi b/Examples/Modern UI/InstallOptions.nsi index 19dcf025..b675a6ef 100644 --- a/Examples/Modern UI/InstallOptions.nsi +++ b/Examples/Modern UI/InstallOptions.nsi @@ -1,5 +1,5 @@ ;NSIS Modern User Interface version 1.62 -;Install Options Example Script +;InstallOptions Example Script ;Written by Joost Verburg !define MUI_PRODUCT "Test Software" ;Define your own software name here @@ -29,10 +29,10 @@ ;General OutFile "InstallOptions.exe" - ;Install Options pages + ;InstallOptions pages ;Header - LangString TEXT_IO_TITLE ${LANG_ENGLISH} "Install Options Page" + LangString TEXT_IO_TITLE ${LANG_ENGLISH} "InstallOptions Page" LangString TEXT_IO_SUBTITLE ${LANG_ENGLISH} "Create your own dialog!" ;Window titles @@ -52,20 +52,20 @@ ;License page LicenseData "${NSISDIR}\Contrib\Modern UI\License.txt" - ;Component-selection page + ;Component selection page ;Descriptions LangString DESC_SecCopyUI ${LANG_ENGLISH} "Copy the modern.exe file to the application folder." - ;Folder-selection page + ;Folder selection page InstallDir "$PROGRAMFILES\${MUI_PRODUCT}" ;Things that need to be extracted on startup (keep these lines before any File command!) ;Only useful for BZIP2 compression - ;Use ReserveFile for your own Install Options ini files too! - !insertmacro MUI_RESERVEFILE_INSTALLOPTIONS + ;Use ReserveFile for your own InstallOptions INI files too! ReserveFile "ioA.ini" ReserveFile "ioB.ini" ReserveFile "ioC.ini" + !insertmacro MUI_RESERVEFILE_INSTALLOPTIONS ;-------------------------------- ;Modern UI System @@ -82,7 +82,7 @@ Section "modern.exe" SecCopyUI SetOutPath "$INSTDIR" File "${NSISDIR}\Contrib\UIs\modern.exe" - ;Read a value from an Install Options INI File + ;Read a value from an InstallOptions INI File !insertmacro MUI_INSTALLOPTIONS_READ ${TEMP1} "ioC.ini" "Field 2" "State" StrCmp ${TEMP1} "1" "" +2 ;Checked @@ -109,7 +109,7 @@ SectionEnd Function .onInit - ;Extract Install Options INI Files + ;Extract InstallOptions INI Files !insertmacro MUI_INSTALLOPTIONS_EXTRACT "ioA.ini" !insertmacro MUI_INSTALLOPTIONS_EXTRACT "ioB.ini" !insertmacro MUI_INSTALLOPTIONS_EXTRACT "ioC.ini" diff --git a/Examples/Modern UI/MultiLanguage.nsi b/Examples/Modern UI/MultiLanguage.nsi index 32cb7a67..bbb0cd54 100644 --- a/Examples/Modern UI/MultiLanguage.nsi +++ b/Examples/Modern UI/MultiLanguage.nsi @@ -59,7 +59,7 @@ LicenseData /LANG=${LANG_BULGARIAN} "${NSISDIR}\Contrib\Modern UI\License.txt" LicenseData /LANG=${LANG_THAI} "${NSISDIR}\Contrib\Modern UI\License.txt" - ;Component-selection page + ;Component selection page ;Titles LangString TITLE_SecCopyUI ${LANG_ENGLISH} "modern.exe" LangString TITLE_SecCopyUI ${LANG_FRENCH} "modern.exe" @@ -98,9 +98,13 @@ LangString DESC_SecCopyUI ${LANG_BULGARIAN} "modern.exe: Bulgarian description" LangString DESC_SecCopyUI ${LANG_THAI} "modern.exe: Thai description" - ;Folder-selection page + ;Folder selection page InstallDir "$PROGRAMFILES\${MUI_PRODUCT}" + ;Things that need to be extracted on first (keep these lines before any File command!) + ;Only useful for BZIP2 compression + !insertmacro MUI_RESERVEFILE_LANGDLL + ;-------------------------------- ;Modern UI System diff --git a/Examples/Modern UI/WelcomeFinish.nsi b/Examples/Modern UI/WelcomeFinish.nsi index d727223f..53c1b5c6 100644 --- a/Examples/Modern UI/WelcomeFinish.nsi +++ b/Examples/Modern UI/WelcomeFinish.nsi @@ -32,19 +32,16 @@ ;License page LicenseData "${NSISDIR}\Contrib\Modern UI\License.txt" - ;Component-selection page + ;Component selection page ;Descriptions LangString DESC_SecCopyUI ${LANG_ENGLISH} "Copy the modern.exe file to the application folder." - ;Folder-selection page + ;Folder selection page InstallDir "$PROGRAMFILES\${MUI_PRODUCT}" - ;Things that need to be extracted on startup (keep these lines before any File command!) + ;Things that need to be extracted on first (keep these lines before any File command!) ;Only useful for BZIP2 compression - ;Use ReserveFile for your own Install Options ini files too! - !insertmacro MUI_RESERVEFILE_INSTALLOPTIONS - !insertmacro MUI_RESERVEFILE_SPECIALINI - !insertmacro MUI_RESERVEFILE_SPECIALBITMAP + !insertmacro MUI_RESERVEFILE_WELCOMEFINISHPAGE ;-------------------------------- ;Modern UI System