Skip to content

Commit

Permalink
build: fix iss script
Browse files Browse the repository at this point in the history
  • Loading branch information
paulmueller committed Nov 17, 2023
1 parent eb2706b commit 1c2a3bb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions build-recipes/win_environment.iss
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
[Code]
const EnvironmentKey = 'SYSTEM\CurrentControlSet\Control\Session Manager\Environment';
procedure EnvAddPath(Path: string);
Expand Down
4 changes: 3 additions & 1 deletion build-recipes/win_mpl-data-cast.iss_dummy
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ Name: "german"; MessagesFile: "compiler:Languages\German.isl"
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked

Name: envPath; Description: "Add to PATH variable (required for mpldc.exe CLI)"

[Files]
Source: "{#MyAppDir}{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#MyAppDir}*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
Expand Down Expand Up @@ -115,7 +117,7 @@ begin
UnInstallOldVersion();
end;
end;
if CurStep = ssPostInstall then
if (CurStep = ssPostInstall) and IsTaskSelected('envPath') then
begin
EnvAddPath(ExpandConstant('{app}') +'\bin');
end;
Expand Down

0 comments on commit 1c2a3bb

Please sign in to comment.