-
-
Notifications
You must be signed in to change notification settings - Fork 175
/
ElevenClock.iss
143 lines (123 loc) · 5.47 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
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
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define MyAppName "ElevenClock"
#define MyAppVersion "4.4.1.1"
#define MyAppPublisher "Martí Climent"
#define MyAppURL "https://marticliment.com/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://marticliment.com/"
AppSupportURL="https://marticliment.com/#contact"
AppUpdatesURL="https://github.com/marticliment/ElevenClock/releases"
VersionInfoVersion=4.4.1.1
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
UsePreviousAppDir=no
WizardStyle=classic
WizardImageStretch=yes
WizardImageFile=INSTALLER.BMP
WizardSmallImageFile=elevenclock\resources\icon.bmp
UsePreviousTasks=no
[Languages]
Name: "English"; MessagesFile: "compiler:Default.isl"
Name: "Armenian"; MessagesFile: "compiler:Languages\Armenian.isl"
Name: "BrazilianPortuguese"; MessagesFile: "compiler:Languages\BrazilianPortuguese.isl"
Name: "Catalan"; MessagesFile: "compiler:Languages\Catalan.isl"
Name: "Corsican"; MessagesFile: "compiler:Languages\Corsican.isl"
Name: "Czech"; MessagesFile: "compiler:Languages\Czech.isl"
Name: "Danish"; MessagesFile: "compiler:Languages\Danish.isl"
Name: "Dutch"; MessagesFile: "compiler:Languages\Dutch.isl"
Name: "Finnish"; MessagesFile: "compiler:Languages\Finnish.isl"
Name: "French"; MessagesFile: "compiler:Languages\French.isl"
Name: "German"; MessagesFile: "compiler:Languages\German.isl"
Name: "Hebrew"; MessagesFile: "compiler:Languages\Hebrew.isl"
Name: "Icelandic"; MessagesFile: "compiler:Languages\Icelandic.isl"
Name: "Italian"; MessagesFile: "compiler:Languages\Italian.isl"
Name: "Japanese"; MessagesFile: "compiler:Languages\Japanese.isl"
Name: "Norwegian"; MessagesFile: "compiler:Languages\Norwegian.isl"
Name: "Polish"; MessagesFile: "compiler:Languages\Polish.isl"
Name: "Portuguese"; MessagesFile: "compiler:Languages\Portuguese.isl"
Name: "Russian"; MessagesFile: "compiler:Languages\Russian.isl"
Name: "Slovenian"; MessagesFile: "compiler:Languages\Slovenian.isl"
Name: "Spanish"; MessagesFile: "compiler:Languages\Spanish.isl"
Name: "Turkish"; MessagesFile: "compiler:Languages\Turkish.isl"
Name: "Ukrainian"; MessagesFile: "compiler:Languages\Ukrainian.isl"
Name: "Korean"; MessagesFile: "compiler:Languages\Korean.isl"
[UninstallRun]
Filename: "{cmd}"; Parameters: "/C ""taskkill /im ElevenClock.exe /f /t"
[InstallDelete]
Type: filesandordirs; Name: "{autopf}\ElevenClock\*"; BeforeInstall: TaskKill('ElevenClock.exe');
[UninstallDelete]
Type: filesandordirs; Name: "{autopf}\ElevenClock\*"
Type: filesandordirs; Name: "{autopf}\ElevenClock392\*"
[Tasks]
Name: "resetelevenclock"; Description: "Clean install (reset settings)"; GroupDescription: "Installation type"; Flags: unchecked
[InstallDelete]
Type: filesandordirs; Name: "{userdesktop}\..\.elevenclock\*"; Tasks: resetelevenclock
[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;
procedure RunUninstaller(Path: String);
var
ResultCode: Integer;
begin
Exec(ExpandConstant('{app}')+'\'+Path, ' /verysilent /SUPPRESSMSGBOXES', '', 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/base_library.zip"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs 64bit ; BeforeInstall: RunUninstaller('unins.exe');
Source: "ElevenClockBin/ElevenClock.exe"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs 64bit ;
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: runasoriginaluser dontlogparameters nowait postinstall;