-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.iss
More file actions
57 lines (49 loc) · 1.35 KB
/
setup.iss
File metadata and controls
57 lines (49 loc) · 1.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#define MyAppName "MineControl CLI"
#define MyAppVersion "2.2.4"
#define MyAppPublisher "Andre Carbajal"
#define MyAppExeName "mine-control-cli.exe"
[Setup]
AppId={{642feabb-e491-404b-8e7d-27f56f64615e}}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
AppPublisher={#MyAppPublisher}
DefaultDirName={autopf}\{#MyAppName}
DefaultGroupName={#MyAppName}
DisableProgramGroupPage=yes
OutputBaseFilename=mine-control-cli-setup
Compression=lzma
SolidCompression=yes
WizardStyle=modern
[Files]
Source: "target\*.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "target\*.dll"; DestDir: "{app}"; Flags: ignoreversion
[Code]
procedure ModifyPath();
var
Path: string;
AppDir: string;
begin
if not RegQueryStringValue(HKLM, 'SYSTEM\CurrentControlSet\Control\Session Manager\Environment', 'Path', Path) then
begin
Exit;
end;
AppDir := ExpandConstant('{app}');
if Pos(LowerCase(AppDir), LowerCase(Path)) = 0 then
begin
if Pos(';', Path[Length(Path)]) <> 0 then
Path := Path + AppDir
else
Path := Path + ';' + AppDir;
RegWriteExpandStringValue(HKLM, 'SYSTEM\CurrentControlSet\Control\Session Manager\Environment', 'Path', Path);
end;
end;
procedure CurStepChanged(CurStep: TSetupStep);
begin
if CurStep = ssPostInstall then
begin
ModifyPath();
end;
end;
[UninstallDelete]
Type: files; Name: "{app}\*.*"
Type: dirifempty; Name: "{app}"