/
SteelDriveII.iss
69 lines (62 loc) · 2.73 KB
/
SteelDriveII.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
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define MyAppName "Baader Planetarium SteelDrive II Focuser X2 plugin"
#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={{B3AEF9EE-248D-11E8-8528-4FE071C4F632}
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=SteeldriveII_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: "focuserlist SteelDriveII.txt"; DestDir: "{app}\Miscellaneous Files"; Flags: ignoreversion
Source: "libSteeldriveII\Release\libSteeldriveII.dll"; DestDir: "{app}\Plugins\FocuserPlugins"; Flags: ignoreversion
Source: "SteeldriveII.ui"; DestDir: "{app}\Plugins\FocuserPlugins"; 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;