From 4ac5ec8865fbca20e1cfe3b8dd5e1393576dd863 Mon Sep 17 00:00:00 2001 From: theadib Date: Mon, 22 May 2006 20:42:39 +0000 Subject: [PATCH] several warnings --- packaging/win32/czech.nsh | 11 +++++- packaging/win32/english.nsh | 11 +++++- packaging/win32/german.nsh | 11 +++++- packaging/win32/inkscape.nsi | 77 +++++++++++++++++++++++++++++++++--- packaging/win32/italian.nsh | 11 +++++- 5 files changed, 112 insertions(+), 9 deletions(-) diff --git a/packaging/win32/czech.nsh b/packaging/win32/czech.nsh index 239281d46..db63d6350 100644 --- a/packaging/win32/czech.nsh +++ b/packaging/win32/czech.nsh @@ -16,6 +16,15 @@ LangString lng_LICENSE_BUTTON ${LANG_CZECH} "Dal ; Bottom text for the license page LangString lng_LICENSE_BOTTOM_TEXT ${LANG_CZECH} "$(^Name) je vydáván pod General Public License (GPL). Licenèní ujednání je zde pouze z informaèních dùvodù. $_CLICK" +;has been installed by different user +LangString lng_DIFFERENT_USER ${LANG_CZECH} "Inkscape has been installed by user $0. If you continue you might not complete successfully! Please log in as $0 and try again." + +;you have no admin rigths +LangString lng_NO_ADMIN ${LANG_CZECH} "You do not have administrator privileges. Installing Inkscape for all users might not complete successfully. Uncheck option 'For All Users'." + +;win9x is not supported +LangString lng_NOT_SUPPORTED ${LANG_CZECH} "Inkscape is known not to run under Windows 95/98/ME!\n\nPlease check the official website for detailed information." + ; Full install type LangString lng_Full $(LANG_CZECH) "Plná" @@ -142,7 +151,7 @@ LangString lng_sv $(LANG_CZECH) "sv Swedish" LangString lng_tr $(LANG_CZECH) "tr Turkish" LangString lng_uk $(LANG_CZECH) "uk Ukrainian" LangString lng_zh_CN $(LANG_CZECH) "zh_CH Simplifed Chinese" -LangString lng_zh_TW $(LANG_CZECH) "zh_TW Chinese (Taiwan)" +LangString lng_zh_TW $(LANG_CZECH) "zh_TW Traditional Chinese" diff --git a/packaging/win32/english.nsh b/packaging/win32/english.nsh index 125e71908..0bf05fd34 100644 --- a/packaging/win32/english.nsh +++ b/packaging/win32/english.nsh @@ -16,6 +16,15 @@ LangString lng_LICENSE_BUTTON ${LANG_ENGLISH} "Next >" ; Bottom text for the license page LangString lng_LICENSE_BOTTOM_TEXT ${LANG_ENGLISH} "$(^Name) is released under the GNU General Public License (GPL). The license is provided here for information purposes only. $_CLICK" +;has been installed by different user +LangString lng_DIFFERENT_USER ${LANG_ENGLISH} "Inkscape has been installed by user $0.$\r$\nIf you continue you might not complete successfully!$\r$\nPlease log in as $0 and try again." + +;you have no admin rigths +LangString lng_NO_ADMIN ${LANG_ENGLISH} "You do not have administrator privileges.$\r$\nInstalling Inkscape for all users might not complete successfully.$\r$\nUncheck the 'for all users' option." + +;win9x is not supported +LangString lng_NOT_SUPPORTED ${LANG_ENGLISH} "Inkscape is known not to run under Windows 95/98/ME!$\r$\nPlease check the official website for detailed information." + ; Full install type LangString lng_Full $(LANG_ENGLISH) "Full" @@ -142,7 +151,7 @@ LangString lng_sv $(LANG_ENGLISH) "sv Swedish" LangString lng_tr $(LANG_ENGLISH) "tr Turkish" LangString lng_uk $(LANG_ENGLISH) "uk Ukrainian" LangString lng_zh_CN $(LANG_ENGLISH) "zh_CH Simplifed Chinese" -LangString lng_zh_TW $(LANG_ENGLISH) "zh_TW Chinese (Taiwan)" +LangString lng_zh_TW $(LANG_ENGLISH) "zh_TW Traditional Chinese" diff --git a/packaging/win32/german.nsh b/packaging/win32/german.nsh index 8558e6630..aa85009db 100644 --- a/packaging/win32/german.nsh +++ b/packaging/win32/german.nsh @@ -16,6 +16,15 @@ LangString lng_LICENSE_BUTTON ${LANG_GERMAN} "Weiter >" ; Bottom text for the license page LangString lng_LICENSE_BOTTOM_TEXT ${LANG_GERMAN} "$(^Name) wird unter der GNU General Public License (GPL) veröffentlicht. Die Lizenz dient hier nur der Information. $_CLICK" +;has been installed by different user +LangString lng_DIFFERENT_USER ${LANG_GERMAN} "Inkscape wurde durch den Benutzer $0 installiert.$\r$\nWenn Sie fortfahren kann die Aktion möglicherweise nicht korrekt abgeschlossen werden!$\r$\nBitte melden Sie sich als $0 an und versuchen Sie es erneut." + +;you have no admin rigths +LangString lng_NO_ADMIN ${LANG_GERMAN} "Sie sind nicht Computeradministrator.$\r$\nDas Installieren für alle Benutzer kann möglicherweise nicht korrekt abgeschlossen werden.$\r$\nBitte deselektieren Sie die Option 'für Alle Benutzer'." + +;win9x is not supported +LangString lng_NOT_SUPPORTED ${LANG_GERMAN} "Es ist bekannt, dass Inkscape unter Windows 95/98/ME nicht oder nicht stabil läuft!$\r$\nBitte prüfen Sie die offizielle Webseite für detaillierte Informationen." + ; Full install type LangString lng_Full $(LANG_GERMAN) "Komplett" @@ -145,7 +154,7 @@ LangString lng_sv $(LANG_GERMAN) "sv Schwedisch" LangString lng_tr $(LANG_GERMAN) "tr Türkisch" LangString lng_uk $(LANG_GERMAN) "uk Ukrainisch" LangString lng_zh_CN $(LANG_GERMAN) "zh_CH Chinesisch (vereinfacht)" -LangString lng_zh_TW $(LANG_GERMAN) "zh_TW Chinesisch (Taiwan)" +LangString lng_zh_TW $(LANG_GERMAN) "zh_TW Chinesisch (traditionell)" ; uninstallation options diff --git a/packaging/win32/inkscape.nsi b/packaging/win32/inkscape.nsi index bd4d442a8..e027f66a6 100644 --- a/packaging/win32/inkscape.nsi +++ b/packaging/win32/inkscape.nsi @@ -93,6 +93,7 @@ ShowUnInstDetails hide var askMultiUser Var MultiUser +var User ; ####################################### ; I N S T A L L E R S E C T I O N S @@ -495,6 +496,7 @@ Section $(lng_Core) SecCore ; this file is added because it slips through the filter SetOutPath $INSTDIR\share\clipart File /a "..\..\inkscape\share\clipart\inkscape.logo.svg" + File /a "..\..\inkscape\share\clipart\inkscape.logo.classic.svg" SetOutPath $INSTDIR\modules File /nonfatal /a /r "..\..\inkscape\modules\*.*" SetOutPath $INSTDIR\python @@ -525,19 +527,26 @@ SectionGroup $(lng_Shortcuts) SecShortcuts Section $(lng_Desktop) SecDesktop SectionIn 1 2 3 + ClearErrors CreateShortCut "$DESKTOP\Inkscape.lnk" "$INSTDIR\inkscape.exe" + IfErrors 0 +2 + DetailPrint "Uups! Problems creating desktop shortcuts" SectionEnd Section $(lng_Quicklaunch) SecQuicklaunch SectionIn 1 2 3 + ClearErrors StrCmp $QUICKLAUNCH $TEMP +2 CreateShortCut "$QUICKLAUNCH\Inkscape.lnk" "$INSTDIR\inkscape.exe" + IfErrors 0 +2 + DetailPrint "Uups! Problems creating quicklaunch shortcuts" SectionEnd Section $(lng_SVGWriter) SecSVGWriter SectionIn 1 2 3 ; create file associations, test before if needed DetailPrint "creating file associations" + ClearErrors ReadRegStr $0 HKCR ".svg" "" StrCmp $0 "" 0 +3 WriteRegStr HKCR ".svg" "" "svgfile" @@ -546,6 +555,8 @@ Section $(lng_SVGWriter) SecSVGWriter StrCmp $0 "" 0 +3 WriteRegStr HKCR ".svgz" "" "svgfile" WriteRegStr HKCR "svgfile" "" "Scalable Vector Graphics file" + IfErrors 0 +2 + DetailPrint "Uups! Problems creating file assoziations for svg writer" DetailPrint "creating default editor" ClearErrors @@ -561,6 +572,7 @@ Section $(lng_ContextMenu) SecContextMenu SectionIn 1 2 3 ; create file associations, test before if needed DetailPrint "creating file associations" + ClearErrors ReadRegStr $0 HKCR ".svg" "" StrCmp $0 "" 0 +3 WriteRegStr HKCR ".svg" "" "svgfile" @@ -569,6 +581,8 @@ Section $(lng_ContextMenu) SecContextMenu StrCmp $0 "" 0 +3 WriteRegStr HKCR ".svgz" "" "svgfile" WriteRegStr HKCR "svgfile" "" "Scalable Vector Graphics file" + IfErrors 0 +2 + DetailPrint "Uups! Problems creating file assoziations for context menu" DetailPrint "creating context menue" ClearErrors @@ -774,14 +788,21 @@ Section -FinalizeInstallation ; DetailPrint "aborting installation" ; Abort WriteRegStr SHCTX "${PRODUCT_DIR_REGKEY}" "MultiUser" "$MultiUser" - WriteRegStr SHCTX "${PRODUCT_DIR_REGKEY}" "askMultiUser" "$askMultiUser" + WriteRegStr SHCTX "${PRODUCT_DIR_REGKEY}" "askMultiUser" "$askMultiUser" + WriteRegStr SHCTX "${PRODUCT_DIR_REGKEY}" "User" "$User" + IfErrors 0 +2 + DetailPrint "fatal: failed to write to registry installation info" ; start menu entries + ClearErrors CreateDirectory "$SMPROGRAMS\Inkscape" CreateShortCut "$SMPROGRAMS\Inkscape\Inkscape.lnk" "$INSTDIR\inkscape.exe" CreateShortCut "$SMPROGRAMS\Inkscape\Uninstall Inkscape.lnk" "$INSTDIR\uninst.exe" + IfErrors 0 +2 + DetailPrint "fatal: failed to write to start menu info" ; uninstall settings + ClearErrors WriteUninstaller "$INSTDIR\uninst.exe" WriteRegExpandStr SHCTX "${PRODUCT_UNINST_KEY}" "UninstallString" '"$INSTDIR\uninst.exe"' WriteRegExpandStr SHCTX "${PRODUCT_UNINST_KEY}" "InstallLocation" "$INSTDIR" @@ -790,6 +811,8 @@ Section -FinalizeInstallation WriteRegStr SHCTX "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}" WriteRegDWORD SHCTX "${PRODUCT_UNINST_KEY}" "NoModify" "1" WriteRegDWORD SHCTX "${PRODUCT_UNINST_KEY}" "NoRepair" "1" + IfErrors 0 +2 + DetailPrint "fatal: failed to write to registry un-installation info" SectionEnd SectionGroupEnd @@ -843,6 +866,36 @@ Function .onInit ; hide if quick launch if not available StrCmp $QUICKLAUNCH $TEMP 0 +2 SectionSetText ${SecQuicklaunch} "" + + ;check if user is admin + ClearErrors + UserInfo::GetName + IfErrors info_Win9x + Pop $0 + StrCpy $User $0 + UserInfo::GetAccountType + Pop $1 + StrCmp $1 "Admin" info_done + + MessageBox MB_OK|MB_ICONEXCLAMATION "$(lng_NO_ADMIN)" + + Goto info_done + + info_Win9x: + # This one means you don't need to care about admin or + # not admin because Windows 9x doesn't either + MessageBox MB_OK|MB_ICONEXCLAMATION $(lng_NOT_SUPPORTED) + + info_done: + + ;check for previous installation + ReadRegStr $0 HKLM "${PRODUCT_DIR_REGKEY}" "User" + StrCmp $0 "" +1 +2 + ReadRegStr $0 HKCU "${PRODUCT_DIR_REGKEY}" "User" + ;check user if applicable + StrCmp $0 "" +3 + StrCmp $0 $User +2 + MessageBox MB_OK|MB_ICONEXCLAMATION "$(lng_DIFFERENT_USER)" ; proccess command line parameter !insertmacro Parameter "GTK" ${SecGTK} @@ -873,6 +926,7 @@ Function .onInit !insertmacro Parameter "hu" ${SecHungarian} !insertmacro Parameter "it" ${SecItalian} !insertmacro Parameter "ja" ${SecJapanese} + !insertmacro Parameter "ko" ${SecKorean} !insertmacro Parameter "mk" ${SecMacedonian} !insertmacro Parameter "nb" ${SecNorwegianBokmal} !insertmacro Parameter "nl" ${SecDutch} @@ -890,6 +944,7 @@ Function .onInit !insertmacro Parameter "tr" ${SecTurkish} !insertmacro Parameter "uk" ${SecUkrainian} !insertmacro Parameter "zh_CN" ${SecChineseSimplified} + !insertmacro Parameter "zh_TW" ${SecChineseTaiwan} Push "?" Push "TEST" @@ -935,19 +990,31 @@ FunctionEnd Function un.onInit + ClearErrors + StrCpy $User "" + UserInfo::GetName + IfErrors +3 + Pop $0 + StrCpy $User $0 + StrCpy $askMultiUser "1" StrCpy $MultiUser "1" ; Test if this was a multiuser installation ReadRegStr $0 HKLM "${PRODUCT_DIR_REGKEY}" "" - StrCmp $0 "$INSTDIR\inkscape.exe" 0 +4 + StrCmp $0 "$INSTDIR\inkscape.exe" 0 +5 ReadRegStr $MultiUser HKLM "${PRODUCT_DIR_REGKEY}" "MultiUser" ReadRegStr $askMultiUser HKLM "${PRODUCT_DIR_REGKEY}" "askMultiUser" - Goto +3 + ReadRegStr $0 HKLM "${PRODUCT_DIR_REGKEY}" "User" + Goto +4 ReadRegStr $MultiUser HKCU "${PRODUCT_DIR_REGKEY}" "MultiUser" ReadRegStr $askMultiUser HKCU "${PRODUCT_DIR_REGKEY}" "askMultiUser" - - + ReadRegStr $0 HKCU "${PRODUCT_DIR_REGKEY}" "User" + ;check user if applicable + StrCmp $0 "" +3 + StrCmp $0 $User +2 + MessageBox MB_OK|MB_ICONEXCLAMATION "$(lng_DIFFERENT_USER)" + !insertmacro MUI_INSTALLOPTIONS_EXTRACT "inkscape.nsi.uninstall" ;check whether Multi user installation ? diff --git a/packaging/win32/italian.nsh b/packaging/win32/italian.nsh index 59a62d798..dfcf07507 100644 --- a/packaging/win32/italian.nsh +++ b/packaging/win32/italian.nsh @@ -16,6 +16,15 @@ LangString lng_LICENSE_BUTTON ${LANG_ITALIAN} "Avanti >" ; Bottom text for the license page LangString lng_LICENSE_BOTTOM_TEXT ${LANG_ITALIAN} "$(^Name) e' rilasciato sotto GNU General Public License (GPL). La licenza e' fornita solo a scopo informativo. $_CLICK" +;has been installed by different user +LangString lng_DIFFERENT_USER ${LANG_ITALIAN} "Inkscape has been installed by user $0. If you continue you might not complete successfully! Please log in as $0 and try again." + +;you have no admin rigths +LangString lng_NO_ADMIN ${LANG_ITALIAN} "You do not have administrator privileges. Installing Inkscape for all users might not complete successfully. Uncheck option 'For All Users'." + +;win9x is not supported +LangString lng_NOT_SUPPORTED ${LANG_ITALIAN} "Inkscape is known not to run under Windows 95/98/ME!\n\nPlease check the official website for detailed information." + ; Full install type LangString lng_Full $(LANG_ITALIAN) "COmpleta" @@ -142,7 +151,7 @@ LangString lng_sv $(LANG_ITALIAN) "sv Svedese" LangString lng_tr $(LANG_ITALIAN) "tr Turco" LangString lng_uk $(LANG_ITALIAN) "uk Ucraino" LangString lng_zh_CN $(LANG_ITALIAN) "zh_CH Cinese Semplificato" -LangString lng_zh_TW $(LANG_ITALIAN) "zh_TW Cinese (Taiwan)" +LangString lng_zh_TW $(LANG_ITALIAN) "zh_TW Traditional Cinese" -- 2.30.2