From 5315e9fbdc232533fea2d20a74ffc0d032e9d20b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jernej=20Simon=C4=8Di=C4=8D?= Date: Tue, 29 Oct 2019 23:10:34 +0100 Subject: [PATCH] Installer: properly remove old icons on 32-bit installs and per-user installs (cherry picked from commit c860d62a637f3fd966018b183a89fc9b7647e172) --- build/windows/installer/gimp3264.iss | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/build/windows/installer/gimp3264.iss b/build/windows/installer/gimp3264.iss index 5b30f88186..5e28feba3b 100755 --- a/build/windows/installer/gimp3264.iss +++ b/build/windows/installer/gimp3264.iss @@ -544,17 +544,17 @@ Type: files; Name: "{app}\lib\gimp\2.0\plug-ins\*.dll" ;gegl 0.2 Type: filesandordirs; Name: "{app}\lib\gegl-0.2" ;old icons -Type: files; Name: "{commonprograms}\GIMP 2.lnk" -Type: files; Name: "{commondesktop}\GIMP 2.lnk" +Type: files; Name: "{autoprograms}\GIMP 2.lnk" +Type: files; Name: "{autodesktop}\GIMP 2.lnk" ;get previous GIMP icon name from uninstall name in Registry -Type: files; Name: "{commonprograms}\{reg:HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\GIMP-2_is1,DisplayName|GIMP 2}.lnk"; Check: CheckRegValueExists('SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\GIMP-2_is1','DisplayName') -Type: files; Name: "{commondesktop}\{reg:HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\GIMP-2_is1,DisplayName|GIMP 2}.lnk"; Check: CheckRegValueExists('SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\GIMP-2_is1','DisplayName') +Type: files; Name: "{autoprograms}\GIMP {reg:HKA\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\GIMP-2_is1,DisplayVersion|GIMP 2}.lnk"; Check: CheckRegValueExists('SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\GIMP-2_is1','DisplayVersion') +Type: files; Name: "{autodesktop}\GIMP {reg:HKA\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\GIMP-2_is1,DisplayVersion|GIMP 2}.lnk"; Check: CheckRegValueExists('SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\GIMP-2_is1','DisplayVersion') ;32-bit Python Type: filesandordirs; Name: "{app}\32\lib\gimp\2.0\python" Type: files; Name: "{app}\32\bin\python2w.exe" Type: files; Name: "{app}\32\bin\python2.exe" Type: files; Name: "{app}\32\bin\libpython2.7.dll" -Type: filesandordirs; Name: "{app}\32\\lib\python2.7" +Type: filesandordirs; Name: "{app}\32\lib\python2.7" ;remove old babl and gegl plugins Type: filesandordirs; Name: "{app}\lib\babl-0.1" Type: filesandordirs; Name: "{app}\lib\gegl-0.4" @@ -702,7 +702,8 @@ end; function CheckRegValueExists(const SubKeyName, ValueName: String): Boolean; begin - Result := RegValueExists(HKEY_LOCAL_MACHINE, SubKeyName, ValueName); + Result := RegValueExists(HKEY_AUTO, SubKeyName, ValueName); + DebugMsg('CheckRegValueExists',SubKeyName + ', ' + ValueName + ': ' + BoolToStr(Result)); end;