With any luck, this will give an error message if the user tries to install on OS X 10.1.x. I have no idea if the installer will even open and no way to test it. Worst case, installer still works for >= 10.2 and crashes for < 10.2. The same as before. Best case, it gives a message about not being compatible and then quits.
This commit is contained in:
@@ -8,8 +8,40 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#import <Cocoa/Cocoa.h>
|
#import <Cocoa/Cocoa.h>
|
||||||
|
#import <Carbon/Carbon.h>
|
||||||
|
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
kMacOSX_10_2 = 0x1020,
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
int main(int argc, const char *argv[])
|
int main(int argc, const char *argv[])
|
||||||
{
|
{
|
||||||
|
long response;
|
||||||
|
OSErr err = Gestalt(gestaltSystemVersion, &response);
|
||||||
|
CFStringRef error = NULL;
|
||||||
|
|
||||||
|
if (err != noErr)
|
||||||
|
error = CFStringCreateWithCString(NULL, "Couldn't determine OS version.", kCFStringEncodingASCII);
|
||||||
|
else if (response < kMacOSX_10_2)
|
||||||
|
error = CFStringCreateWithCString(NULL, "StepMania will not run on any version of Mac OS X 10.1.x "
|
||||||
|
"or earlier.", kCFStringEncodingASCII);
|
||||||
|
if (error)
|
||||||
|
{
|
||||||
|
CFStringRef OK = CFSTR("OK");
|
||||||
|
struct AlertStdCFStringAlertParamRec params = {kStdCFStringAlertVersionOne, TRUE, FALSE, OK, NULL, NULL,
|
||||||
|
kAlertStdAlertOKButton, NULL, kWindowAlertPositionParentWindowScreen, NULL};
|
||||||
|
DialogRef dialog;
|
||||||
|
SInt16 result;
|
||||||
|
|
||||||
|
CreateStandardAlert(kAlertStopAlert, error, NULL, ¶ms, &dialog);
|
||||||
|
AutoSizeDialog(dialog);
|
||||||
|
RunStandardAlert(dialog, NULL, &result);
|
||||||
|
CFRelease(error);
|
||||||
|
|
||||||
|
exit(0);
|
||||||
|
}
|
||||||
|
|
||||||
return NSApplicationMain(argc, argv);
|
return NSApplicationMain(argc, argv);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user