Check for Marinetti 3.0b11 or later.

If an older version is used, the user is warned about it but can still continue.
This commit is contained in:
Stephen Heumann 2019-07-15 15:08:13 -05:00
parent 87cf5483a3
commit e7230aa80e
3 changed files with 29 additions and 0 deletions

View File

@ -13,6 +13,7 @@
#include <quickdraw.h>
#include <resources.h>
#include <window.h>
#include <tcpip.h>
#include <gsos.h>
#include <orca.h>
@ -24,6 +25,7 @@
#include "diskbrowser.h"
#include "browserevents.h"
#include "disksearch.h"
#include "browserutil.h"
/* Rectangles outlining the buttons in the style of "default" buttons */
static Rect searchRect = {8, 305, 26, 414};
@ -60,6 +62,17 @@ static void DrawContents(void);
static void DrawButtonOutlines(boolean justChanged);
static void MarinettiVersionCheck(void) {
static boolean alreadyChecked = false;
if (!alreadyChecked) {
if (TCPIPLongVersion() < DESIRED_MARINETTI_VERSION) {
ShowErrorAlert(0, marinettiVersionWarning);
}
alreadyChecked = true;
}
}
void ShowBrowserWindow(void) {
if (windowOpened) {
SelectWindow(window);
@ -78,6 +91,8 @@ void ShowBrowserWindow(void) {
}
resourceFileOpened = true;
MarinettiVersionCheck();
window = NewWindow2(NULL, 0, DrawContents, NULL,
refIsResource, winDiskBrowser, rWindParam1);
if (toolerror()) {

View File

@ -14,8 +14,11 @@
#define searchErrorAlert 3000
#define mountErrorAlert 3001
#define marinettiVersionWarning 3002
#define DESIRED_MARINETTI_VERSION 0x03006011 /* 3.0b11 */
/* The browser window */
extern GrafPortPtr window;

View File

@ -171,6 +171,7 @@ resource rPString(mountDiskButton) { "Mount Disk" };
#define searchErrorAlert 3000
#define mountErrorAlert 3001
#define marinettiVersionWarning 3002
resource rAlertString (searchErrorAlert) {
"72/"
@ -188,3 +189,13 @@ resource rAlertString (mountErrorAlert) {
"/^#0\$00"
};
resource rAlertString (marinettiVersionWarning) {
"84:"
"NetDisk and the Archive.org Disk Browser are designed for use with "
"Marinetti 3.0b11 or later. You are currently using an older version of "
"Marinetti. You can try to use NetDisk with your current Marinetti "
"version, but you may experience I/O errors or other problems. "
"To ensure proper operation, please upgrade Marinetti."
":^#6\$00"
};