forked from EBSP-Indexer/EBSP-Indexer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup_script.iss
77 lines (67 loc) · 2.88 KB
/
setup_script.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
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define MyAppName "EBSP Indexer"
#define MyAppVersion "0.2.0"
#define MyAppPublisher "EBSP Indexer Developers"
#define MyAppExeName "EBSP Indexer.exe"
#define InstallerVersion "0.2.1"
[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={{38A0E626-43E8-4E4A-8AE6-62FA6C9932D5}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
VersionInfoVersion={#InstallerVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
DefaultDirName={autopf}\EBSP-Indexer
DisableProgramGroupPage=yes
LicenseFile=C:\Users\eroest\source\EBSP-Indexer\dist\EBSP Indexer\COPYING.txt
PrivilegesRequired=lowest
OutputBaseFilename=EBSP_Indexer_0.2.0_Win_x86_install
SetupIconFile=C:\Users\eroest\source\EBSP-Indexer\resources\setup_icon.ico
Compression=lzma
SolidCompression=yes
WizardStyle=modern
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
Name: "norwegian"; MessagesFile: "compiler:Languages\Norwegian.isl"
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
[Files]
Source: "C:\Users\eroest\source\EBSP-Indexer\dist\EBSP Indexer\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\eroest\source\EBSP-Indexer\dist\EBSP Indexer\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
; VC++ redistributable runtime. Extracted by VC2017RedistNeedsInstall(), if needed.
Source: "C:\Users\eroest\source\EBSP-Indexer\VC_redist.x64.exe"; DestDir: {tmp}; Flags: dontcopy
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
[Icons]
Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
[Code]
function VCRedistNeedsInstall: Boolean;
var
Version: String;
begin
if RegQueryStringValue(HKEY_LOCAL_MACHINE,
'SOFTWARE\Microsoft\VisualStudio\14.0\VC\Runtimes\x64', 'Version',
Version) then
begin
// Is the installed version at least 14.29 ?
Log('VC Redist Version check : found ' + Version);
Result := (CompareStr(Version, 'v14.29.30139')<0);
end
else
begin
// Not even an old version installed
Result := True;
end;
if (Result) then
begin
ExtractTemporaryFile('VC_redist.x64.exe');
end;
end;
[Run]
Filename: "{tmp}\VC_redist.x64.exe"; \
StatusMsg: Installing Microsoft Visual C++ Redistributable 2015-2022; \
Parameters: "/quiet"; Check: VCRedistNeedsInstall; Flags: waituntilterminated
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent