[dia/dia-0-97] Improved uninstallation, ensure that translations are installed if needed.
- From: Steffen Macke <sdteffen src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dia/dia-0-97] Improved uninstallation, ensure that translations are installed if needed.
- Date: Wed, 26 Mar 2014 15:13:36 +0000 (UTC)
commit d75dc24a991fa267df867f9d27c407b5002609b8
Author: Steffen Macke <sdteffen sdteffen de>
Date: Wed Mar 26 16:12:48 2014 +0100
Improved uninstallation, ensure that translations are installed if needed.
installer/win32/dia.nsi | 123 ++++++++++++++++++++++++++++++++++++++---------
1 files changed, 100 insertions(+), 23 deletions(-)
---
diff --git a/installer/win32/dia.nsi b/installer/win32/dia.nsi
index b22a879..448a3fd 100644
--- a/installer/win32/dia.nsi
+++ b/installer/win32/dia.nsi
@@ -31,7 +31,7 @@ Var name
Name $name
; Uninstall only the installed files and folders
-!define UninstLog "uninstall.log"
+!define UninstLog "dia-${DIA_VERSION}-uninstall.log"
Var UninstLog
; Where the GTK+ binares are installed. Set in .onInit
@@ -84,10 +84,7 @@ ShowInstDetails show
ShowUninstDetails show
SetDateSave on
-; $name and $INSTDIR are set in .onInit function..
-
!include "MUI.nsh"
-;!include "Sections.nsh"
;--------------------------------
;Defines
@@ -99,6 +96,10 @@ SetDateSave on
!define DIA_STARTUP_RUN_KEY "SOFTWARE\Microsoft\Windows\CurrentVersion\Run"
!define DIA_UNINST_EXE "dia-${DIA_VERSION}-uninstall.exe"
+!define MUI_LANGDLL_REGISTRY_ROOT "HKCU"
+!define MUI_LANGDLL_REGISTRY_KEY ${DIA_REG_KEY}
+!define MUI_LANGDLL_REGISTRY_VALUENAME "Installer Language"
+
XPStyle On
VIAddVersionKey "ProductName" "Dia for Windows"
@@ -292,6 +293,7 @@ ${File} "..\..\..\bin\" "libcairo-2.dll"
${File} "..\..\lib\" "libdia.dll"
${File} "..\..\..\bin\" "iconv.dll"
${File} "..\..\..\bin\" "intl.dll"
+${File} "..\..\..\bin\" "libintl.dll"
${File} "..\..\..\bin\" "libxml2.dll"
${File} "..\..\..\bin\" "libxslt.dll"
${SetOutPath} "$INSTDIR\etc"
@@ -415,8 +417,8 @@ ${File} "..\..\shapes\Assorted\" "trapezoid.png"
${File} "..\..\shapes\Assorted\" "trapezoid.shape"
Delete "$INSTDIR\shapes\Assorted\triangle-isoceles.png"
Delete "$INSTDIR\shapes\Assorted\triangle-isoceles.shape"
-${File} "..\..\shapes\Assorted\" "triangle-isosceles.png"
-${File} "..\..\shapes\Assorted\" "triangle-isosceles.shape"
+${File} "..\..\shapes\Assorted\" "triangle-isoceles.png"
+${File} "..\..\shapes\Assorted\" "triangle-isoceles.shape"
${File} "..\..\shapes\Assorted\" "triangle-rightangle.png"
${File} "..\..\shapes\Assorted\" "triangle-rightangle.shape"
${SetOutPath} "$INSTDIR\shapes\BPMN"
@@ -702,10 +704,10 @@ ${File} "..\..\shapes\Circuit\" "vresistor_de.png"
${File} "..\..\shapes\Circuit\" "vzener.png"
${File} "..\..\shapes\Circuit\" "vzener.shape"
${File} "..\..\shapes\Circuit\" "vzener.png"
-${File} "..\..\shapes\Circuit\" "xtal_h.png"
-${File} "..\..\shapes\Circuit\" "xtal_h.shape"
-${File} "..\..\shapes\Circuit\" "xtal_v.png"
-${File} "..\..\shapes\Circuit\" "xtal_v.shape"
+#${File} "..\..\shapes\Circuit\" "xtal_h.png"
+#${File} "..\..\shapes\Circuit\" "xtal_h.shape"
+#${File} "..\..\shapes\Circuit\" "xtal_v.png"
+#${File} "..\..\shapes\Circuit\" "xtal_v.shape"
${SetOutPath} "$INSTDIR\shapes\Cisco"
${File} "..\..\shapes\Cisco\" "1000.png"
${File} "..\..\shapes\Cisco\" "1000.shape"
@@ -2340,10 +2342,10 @@ ${File} "..\..\data\" "integrated-ui.xml"
${File} "..\..\data\" "popup-ui.xml"
${File} "..\..\data\" "toolbar-ui.xml"
${File} "..\..\data\" "toolbox-ui.xml"
-${File} "..\..\data\" "sheets-edit-dialog.xml"
-${File} "..\..\data\" "sheets-main-dialog.xml"
-${File} "..\..\data\" "sheets-new-dialog.xml"
-${File} "..\..\data\" "sheets-remove-dialog.xml"
+#${File} "..\..\data\" "sheets-edit-dialog.xml"
+#${File} "..\..\data\" "sheets-main-dialog.xml"
+#${File} "..\..\data\" "sheets-new-dialog.xml"
+#${File} "..\..\data\" "sheets-remove-dialog.xml"
!ifdef DIA_INCLUDE_GTK
${SetOutPath} "$INSTDIR\bin"
@@ -2362,8 +2364,6 @@ ${File} "..\..\..\bin\" "libcroco-0.6-3.dll"
${File} "..\..\..\bin\" "libexpat-1.dll"
${File} "..\..\..\bin\" "libfontconfig-1.dll"
${File} "..\..\..\bin\" "freetype6.dll"
-; TODO: Remove the following, once gladewin32 has switched to freetype6.dll
-;${File} "..\..\..\bin\" "libfreetype-6.dll"
${File} "..\..\..\bin\" "libgailutil-18.dll"
${File} "..\..\..\bin\" "libgdk-win32-2.0-0.dll"
${File} "..\..\..\bin\" "libgdk_pixbuf-2.0-0.dll"
@@ -2379,8 +2379,7 @@ ${File} "..\..\..\bin\" "libpango-1.0-0.dll"
${File} "..\..\..\bin\" "libpangocairo-1.0-0.dll"
${File} "..\..\..\bin\" "libpangoft2-1.0-0.dll"
${File} "..\..\..\bin\" "libpangowin32-1.0-0.dll"
-;${File} "..\..\..\bin\" "libpng12.dll"
-${File} "..\..\..\bin\" "libpng12-0.dll"
+${File} "..\..\..\bin\" "libpng14-14.dll"
${File} "..\..\..\bin\" "librsvg-2-2.dll"
;${File} "..\..\..\bin\" "librle3.dll"
${File} "..\..\..\bin\" "libtiff3.dll"
@@ -3439,7 +3438,7 @@ Section Uninstall
DeleteRegValue HKCU "${DIA_STARTUP_RUN_KEY}" "Dia"
DeleteRegValue HKLM "${DIA_STARTUP_RUN_KEY}" "Dia"
; Remove Language preference info
- DeleteRegKey HKCU ${DIA_REG_KEY} ;${MUI_LANGDLL_REGISTRY_ROOT} ${MUI_LANGDLL_REGISTRY_KEY}
+ DeleteRegKey HKCU ${DIA_REG_KEY}
; Can't uninstall if uninstall.log is missing!
IfFileExists "$INSTDIR\${UninstLog}" +3
@@ -3487,12 +3486,77 @@ Section Uninstall
Delete "$SMPROGRAMS\Dia\French\Dia Manual (PDF).lnk"
RMDir "$SMPROGRAMS\Dia\French"
RMDir "$SMPROGRAMS\Dia"
+
+ ; File generated by installer
+ Delete "$INSTDIR\etc\gtk-2.0\gdk-pixbuf.loaders"
+
+ RMDir /REBOOTOK "$INSTDIR\xslt"
+ RMDir /REBOOTOK "$INSTDIR\ui"
+ RMDir /REBOOTOK "$INSTDIR\sheets\UML"
+ RMDir /REBOOTOK "$INSTDIR\sheets\KAOS"
+ RMDir /REBOOTOK "$INSTDIR\sheets\Jackson"
+ RMDir /REBOOTOK "$INSTDIR\sheets\Istar"
+ RMDir /REBOOTOK "$INSTDIR\sheets\GRAFCET"
+ RMDir /REBOOTOK "$INSTDIR\sheets\ER"
+ RMDir /REBOOTOK "$INSTDIR\sheets"
+ RMDir /REBOOTOK "$INSTDIR\share\themes\Raleigh\gtk-2.0"
+ RMDir /REBOOTOK "$INSTDIR\share\themes\Raleigh"
+ RMDir /REBOOTOK "$INSTDIR\share\themes\MS-Windows\gtk-2.0"
+ RMDir /REBOOTOK "$INSTDIR\share\themes\MS-Windows"
+ RMDir /REBOOTOK "$INSTDIR\share\themes\Emacs\gtk-2.0-key"
+ RMDir /REBOOTOK "$INSTDIR\share\themes\Emacs"
+ RMDir /REBOOTOK "$INSTDIR\share\themes\Default\gtk-2.0-key"
+ RMDir /REBOOTOK "$INSTDIR\share\themes\Default"
+ RMDir /REBOOTOK "$INSTDIR\share\themes"
+ RMDir /REBOOTOK "$INSTDIR\share"
+ RMDir /REBOOTOK "$INSTDIR\shapes\sybase"
+ RMDir /REBOOTOK "$INSTDIR\shapes\SDL"
+ RMDir /REBOOTOK "$INSTDIR\shapes\Pneumatic"
+ RMDir /REBOOTOK "$INSTDIR\shapes\network"
+ RMDir /REBOOTOK "$INSTDIR\shapes\MSE"
+ RMDir /REBOOTOK "$INSTDIR\shapes\Misc"
+ RMDir /REBOOTOK "$INSTDIR\shapes\Map\Isometric"
+ RMDir /REBOOTOK "$INSTDIR\shapes\Map"
+ RMDir /REBOOTOK "$INSTDIR\shapes\Logic"
+ RMDir /REBOOTOK "$INSTDIR\shapes\Lights"
+ RMDir /REBOOTOK "$INSTDIR\shapes\jigsaw"
+ RMDir /REBOOTOK "$INSTDIR\shapes\Gane_and_Sarson"
+ RMDir /REBOOTOK "$INSTDIR\shapes\flowchart"
+ RMDir /REBOOTOK "$INSTDIR\shapes\Electric"
+ RMDir /REBOOTOK "$INSTDIR\shapes\Cybernetics"
+ RMDir /REBOOTOK "$INSTDIR\shapes\Contact"
+ RMDir /REBOOTOK "$INSTDIR\shapes\Civil"
+ RMDir /REBOOTOK "$INSTDIR\shapes\Cisco"
+ RMDir /REBOOTOK "$INSTDIR\shapes\Circuit"
+ RMDir /REBOOTOK "$INSTDIR\shapes\ChemEng"
+ RMDir /REBOOTOK "$INSTDIR\shapes\BPMN"
+ RMDir /REBOOTOK "$INSTDIR\shapes\Assorted"
+ RMDir /REBOOTOK "$INSTDIR\shapes"
+ RMDir /REBOOTOK "$INSTDIR\samples\Visio\vdxtosvg"
+ RMDir /REBOOTOK "$INSTDIR\samples\Visio"
+ RMDir /REBOOTOK "$INSTDIR\samples\self"
+ RMDir /REBOOTOK "$INSTDIR\samples\Fig"
+ RMDir /REBOOTOK "$INSTDIR\samples"
+ RMDir /REBOOTOK "$INSTDIR\lib\gtk-2.0\2.10.0\loaders"
+ RMDir /REBOOTOK "$INSTDIR\lib\gtk-2.0\2.10.0\engines"
+ RMDir /REBOOTOK "$INSTDIR\lib\gtk-2.0\2.10.0"
+ RMDir /REBOOTOK "$INSTDIR\lib\gtk-2.0"
+ RMDir /REBOOTOK "$INSTDIR\lib"
+ RMDir /REBOOTOK "$INSTDIR\help\pl"
+ RMDir /REBOOTOK "$INSTDIR\help\fr"
+ RMDir /REBOOTOK "$INSTDIR\help\eu"
+ RMDir /REBOOTOK "$INSTDIR\help\C\faq_files"
+ RMDir /REBOOTOK "$INSTDIR\help\C"
+ RMDir /REBOOTOK "$INSTDIR\help"
+ RMDir /REBOOTOK "$INSTDIR\etc\pango"
+ RMDir /REBOOTOK "$INSTDIR\etc\gtk-2.0"
+ RMDir /REBOOTOK "$INSTDIR\etc"
+ RMDir /REBOOTOK "$INSTDIR\dia"
+ RMDir /REBOOTOK "$INSTDIR\bin"
+ RMDir /REBOOTOK "$INSTDIR"
IfSilent done
- MessageBox MB_YESNO|MB_ICONEXCLAMATION $(un.DIA_UNINSTALLATION_WARNING) IDNO done
- skip_warning:
- RMDir /r "$INSTDIR"
-
+
MessageBox MB_YESNO|MB_ICONEXCLAMATION $(un.DIA_DOTDIA_WARNING) IDNO done
SetShellVarContext current
RMDir /r "$PROFILE\.dia"
@@ -3688,9 +3752,17 @@ FunctionEnd
Function .onInit
StrCpy $name "Dia ${DIA_VERSION}"
!define MUI_LANGDLL_ALLLANGUAGES
+ !define MUI_LANGDLL_ALWAYSSHOW
!insertmacro MUI_LANGDLL_DISPLAY
+ !insertmacro MUI_LANGDLL_SAVELANGUAGE
ClearErrors
+ ; Ensure translation installation unless English is selected
+ StrCmp "$LANGUAGE" "1033" English
+ IntOp $0 ${SF_SELECTED} | ${SF_RO}
+ SectionSetFlags ${SecTranslations} $0
+ English:
+
; Only enable the Python section if python23.dll is in the system path
SearchPath $0 "python23.dll"
IfErrors NoPython HasPython
@@ -3755,6 +3827,11 @@ Function .onInit
!endif
FunctionEnd
+Function un.onInit
+ !insertmacro MUI_UNGETLANGUAGE
+ ClearErrors
+FunctionEnd
+
Function un.TrimNewlines
Exch $R0
Push $R1
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]