[gimp] Installer: handle missing install directory of GIMP <2.8 better when there's still uninstall info in
- From: Jehan <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] Installer: handle missing install directory of GIMP <2.8 better when there's still uninstall info in
- Date: Mon, 10 May 2021 16:40:14 +0000 (UTC)
commit 67f7187c25c064412438b15a18a90dbc44b09c11
Author: Jernej Simončič <jernej|s-gitstuff eternallybored org>
Date: Sun Jan 6 21:35:50 2019 +0100
Installer: handle missing install directory of GIMP <2.8 better when there's still uninstall info in
Registry
(cherry picked from commit 778faaddc81169188c6a56432131f78fe5ee2f65)
build/windows/installer/gimp3264.iss | 18 +++++++++++++-----
1 file changed, 13 insertions(+), 5 deletions(-)
---
diff --git a/build/windows/installer/gimp3264.iss b/build/windows/installer/gimp3264.iss
index e45efadf59..c3ac0a8c89 100755
--- a/build/windows/installer/gimp3264.iss
+++ b/build/windows/installer/gimp3264.iss
@@ -1416,7 +1416,6 @@ var InResult: TRemoveOldGIMPResult;
ResultCode, i: Integer;
begin
InResult := oResult;
- InstallDir := '';
DebugMsg('DoUninstall','Uninstall string: ' + UninstStr);
@@ -1424,14 +1423,23 @@ begin
if LowerCase(RemoveBackslashUnlessRoot(InstallDir)) =
LowerCase(RemoveBackslashUnlessRoot(ExpandConstant('{app}'))) then
oResult := rogRestartRequired
else
- oResult := rogContinue;
+ oResult := InResult;
pInfoLabel.Caption := InstallDir;
if not Exec('>',UninstStr,'',SW_SHOW,ewWaitUntilTerminated,ResultCode) then
begin
- DebugMsg('DoUninstall','Exec failed: ' + IntToStr(ResultCode));
- oResult := rogUninstallFailed;
+ DebugMsg('DoUninstall','Exec('+UninstStr+') failed: ' + IntToStr(ResultCode));
+
+ if not DirExists(InstallDir) then //old install directory doesn't exist, assume it was
deleted, and Registry info is orphaned
+ begin
+ DebugMsg('DoUninstall','Install directory doesn'#39't exist: ' + InstallDir + ',
resuming install');
+ oResult := InResult
+ end else
+ begin
+ oResult := rogUninstallFailed;
+ end;
+
exit;
end;
@@ -1441,13 +1449,13 @@ begin
i := 0;
while i < (UNINSTALL_MAX_WAIT_TIME / UNINSTALL_CHECK_TIME) do
begin
- DebugMsg('DoUninstall','Waiting for ' + ExpandConstant('{app}') + ' to disappear [' +
IntToStr(i) + ']');
if not DirExists(ExpandConstant('{app}')) then
begin
DebugMsg('DoUninstall','Existing GIMP directory removed, restoring previous restart
requirement');
oResult := InResult; //restore previous result
break;
end;
+ DebugMsg('DoUninstall','Waiting for ' + ExpandConstant('{app}') + ' to disappear [' +
IntToStr(i) + ']');
Sleep(UNINSTALL_CHECK_TIME); //it may take a few seconds for the uninstaller to remove the
directory after it's exited
Inc(i);
end;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]