forked from marticliment/ElevenClock
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ElevenClock.iss
92 lines (80 loc) · 3.12 KB
/
ElevenClock.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
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define MyAppName "ElevenClock"
#define MyAppVersion "3.8.2"
#define MyAppPublisher "Martí Climent"
#define MyAppURL "https://github.com/martinet101/ElevenClock"
#define MyAppExeName "ElevenClock.exe"
[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={{D62480B8-71F1-48CE-BEEC-9D3E172C87B5}
AppName={#MyAppName}
DisableWelcomePage=no
AppVersion={#MyAppVersion}
AppVerName={#MyAppName}
AppPublisher="Martí Climent"
AppPublisherURL="https://www.somepythonthings.tk/"
AppSupportURL="https://www.somepythonthings.tk/#contact"
AppUpdatesURL="https://github.com/martinet101/ElevenClock/releases"
DefaultDirName={autopf}\ElevenClock
DisableDirPage=yes
ChangesAssociations=yes
CloseApplications=no
ArchitecturesInstallIn64BitMode=x64 arm64
DisableProgramGroupPage=yes
MinVersion=10.0
LicenseFile=LICENSE
; Uncomment the following line to run in non administrative install mode (install for current user only.)
PrivilegesRequired=lowest
OutputDir=.\
OutputBaseFilename=ElevenClock.Installer
SetupIconFile=elevenclock\resources\icon.ico
UninstallDisplayIcon={app}\ElevenClock.exe
Compression=lzma
SolidCompression=yes
WizardStyle=classic
WizardImageStretch=yes
WizardImageFile=INSTALLER.BMP
WizardSmallImageFile=elevenclock\resources\icon.bmp
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
[UninstallRun]
Filename: "{cmd}"; Parameters: "/C ""taskkill /im ElevenClock.exe /f /t"
[Code]
procedure InitializeWizard;
begin
WizardForm.Bevel.Visible := False;
WizardForm.Bevel1.Visible := True;
end;
function InitializeUninstall(): Boolean;
var
ErrorCode: Integer;
begin
if CheckForMutexes('MyProgMutex') and
(MsgBox('Application is running, do you want to close it?',
mbConfirmation, MB_OKCANCEL) = IDOK) then
begin
Exec('taskkill.exe', '/f /im ElevenClock.exe', '', SW_HIDE,
ewWaitUntilTerminated, ErrorCode);
end;
Result := True;
end;
procedure TaskKill(FileName: String);
var
ResultCode: Integer;
begin
Exec('taskkill.exe', '/f /im ' + '"' + FileName + '"', '', SW_HIDE,
ewWaitUntilTerminated, ResultCode);
end;
[Registry]
Root: HKCU; Subkey: "SOFTWARE\Microsoft\Windows\CurrentVersion\Run"; ValueType: string; ValueName: "elevenClock"; ValueData: """{app}\ElevenClock.exe"""; Flags: uninsdeletevalue
[Files]
Source: "ElevenClockBin/ElevenClock.exe"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs 64bit ; BeforeInstall: TaskKill('ElevenClock.exe')
Source: "ElevenClockBin/*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs 64bit;
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
[Icons]
Name: "{autoprograms}\{#MyAppName} Settings"; Filename: "{app}\{#MyAppExeName}"; Parameters: "--settings"
Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}";
[Run]
Filename: "{app}\ElevenClock.exe"; Flags: dontlogparameters nowait postinstall;