作図ソフト dia の改良版
リビジョン | d75dc24a991fa267df867f9d27c407b5002609b8 (tree) |
---|---|
日時 | 2014-03-27 00:12:48 |
作者 | Steffen Macke <sdteffen@sdte...> |
コミッター | Steffen Macke |
Improved uninstallation, ensure that translations are installed if needed.
@@ -31,7 +31,7 @@ Var name | ||
31 | 31 | Name $name |
32 | 32 | |
33 | 33 | ; Uninstall only the installed files and folders |
34 | -!define UninstLog "uninstall.log" | |
34 | +!define UninstLog "dia-${DIA_VERSION}-uninstall.log" | |
35 | 35 | Var UninstLog |
36 | 36 | |
37 | 37 | ; Where the GTK+ binares are installed. Set in .onInit |
@@ -84,10 +84,7 @@ ShowInstDetails show | ||
84 | 84 | ShowUninstDetails show |
85 | 85 | SetDateSave on |
86 | 86 | |
87 | -; $name and $INSTDIR are set in .onInit function.. | |
88 | - | |
89 | 87 | !include "MUI.nsh" |
90 | -;!include "Sections.nsh" | |
91 | 88 | |
92 | 89 | ;-------------------------------- |
93 | 90 | ;Defines |
@@ -99,6 +96,10 @@ SetDateSave on | ||
99 | 96 | !define DIA_STARTUP_RUN_KEY "SOFTWARE\Microsoft\Windows\CurrentVersion\Run" |
100 | 97 | !define DIA_UNINST_EXE "dia-${DIA_VERSION}-uninstall.exe" |
101 | 98 | |
99 | +!define MUI_LANGDLL_REGISTRY_ROOT "HKCU" | |
100 | +!define MUI_LANGDLL_REGISTRY_KEY ${DIA_REG_KEY} | |
101 | +!define MUI_LANGDLL_REGISTRY_VALUENAME "Installer Language" | |
102 | + | |
102 | 103 | XPStyle On |
103 | 104 | |
104 | 105 | VIAddVersionKey "ProductName" "Dia for Windows" |
@@ -292,6 +293,7 @@ ${File} "..\..\..\bin\" "libcairo-2.dll" | ||
292 | 293 | ${File} "..\..\lib\" "libdia.dll" |
293 | 294 | ${File} "..\..\..\bin\" "iconv.dll" |
294 | 295 | ${File} "..\..\..\bin\" "intl.dll" |
296 | +${File} "..\..\..\bin\" "libintl.dll" | |
295 | 297 | ${File} "..\..\..\bin\" "libxml2.dll" |
296 | 298 | ${File} "..\..\..\bin\" "libxslt.dll" |
297 | 299 | ${SetOutPath} "$INSTDIR\etc" |
@@ -415,8 +417,8 @@ ${File} "..\..\shapes\Assorted\" "trapezoid.png" | ||
415 | 417 | ${File} "..\..\shapes\Assorted\" "trapezoid.shape" |
416 | 418 | Delete "$INSTDIR\shapes\Assorted\triangle-isoceles.png" |
417 | 419 | Delete "$INSTDIR\shapes\Assorted\triangle-isoceles.shape" |
418 | -${File} "..\..\shapes\Assorted\" "triangle-isosceles.png" | |
419 | -${File} "..\..\shapes\Assorted\" "triangle-isosceles.shape" | |
420 | +${File} "..\..\shapes\Assorted\" "triangle-isoceles.png" | |
421 | +${File} "..\..\shapes\Assorted\" "triangle-isoceles.shape" | |
420 | 422 | ${File} "..\..\shapes\Assorted\" "triangle-rightangle.png" |
421 | 423 | ${File} "..\..\shapes\Assorted\" "triangle-rightangle.shape" |
422 | 424 | ${SetOutPath} "$INSTDIR\shapes\BPMN" |
@@ -702,10 +704,10 @@ ${File} "..\..\shapes\Circuit\" "vresistor_de.png" | ||
702 | 704 | ${File} "..\..\shapes\Circuit\" "vzener.png" |
703 | 705 | ${File} "..\..\shapes\Circuit\" "vzener.shape" |
704 | 706 | ${File} "..\..\shapes\Circuit\" "vzener.png" |
705 | -${File} "..\..\shapes\Circuit\" "xtal_h.png" | |
706 | -${File} "..\..\shapes\Circuit\" "xtal_h.shape" | |
707 | -${File} "..\..\shapes\Circuit\" "xtal_v.png" | |
708 | -${File} "..\..\shapes\Circuit\" "xtal_v.shape" | |
707 | +#${File} "..\..\shapes\Circuit\" "xtal_h.png" | |
708 | +#${File} "..\..\shapes\Circuit\" "xtal_h.shape" | |
709 | +#${File} "..\..\shapes\Circuit\" "xtal_v.png" | |
710 | +#${File} "..\..\shapes\Circuit\" "xtal_v.shape" | |
709 | 711 | ${SetOutPath} "$INSTDIR\shapes\Cisco" |
710 | 712 | ${File} "..\..\shapes\Cisco\" "1000.png" |
711 | 713 | ${File} "..\..\shapes\Cisco\" "1000.shape" |
@@ -2340,10 +2342,10 @@ ${File} "..\..\data\" "integrated-ui.xml" | ||
2340 | 2342 | ${File} "..\..\data\" "popup-ui.xml" |
2341 | 2343 | ${File} "..\..\data\" "toolbar-ui.xml" |
2342 | 2344 | ${File} "..\..\data\" "toolbox-ui.xml" |
2343 | -${File} "..\..\data\" "sheets-edit-dialog.xml" | |
2344 | -${File} "..\..\data\" "sheets-main-dialog.xml" | |
2345 | -${File} "..\..\data\" "sheets-new-dialog.xml" | |
2346 | -${File} "..\..\data\" "sheets-remove-dialog.xml" | |
2345 | +#${File} "..\..\data\" "sheets-edit-dialog.xml" | |
2346 | +#${File} "..\..\data\" "sheets-main-dialog.xml" | |
2347 | +#${File} "..\..\data\" "sheets-new-dialog.xml" | |
2348 | +#${File} "..\..\data\" "sheets-remove-dialog.xml" | |
2347 | 2349 | |
2348 | 2350 | !ifdef DIA_INCLUDE_GTK |
2349 | 2351 | ${SetOutPath} "$INSTDIR\bin" |
@@ -2362,8 +2364,6 @@ ${File} "..\..\..\bin\" "libcroco-0.6-3.dll" | ||
2362 | 2364 | ${File} "..\..\..\bin\" "libexpat-1.dll" |
2363 | 2365 | ${File} "..\..\..\bin\" "libfontconfig-1.dll" |
2364 | 2366 | ${File} "..\..\..\bin\" "freetype6.dll" |
2365 | -; TODO: Remove the following, once gladewin32 has switched to freetype6.dll | |
2366 | -;${File} "..\..\..\bin\" "libfreetype-6.dll" | |
2367 | 2367 | ${File} "..\..\..\bin\" "libgailutil-18.dll" |
2368 | 2368 | ${File} "..\..\..\bin\" "libgdk-win32-2.0-0.dll" |
2369 | 2369 | ${File} "..\..\..\bin\" "libgdk_pixbuf-2.0-0.dll" |
@@ -2379,8 +2379,7 @@ ${File} "..\..\..\bin\" "libpango-1.0-0.dll" | ||
2379 | 2379 | ${File} "..\..\..\bin\" "libpangocairo-1.0-0.dll" |
2380 | 2380 | ${File} "..\..\..\bin\" "libpangoft2-1.0-0.dll" |
2381 | 2381 | ${File} "..\..\..\bin\" "libpangowin32-1.0-0.dll" |
2382 | -;${File} "..\..\..\bin\" "libpng12.dll" | |
2383 | -${File} "..\..\..\bin\" "libpng12-0.dll" | |
2382 | +${File} "..\..\..\bin\" "libpng14-14.dll" | |
2384 | 2383 | ${File} "..\..\..\bin\" "librsvg-2-2.dll" |
2385 | 2384 | ;${File} "..\..\..\bin\" "librle3.dll" |
2386 | 2385 | ${File} "..\..\..\bin\" "libtiff3.dll" |
@@ -3439,7 +3438,7 @@ Section Uninstall | ||
3439 | 3438 | DeleteRegValue HKCU "${DIA_STARTUP_RUN_KEY}" "Dia" |
3440 | 3439 | DeleteRegValue HKLM "${DIA_STARTUP_RUN_KEY}" "Dia" |
3441 | 3440 | ; Remove Language preference info |
3442 | - DeleteRegKey HKCU ${DIA_REG_KEY} ;${MUI_LANGDLL_REGISTRY_ROOT} ${MUI_LANGDLL_REGISTRY_KEY} | |
3441 | + DeleteRegKey HKCU ${DIA_REG_KEY} | |
3443 | 3442 | |
3444 | 3443 | ; Can't uninstall if uninstall.log is missing! |
3445 | 3444 | IfFileExists "$INSTDIR\${UninstLog}" +3 |
@@ -3487,12 +3486,77 @@ Section Uninstall | ||
3487 | 3486 | Delete "$SMPROGRAMS\Dia\French\Dia Manual (PDF).lnk" |
3488 | 3487 | RMDir "$SMPROGRAMS\Dia\French" |
3489 | 3488 | RMDir "$SMPROGRAMS\Dia" |
3489 | + | |
3490 | + ; File generated by installer | |
3491 | + Delete "$INSTDIR\etc\gtk-2.0\gdk-pixbuf.loaders" | |
3492 | + | |
3493 | + RMDir /REBOOTOK "$INSTDIR\xslt" | |
3494 | + RMDir /REBOOTOK "$INSTDIR\ui" | |
3495 | + RMDir /REBOOTOK "$INSTDIR\sheets\UML" | |
3496 | + RMDir /REBOOTOK "$INSTDIR\sheets\KAOS" | |
3497 | + RMDir /REBOOTOK "$INSTDIR\sheets\Jackson" | |
3498 | + RMDir /REBOOTOK "$INSTDIR\sheets\Istar" | |
3499 | + RMDir /REBOOTOK "$INSTDIR\sheets\GRAFCET" | |
3500 | + RMDir /REBOOTOK "$INSTDIR\sheets\ER" | |
3501 | + RMDir /REBOOTOK "$INSTDIR\sheets" | |
3502 | + RMDir /REBOOTOK "$INSTDIR\share\themes\Raleigh\gtk-2.0" | |
3503 | + RMDir /REBOOTOK "$INSTDIR\share\themes\Raleigh" | |
3504 | + RMDir /REBOOTOK "$INSTDIR\share\themes\MS-Windows\gtk-2.0" | |
3505 | + RMDir /REBOOTOK "$INSTDIR\share\themes\MS-Windows" | |
3506 | + RMDir /REBOOTOK "$INSTDIR\share\themes\Emacs\gtk-2.0-key" | |
3507 | + RMDir /REBOOTOK "$INSTDIR\share\themes\Emacs" | |
3508 | + RMDir /REBOOTOK "$INSTDIR\share\themes\Default\gtk-2.0-key" | |
3509 | + RMDir /REBOOTOK "$INSTDIR\share\themes\Default" | |
3510 | + RMDir /REBOOTOK "$INSTDIR\share\themes" | |
3511 | + RMDir /REBOOTOK "$INSTDIR\share" | |
3512 | + RMDir /REBOOTOK "$INSTDIR\shapes\sybase" | |
3513 | + RMDir /REBOOTOK "$INSTDIR\shapes\SDL" | |
3514 | + RMDir /REBOOTOK "$INSTDIR\shapes\Pneumatic" | |
3515 | + RMDir /REBOOTOK "$INSTDIR\shapes\network" | |
3516 | + RMDir /REBOOTOK "$INSTDIR\shapes\MSE" | |
3517 | + RMDir /REBOOTOK "$INSTDIR\shapes\Misc" | |
3518 | + RMDir /REBOOTOK "$INSTDIR\shapes\Map\Isometric" | |
3519 | + RMDir /REBOOTOK "$INSTDIR\shapes\Map" | |
3520 | + RMDir /REBOOTOK "$INSTDIR\shapes\Logic" | |
3521 | + RMDir /REBOOTOK "$INSTDIR\shapes\Lights" | |
3522 | + RMDir /REBOOTOK "$INSTDIR\shapes\jigsaw" | |
3523 | + RMDir /REBOOTOK "$INSTDIR\shapes\Gane_and_Sarson" | |
3524 | + RMDir /REBOOTOK "$INSTDIR\shapes\flowchart" | |
3525 | + RMDir /REBOOTOK "$INSTDIR\shapes\Electric" | |
3526 | + RMDir /REBOOTOK "$INSTDIR\shapes\Cybernetics" | |
3527 | + RMDir /REBOOTOK "$INSTDIR\shapes\Contact" | |
3528 | + RMDir /REBOOTOK "$INSTDIR\shapes\Civil" | |
3529 | + RMDir /REBOOTOK "$INSTDIR\shapes\Cisco" | |
3530 | + RMDir /REBOOTOK "$INSTDIR\shapes\Circuit" | |
3531 | + RMDir /REBOOTOK "$INSTDIR\shapes\ChemEng" | |
3532 | + RMDir /REBOOTOK "$INSTDIR\shapes\BPMN" | |
3533 | + RMDir /REBOOTOK "$INSTDIR\shapes\Assorted" | |
3534 | + RMDir /REBOOTOK "$INSTDIR\shapes" | |
3535 | + RMDir /REBOOTOK "$INSTDIR\samples\Visio\vdxtosvg" | |
3536 | + RMDir /REBOOTOK "$INSTDIR\samples\Visio" | |
3537 | + RMDir /REBOOTOK "$INSTDIR\samples\self" | |
3538 | + RMDir /REBOOTOK "$INSTDIR\samples\Fig" | |
3539 | + RMDir /REBOOTOK "$INSTDIR\samples" | |
3540 | + RMDir /REBOOTOK "$INSTDIR\lib\gtk-2.0\2.10.0\loaders" | |
3541 | + RMDir /REBOOTOK "$INSTDIR\lib\gtk-2.0\2.10.0\engines" | |
3542 | + RMDir /REBOOTOK "$INSTDIR\lib\gtk-2.0\2.10.0" | |
3543 | + RMDir /REBOOTOK "$INSTDIR\lib\gtk-2.0" | |
3544 | + RMDir /REBOOTOK "$INSTDIR\lib" | |
3545 | + RMDir /REBOOTOK "$INSTDIR\help\pl" | |
3546 | + RMDir /REBOOTOK "$INSTDIR\help\fr" | |
3547 | + RMDir /REBOOTOK "$INSTDIR\help\eu" | |
3548 | + RMDir /REBOOTOK "$INSTDIR\help\C\faq_files" | |
3549 | + RMDir /REBOOTOK "$INSTDIR\help\C" | |
3550 | + RMDir /REBOOTOK "$INSTDIR\help" | |
3551 | + RMDir /REBOOTOK "$INSTDIR\etc\pango" | |
3552 | + RMDir /REBOOTOK "$INSTDIR\etc\gtk-2.0" | |
3553 | + RMDir /REBOOTOK "$INSTDIR\etc" | |
3554 | + RMDir /REBOOTOK "$INSTDIR\dia" | |
3555 | + RMDir /REBOOTOK "$INSTDIR\bin" | |
3556 | + RMDir /REBOOTOK "$INSTDIR" | |
3490 | 3557 | |
3491 | 3558 | IfSilent done |
3492 | - MessageBox MB_YESNO|MB_ICONEXCLAMATION $(un.DIA_UNINSTALLATION_WARNING) IDNO done | |
3493 | - skip_warning: | |
3494 | - RMDir /r "$INSTDIR" | |
3495 | - | |
3559 | + | |
3496 | 3560 | MessageBox MB_YESNO|MB_ICONEXCLAMATION $(un.DIA_DOTDIA_WARNING) IDNO done |
3497 | 3561 | SetShellVarContext current |
3498 | 3562 | RMDir /r "$PROFILE\.dia" |
@@ -3688,9 +3752,17 @@ FunctionEnd | ||
3688 | 3752 | Function .onInit |
3689 | 3753 | StrCpy $name "Dia ${DIA_VERSION}" |
3690 | 3754 | !define MUI_LANGDLL_ALLLANGUAGES |
3755 | + !define MUI_LANGDLL_ALWAYSSHOW | |
3691 | 3756 | !insertmacro MUI_LANGDLL_DISPLAY |
3757 | + !insertmacro MUI_LANGDLL_SAVELANGUAGE | |
3692 | 3758 | ClearErrors |
3693 | 3759 | |
3760 | + ; Ensure translation installation unless English is selected | |
3761 | + StrCmp "$LANGUAGE" "1033" English | |
3762 | + IntOp $0 ${SF_SELECTED} | ${SF_RO} | |
3763 | + SectionSetFlags ${SecTranslations} $0 | |
3764 | + English: | |
3765 | + | |
3694 | 3766 | ; Only enable the Python section if python23.dll is in the system path |
3695 | 3767 | SearchPath $0 "python23.dll" |
3696 | 3768 | IfErrors NoPython HasPython |
@@ -3755,6 +3827,11 @@ Function .onInit | ||
3755 | 3827 | !endif |
3756 | 3828 | FunctionEnd |
3757 | 3829 | |
3830 | +Function un.onInit | |
3831 | + !insertmacro MUI_UNGETLANGUAGE | |
3832 | + ClearErrors | |
3833 | +FunctionEnd | |
3834 | + | |
3758 | 3835 | Function un.TrimNewlines |
3759 | 3836 | Exch $R0 |
3760 | 3837 | Push $R1 |