tabulation fix
This commit is contained in:
parent
608eef5b78
commit
00e7b363f8
|
@ -249,47 +249,47 @@ end;
|
||||||
/////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////
|
||||||
function IsUpgrade(): Boolean;
|
function IsUpgrade(): Boolean;
|
||||||
begin
|
begin
|
||||||
Result := (GetUninstallString() <> '');
|
Result := (GetUninstallString() <> '');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////
|
||||||
function UnInstallOldVersion(): Integer;
|
function UnInstallOldVersion(): Integer;
|
||||||
var
|
var
|
||||||
sUnInstallString: String;
|
sUnInstallString: String;
|
||||||
iResultCode: Integer;
|
iResultCode: Integer;
|
||||||
begin
|
begin
|
||||||
// Return Values:
|
// Return Values:
|
||||||
// 1 - uninstall string is empty
|
// 1 - uninstall string is empty
|
||||||
// 2 - error executing the UnInstallString
|
// 2 - error executing the UnInstallString
|
||||||
// 3 - successfully executed the UnInstallString
|
// 3 - successfully executed the UnInstallString
|
||||||
|
|
||||||
// default return value
|
// default return value
|
||||||
Result := 0;
|
Result := 0;
|
||||||
|
|
||||||
// get the uninstall string of the old app
|
// get the uninstall string of the old app
|
||||||
sUnInstallString := GetUninstallString();
|
sUnInstallString := GetUninstallString();
|
||||||
if sUnInstallString <> '' then begin
|
if sUnInstallString <> '' then begin
|
||||||
sUnInstallString := RemoveQuotes(sUnInstallString);
|
sUnInstallString := RemoveQuotes(sUnInstallString);
|
||||||
if Exec(sUnInstallString, '/SILENT /NORESTART /SUPPRESSMSGBOXES','', SW_HIDE, ewWaitUntilTerminated, iResultCode) then
|
if Exec(sUnInstallString, '/SILENT /NORESTART /SUPPRESSMSGBOXES','', SW_HIDE, ewWaitUntilTerminated, iResultCode) then
|
||||||
Result := 3
|
Result := 3
|
||||||
else
|
else
|
||||||
Result := 2;
|
Result := 2;
|
||||||
end else
|
end else
|
||||||
Result := 1;
|
Result := 1;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////
|
||||||
procedure CurStepChanged(CurStep: TSetupStep);
|
procedure CurStepChanged(CurStep: TSetupStep);
|
||||||
begin
|
begin
|
||||||
if not (IsTaskSelected('portable')) then
|
if not (IsTaskSelected('portable')) then
|
||||||
begin
|
begin
|
||||||
if (CurStep=ssInstall) then
|
if (CurStep=ssInstall) then
|
||||||
begin
|
begin
|
||||||
if (IsUpgrade()) then
|
if (IsUpgrade()) then
|
||||||
begin
|
begin
|
||||||
UnInstallOldVersion();
|
UnInstallOldVersion();
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
Loading…
Reference in New Issue