Skip to content

Commit b871edd

Browse files
committed
Installer - Correct error message when attempting to install on Platform 6.6 or earlier.
1 parent db83d80 commit b871edd

1 file changed

Lines changed: 13 additions & 8 deletions

File tree

Setup/Conform6.iss

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -130,16 +130,21 @@ var
130130
begin
131131
Result := FALSE; // Assume failure
132132
PlatformVersionNumber := PlatformVersion(); // Get the installed Platform version as a double
133-
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
133+
// Check whether we have the minimum required Platform or newer and the maximum or older Platform
134+
If (PlatformVersionNumber >= MINIMUM_PLATFORM_VERSION) and (PlatformVersionNumber <= MAXIMUM_PLATFORM_VERSION) then // We are on a supported OS
134135
Result := TRUE
135-
else
136-
If PlatformVersionNumber = 0.0 then
136+
else // We are not on a suypported OS
137+
// Check whether a Platform is installed
138+
If PlatformVersionNumber = 0.0 then // No Platform is installed
137139
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)
138-
else begin
139-
If PlatformVersionNumber < MINIMUM_PLATFORM_VERSION then
140-
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)
141-
else
142-
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);
140+
else begin // An incompatible Platform is installed
141+
// Check whether an earlier Platform than the minimum is installed
142+
If PlatformVersionNumber < MINIMUM_PLATFORM_VERSION then // An earlier Platform is installed
143+
MsgBox('This version of Conform requires ASCOM Platform ' + Format('%3.1f', [MINIMUM_PLATFORM_VERSION]) + ' or later' +
144+
', but Platform '+ Format('%3.1f', [PlatformVersionNumber]) + ' is installed.' #13#13 'Please install Platform 7 to use this Conform version.', mbCriticalError, MB_OK)
145+
else // A later Platform is installed that is younger than the maximum supported version
146+
MsgBox('This version of Conform only runs on ASCOM Platforms from ' + Format('%3.1f', [MINIMUM_PLATFORM_VERSION]) + ' to ' + Format('%3.1f', [MAXIMUM_PLATFORM_VERSION]) +
147+
', 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);
143148
end;
144149
end;
145150

0 commit comments

Comments
 (0)