-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathsetup.64.iss
More file actions
85 lines (71 loc) · 2.85 KB
/
setup.64.iss
File metadata and controls
85 lines (71 loc) · 2.85 KB
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
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define MyAppName "fũnkplot"
#define MyAppVersion "01.0"
#define MyAppPublisher "The Unauthorized Frog"
#define MyAppURL "http://funkplot.sh"
#define MyAppExeName "funkplot-gui.exe"
#define SrcRootDir "c:\Users\Ferenc\work\"
;"c:\Users\ferencd"
[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.)
ArchitecturesInstallIn64BitMode=x64
AppId={{5AB81E2F-38DF-495E-B1E9-D0BBF4D84085}}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={pf}\{#MyAppName}
DisableDirPage=yes
DisableProgramGroupPage=yes
OutputDir={#SrcRootDir}funkplot\build-release\bin\
OutputBaseFilename=funkplot-1.0.0-setup
SetupIconFile={#SrcRootDir}\funkplot\fxs.ico
UninstallDisplayIcon={#SrcRootDir}\funkplot\fxs.ico
SourceDir={#SrcRootDir}\funkplot\build-release\bin\package\
Compression=lzma2
SolidCompression=yes
LicenseFile=LICENSE.TXT
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
[Files]
Source: "*.*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs
Source: "vc_redist.x64.exe"; DestDir: {tmp}; Flags: deleteafterinstall
[Icons]
Name: "{commonprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
[Run]
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
Filename: "{tmp}\VC_redist.x64.exe"; Parameters: "/q /norestart"; \
Check: (not Is64BitInstallMode) and VC2019RedistNeedsInstall('x64'); \
Flags: waituntilterminated; \
StatusMsg: "Installing VC++ 2019 redistributables..."
[Code]
function VC2019RedistNeedsInstall(Arch: string): Boolean;
var
Version: String;
begin
if RegQueryStringValue(
HKEY_LOCAL_MACHINE,
'SOFTWARE\Microsoft\VisualStudio\14.0\VC\Runtimes\' + Arch,
'Version', Version) then
begin
Log('VC Redist Version check : found ' + Version);
Result := (CompareStr(Version, 'v14.29.30139.00')<0);
end;
end;
[Code]
function InitializeUninstall(): Boolean;
var ErrorCode: Integer;
begin
ShellExec('open','taskkill.exe','/f /im {#MyAppExeName}','',SW_HIDE,ewNoWait,ErrorCode);
ShellExec('open','tskill.exe',' {#MyAppName}','',SW_HIDE,ewNoWait,ErrorCode);
result := True;
end;