From 2d0138b713ae1fda62952f420b200953cfe1f5f6 Mon Sep 17 00:00:00 2001 From: dooglus Date: Fri, 6 Apr 2007 13:09:01 +0000 Subject: [PATCH] Atrus' Windows patches: [ 1695480 ] win32-synfig-clean-uninstall git-svn-id: http://svn.voria.com/code@434 1f10aa63-cdf2-0310-b900-c93c546f37ac --- .../src/modules/lyr_freetype/unlyr_freetype.nsh | 3 ++ .../trunk/src/modules/lyr_std/unlyr_std.nsh | 3 ++ .../trunk/src/modules/mod_bmp/unmod_bmp.nsh | 3 ++ synfig-core/trunk/src/modules/mod_dv/unmod_dv.nsh | 3 ++ .../trunk/src/modules/mod_ffmpeg/unmod_ffmpeg.nsh | 3 ++ .../trunk/src/modules/mod_filter/unmod_filter.nsh | 3 ++ .../src/modules/mod_geometry/unmod_geometry.nsh | 3 ++ .../trunk/src/modules/mod_gif/unmod_gif.nsh | 3 ++ .../src/modules/mod_gradient/unmod_gradient.nsh | 3 ++ .../modules/mod_imagemagick/unmod_imagemagick.nsh | 3 ++ .../trunk/src/modules/mod_jpeg/unmod_jpeg.nsh | 3 ++ .../modules/mod_libavcodec/unmod_libavcodec.nsh | 3 ++ .../trunk/src/modules/mod_noise/unmod_noise.nsh | 3 ++ .../src/modules/mod_openexr/unmod_openexr.nsh | 3 ++ .../src/modules/mod_particle/unmod_particle.nsh | 3 ++ .../trunk/src/modules/mod_png/unmod_png.nsh | 3 ++ .../trunk/src/modules/mod_ppm/unmod_ppm.nsh | 3 ++ .../src/modules/mod_yuv420p/unmod_yuv420p.nsh | 3 ++ synfig-core/trunk/src/modules/untemplate.nsh | 3 ++ synfig-core/trunk/src/synfig/synfig.nsh | 1 + synfig-core/trunk/src/tool/tool.nsh | 1 + synfig-core/trunk/win32inst.nsi.in | 62 +++++++++------------- 22 files changed, 83 insertions(+), 38 deletions(-) diff --git a/synfig-core/trunk/src/modules/lyr_freetype/unlyr_freetype.nsh b/synfig-core/trunk/src/modules/lyr_freetype/unlyr_freetype.nsh index cb9431b..217f615 100644 --- a/synfig-core/trunk/src/modules/lyr_freetype/unlyr_freetype.nsh +++ b/synfig-core/trunk/src/modules/lyr_freetype/unlyr_freetype.nsh @@ -1,5 +1,8 @@ Section "un.lyr_freetype" Delete "$INSTDIR\lib\synfig\modules\lyr_freetype.dll" + RMDir "$INSTDIR\lib\synfig\modules" + RMDir "$INSTDIR\lib\synfig" + RMDir "$INSTDIR\lib" RMDir "$INSTDIR" SectionEnd diff --git a/synfig-core/trunk/src/modules/lyr_std/unlyr_std.nsh b/synfig-core/trunk/src/modules/lyr_std/unlyr_std.nsh index 94e4c7f..b8b5c04 100644 --- a/synfig-core/trunk/src/modules/lyr_std/unlyr_std.nsh +++ b/synfig-core/trunk/src/modules/lyr_std/unlyr_std.nsh @@ -1,5 +1,8 @@ Section "un.lyr_std" Delete "$INSTDIR\lib\synfig\modules\lyr_std.dll" + RMDir "$INSTDIR\lib\synfig\modules" + RMDir "$INSTDIR\lib\synfig" + RMDir "$INSTDIR\lib" RMDir "$INSTDIR" SectionEnd diff --git a/synfig-core/trunk/src/modules/mod_bmp/unmod_bmp.nsh b/synfig-core/trunk/src/modules/mod_bmp/unmod_bmp.nsh index c3f10ac..1df228a 100644 --- a/synfig-core/trunk/src/modules/mod_bmp/unmod_bmp.nsh +++ b/synfig-core/trunk/src/modules/mod_bmp/unmod_bmp.nsh @@ -1,5 +1,8 @@ Section "un.mod_bmp" Delete "$INSTDIR\lib\synfig\modules\mod_bmp.dll" + RMDir "$INSTDIR\lib\synfig\modules" + RMDir "$INSTDIR\lib\synfig" + RMDir "$INSTDIR\lib" RMDir "$INSTDIR" SectionEnd diff --git a/synfig-core/trunk/src/modules/mod_dv/unmod_dv.nsh b/synfig-core/trunk/src/modules/mod_dv/unmod_dv.nsh index eda482e..39b1299 100644 --- a/synfig-core/trunk/src/modules/mod_dv/unmod_dv.nsh +++ b/synfig-core/trunk/src/modules/mod_dv/unmod_dv.nsh @@ -1,5 +1,8 @@ Section "un.mod_dv" Delete "$INSTDIR\lib\synfig\modules\mod_dv.dll" + RMDir "$INSTDIR\lib\synfig\modules" + RMDir "$INSTDIR\lib\synfig" + RMDir "$INSTDIR\lib" RMDir "$INSTDIR" SectionEnd diff --git a/synfig-core/trunk/src/modules/mod_ffmpeg/unmod_ffmpeg.nsh b/synfig-core/trunk/src/modules/mod_ffmpeg/unmod_ffmpeg.nsh index 3badf6c..09ed59b 100644 --- a/synfig-core/trunk/src/modules/mod_ffmpeg/unmod_ffmpeg.nsh +++ b/synfig-core/trunk/src/modules/mod_ffmpeg/unmod_ffmpeg.nsh @@ -1,5 +1,8 @@ Section "un.mod_ffmpeg" Delete "$INSTDIR\lib\synfig\modules\mod_ffmpeg.dll" + RMDir "$INSTDIR\lib\synfig\modules" + RMDir "$INSTDIR\lib\synfig" + RMDir "$INSTDIR\lib" RMDir "$INSTDIR" SectionEnd diff --git a/synfig-core/trunk/src/modules/mod_filter/unmod_filter.nsh b/synfig-core/trunk/src/modules/mod_filter/unmod_filter.nsh index e339cbf..3fcce9b 100644 --- a/synfig-core/trunk/src/modules/mod_filter/unmod_filter.nsh +++ b/synfig-core/trunk/src/modules/mod_filter/unmod_filter.nsh @@ -1,5 +1,8 @@ Section "un.mod_filter" Delete "$INSTDIR\lib\synfig\modules\mod_filter.dll" + RMDir "$INSTDIR\lib\synfig\modules" + RMDir "$INSTDIR\lib\synfig" + RMDir "$INSTDIR\lib" RMDir "$INSTDIR" SectionEnd diff --git a/synfig-core/trunk/src/modules/mod_geometry/unmod_geometry.nsh b/synfig-core/trunk/src/modules/mod_geometry/unmod_geometry.nsh index f5f2317..3f5b516 100644 --- a/synfig-core/trunk/src/modules/mod_geometry/unmod_geometry.nsh +++ b/synfig-core/trunk/src/modules/mod_geometry/unmod_geometry.nsh @@ -1,5 +1,8 @@ Section "un.mod_geometry" Delete "$INSTDIR\lib\synfig\modules\mod_geometry.dll" + RMDir "$INSTDIR\lib\synfig\modules" + RMDir "$INSTDIR\lib\synfig" + RMDir "$INSTDIR\lib" RMDir "$INSTDIR" SectionEnd diff --git a/synfig-core/trunk/src/modules/mod_gif/unmod_gif.nsh b/synfig-core/trunk/src/modules/mod_gif/unmod_gif.nsh index 2dff31a..16d17ce 100644 --- a/synfig-core/trunk/src/modules/mod_gif/unmod_gif.nsh +++ b/synfig-core/trunk/src/modules/mod_gif/unmod_gif.nsh @@ -1,5 +1,8 @@ Section "un.mod_gif" Delete "$INSTDIR\lib\synfig\modules\mod_gif.dll" + RMDir "$INSTDIR\lib\synfig\modules" + RMDir "$INSTDIR\lib\synfig" + RMDir "$INSTDIR\lib" RMDir "$INSTDIR" SectionEnd diff --git a/synfig-core/trunk/src/modules/mod_gradient/unmod_gradient.nsh b/synfig-core/trunk/src/modules/mod_gradient/unmod_gradient.nsh index bbf302c..e5bf48e 100644 --- a/synfig-core/trunk/src/modules/mod_gradient/unmod_gradient.nsh +++ b/synfig-core/trunk/src/modules/mod_gradient/unmod_gradient.nsh @@ -1,5 +1,8 @@ Section "un.mod_gradient" Delete "$INSTDIR\lib\synfig\modules\mod_gradient.dll" + RMDir "$INSTDIR\lib\synfig\modules" + RMDir "$INSTDIR\lib\synfig" + RMDir "$INSTDIR\lib" RMDir "$INSTDIR" SectionEnd diff --git a/synfig-core/trunk/src/modules/mod_imagemagick/unmod_imagemagick.nsh b/synfig-core/trunk/src/modules/mod_imagemagick/unmod_imagemagick.nsh index d6ce0de..a849b55 100644 --- a/synfig-core/trunk/src/modules/mod_imagemagick/unmod_imagemagick.nsh +++ b/synfig-core/trunk/src/modules/mod_imagemagick/unmod_imagemagick.nsh @@ -1,5 +1,8 @@ Section "un.mod_imagemagick" Delete "$INSTDIR\lib\synfig\modules\mod_imagemagick.dll" + RMDir "$INSTDIR\lib\synfig\modules" + RMDir "$INSTDIR\lib\synfig" + RMDir "$INSTDIR\lib" RMDir "$INSTDIR" SectionEnd diff --git a/synfig-core/trunk/src/modules/mod_jpeg/unmod_jpeg.nsh b/synfig-core/trunk/src/modules/mod_jpeg/unmod_jpeg.nsh index 80b5769..56c9547 100644 --- a/synfig-core/trunk/src/modules/mod_jpeg/unmod_jpeg.nsh +++ b/synfig-core/trunk/src/modules/mod_jpeg/unmod_jpeg.nsh @@ -1,5 +1,8 @@ Section "un.mod_jpeg" Delete "$INSTDIR\lib\synfig\modules\mod_jpeg.dll" + RMDir "$INSTDIR\lib\synfig\modules" + RMDir "$INSTDIR\lib\synfig" + RMDir "$INSTDIR\lib" RMDir "$INSTDIR" SectionEnd diff --git a/synfig-core/trunk/src/modules/mod_libavcodec/unmod_libavcodec.nsh b/synfig-core/trunk/src/modules/mod_libavcodec/unmod_libavcodec.nsh index 027dc86..77acf4d 100644 --- a/synfig-core/trunk/src/modules/mod_libavcodec/unmod_libavcodec.nsh +++ b/synfig-core/trunk/src/modules/mod_libavcodec/unmod_libavcodec.nsh @@ -1,5 +1,8 @@ Section "un.mod_libavcodec" Delete "$INSTDIR\lib\synfig\modules\mod_libavcodec.dll" + RMDir "$INSTDIR\lib\synfig\modules" + RMDir "$INSTDIR\lib\synfig" + RMDir "$INSTDIR\lib" RMDir "$INSTDIR" SectionEnd diff --git a/synfig-core/trunk/src/modules/mod_noise/unmod_noise.nsh b/synfig-core/trunk/src/modules/mod_noise/unmod_noise.nsh index 69b6c1e..fe04e1f 100644 --- a/synfig-core/trunk/src/modules/mod_noise/unmod_noise.nsh +++ b/synfig-core/trunk/src/modules/mod_noise/unmod_noise.nsh @@ -1,5 +1,8 @@ Section "un.mod_noise" Delete "$INSTDIR\lib\synfig\modules\mod_noise.dll" + RMDir "$INSTDIR\lib\synfig\modules" + RMDir "$INSTDIR\lib\synfig" + RMDir "$INSTDIR\lib" RMDir "$INSTDIR" SectionEnd diff --git a/synfig-core/trunk/src/modules/mod_openexr/unmod_openexr.nsh b/synfig-core/trunk/src/modules/mod_openexr/unmod_openexr.nsh index 0910092..d0aa1c6 100644 --- a/synfig-core/trunk/src/modules/mod_openexr/unmod_openexr.nsh +++ b/synfig-core/trunk/src/modules/mod_openexr/unmod_openexr.nsh @@ -1,5 +1,8 @@ Section "un.mod_openexr" Delete "$INSTDIR\lib\synfig\modules\mod_openexr.dll" + RMDir "$INSTDIR\lib\synfig\modules" + RMDir "$INSTDIR\lib\synfig" + RMDir "$INSTDIR\lib" RMDir "$INSTDIR" SectionEnd diff --git a/synfig-core/trunk/src/modules/mod_particle/unmod_particle.nsh b/synfig-core/trunk/src/modules/mod_particle/unmod_particle.nsh index 38c975f..d848030 100644 --- a/synfig-core/trunk/src/modules/mod_particle/unmod_particle.nsh +++ b/synfig-core/trunk/src/modules/mod_particle/unmod_particle.nsh @@ -1,5 +1,8 @@ Section "un.mod_particle" Delete "$INSTDIR\lib\synfig\modules\mod_particle.dll" + RMDir "$INSTDIR\lib\synfig\modules" + RMDir "$INSTDIR\lib\synfig" + RMDir "$INSTDIR\lib" RMDir "$INSTDIR" SectionEnd diff --git a/synfig-core/trunk/src/modules/mod_png/unmod_png.nsh b/synfig-core/trunk/src/modules/mod_png/unmod_png.nsh index fc76454..4266a9a 100644 --- a/synfig-core/trunk/src/modules/mod_png/unmod_png.nsh +++ b/synfig-core/trunk/src/modules/mod_png/unmod_png.nsh @@ -1,5 +1,8 @@ Section "un.mod_png" Delete "$INSTDIR\lib\synfig\modules\mod_png.dll" + RMDir "$INSTDIR\lib\synfig\modules" + RMDir "$INSTDIR\lib\synfig" + RMDir "$INSTDIR\lib" RMDir "$INSTDIR" SectionEnd diff --git a/synfig-core/trunk/src/modules/mod_ppm/unmod_ppm.nsh b/synfig-core/trunk/src/modules/mod_ppm/unmod_ppm.nsh index 6eea9ba..0cf7a12 100644 --- a/synfig-core/trunk/src/modules/mod_ppm/unmod_ppm.nsh +++ b/synfig-core/trunk/src/modules/mod_ppm/unmod_ppm.nsh @@ -1,5 +1,8 @@ Section "un.mod_ppm" Delete "$INSTDIR\lib\synfig\modules\mod_ppm.dll" + RMDir "$INSTDIR\lib\synfig\modules" + RMDir "$INSTDIR\lib\synfig" + RMDir "$INSTDIR\lib" RMDir "$INSTDIR" SectionEnd diff --git a/synfig-core/trunk/src/modules/mod_yuv420p/unmod_yuv420p.nsh b/synfig-core/trunk/src/modules/mod_yuv420p/unmod_yuv420p.nsh index 02f2447..954b275 100644 --- a/synfig-core/trunk/src/modules/mod_yuv420p/unmod_yuv420p.nsh +++ b/synfig-core/trunk/src/modules/mod_yuv420p/unmod_yuv420p.nsh @@ -1,5 +1,8 @@ Section "un.mod_yuv420p" Delete "$INSTDIR\lib\synfig\modules\mod_yuv420p.dll" + RMDir "$INSTDIR\lib\synfig\modules" + RMDir "$INSTDIR\lib\synfig" + RMDir "$INSTDIR\lib" RMDir "$INSTDIR" SectionEnd diff --git a/synfig-core/trunk/src/modules/untemplate.nsh b/synfig-core/trunk/src/modules/untemplate.nsh index 005a92a..7736e30 100644 --- a/synfig-core/trunk/src/modules/untemplate.nsh +++ b/synfig-core/trunk/src/modules/untemplate.nsh @@ -1,5 +1,8 @@ Section "un.@MODNAME@" Delete "$INSTDIR\lib\synfig\modules\@MODNAME@.dll" + RMDir "$INSTDIR\lib\synfig\modules" + RMDir "$INSTDIR\lib\synfig" + RMDir "$INSTDIR\lib" RMDir "$INSTDIR" SectionEnd diff --git a/synfig-core/trunk/src/synfig/synfig.nsh b/synfig-core/trunk/src/synfig/synfig.nsh index 329d608..2fc4c53 100644 --- a/synfig-core/trunk/src/synfig/synfig.nsh +++ b/synfig-core/trunk/src/synfig/synfig.nsh @@ -13,6 +13,7 @@ SectionEnd Section "un.Synfig Core" Delete "$INSTDIR\bin\libsynfig-0.dll" + RMDir "$INSTDIR\bin" RMDir "$INSTDIR" SectionEnd diff --git a/synfig-core/trunk/src/tool/tool.nsh b/synfig-core/trunk/src/tool/tool.nsh index 472788e..57ce8d3 100644 --- a/synfig-core/trunk/src/tool/tool.nsh +++ b/synfig-core/trunk/src/tool/tool.nsh @@ -13,6 +13,7 @@ SectionEnd Section "un.Synfig Tool Uninstall" Delete "$INSTDIR\bin\synfig.exe" + RMDir "$INSTDIR\bin" RMDir "$INSTDIR" SectionEnd diff --git a/synfig-core/trunk/win32inst.nsi.in b/synfig-core/trunk/win32inst.nsi.in index ff29e4a..2e4ad9e 100644 --- a/synfig-core/trunk/win32inst.nsi.in +++ b/synfig-core/trunk/win32inst.nsi.in @@ -20,10 +20,6 @@ OutFile "@PACKAGE_TARNAME@-@PACKAGE_VERSION@.exe" ; The default installation directory InstallDir $PROGRAMFILES\@PACKAGE_TARNAME@ -; Registry key to check for directory (so if you install again, it will -; overwrite the old one automatically) -InstallDirRegKey HKLM "Software\Voria_@PACKAGE_TARNAME@" "Install_Dir" - !define VERSION_MAJ "@VERSION_MAJ@" !define VERSION_MIN "@VERSION_MIN@" !define VERSION_REV "@VERSION_REV@" @@ -77,8 +73,6 @@ Section "" Delete $INSTDIR\etc\synfig_modules.cfg ; Write the installation path into the registry - ; WriteRegStr HKLM "Software\Voria_@PACKAGE_TARNAME@" "Install_Dir" "$INSTDIR" - WriteRegStr HKLM "${SYNFIG_REG_KEY}" "Path" "$INSTDIR" WriteRegStr HKLM "${SYNFIG_REG_KEY}" "Version" "@PACKAGE_VERSION@" @@ -92,16 +86,6 @@ Section "" SectionEnd - -; Optional section (can be disabled by the user) -;Section "Start Menu Shortcuts" - -; CreateDirectory "$SMPROGRAMS\Example2" -; CreateShortCut "$SMPROGRAMS\Example2\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0 -; CreateShortCut "$SMPROGRAMS\Example2\Example2 (MakeNSISW).lnk" "$INSTDIR\makensisw.exe" "" "$INSTDIR\makensisw.exe" 0 - -;SectionEnd - ; Optional section (can be disabled by the user) Section "Start Menu Shortcuts" @@ -120,21 +104,21 @@ Section "Uninstall" ; Remove registry keys DeleteRegKey HKLM "${SYNFIG_REG_KEY}" DeleteRegKey HKLM "${SYNFIG_UNINSTALL_KEY}" - ; DeleteRegKey HKLM "Software\Voria_@PACKAGE_TARNAME@" ; Remove files and uninstaller - ;Delete $INSTDIR\synfig.exe Delete $INSTDIR\uninstall-@PACKAGE_TARNAME@.exe Delete $INSTDIR\etc\synfig_modules.cfg - RMDir $INSTDIR\bin - RMDir $INSTDIR\etc + RMDir "$INSTDIR\bin" + RMDir "$INSTDIR\etc" + RMDir "$INSTDIR" - ; Remove shortcuts, if any +SectionEnd + +Section "un.Start Menu Shortcuts" + ; Remove shortcuts, if any Delete "$SMPROGRAMS\Voria\Uninstall Synfig Core.lnk" - ; Remove directories used - ;RMDir "$SMPROGRAMS\Example2" - RMDir "$INSTDIR" + RMDir "$SMPROGRAMS\Voria" SectionEnd @@ -144,18 +128,21 @@ SectionEnd Section "Examples" SetOutPath $INSTDIR\examples File "@srcdir@\examples\*.sif" + CreateDirectory "$SMPROGRAMS\Voria" CreateShortCut "$SMPROGRAMS\Voria\Examples.lnk" "$INSTDIR\examples" "" "$INSTDIR\examples" 0 SectionEnd Section "un.Examples" - Delete "$SMPROGRAMS\Voria\Examples.lnk" Delete "$INSTDIR\examples\*.sif" RMDir "$INSTDIR\examples" + + Delete "$SMPROGRAMS\Voria\Examples.lnk" + RMDir "$SMPROGRAMS\Voria" SectionEnd -SubSection "PlugIns" -SubSection "Layers" +SectionGroup "PlugIns" +SectionGroup "Layers" !include "@srcdir@\src\modules\lyr_std\lyr_std.nsh" !include "@srcdir@\src\modules\mod_filter\mod_filter.nsh" !include "@srcdir@\src\modules\mod_gradient\mod_gradient.nsh" @@ -163,8 +150,8 @@ SubSection "Layers" !include "@srcdir@\src\modules\mod_particle\mod_particle.nsh" !include "@srcdir@\src\modules\mod_geometry\mod_geometry.nsh" !include "@srcdir@\src\modules\lyr_freetype\lyr_freetype.nsh" -SubSectionEnd -SubSection "Render Targets" +SectionGroupEnd +SectionGroup "Render Targets" !include "@srcdir@\src\modules\mod_bmp\mod_bmp.nsh" !include "@srcdir@\src\modules\mod_dv\mod_dv.nsh" !include "@srcdir@\src\modules\mod_ffmpeg\mod_ffmpeg.nsh" @@ -174,12 +161,11 @@ SubSection "Render Targets" !include "@srcdir@\src\modules\mod_png\mod_png.nsh" !include "@srcdir@\src\modules\mod_ppm\mod_ppm.nsh" !include "@srcdir@\src\modules\mod_yuv420p\mod_yuv420p.nsh" -SubSectionEnd -SubSectionEnd - +SectionGroupEnd +SectionGroupEnd -SubSection "un.PlugIns" -SubSection "un.Layers" +SectionGroup "un.PlugIns" +SectionGroup "un.Layers" !include "@srcdir@\src\modules\lyr_std\unlyr_std.nsh" !include "@srcdir@\src\modules\lyr_freetype\unlyr_freetype.nsh" !include "@srcdir@\src\modules\mod_filter\unmod_filter.nsh" @@ -187,8 +173,8 @@ SubSection "un.Layers" !include "@srcdir@\src\modules\mod_noise\unmod_noise.nsh" !include "@srcdir@\src\modules\mod_particle\unmod_particle.nsh" !include "@srcdir@\src\modules\mod_geometry\unmod_geometry.nsh" -SubSectionEnd -SubSection "un.Render Targets" +SectionGroupEnd +SectionGroup "un.Render Targets" !include "@srcdir@\src\modules\mod_bmp\unmod_bmp.nsh" !include "@srcdir@\src\modules\mod_dv\unmod_dv.nsh" !include "@srcdir@\src\modules\mod_ffmpeg\unmod_ffmpeg.nsh" @@ -198,8 +184,8 @@ SubSection "un.Render Targets" !include "@srcdir@\src\modules\mod_png\unmod_png.nsh" !include "@srcdir@\src\modules\mod_ppm\unmod_ppm.nsh" !include "@srcdir@\src\modules\mod_yuv420p\unmod_yuv420p.nsh" -SubSectionEnd -SubSectionEnd +SectionGroupEnd +SectionGroupEnd Function .onInit ; Get installer location -- 2.7.4