-
Notifications
You must be signed in to change notification settings - Fork 0
/
RDCFilterWheel.iss
executable file
·68 lines (61 loc) · 2.62 KB
/
RDCFilterWheel.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
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define MyAppName "RDC Filterwheel X2 Driver"
#define MyAppVersion "1.0"
#define MyAppPublisher "RTI-Zone"
#define MyAppURL "https://rti-zone.org"
[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={{9B420BF7-AC54-4243-9A8E-05BF5AC90F0F}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={code:TSXInstallDir}\Resources\Common
DefaultGroupName={#MyAppName}
; Need to customise these
; First is where you want the installer to end up
OutputDir=installer
; Next is the name of the installer
OutputBaseFilename=RDCFilterWheel_X2_Installer
; Final one is the icon you would like on the installer. Comment out if not needed.
SetupIconFile=rti_zone_logo.ico
Compression=lzma
SolidCompression=yes
; We don't want users to be able to select the drectory since read by TSXInstallDir below
DisableDirPage=yes
; Uncomment this if you don't want an uninstaller.
;Uninstallable=no
CloseApplications=yes
DirExistsWarning=no
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
[Files]
; WIll also need to customise these!
Source: "filterwheellist rdc.txt"; DestDir: "{app}\Miscellaneous Files"; Flags: ignoreversion
Source: "libRDCFilterWheel\Release\libRDCFilterWheel.dll"; DestDir: "{app}\Plugins\FilterWheelPlugIns"; Flags: ignoreversion
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
; msgBox('Do you want to install MyProg.exe to ' + ExtractFilePath(CurrentFileName) + '?', mbConfirmation, MB_YESNO)
[Code]
{* Below is a function to read TheSkyXInstallPath.txt and confirm that the directory does exist
This is then used in the DefaultDirName above
*}
var
Location: String;
LoadResult: Boolean;
function TSXInstallDir(Param: String) : String;
begin
LoadResult := LoadStringFromFile(ExpandConstant('{userdocs}') + '\Software Bisque\TheSkyX Professional Edition\TheSkyXInstallPath.txt', Location);
{ Check that could open the file}
if not LoadResult then
RaiseException('Unable to find the installation path for The Sky X');
{Check that the file exists}
if not DirExists(Location) then
RaiseException('The SkyX installation directory ' + Location + ' does not exist');
Result := Location;
end;