You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
REQUIRED_PLATFORM_VERSION = 6.5; // Set this to the minimum required ASCOM Platform version for this application
101
+
MINIMUM_PLATFORM_VERSION = 6.5; // Set this to the minimum required ASCOM Platform version for this application
102
+
MAXIMUM_PLATFORM_VERSION = 6.6; // This must be a number that is larger than the highest release version of Platform 6
102
103
103
104
//
104
105
// Function to return the ASCOM Platform's version number as a double.
@@ -125,16 +126,20 @@ end;
125
126
functionInitializeSetup(): Boolean;
126
127
var
127
128
PlatformVersionNumber : double;
128
-
begin
129
+
begin
129
130
Result := FALSE; // Assume failure
130
131
PlatformVersionNumber := PlatformVersion(); // Get the installed Platform version as a double
131
-
If PlatformVersionNumber >= REQUIRED_PLATFORM_VERSION then// Check whether we have the minimum required Platform or newer
132
+
If(PlatformVersionNumber >= MINIMUM_PLATFORM_VERSION) and (PlatformVersionNumber <= MAXIMUM_PLATFORM_VERSION) then// Check whether we have the minimum required Platform or newer and the maximum or older Platform
132
133
Result := TRUE
133
134
else
134
-
if PlatformVersionNumber = 0.0then
135
-
MsgBox('No ASCOM Platform is installed. Please install Platform ' + Format('%3.1f', [REQUIRED_PLATFORM_VERSION]) + ' or later from http://www.ascom-standards.org', mbCriticalError, MB_OK)
136
-
else
137
-
MsgBox('This version of Conform requires ASCOM Platform ' + Format('%3.1f', [REQUIRED_PLATFORM_VERSION]) + ' or later, but Platform '+ Format('%3.1f', [PlatformVersionNumber]) + ' is installed.' #13#13'Please install the latest Platform before continuing; you will find it at https://www.ascom-standards.org', mbCriticalError, MB_OK);
135
+
If PlatformVersionNumber = 0.0then
136
+
MsgBox('No ASCOM Platform is installed. Please install Platform ' + Format('%3.1f', [MINIMUM_PLATFORM_VERSION]) + ' or later from http://www.ascom-standards.org', mbCriticalError, MB_OK)
137
+
elsebegin
138
+
If PlatformVersionNumber < MINIMUM_PLATFORM_VERSION then
139
+
MsgBox('This version of Conform requires ASCOM Platform ' + Format('%3.1f', [MINIMUM_PLATFORM_VERSION]) + ' or ' + Format('%3.1f', [MAXIMUM_PLATFORM_VERSION]) + ', but Platform '+ Format('%3.1f', [PlatformVersionNumber]) + ' is installed.' #13#13'Please install Platform 6.5 or 6.6 to use this Conform version (Please note that this version will not work on Platform 7).', mbCriticalError, MB_OK)
140
+
else
141
+
MsgBox('This version of Conform only runs on ASCOM Platform ' + Format('%3.1f', [MINIMUM_PLATFORM_VERSION]) + ' and ' + Format('%3.1f', [MAXIMUM_PLATFORM_VERSION]) + ', but Platform '+ Format('%3.1f', [PlatformVersionNumber]) + ' is installed.' #13#13'For Platform 7, please use a later version of Conform or preferably Conform Universal, which has greater functionality.', mbCriticalError, MB_OK);
142
+
end;
138
143
end;
139
144
140
145
// Code to enable the installer to uninstall previous versions of itself when a new version is installed
0 commit comments