This repository has been archived by the owner on Jul 3, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathInstallPhilleConnect.iss
184 lines (165 loc) · 6.04 KB
/
InstallPhilleConnect.iss
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
; Script generated by the Inno Script Studio Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define MyAppName "PhilleConnect"
#define MyAppVersion "2.0"
#define MyAppPublisher "Johannes Kreutz and Dirk Winkel"
#define MyAppURL "https://www.philleconnect.org/"
[Setup]
; NOTE: The value of AppId uniquely identifies this application.
; Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{0F9E17C0-9CBF-410F-9949-CAC7B6AFF494}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={pf}\{#MyAppName}
DisableDirPage=yes
DefaultGroupName={#MyAppName}
DisableProgramGroupPage=yes
OutputDir=Installer
OutputBaseFilename=PhilleConnectSetup
Compression=lzma
SolidCompression=True
AllowCancelDuringInstall=False
ShowLanguageDialog=no
Uninstallable=no
ArchitecturesInstallIn64BitMode=x64
ArchitecturesAllowed=x64
MinVersion=0,6.1.7601
PrivilegesRequired=admin
[Languages]
Name: "german"; MessagesFile: "compiler:Languages\German.isl"
[Components]
Name: "student"; Description: "Installation für Schülerrechner"; Types: full; \
Flags: exclusive
Name: "teacher"; Description: "Installation für Lehrerrechner im Rechnerraum"; \
Types: custom; Flags: exclusive
Name: "smallTeacher"; Description: "Installation für Einzel-Lehrerrechner"; \
Types: custom; Flags: exclusive
[Tasks]
Name: "desktopicon"; Description: "Desktopverknüpfung erstellen"; \
GroupDescription: "Icons"
Name: "startmenuicon"; Description: "Startmenüeintrag erstellen"; \
GroupDescription: "Icons"
[Files]
Source: "PhilleConnectExecutables\*"; \
DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "PhilleConnectDesktop\*"; \
DestDir: "{tmp}"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "PhilleConnectStudent\*"; \
DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; \
Components: student
Source: "PhilleConnectTeacher\*"; \
DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; \
Components: teacher
Source: "PhilleConnectSmallTeacherStudent\*"; \
DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; \
Components: student smallTeacher
Source: "InstallerLocation\*"; \
DestDir: "{src}"; Flags: ignoreversion recursesubdirs createallsubdirs \
deleteafterinstall
Source: "Scripts\*"; \
DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs \
deleteafterinstall
[Registry]
Root: "HKLM"; \
Subkey: "Software\Microsoft\Windows\CurrentVersion\Run"; \
ValueType: string; \
ValueName: "PhilleConnectDrive"; \
ValueData: "C:\Program Files\PhilleConnect\PhilleConnectDrive.exe"; \
Flags: createvalueifdoesntexist; \
Components: student smallTeacher
Root: "HKLM"; \
Subkey: "Software\Microsoft\Windows\CurrentVersion\Run"; \
ValueType: string; \
ValueName: "PhilleConnectTeacher"; \
ValueData: "C:\Program Files\PhilleConnect\PhilleConnectTeacher.exe"; \
Flags: createvalueifdoesntexist; \
Components: teacher
Root: "HKLM"; \
Subkey: "Software\Microsoft\Windows\CurrentVersion\Policies\System"; \
ValueType: dword; \
ValueName: "DelayedDesktopSwitchTimeout"; \
ValueData: "3"; \
Flags: createvalueifdoesntexist
Root: "HKLM"; \
Subkey: "Software\Microsoft\Windows\CurrentVersion\Policies\System"; \
ValueType: dword; \
ValueName: "RunLogonScriptSync"; \
ValueData: "1"; \
Flags: createvalueifdoesntexist
[Run]
Filename: "{app}\createSystemclientTask.bat"; \
Flags: runascurrentuser
Filename: "{src}\copyConfigFile.bat"
Filename: "{app}\gpedit.bat"; \
Flags: runascurrentuser
Filename: "{app}\setupFirewall.bat"; \
Flags: runascurrentuser; \
Components: student
Filename: "{tmp}\ClientRegistrationTool.exe"; \
Flags: nowait postinstall skipifsilent; \
Description: "Client registrieren und neu starten"
Filename: "{app}\reboot.bat"; \
Flags: nowait postinstall unchecked; \
Description: "Client bereits registriert, jetzt neu starten"
[Icons]
Name: "{group}\PhilleConnect Drive"; \
Filename: "{app}\PhilleConnectDrive.exe"; WorkingDir: "{app}"; \
Comment: "Mit Home-Laufwerk verbinden..."; Tasks: startmenuicon; \
Components: student smallTeacher
Name: "{commondesktop}\PhilleConnect Drive"; \
Filename: "{app}\PhilleConnectDrive.exe"; WorkingDir: "{app}"; \
Comment: "Mit Home-Laufwerk verbinden..."; Tasks: desktopicon; \
Components: student smallTeacher
Name: "{group}\PhilleConnect Teacher"; \
Filename: "{app}\PhilleConnectTeacher.exe"; WorkingDir: "{app}"; \
Comment: "Mit Home-Laufwerk verbinden..."; Tasks: startmenuicon; \
Components: teacher
Name: "{commondesktop}\PhilleConnect Teacher"; \
Filename: "{app}\PhilleConnectTeacher.exe"; WorkingDir: "{app}"; \
Comment: "Mit Home-Laufwerk verbinden..."; Tasks: desktopicon; \
Components: teacher
[Code]
var
RunListLastChecked: Integer;
procedure RunListClickCheck(Sender: TObject);
var
I: Integer;
Checked: Integer;
begin
{ Find if some other checkbox got checked }
Checked := -1;
for I := 0 to WizardForm.RunList.Items.Count - 1 do
begin
if WizardForm.RunList.Checked[I] and (I <> RunListLastChecked) then
begin
Checked := I;
end;
end;
{ If it was, uncheck the previously checked box and remember the new one }
if Checked >= 0 then
begin
if RunListLastChecked >= 0 then
begin
WizardForm.RunList.Checked[RunListLastChecked] := False;
end;
RunListLastChecked := Checked;
end;
{ Or if the previously checked box got unchecked, forget it. }
{ (This is not really necessary, it's just to clean the things up) }
if (RunListLastChecked >= 0) and
(not WizardForm.RunList.Checked[RunListLastChecked]) then
begin
RunListLastChecked := -1;
end;
end;
procedure InitializeWizard();
begin
WizardForm.RunList.OnClickCheck := @RunListClickCheck;
RunListLastChecked := 0;
end;