new macro's: get uninstaller language, delete shortcuts, new languages
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@2452 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
f8ee13c0da
commit
fddc57d2aa
5 changed files with 76 additions and 41 deletions
|
@ -1,12 +1,13 @@
|
|||
NSIS Modern User Interface - VERSION HISTORY
|
||||
|
||||
1.64 - March 26, 2003
|
||||
1.64 - April 7, 2003
|
||||
* Support for license page with checkbox or radiobuttons to let the
|
||||
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
|
||||
* Header text for aborted installation
|
||||
* New macro's: get language for uninstaller, delete shortcuts
|
||||
* Language files have to be updated
|
||||
|
||||
1.63 - March 9, 2003
|
||||
|
|
|
@ -206,6 +206,12 @@ follow these steps:</p>
|
|||
remember the users preference. You should also use it in the uninstaller to
|
||||
remove the Start Menu folders. Don't forget to remove this key in the
|
||||
uninstaller.</p>
|
||||
<p class="text">In the uninstaller, use these macro's to remove the shortcuts:</p>
|
||||
<pre class="margin">
|
||||
!insertmacro MUI_STARTMENU_DELETE_BEGIN $R0 ;You can also use another variable
|
||||
Delete "$SMPROGRAMS\$R0\Your Shortcut.lnk"
|
||||
!insertmacro MUI_STARTMENU_DELETE_END
|
||||
</pre>
|
||||
</div>
|
||||
<p class="text"><span class="bold">MUI_FINISHPAGE</span><br />
|
||||
Show the finish page. The finish page tells that the installation is succesful.
|
||||
|
@ -353,6 +359,15 @@ FunctionEnd
|
|||
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="text">In the uninstaller, insert the MUI_UNGETLANGUAGE macro in un.onInit to get the stored language
|
||||
preference:</p>
|
||||
<pre class="margin">
|
||||
Function un.onInit
|
||||
|
||||
!insertmacro MUI_UNGETLANGUAGE
|
||||
|
||||
FunctionEnd
|
||||
</pre>
|
||||
<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
|
||||
|
@ -584,7 +599,7 @@ MUI_UNCUSTOMFUNCTION_INSTFILES_LEAVE
|
|||
</p>
|
||||
<p class="header">Version history</p>
|
||||
<ul>
|
||||
<li>1.64 - March 26, 2003
|
||||
<li>1.64 - April 7, 2003
|
||||
<ul>
|
||||
<li>Support for license page with checkbox or radiobuttons to
|
||||
let the user accept the agreement or not</li>
|
||||
|
@ -592,6 +607,7 @@ MUI_UNCUSTOMFUNCTION_INSTFILES_LEAVE
|
|||
<li>Language preference stored when installation has completed,
|
||||
no problems anymore when the users selects the wrong language</li>
|
||||
<li>Header text for aborted installation</li>
|
||||
<li>New macro's: get language for uninstaller, delete shortcuts</li>
|
||||
<li>Language files have to be updated</li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
|
|
|
@ -436,7 +436,7 @@
|
|||
Push ${MUI_TEMP1}
|
||||
|
||||
StrCpy ${MUI_TEMP1} ${MUI_STARTMENUPAGE_VARIABLE} 1
|
||||
StrCmp ${MUI_TEMP1} ">" no_startmenu_shortcuts
|
||||
StrCmp ${MUI_TEMP1} ">" mui.startmenu_write_done
|
||||
|
||||
Pop ${MUI_TEMP1}
|
||||
|
||||
|
@ -452,7 +452,28 @@
|
|||
WriteRegStr "${MUI_STARTMENUPAGE_REGISTRY_ROOT}" "${MUI_STARTMENUPAGE_REGISTRY_KEY}" "${MUI_STARTMENUPAGE_REGISTRY_VALUENAME}" "${MUI_STARTMENUPAGE_VARIABLE}"
|
||||
!endif
|
||||
|
||||
no_startmenu_shortcuts:
|
||||
mui.startmenu_write_done:
|
||||
|
||||
!verbose 4
|
||||
|
||||
!macroend
|
||||
|
||||
!macro MUI_STARTMENU_DELETE_BEGIN VAR
|
||||
|
||||
!verbose 3
|
||||
|
||||
ReadRegStr "${VAR}" "${MUI_STARTMENUPAGE_REGISTRY_ROOT}" "${MUI_STARTMENUPAGE_REGISTRY_KEY}" "${MUI_STARTMENUPAGE_REGISTRY_VALUENAME}"
|
||||
StrCmp "${VAR}" "" mui.startmenu_delete_done
|
||||
|
||||
!verbose 4
|
||||
|
||||
!macroend
|
||||
|
||||
!macro MUI_STARTMENU_DELETE_END
|
||||
|
||||
!verbose 3
|
||||
|
||||
mui.startmenu_delete_done:
|
||||
|
||||
!verbose 4
|
||||
|
||||
|
@ -508,6 +529,33 @@
|
|||
|
||||
!macroend
|
||||
|
||||
!macro MUI_UNGETLANGUAGE
|
||||
|
||||
!ifndef MUI_MANUALVERBOSE
|
||||
!verbose 4
|
||||
!endif
|
||||
|
||||
Push ${MUI_TEMP1}
|
||||
|
||||
ReadRegStr ${MUI_TEMP1} "${MUI_LANGDLL_REGISTRY_ROOT}" "${MUI_LANGDLL_REGISTRY_KEY}" "${MUI_LANGDLL_REGISTRY_VALUENAME}"
|
||||
|
||||
StrCmp ${MUI_TEMP1} "" 0 mui.ungetlanguage_setlang
|
||||
!insertmacro MUI_LANGDLL_DISPLAY
|
||||
Goto mui.ungetlanguage_done
|
||||
|
||||
mui.ungetlanguage_setlang:
|
||||
StrCpy $LANGUAGE ${MUI_TEMP1}
|
||||
|
||||
mui.ungetlanguage_done:
|
||||
|
||||
Pop ${MUI_TEMP1}
|
||||
|
||||
!ifndef MUI_MANUALVERBOSE
|
||||
!verbose 4
|
||||
!endif
|
||||
|
||||
!macroend
|
||||
|
||||
;--------------------------------
|
||||
;PAGE COMMANDS
|
||||
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
;--------------------------------
|
||||
;Modern UI Configuration
|
||||
|
||||
!define MUI_LICENSEPAGE
|
||||
!define MUI_COMPONENTSPAGE
|
||||
!define MUI_DIRECTORYPAGE
|
||||
|
||||
|
@ -64,6 +63,8 @@
|
|||
!insertmacro MUI_LANGUAGE "Romanian"
|
||||
!insertmacro MUI_LANGUAGE "Macedonian"
|
||||
!insertmacro MUI_LANGUAGE "Turkish"
|
||||
!insertmacro MUI_LANGUAGE "Lithuanian"
|
||||
!insertmacro MUI_LANGUAGE "Catalan"
|
||||
|
||||
;--------------------------------
|
||||
;Language Strings
|
||||
|
@ -94,35 +95,8 @@
|
|||
LangString DESC_SecCopyUI ${LANG_ROMANIAN} "modern.exe: Romanian description"
|
||||
LangString DESC_SecCopyUI ${LANG_MACEDONIAN} "modern.exe: Macedonian description"
|
||||
LangString DESC_SecCopyUI ${LANG_TURKISH} "modern.exe: Turkish description"
|
||||
|
||||
;--------------------------------
|
||||
;Data
|
||||
|
||||
LicenseData /LANG=${LANG_ENGLISH} "${NSISDIR}\Contrib\Modern UI\License.txt"
|
||||
LicenseData /LANG=${LANG_FRENCH} "${NSISDIR}\Contrib\Modern UI\License.txt"
|
||||
LicenseData /LANG=${LANG_GERMAN} "${NSISDIR}\Contrib\Modern UI\License.txt"
|
||||
LicenseData /LANG=${LANG_SPANISH} "${NSISDIR}\Contrib\Modern UI\License.txt"
|
||||
LicenseData /LANG=${LANG_SIMPCHINESE} "${NSISDIR}\Contrib\Modern UI\License.txt"
|
||||
LicenseData /LANG=${LANG_TRADCHINESE} "${NSISDIR}\Contrib\Modern UI\License.txt"
|
||||
LicenseData /LANG=${LANG_JAPANESE} "${NSISDIR}\Contrib\Modern UI\License.txt"
|
||||
LicenseData /LANG=${LANG_KOREAN} "${NSISDIR}\Contrib\Modern UI\License.txt"
|
||||
LicenseData /LANG=${LANG_ITALIAN} "${NSISDIR}\Contrib\Modern UI\License.txt"
|
||||
LicenseData /LANG=${LANG_DUTCH} "${NSISDIR}\Contrib\Modern UI\License.txt"
|
||||
LicenseData /LANG=${LANG_DANISH} "${NSISDIR}\Contrib\Modern UI\License.txt"
|
||||
LicenseData /LANG=${LANG_GREEK} "${NSISDIR}\Contrib\Modern UI\License.txt"
|
||||
LicenseData /LANG=${LANG_RUSSIAN} "${NSISDIR}\Contrib\Modern UI\License.txt"
|
||||
LicenseData /LANG=${LANG_PORTUGUESEBR} "${NSISDIR}\Contrib\Modern UI\License.txt"
|
||||
LicenseData /LANG=${LANG_POLISH} "${NSISDIR}\Contrib\Modern UI\License.txt"
|
||||
LicenseData /LANG=${LANG_UKRAINIAN} "${NSISDIR}\Contrib\Modern UI\License.txt"
|
||||
LicenseData /LANG=${LANG_CZECH} "${NSISDIR}\Contrib\Modern UI\License.txt"
|
||||
LicenseData /LANG=${LANG_SLOVAK} "${NSISDIR}\Contrib\Modern UI\License.txt"
|
||||
LicenseData /LANG=${LANG_CROATIAN} "${NSISDIR}\Contrib\Modern UI\License.txt"
|
||||
LicenseData /LANG=${LANG_BULGARIAN} "${NSISDIR}\Contrib\Modern UI\License.txt"
|
||||
LicenseData /LANG=${LANG_HUNGARIAN} "${NSISDIR}\Contrib\Modern UI\License.txt"
|
||||
LicenseData /LANG=${LANG_THAI} "${NSISDIR}\Contrib\Modern UI\License.txt"
|
||||
LicenseData /LANG=${LANG_ROMANIAN} "${NSISDIR}\Contrib\Modern UI\License.txt"
|
||||
LicenseData /LANG=${LANG_MACEDONIAN} "${NSISDIR}\Contrib\Modern UI\License.txt"
|
||||
LicenseData /LANG=${LANG_TURKISH} "${NSISDIR}\Contrib\Modern UI\License.txt"
|
||||
LangString DESC_SecCopyUI ${LANG_LITHUANIAN} "modern.exe: Lithuanian description"
|
||||
LangString DESC_SecCopyUI ${LANG_CATALAN} "modern.exe: Catalan description"
|
||||
|
||||
;--------------------------------
|
||||
;Reserve Files
|
||||
|
@ -185,7 +159,6 @@ SectionEnd
|
|||
|
||||
Function un.onInit
|
||||
|
||||
;Get language from registry
|
||||
ReadRegStr $LANGUAGE HKCU "Software\${MUI_PRODUCT}" "Installer Language"
|
||||
!insertmacro MUI_UNGETLANGUAGE
|
||||
|
||||
FunctionEnd
|
|
@ -106,16 +106,13 @@ Section "Uninstall"
|
|||
Delete "$INSTDIR\modern.exe"
|
||||
Delete "$INSTDIR\Uninstall.exe"
|
||||
|
||||
;Remove shortcut
|
||||
ReadRegStr ${TEMP} "${MUI_STARTMENUPAGE_REGISTRY_ROOT}" "${MUI_STARTMENUPAGE_REGISTRY_KEY}" "${MUI_STARTMENUPAGE_REGISTRY_VALUENAME}"
|
||||
|
||||
StrCmp ${TEMP} "" noshortcuts
|
||||
!insertmacro MUI_STARTMENU_DELETE_BEGIN ${TEMP}
|
||||
|
||||
Delete "$SMPROGRAMS\${TEMP}\Modern UI.lnk"
|
||||
Delete "$SMPROGRAMS\${TEMP}\Uninstall.lnk"
|
||||
RMDir "$SMPROGRAMS\${TEMP}" ;Only if empty, so it won't delete other shortcuts
|
||||
|
||||
noshortcuts:
|
||||
!insertmacro MUI_STARTMENU_DELETE_END
|
||||
|
||||
RMDir "$INSTDIR"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue