Updated MGMSystemInfo to include Mountain Lion. Updated to version 0.2.1. Apparently fixed some issues in the PHP script.

This commit is contained in:
GRMrGecko 2012-12-01 10:09:01 -06:00
parent 48480282f2
commit ba4a3e40f9
5 changed files with 28 additions and 8 deletions

View File

@ -44,6 +44,8 @@
- (BOOL)isAfterTiger; - (BOOL)isAfterTiger;
- (BOOL)isAfterLeopard; - (BOOL)isAfterLeopard;
- (BOOL)isAfterSnowLeopard; - (BOOL)isAfterSnowLeopard;
- (BOOL)isAfterLion;
- (BOOL)isAfterMountainLion;
- (NSString *)language; - (NSString *)language;
- (NSString *)applicationIdentifier; - (NSString *)applicationIdentifier;
- (NSString *)applicationName; - (NSString *)applicationName;

View File

@ -213,10 +213,12 @@ NSString * const MGMModel = @"hw.model";
if (minorVersion==7) if (minorVersion==7)
return @"Lion"; return @"Lion";
if (minorVersion==8) if (minorVersion==8)
return @"Lynx"; return @"Mountain Lion";
if (minorVersion==9) if (minorVersion==9)
return @"Garfield"; return @"Lynx";
if (minorVersion==10) if (minorVersion==10)
return @"Garfield";
if (minorVersion==11)
return @"Liger"; return @"Liger";
} }
return @"Unknown"; return @"Unknown";
@ -278,6 +280,22 @@ NSString * const MGMModel = @"hw.model";
return NO; return NO;
} }
- (BOOL)isAfterLion {
if ([self OSMajorVersion]==10) {
int minorVersion = [self OSMinorVersion];
return (minorVersion>=7);
}
return NO;
}
- (BOOL)isAfterMountainLion {
if ([self OSMajorVersion]==10) {
int minorVersion = [self OSMinorVersion];
return (minorVersion>=8);
}
return NO;
}
- (NSString *)language { - (NSString *)language {
NSArray *languages = [[NSUserDefaults standardUserDefaults] objectForKey:@"AppleLanguages"]; NSArray *languages = [[NSUserDefaults standardUserDefaults] objectForKey:@"AppleLanguages"];
if (languages!=nil && [languages count]>=1) if (languages!=nil && [languages count]>=1)

View File

@ -641,7 +641,7 @@
"MACOSX_DEPLOYMENT_TARGET[arch=x86_64]" = 10.5; "MACOSX_DEPLOYMENT_TARGET[arch=x86_64]" = 10.5;
ONLY_ACTIVE_ARCH = YES; ONLY_ACTIVE_ARCH = YES;
PREBINDING = NO; PREBINDING = NO;
SDKROOT = macosx10.6; SDKROOT = macosx10.5;
VALID_ARCHS = "ppc i386 x86_64"; VALID_ARCHS = "ppc i386 x86_64";
}; };
name = Debug; name = Debug;
@ -661,7 +661,7 @@
MACOSX_DEPLOYMENT_TARGET = 10.4; MACOSX_DEPLOYMENT_TARGET = 10.4;
"MACOSX_DEPLOYMENT_TARGET[arch=x86_64]" = 10.5; "MACOSX_DEPLOYMENT_TARGET[arch=x86_64]" = 10.5;
PREBINDING = NO; PREBINDING = NO;
SDKROOT = macosx10.6; SDKROOT = macosx10.5;
VALID_ARCHS = "ppc i386 x86_64"; VALID_ARCHS = "ppc i386 x86_64";
}; };
name = Release; name = Release;

View File

@ -8,7 +8,7 @@
CFBundlePackageType = FMWK; CFBundlePackageType = FMWK;
"CFBundleShortVersionString" = "0.2"; "CFBundleShortVersionString" = "0.2";
CFBundleSignature = "????"; CFBundleSignature = "????";
CFBundleVersion = "0.2"; CFBundleVersion = "0.2.1";
"NSHumanReadableCopyright" = "Copyright (c) 2011 Mr. Gecko's Media (James Coleman). All rights reserved. http://mrgeckosmedia.com/"; "NSHumanReadableCopyright" = "Copyright (c) 2011 Mr. Gecko's Media (James Coleman). All rights reserved. http://mrgeckosmedia.com/";
NSPrincipalClass = ""; NSPrincipalClass = "";
} }

View File

@ -23,7 +23,7 @@ function buildBody($FILES, $BOUNDARY) {
$FILESIZE = $_FILES[$KEY]['size']; $FILESIZE = $_FILES[$KEY]['size'];
$BODY .= "--$BOUNDARY\r\n"; $BODY .= "--$BOUNDARY\r\n";
$BODY .= "Content-Disposition: attachment; filename=\"{$FILENAME}\"\r\n"; $BODY .= "Content-Disposition: attachment; filename=\"{$FILENAME}\"\r\n";
$BODY .= "Content-Type: {$FILETYPE} name=\"{$FILENAME}\"\r\n"; $BODY .= "Content-Type: {$FILETYPE}; name=\"{$FILENAME}\"\r\n";
$BODY .= "Content-Transfer-Encoding: binary\r\n\r\n"; $BODY .= "Content-Transfer-Encoding: binary\r\n\r\n";
$FILEPIPE = fopen($FILE, "r"); $FILEPIPE = fopen($FILE, "r");
$BODY .= fread($FILEPIPE, $FILESIZE); $BODY .= fread($FILEPIPE, $FILESIZE);
@ -34,7 +34,7 @@ function buildBody($FILES, $BOUNDARY) {
return $BODY; return $BODY;
} }
//Word of warning, IP is for debugging, do not include the IP of your user without the knowledge that your user may not user your application afterword. //Word of warning, IP is for debugging, do not include the IP of your user without the knowledge that your user may not use your application.
//$_POST['IP'] = $_SERVER['HTTP_PC_REMOTE_ADDR']!="" ? $_SERVER['HTTP_PC_REMOTE_ADDR'] : $_SERVER['REMOTE_ADDR']; //$_POST['IP'] = $_SERVER['HTTP_PC_REMOTE_ADDR']!="" ? $_SERVER['HTTP_PC_REMOTE_ADDR'] : $_SERVER['REMOTE_ADDR'];
$_POST['User_Agent'] = urldecode($_SERVER['HTTP_USER_AGENT']); $_POST['User_Agent'] = urldecode($_SERVER['HTTP_USER_AGENT']);
@ -81,7 +81,7 @@ if ($_POST['GRType']=="crash") {
$headers .= "{$NAME}: {$_POST[$KEY]}\n"; $headers .= "{$NAME}: {$_POST[$KEY]}\n";
} }
if ($userReport!="") if ($userReport!="")
$headers .= "\nThe user was\n$userReport"; $headers .= "\nThe user was\n$userReport\n";
$headers .= buildBody($_FILES, $boundary); $headers .= buildBody($_FILES, $boundary);