Create Windows installer #53
This commit is contained in:
@@ -54,19 +54,6 @@ begin
|
||||
Result := S;
|
||||
end;
|
||||
|
||||
function CheckAddPath(NewPath: string): Boolean;
|
||||
var
|
||||
OldPath: string;
|
||||
begin
|
||||
if not RegQueryStringValue(HKLM,
|
||||
'SYSTEM\CurrentControlSet\Control\Session Manager\Environment',
|
||||
'Path', OldPath)
|
||||
then
|
||||
OldPath := '';
|
||||
|
||||
Result := Pos(LowerCase(NewPath), LowerCase(OldPath)) = 0;
|
||||
end;
|
||||
|
||||
procedure AddAppToPath();
|
||||
var
|
||||
OldPath, NewPath, FinalPath: string;
|
||||
@@ -92,14 +79,6 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure CurStepChanged(CurStep: TSetupStep);
|
||||
begin
|
||||
if CurStep = ssPostInstall then
|
||||
begin
|
||||
AddAppToPath();
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure RemoveAppFromPath();
|
||||
var
|
||||
OldPath, NewPath, Token, Remainder, FinalPath: string;
|
||||
@@ -149,6 +128,14 @@ begin
|
||||
RefreshEnvironment();
|
||||
end;
|
||||
|
||||
procedure CurStepChanged(CurStep: TSetupStep);
|
||||
begin
|
||||
if CurStep = ssPostInstall then
|
||||
begin
|
||||
AddAppToPath();
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure DeinitializeUninstall();
|
||||
begin
|
||||
RemoveAppFromPath();
|
||||
|
Reference in New Issue
Block a user