-
Notifications
You must be signed in to change notification settings - Fork 4
/
PIE_win_installer.iss
128 lines (109 loc) · 5.58 KB
/
PIE_win_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
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
123
124
125
126
127
128
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
; then did a few changes to make maintenance, move to other folder easier
; Define name of main output program (GUI)
#define GUIEXE "EllipsoidGUI.exe"
; define the path to your work folder
#define BaseFolder64 "C:\Users\JCC\Documents\custom_python_libs\pieface\dist\PIEFACE_win64"
#define BaseFolder32 "C:\Users\JCC\Documents\custom_python_libs\pieface\dist\PIEFACE_win32"
; get version information from the exe
#define GUIName BaseFolder64+"\"+GUIEXE
#define CMDName BaseFolder64+"\CIFellipsoid.exe"
#define AppVersionNo GetFileVersion(GUIName)
#define AppMajorVersionIdx Pos(".", AppVersionNo)
#define AppMinorVersionTemp Copy(AppVersionNo, AppMajorVersionIdx +1)
#define AppMajorVersionNo Copy(AppVersionNo, 1, AppMajorVersionIdx -1)
#define AppMinorVersionNo Copy(AppMinorVersionTemp, 1, Pos(".", AppMinorVersionTemp)-1)
; define some more stuff, mainly to just keep it all at the beginning
#define MyAppName "PIEFACE"
#define MyAppPublisher "University of Edinburgh"
#define MyAppURL "http://www.csec.ed.ac.uk"
#define MyAppSupportURL "http://www.csec.ed.ac.uk"
#define MyAppUpdatesURL "http://www.csec.ed.ac.uk"
#define OutputFileName "WinSetup_PIEFACE"
[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={{71C0FA60-614B-4A53-8275-E38BCDB65707}}
AppName={#MyAppName}
AppVersion={#AppVersionNo}
AppVerName={#MyAppName} version {#AppMajorVersionNo}.{#AppMinorVersionNo}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppSupportURL}
AppUpdatesURL={#MyAppUpdatesURL}
; Allow different installation for 64/32-bit
ArchitecturesInstallIn64BitMode = x64
; Following should probably be something like "{pf}\yourappname" for a real application
; set DefaultDirName to store files after setup done
DefaultDirName={pf}\PIEFACE
DefaultGroupName=PIEFACE
AllowNoIcons=yes
PrivilegesRequired=admin
DisableStartupPrompt=yes
DisableWelcomePage=yes
; AlwaysRestart=yes
OutputBaseFilename={#OutputFileName}_{#AppVersionNo}_tmp
OutputDir="."
; bzip/9 is better by about 400KB over zip/9 and lzma is even better
Compression=lzma/ultra
; Following would reduce size a bit more
; SolidCompression=yes
; Location of files to use
SourceDir=C:\Users\JCC\Documents\custom_python_libs\pieface
Uninstallable=yes
; Add ability to add program to PATH
ChangesEnvironment=true
; Show README during setup
;InfoAfterFile=README.rst
LicenseFile=license.txt
[Languages]
Name: english; MessagesFile: compiler:Default.isl
[Tasks]
; To create Desktop Icon
Name: desktopicon; Description: {cm:CreateDesktopIcon}; GroupDescription: {cm:AdditionalIcons}
; Add reference to modpath.iss, to enable add/remove of program to PATH
Name: modifypath; Description: Add application directory to your environmental path
; To create Quicklaunchicon
; Name: quicklaunchicon; Description: {cm:CreateQuickLaunchIcon}; GroupDescription: {cm:AdditionalIcons}; Flags: unchecked
[Files]
; 64-bit source
Source: "{#BaseFolder64}\*" ; DestDir: {app}; Excludes: "*.exe, *.rst" ;Flags: ignoreversion; Check: Is64BitInstallMode;
Source: "{#BaseFolder64}\CIFellipsoid.exe"; DestDir: {app}; Flags: ignoreversion; Check: Is64BitInstallMode;
Source: "{#BaseFolder64}\{#GUIEXE}"; DestDir: {app}; Flags: ignoreversion; Check: Is64BitInstallMode;
Source: "{#BaseFolder64}\README.pdf"; DestDir: {app}; Check: Is64BitInstallMode;
;Flags: isreadme;
Source: "{#BaseFolder64}\*"; DestDir: {app}; Flags: recursesubdirs createallsubdirs; Check: Is64BitInstallMode;
; 32-bit source
Source: "{#BaseFolder32}\*" ; DestDir: {app}; Excludes: "*.exe, *.rst" ;Flags: ignoreversion; Check: not Is64BitInstallMode;
Source: "{#BaseFolder32}\CIFellipsoid.exe"; DestDir: {app}; Flags: ignoreversion; Check: not Is64BitInstallMode;
Source: "{#BaseFolder32}\{#GUIEXE}"; DestDir: {app}; Flags: ignoreversion; Check: not Is64BitInstallMode;
Source: "{#BaseFolder32}\README.pdf"; DestDir: {app}; Check: not Is64BitInstallMode;
;Flags: isreadme;
Source: "{#BaseFolder32}\*"; DestDir: {app}; Flags: recursesubdirs createallsubdirs; Check: not Is64BitInstallMode;
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
[Icons]
Name: {group}\PIEFACE_GUI; Filename: {app}\{#GUIEXE}; IconFilename: "{app}\docs\images\PIEFACE.ico"; WorkingDir: "{userdocs}"
Name: {commondesktop}\PIEFACE_GUI; Filename: {app}\{#GUIEXE}; Tasks: desktopicon;
;create uninstall shortcut in start menu
Name: {group}\Uninstall PIEFACE; Filename: {uninstallexe}
;[Registry]
;Root: HKLM; Subkey: "SOFTWARE\Microsoft\Windows\CurrentVersion\Run"; ValueType: string; ValueName: {#MyAppName}; ValueData: {app}\{#MyAppExeName}; Flags: uninsdeletevalue
;Root: HKLM; Subkey: "Software\My Company\My Program"; Flags: uninsdeletekey
[Run]
; Open README file when complete
Filename: "{app}\README.pdf"; Description: "View the README file"; Flags: postinstall shellexec skipifsilent
; Here runhidden flag is used to hide pop up window after setup done
Filename: {app}\{#GUIEXE}; Description: {cm:LaunchProgram,{#GUIEXE}}; Flags: nowait postinstall skipifsilent runhidden
; Filename: {sys}\net.exe; Parameters: start {#MyAppName}; Flags: runhidden;
[Code]
const
ModPathName = 'modifypath';
ModPathType = 'user';
function ModPathDir(): TArrayOfString;
begin
setArrayLength(Result, 1)
Result[0] := ExpandConstant('{app}');
end;
#include "modpath.iss"