-
Notifications
You must be signed in to change notification settings - Fork 10
/
windows-installer.iss
executable file
·55 lines (49 loc) · 2.14 KB
/
windows-installer.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
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define MyAppName "DearEIS"
#define MyAppVersion "1.0.0"
#define MyAppPublisher "DearEIS developers"
#define MyAppURL "https://vyrjana.github.io/DearEIS/"
#define MyAppExeName "DearEIS.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={{3ADBB06E-72F4-49A8-986F-C235057D1539}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
CreateAppDir=no
; Remove the following line to run in administrative install mode (install for all users.)
PrivilegesRequired=lowest
OutputBaseFilename=DearEIS-installer
Compression=lzma
SolidCompression=yes
WizardStyle=modern
Uninstallable=no
DefaultGroupName=DearEIS
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
[Run]
Filename: "pip.exe"; Parameters: "install --upgrade deareis"; StatusMsg: "Using pip to install/upgrade DearEIS...";
[Icons]
Name: "{group}\DearEIS"; Filename: "deareis.exe"; WorkingDir: "{commondocs}"
Name: "{group}\DearEIS (debug)"; Filename: "deareis-debug.exe"; WorkingDir: "{commondocs}"; Comment: "Run the program with a debugging terminal attached."
Name: "{group}\Update DearEIS"; Filename: "powershell.exe"; Parameters: "-NoExit pip.exe install --upgrade deareis"; Comment: "Use pip to install the latest version of DearEIS."
Name: "{group}\Uninstall DearEIS"; Filename: "pip.exe"; Parameters: "uninstall deareis"
[Code]
function PrepareToInstall(var NeedsRestart: Boolean): String;
var
ErrorMessage: String;
ErrorCode: Integer;
begin
ErrorMessage := ''
if not Exec('python.exe', '--version', '', SW_HIDE, ewWaitUntilTerminated, ErrorCode) then
begin
ErrorMessage := 'Failed to detect a Python runtime! Install a recent version of Python and try again!'
end;
Result := ErrorMessage;
end;