-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup_base.iss
122 lines (107 loc) · 5.3 KB
/
setup_base.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
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define MyAppPublisher "Danol"
#define MyAppCopyright "(c) 2023 Danol"
#define MyAppURL "https://danol.cz"
#define MyAppExeName "strawLumen.exe"
[Setup]
AppName={#MyAppName}
AppVersion={#MyAppVersion}
AppVerName={#MyAppName} v{#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={pf}\{#MyAppName}
DefaultGroupName={#MyAppName}
VersionInfoVersion={#MyAppVersion}
VersionInfoCompany={#MyAppPublisher}
VersionInfoCopyRight={#MyAppCopyright}
DisableProgramGroupPage=yes
OutputDir=setup
OutputBaseFilename=lumen_{#PlatformId}_{#MyAppVersion}
Compression=lzma
SolidCompression=yes
UninstallDisplayIcon="{app}\bin_{#PlatformId}\{#MyAppExeName}"
; Sign tools configured in inno setup ide
SignTool=ComodoSign
SignedUninstaller=yes
DisableDirPage=no
Uninstallable=not IsPortableMode
DirExistsWarning=no
[Languages]
Name: "cz"; MessagesFile: "compiler:Languages\Czech.isl"
Name: "en"; MessagesFile: "compiler:Default.isl"
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"
Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked; OnlyBelowVersion: 0,6.1
[Files]
Source: "installDeps\vc_redist.{#PlatformId}.exe"; DestDir: {tmp}; AfterInstall: InstallMSVC; Flags: deleteafterinstall
Source: "installDeps\klcp_basic_unattended.ini"; DestDir: {tmp}; Flags: deleteafterinstall
Source: "installDeps\k_lite.exe"; DestDir: {tmp}; AfterInstall: InstallKLite; Flags: deleteafterinstall
Source: "bin\bin_{#PlatformId}\strawLumen.exe"; DestDir: "{app}\bin_{#PlatformId}"; Flags: ignoreversion sign
Source: "bin\bin_{#PlatformId}\QtWebEngineProcess.exe"; DestDir: "{app}\bin_{#PlatformId}"; Flags: ignoreversion recursesubdirs
Source: "bin\bin_{#PlatformId}\*.dll"; DestDir: "{app}\bin_{#PlatformId}"; Flags: ignoreversion recursesubdirs
Source: "bin\bin_{#PlatformId}\*.pak"; DestDir: "{app}\bin_{#PlatformId}"; Flags: ignoreversion recursesubdirs
Source: "bin\bin_{#PlatformId}\*.dat"; DestDir: "{app}\bin_{#PlatformId}"; Flags: ignoreversion recursesubdirs
Source: "bin\lang\*.qm"; DestDir: "{app}\lang"; Flags: ignoreversion
Source: "bin\backgrounds\*"; DestDir: "{app}\backgrounds"; Flags: ignoreversion
Source: "bin\bible\*"; DestDir: "{app}\bible"; Flags: ignoreversion
Source: "bin\etc\*"; DestDir: "{app}\etc"; Flags: ignoreversion recursesubdirs
Source: "bin\changelog.html"; DestDir: "{app}"; Flags: ignoreversion
Source: "fonts\SourceSansPro-*.ttf"; DestDir: "{fonts}"; FontInstall: "Source Sans Pro"; Flags: onlyifdoesntexist uninsneveruninstall
Source: "portableMode"; DestDir: "{app}"; Components: portable
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
[Types]
Name: "full"; Description: "Nepøenosná instalace"
Name: "portable"; Description: "Portable/pøenosná instalace"
[Components]
Name: "core"; Description: "Aplikace"; Types: full portable; Flags: fixed
Name: "portable"; Description: "Portable/pøenosný mód (data programu se ukládají do složky s aplikací)"; Types: portable
[Dirs]
[Icons]
Name: "{app}\{#MyAppName}"; Filename: "{app}\bin_{#PlatformId}\{#MyAppExeName}"
Name: "{group}\{#MyAppName}"; Filename: "{app}\bin_{#PlatformId}\{#MyAppExeName}"
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\bin_{#PlatformId}\{#MyAppExeName}"; Tasks: desktopicon
Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: quicklaunchicon
[Run]
Filename: "{app}\bin_{#PlatformId}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
[Code]
procedure InstallMSVC;
var
StatusText: string;
ResultCode: integer;
begin
StatusText := WizardForm.StatusLabel.Caption;
WizardForm.StatusLabel.Caption := 'Instaluji Microsoft Visual Studio Redistributable...';
WizardForm.ProgressGauge.Style := npbstMarquee;
try
if not Exec(ExpandConstant('{tmp}\vc_redist.{#PlatformId}.exe'), '/install /passive /quiet /norestart', '', SW_SHOWNORMAL, ewWaitUntilTerminated, ResultCode)
then
MsgBox('Nepodaøilo se spustit instalátor MSVC Redist. Aplikace bez této knihovny nemusí fungovat.' + #13#10 + SysErrorMessage(ResultCode), mbError, MB_OK);
finally
WizardForm.StatusLabel.Caption := StatusText;
WizardForm.ProgressGauge.Style := npbstNormal;
end;
end;
procedure InstallKLite;
var
StatusText: string;
ResultCode: integer;
begin
StatusText := WizardForm.StatusLabel.Caption;
WizardForm.StatusLabel.Caption := 'Instaluji K-Lite codec pack...';
WizardForm.ProgressGauge.Style := npbstMarquee;
try
if not Exec(ExpandConstant('{tmp}\k_lite.exe'), ExpandConstant('/verysilent /norestart /LoadInf="{tmp}/klcp_basic_unattended.ini"'), '', SW_SHOWNORMAL, ewWaitUntilTerminated, ResultCode)
then
MsgBox('Nepodaøilo se spustit instalátor K-Lite. Bez tìchto kodekù nemusí fungovat funkce pøehrávaèe videí.' + #13#10 + SysErrorMessage(ResultCode), mbError, MB_OK);
finally
WizardForm.StatusLabel.Caption := StatusText;
WizardForm.ProgressGauge.Style := npbstNormal;
end;
end;
function IsPortableMode: Boolean;
begin
result := WizardSetupType(false) = 'portable';
end;