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
* 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
1.63 - March 9, 2003

View file

@ -332,6 +332,7 @@ follow these steps:</p>
</pre>
<p class="text">Have a look at the language files for a complete list of all the
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
(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>
@ -342,25 +343,18 @@ Function .onInit
FunctionEnd
</pre>
<p class="text">To customize the texts on the language selection dialog, define
MUI_TEXT_LANGDLL_WINDOWTITLE and MUI_TEXT_LANGDLL_INFO before inserting the macro.</p>
<p class="text">If you want the installer to remember the users language
preference, define MUI_STARTMENUPAGE_REGISTRY_ROOT, MUI_STARTMENUPAGE_REGISTRY_KEY
and MUI_STARTMENUPAGE_REGISTRY_VALUENAME to set a registry key to store the
language. You can also use it in the uninstaller to display the right language.
Don't forget to remove this key in the uninstaller.</p>
<p class="subheader">7. Insert the MUI_SECTIONS_FINISHHEADER macro</p>
<p class="text">If you are not using a Finish page without
MUI_FINISHPAGE_NOAUTOCLOSEWINDOW and have not set AutoCloseWindow
to true, you should insert the MUI_SECTIONS_FINISHHEADER
after all the sections to display the finish header:</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">To customize the language selection dialog, use these defines:</p>
<p class="text"><span class="bold">MUI_LANGDLL_WINDOWTITLE</span><br />
The window title of the language selection dialog.</p>
<p class="text"><span class="bold">MUI_LANGDLL_INFO</span><br />
The text on the language selection dialog.</p>
<p class="text"><span class="bold">MUI_LANGDLL_REGISTRY_ROOT </span><span class="parameter">root</span><br />
<span class="bold">MUI_LANGDLL_REGISTRY_KEY </span><span class="parameter">key</span><br />
<span class="bold">MUI_LANGDLL_REGISTRY_VALUENAME </span><span class="parameter">value_name</span><br />
The registry key to store the language. The users preference will be remembered.
You can also use it in the uninstaller to display the right language. Don't forget
to remove this key in the uninstaller.</p>
<p class="subheader">7. Set the descriptions for the sections</p>
<p class="text">Insert the description macro's to set the descriptions
for the sections. These descriptions will be displayed on the component
selection page, when the users hovers the mouse over a section.
@ -381,7 +375,7 @@ Section "Section Name 1" Section1
...
SectionEnd
</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
insert ReserveFile commands. <a href="#ReserveFile">More info...</a></p>
<p class="header"><a name="customPages">Custom pages</a></p>
@ -595,6 +589,9 @@ MUI_UNCUSTOMFUNCTION_INSTFILES_LEAVE
<ul>
<li>Support for license page with checkbox or radiobuttons to
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>
</ul></li>
</ul>

View file

@ -270,36 +270,16 @@
!macro MUI_FINISHHEADER
!ifndef MUI_NOVERBOSE && MUI_MANUALVERBOSE
!verbose 3
!ifndef MUI_FINISHPAGE && MUI_FINISHPAGE_NOAUTOCLOSE
!insertmacro MUI_HEADER_TEXT $(MUI_TEXT_FINISH_TITLE) $(MUI_TEXT_FINISH_SUBTITLE)
!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
!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)
!undef MUI_NOVERBOSE
!ifndef MUI_MANUALVERBOSE
!verbose 4
!endif
!macroend
!macro MUI_ABORTWARNING
@ -483,7 +463,6 @@
Abort
!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:
!endif
@ -493,6 +472,14 @@
!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
@ -833,24 +820,8 @@
!macro MUI_SECTIONS_FINISHHEADER
!ifndef MUI_MANUALVERBOSE
!verbose 3
!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
;1.63 compatibility
!error "Remove '!insertmacro MUI_SECTIONS_FINISHHEADER' from your script."
!macroend
@ -1168,6 +1139,10 @@
!ifdef MUI_CUSTOMFUNCTION_INSTFILES_LEAVE
Call "${MUI_CUSTOMFUNCTION_INSTFILES_LEAVE}"
!endif
!insertmacro MUI_FINISHHEADER
!insertmacro MUI_LANGDLL_SAVELANGUAGE
FunctionEnd
!ifndef MUI_NOVERBOSE && MUI_MANUALVERBOSE
@ -1534,10 +1509,10 @@
!endif
Function "${PRE}"
!insertmacro MUI_HEADER_TEXT $(un.MUI_UNTEXT_INTRO_TITLE) $(un.MUI_UNTEXT_INTRO_SUBTITLE)
!ifdef MUI_UNCUSTOMFUNCTION_CONFIRM_PRE
Call "${MUI_UNCUSTOMFUNCTION_CONFIRM_PRE}"
!endif
!insertmacro MUI_HEADER_TEXT $(un.MUI_UNTEXT_INTRO_TITLE) $(un.MUI_UNTEXT_INTRO_SUBTITLE)
FunctionEnd
Function "${SHOW}"
@ -1565,10 +1540,10 @@
!endif
Function ${PRE}
!insertmacro MUI_HEADER_TEXT $(un.MUI_UNTEXT_UNINSTALLING_TITLE) $(un.MUI_UNTEXT_UNINSTALLING_SUBTITLE)
!ifdef MUI_UNCUSTOMFUNCTION_INSTFILES_PRE
Call "${MUI_UNCUSTOMFUNCTION_INSTFILES_PRE}"
!endif
!insertmacro MUI_HEADER_TEXT $(un.MUI_UNTEXT_UNINSTALLING_TITLE) $(un.MUI_UNTEXT_UNINSTALLING_SUBTITLE)
FunctionEnd
Function "${SHOW}"
@ -1581,6 +1556,7 @@
!ifdef MUI_UNCUSTOMFUNCTION_INSTFILES_LEAVE
Call "${MUI_UNCUSTOMFUNCTION_INSTFILES_LEAVE}"
!endif
!insertmacro MUI_UNFINISHHEADER
FunctionEnd
!ifndef MUI_NOVERBOSE && MUI_MANUALVERBOSE
@ -1934,8 +1910,10 @@
!insertmacro MUI_LANGUAGEFILE_LANGSTRING "MUI_TEXT_INSTALLING_TITLE"
!insertmacro MUI_LANGUAGEFILE_LANGSTRING "MUI_TEXT_INSTALLING_SUBTITLE"
!insertmacro MUI_LANGUAGEFILE_LANGSTRING "MUI_TEXT_FINISH_TITLE"
!insertmacro MUI_LANGUAGEFILE_LANGSTRING "MUI_TEXT_FINISH_SUBTITLE"
!ifndef MUI_FINISHPAGE && MUI_FINISHPAGE_NOAUTOCLOSE
!insertmacro MUI_LANGUAGEFILE_LANGSTRING "MUI_TEXT_FINISH_TITLE"
!insertmacro MUI_LANGUAGEFILE_LANGSTRING "MUI_TEXT_FINISH_SUBTITLE"
!endif
!ifdef MUI_FINISHPAGE
!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
;Display the Finish header
;Insert this macro after the sections if you are not using a finish page
!insertmacro MUI_SECTIONS_FINISHHEADER
;--------------------------------
;Descriptions
@ -89,8 +85,5 @@ Section "Uninstall"
RMDir "$INSTDIR"
DeleteRegKey /ifempty HKCU "Software\${MUI_PRODUCT}"
;Display the Finish header
!insertmacro MUI_UNFINISHHEADER
SectionEnd

View file

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

View file

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

View file

@ -147,10 +147,6 @@ Section "modern.exe" SecCopyUI
WriteUninstaller "$INSTDIR\Uninstall.exe"
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
@ -182,9 +178,6 @@ Section "Uninstall"
DeleteRegKey /ifempty HKCU "Software\${MUI_PRODUCT}"
;Display the Finish header
!insertmacro MUI_UNFINISHHEADER
SectionEnd
;--------------------------------

View file

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

View file

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