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:
joostverburg 2003-04-07 18:05:12 +00:00
parent f8ee13c0da
commit fddc57d2aa
5 changed files with 76 additions and 41 deletions

View file

@ -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

View file

@ -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"