-
Notifications
You must be signed in to change notification settings - Fork 5
/
setup_setting.iss
73 lines (62 loc) · 2.53 KB
/
setup_setting.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
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define MyAppName "ProSAP"
#define MyAppVersion "0.99.6"
#define MyAppPublisher "InternOmics Lab"
#define MyAppURL "https://github.com/hcji/ProSAP"
#define MyAppExeName "ProSAP.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={{F4CB095E-BDCD-46F9-99BE-BA539C06EA41}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={autopf}\{#MyAppName}
DefaultGroupName={#MyAppName}
AllowNoIcons=yes
LicenseFile=D:\project\ProSAP\LICENSE.rtf
; Remove the following line to run in administrative install mode (install for all users.)
PrivilegesRequired=lowest
OutputDir=D:\project\ProSAP\setup
OutputBaseFilename=ProSAP_setup
SetupIconFile=D:\project\ProSAP\img\ProSAP.ico
Compression=lzma
SolidCompression=yes
WizardStyle=modern
Uninstallable=yes
UninstallDisplayName=Uninstall{#MyAppName}
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
[Files]
Source: "D:\project\ProSAP\dist\ProSAP\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion
Source: "D:\project\ProSAP\dist\ProSAP\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
[Icons]
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
Name: "{userdesktop}\{#MyAppName}";Filename: "{app}\{#MyAppExeName}"
Name: "{group}\{cm:ProgramOnTheWeb,{#MyAppName}}"; Filename: "{#MyAppURL}"
Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"
[Run]
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
[Files]
Source: "dep\R-4.1.0-win.exe"; DestDir: {tmp}; Flags: deleteafterinstall; AfterInstall: InstallR; Check: RIsNotInstalled
[Code]
function RIsNotInstalled: Boolean;
begin
Result := not RegKeyExists(HKEY_LOCAL_MACHINE, 'SOFTWARE\R-core\R');
end;
procedure InstallR;
var
ResultCode: Integer;
begin
if not Exec(ExpandConstant('{tmp}\R-4.1.0-win.exe'), '/q /norestart', '', SW_SHOW, ewWaitUntilTerminated, ResultCode) then
begin
MsgBox('R failed with code: ' + IntToStr(ResultCode) + '.',
mbError, MB_OK);
end;
end;