no finish header macro's anymore - language preference stored when installation has completed

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@2373 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
joostverburg 2003-03-26 21:54:02 +00:00
parent e0871d504d
commit 17c687180a
9 changed files with 46 additions and 104 deletions

View file

@ -2,7 +2,10 @@ NSIS Modern User Interface - VERSION HISTORY
1.64 - March 26, 2003 1.64 - March 26, 2003
* Support for license page with checkbox or radiobuttons to let the * Support for license page with checkbox or radiobuttons to let the
user accept the agreement or not user accept the agreement or not
* Macro's for finish headers don't have to be inserted anymore
* Language preference stored when installation has completed,
no problems anymore when the users selects the wrong language
* Language files have to be updated * Language files have to be updated
1.63 - March 9, 2003 1.63 - March 9, 2003

View file

@ -332,6 +332,7 @@ follow these steps:</p>
</pre> </pre>
<p class="text">Have a look at the language files for a complete list of all the <p class="text">Have a look at the language files for a complete list of all the
string names.</p> string names.</p>
<p class="text"><span class="bold">Language selection dialog</span></p>
<p class="text">If you want the installer to display a language selection dialog <p class="text">If you want the installer to display a language selection dialog
(have a look at the <a href="../../Examples/Modern UI/MultiLanguage.nsi"> (have a look at the <a href="../../Examples/Modern UI/MultiLanguage.nsi">
MultiLanguage.nsi</a> example), insert the MUI_LANGDLL_DISPLAY macro in .onInit:</p> MultiLanguage.nsi</a> example), insert the MUI_LANGDLL_DISPLAY macro in .onInit:</p>
@ -342,25 +343,18 @@ Function .onInit
FunctionEnd FunctionEnd
</pre> </pre>
<p class="text">To customize the texts on the language selection dialog, define <p class="text">To customize the language selection dialog, use these defines:</p>
MUI_TEXT_LANGDLL_WINDOWTITLE and MUI_TEXT_LANGDLL_INFO before inserting the macro.</p> <p class="text"><span class="bold">MUI_LANGDLL_WINDOWTITLE</span><br />
<p class="text">If you want the installer to remember the users language The window title of the language selection dialog.</p>
preference, define MUI_STARTMENUPAGE_REGISTRY_ROOT, MUI_STARTMENUPAGE_REGISTRY_KEY <p class="text"><span class="bold">MUI_LANGDLL_INFO</span><br />
and MUI_STARTMENUPAGE_REGISTRY_VALUENAME to set a registry key to store the The text on the language selection dialog.</p>
language. You can also use it in the uninstaller to display the right language. <p class="text"><span class="bold">MUI_LANGDLL_REGISTRY_ROOT </span><span class="parameter">root</span><br />
Don't forget to remove this key in the uninstaller.</p> <span class="bold">MUI_LANGDLL_REGISTRY_KEY </span><span class="parameter">key</span><br />
<p class="subheader">7. Insert the MUI_SECTIONS_FINISHHEADER macro</p> <span class="bold">MUI_LANGDLL_REGISTRY_VALUENAME </span><span class="parameter">value_name</span><br />
<p class="text">If you are not using a Finish page without The registry key to store the language. The users preference will be remembered.
MUI_FINISHPAGE_NOAUTOCLOSEWINDOW and have not set AutoCloseWindow You can also use it in the uninstaller to display the right language. Don't forget
to true, you should insert the MUI_SECTIONS_FINISHHEADER to remove this key in the uninstaller.</p>
after all the sections to display the finish header:</p> <p class="subheader">7. Set the descriptions for the sections</p>
<pre class="margin">!insertmacro MUI_SECTIONS_FINISHHEADER</pre>
<p class="text">For the uninstaller, insert MUI_UNFINISHHEADER at the end of the
Uninstall section:</p>
<pre class="margin">
!insertmacro MUI_UNFINISHHEADER
</pre>
<p class="subheader">8. Set the descriptions for the sections</p>
<p class="text">Insert the description macro's to set the descriptions <p class="text">Insert the description macro's to set the descriptions
for the sections. These descriptions will be displayed on the component for the sections. These descriptions will be displayed on the component
selection page, when the users hovers the mouse over a section. selection page, when the users hovers the mouse over a section.
@ -381,7 +375,7 @@ Section "Section Name 1" Section1
... ...
SectionEnd SectionEnd
</pre> </pre>
<p class="subheader">9. Reserve Files</p> <p class="subheader">8. Reserve Files</p>
<p class="text">If you are using BZIP2 compression, you might need to <p class="text">If you are using BZIP2 compression, you might need to
insert ReserveFile commands. <a href="#ReserveFile">More info...</a></p> insert ReserveFile commands. <a href="#ReserveFile">More info...</a></p>
<p class="header"><a name="customPages">Custom pages</a></p> <p class="header"><a name="customPages">Custom pages</a></p>
@ -595,6 +589,9 @@ MUI_UNCUSTOMFUNCTION_INSTFILES_LEAVE
<ul> <ul>
<li>Support for license page with checkbox or radiobuttons to <li>Support for license page with checkbox or radiobuttons to
let the user accept the agreement or not</li> let the user accept the agreement or not</li>
<li>Macro's for finish headers don't have to be inserted anymore</li>
<li>Language preference stored when installation has completed,
no problems anymore when the users selects the wrong language</li>
<li>Language files have to be updated</li> <li>Language files have to be updated</li>
</ul></li> </ul></li>
</ul> </ul>

View file

@ -270,36 +270,16 @@
!macro MUI_FINISHHEADER !macro MUI_FINISHHEADER
!ifndef MUI_NOVERBOSE && MUI_MANUALVERBOSE !ifndef MUI_FINISHPAGE && MUI_FINISHPAGE_NOAUTOCLOSE
!verbose 3 !insertmacro MUI_HEADER_TEXT $(MUI_TEXT_FINISH_TITLE) $(MUI_TEXT_FINISH_SUBTITLE)
!endif !endif
;Finish text on the header (white rectangle)
!insertmacro MUI_HEADER_TEXT $(MUI_TEXT_FINISH_TITLE) $(MUI_TEXT_FINISH_SUBTITLE)
!ifndef MUI_NOVERBOSE && MUI_MANUALVERBOSE
!verbose 4
!endif
!macroend !macroend
!macro MUI_UNFINISHHEADER !macro MUI_UNFINISHHEADER
!ifndef MUI_MANUALVERBOSE
!verbose 3
!endif
!define MUI_NOVERBOSE
;Finish text on the header (white rectangle)
!insertmacro MUI_HEADER_TEXT $(un.MUI_UNTEXT_FINISHED_TITLE) $(un.MUI_UNTEXT_FINISHED_SUBTITLE) !insertmacro MUI_HEADER_TEXT $(un.MUI_UNTEXT_FINISHED_TITLE) $(un.MUI_UNTEXT_FINISHED_SUBTITLE)
!undef MUI_NOVERBOSE
!ifndef MUI_MANUALVERBOSE
!verbose 4
!endif
!macroend !macroend
!macro MUI_ABORTWARNING !macro MUI_ABORTWARNING
@ -483,7 +463,6 @@
Abort Abort
!ifdef MUI_LANGDLL_REGISTRY_ROOT & MUI_LANGDLL_REGISTRY_KEY & MUI_LANGDLL_REGISTRY_VALUENAME !ifdef MUI_LANGDLL_REGISTRY_ROOT & MUI_LANGDLL_REGISTRY_KEY & MUI_LANGDLL_REGISTRY_VALUENAME
WriteRegStr "${MUI_LANGDLL_REGISTRY_ROOT}" "${MUI_LANGDLL_REGISTRY_KEY}" "${MUI_LANGDLL_REGISTRY_VALUENAME}" $LANGUAGE
langdll_done: langdll_done:
!endif !endif
@ -493,6 +472,14 @@
!macroend !macroend
!macro MUI_LANGDLL_SAVELANGUAGE
!ifdef MUI_LANGDLL_REGISTRY_ROOT & MUI_LANGDLL_REGISTRY_KEY & MUI_LANGDLL_REGISTRY_VALUENAME
WriteRegStr "${MUI_LANGDLL_REGISTRY_ROOT}" "${MUI_LANGDLL_REGISTRY_KEY}" "${MUI_LANGDLL_REGISTRY_VALUENAME}" $LANGUAGE
!endif
!macroend
;-------------------------------- ;--------------------------------
;PAGE COMMANDS ;PAGE COMMANDS
@ -833,24 +820,8 @@
!macro MUI_SECTIONS_FINISHHEADER !macro MUI_SECTIONS_FINISHHEADER
!ifndef MUI_MANUALVERBOSE ;1.63 compatibility
!verbose 3 !error "Remove '!insertmacro MUI_SECTIONS_FINISHHEADER' from your script."
!endif
!define MUI_NOVERBOSE
Section ""
;Invisible section to display the Finish header
!insertmacro MUI_FINISHHEADER
SectionEnd
!undef MUI_NOVERBOSE
!ifndef MUI_MANUALVERBOSE
!verbose 4
!endif
!macroend !macroend
@ -1168,6 +1139,10 @@
!ifdef MUI_CUSTOMFUNCTION_INSTFILES_LEAVE !ifdef MUI_CUSTOMFUNCTION_INSTFILES_LEAVE
Call "${MUI_CUSTOMFUNCTION_INSTFILES_LEAVE}" Call "${MUI_CUSTOMFUNCTION_INSTFILES_LEAVE}"
!endif !endif
!insertmacro MUI_FINISHHEADER
!insertmacro MUI_LANGDLL_SAVELANGUAGE
FunctionEnd FunctionEnd
!ifndef MUI_NOVERBOSE && MUI_MANUALVERBOSE !ifndef MUI_NOVERBOSE && MUI_MANUALVERBOSE
@ -1534,10 +1509,10 @@
!endif !endif
Function "${PRE}" Function "${PRE}"
!insertmacro MUI_HEADER_TEXT $(un.MUI_UNTEXT_INTRO_TITLE) $(un.MUI_UNTEXT_INTRO_SUBTITLE)
!ifdef MUI_UNCUSTOMFUNCTION_CONFIRM_PRE !ifdef MUI_UNCUSTOMFUNCTION_CONFIRM_PRE
Call "${MUI_UNCUSTOMFUNCTION_CONFIRM_PRE}" Call "${MUI_UNCUSTOMFUNCTION_CONFIRM_PRE}"
!endif !endif
!insertmacro MUI_HEADER_TEXT $(un.MUI_UNTEXT_INTRO_TITLE) $(un.MUI_UNTEXT_INTRO_SUBTITLE)
FunctionEnd FunctionEnd
Function "${SHOW}" Function "${SHOW}"
@ -1565,10 +1540,10 @@
!endif !endif
Function ${PRE} Function ${PRE}
!insertmacro MUI_HEADER_TEXT $(un.MUI_UNTEXT_UNINSTALLING_TITLE) $(un.MUI_UNTEXT_UNINSTALLING_SUBTITLE)
!ifdef MUI_UNCUSTOMFUNCTION_INSTFILES_PRE !ifdef MUI_UNCUSTOMFUNCTION_INSTFILES_PRE
Call "${MUI_UNCUSTOMFUNCTION_INSTFILES_PRE}" Call "${MUI_UNCUSTOMFUNCTION_INSTFILES_PRE}"
!endif !endif
!insertmacro MUI_HEADER_TEXT $(un.MUI_UNTEXT_UNINSTALLING_TITLE) $(un.MUI_UNTEXT_UNINSTALLING_SUBTITLE)
FunctionEnd FunctionEnd
Function "${SHOW}" Function "${SHOW}"
@ -1581,6 +1556,7 @@
!ifdef MUI_UNCUSTOMFUNCTION_INSTFILES_LEAVE !ifdef MUI_UNCUSTOMFUNCTION_INSTFILES_LEAVE
Call "${MUI_UNCUSTOMFUNCTION_INSTFILES_LEAVE}" Call "${MUI_UNCUSTOMFUNCTION_INSTFILES_LEAVE}"
!endif !endif
!insertmacro MUI_UNFINISHHEADER
FunctionEnd FunctionEnd
!ifndef MUI_NOVERBOSE && MUI_MANUALVERBOSE !ifndef MUI_NOVERBOSE && MUI_MANUALVERBOSE
@ -1934,8 +1910,10 @@
!insertmacro MUI_LANGUAGEFILE_LANGSTRING "MUI_TEXT_INSTALLING_TITLE" !insertmacro MUI_LANGUAGEFILE_LANGSTRING "MUI_TEXT_INSTALLING_TITLE"
!insertmacro MUI_LANGUAGEFILE_LANGSTRING "MUI_TEXT_INSTALLING_SUBTITLE" !insertmacro MUI_LANGUAGEFILE_LANGSTRING "MUI_TEXT_INSTALLING_SUBTITLE"
!insertmacro MUI_LANGUAGEFILE_LANGSTRING "MUI_TEXT_FINISH_TITLE" !ifndef MUI_FINISHPAGE && MUI_FINISHPAGE_NOAUTOCLOSE
!insertmacro MUI_LANGUAGEFILE_LANGSTRING "MUI_TEXT_FINISH_SUBTITLE" !insertmacro MUI_LANGUAGEFILE_LANGSTRING "MUI_TEXT_FINISH_TITLE"
!insertmacro MUI_LANGUAGEFILE_LANGSTRING "MUI_TEXT_FINISH_SUBTITLE"
!endif
!ifdef MUI_FINISHPAGE !ifdef MUI_FINISHPAGE
!insertmacro MUI_LANGUAGEFILE_NSISCOMMAND_MULTIPARAMETER "MiscButtonText" "MUI_TEXT_FINISH_BUTTON" '"" "" "" "${MUI_TEXT_FINISH_BUTTON}"' !insertmacro MUI_LANGUAGEFILE_NSISCOMMAND_MULTIPARAMETER "MiscButtonText" "MUI_TEXT_FINISH_BUTTON" '"" "" "" "${MUI_TEXT_FINISH_BUTTON}"'

View file

@ -65,10 +65,6 @@ Section "modern.exe" SecCopyUI
SectionEnd SectionEnd
;Display the Finish header
;Insert this macro after the sections if you are not using a finish page
!insertmacro MUI_SECTIONS_FINISHHEADER
;-------------------------------- ;--------------------------------
;Descriptions ;Descriptions
@ -89,8 +85,5 @@ Section "Uninstall"
RMDir "$INSTDIR" RMDir "$INSTDIR"
DeleteRegKey /ifempty HKCU "Software\${MUI_PRODUCT}" DeleteRegKey /ifempty HKCU "Software\${MUI_PRODUCT}"
;Display the Finish header
!insertmacro MUI_UNFINISHHEADER
SectionEnd SectionEnd

View file

@ -75,10 +75,6 @@ Section "modern.exe" SecCopyUI
SectionEnd SectionEnd
;Display the Finish header
;Insert this macro after the sections if you are not using a finish page
!insertmacro MUI_SECTIONS_FINISHHEADER
;-------------------------------- ;--------------------------------
;Descriptions ;Descriptions
@ -100,7 +96,4 @@ Section "Uninstall"
DeleteRegKey /ifempty HKCU "Software\${MUI_PRODUCT}" DeleteRegKey /ifempty HKCU "Software\${MUI_PRODUCT}"
;Display the Finish header
!insertmacro MUI_UNFINISHHEADER
SectionEnd SectionEnd

View file

@ -101,10 +101,6 @@ Section "modern.exe" SecCopyUI
SectionEnd SectionEnd
;Display the Finish header
;Insert this macro after the sections if you are not using a finish page
!insertmacro MUI_SECTIONS_FINISHHEADER
;-------------------------------- ;--------------------------------
;Descriptions ;Descriptions
@ -152,7 +148,5 @@ Section "Uninstall"
RMDir "$INSTDIR" RMDir "$INSTDIR"
DeleteRegKey /ifempty HKCU "Software\${MUI_PRODUCT}" DeleteRegKey /ifempty HKCU "Software\${MUI_PRODUCT}"
!insertmacro MUI_UNFINISHHEADER
SectionEnd SectionEnd

View file

@ -147,10 +147,6 @@ Section "modern.exe" SecCopyUI
WriteUninstaller "$INSTDIR\Uninstall.exe" WriteUninstaller "$INSTDIR\Uninstall.exe"
SectionEnd SectionEnd
;Display the Finish header
;Insert this macro after the sections if you are not using a finish page
!insertmacro MUI_SECTIONS_FINISHHEADER
;-------------------------------- ;--------------------------------
;Installer Functions ;Installer Functions
@ -182,9 +178,6 @@ Section "Uninstall"
DeleteRegKey /ifempty HKCU "Software\${MUI_PRODUCT}" DeleteRegKey /ifempty HKCU "Software\${MUI_PRODUCT}"
;Display the Finish header
!insertmacro MUI_UNFINISHHEADER
SectionEnd SectionEnd
;-------------------------------- ;--------------------------------

View file

@ -89,10 +89,6 @@ Section "modern.exe" SecCopyUI
SectionEnd SectionEnd
;Display the Finish header
;Insert this macro after the sections if you are not using a finish page
!insertmacro MUI_SECTIONS_FINISHHEADER
;-------------------------------- ;--------------------------------
;Descriptions ;Descriptions
@ -125,7 +121,4 @@ Section "Uninstall"
DeleteRegKey /ifempty HKCU "Software\${MUI_PRODUCT}" DeleteRegKey /ifempty HKCU "Software\${MUI_PRODUCT}"
;Display the Finish header
!insertmacro MUI_UNFINISHHEADER
SectionEnd SectionEnd

View file

@ -96,6 +96,4 @@ Section "Uninstall"
DeleteRegKey /ifempty HKCU "Software\${MUI_PRODUCT}" DeleteRegKey /ifempty HKCU "Software\${MUI_PRODUCT}"
!insertmacro MUI_UNFINISHHEADER
SectionEnd SectionEnd