-
Notifications
You must be signed in to change notification settings - Fork 285
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
change deployment to 10.10 #2295
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -142,41 +142,28 @@ - (void)updateLaunchStatusInfo { | |
|
||
@end | ||
|
||
|
||
@implementation NSApplication (VersionCheck) | ||
+ (NSString *)macOSXFullVersion { | ||
return [NSString stringWithFormat:@"%i.%i.%i",(int)[self macOSXMajorVersion],(int)[self macOSXMinorVersion],(int)[self macOSXBugfixVersion]]; | ||
} | ||
#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10 | ||
#error Switch to [[NSProcessInfo processInfo] operatingSystemVersion] | ||
#else | ||
#pragma clang diagnostic push | ||
#pragma clang diagnostic ignored "-Wdeprecated-declarations" | ||
+ (SInt32)macOSXMajorVersion { | ||
SInt32 versionMajor; | ||
Gestalt (gestaltSystemVersionMajor, &versionMajor); | ||
return versionMajor; | ||
+ (NSInteger)macOSXMajorVersion { | ||
NSOperatingSystemVersion osv = [[NSProcessInfo processInfo] operatingSystemVersion]; | ||
return osv.majorVersion; | ||
} | ||
|
||
+ (SInt32)macOSXMinorVersion { | ||
SInt32 versionMinor; | ||
Gestalt (gestaltSystemVersionMinor, &versionMinor); | ||
return versionMinor; | ||
+ (NSInteger)macOSXMinorVersion { | ||
NSOperatingSystemVersion osv = [[NSProcessInfo processInfo] operatingSystemVersion]; | ||
return osv.minorVersion; | ||
} | ||
|
||
+ (SInt32)macOSXBugfixVersion { | ||
SInt32 versionBugfix; | ||
Gestalt (gestaltSystemVersionBugFix, &versionBugfix); | ||
return versionBugfix; | ||
+ (NSInteger)macOSXBugfixVersion { | ||
NSOperatingSystemVersion osv = [[NSProcessInfo processInfo] operatingSystemVersion]; | ||
return osv.patchVersion; | ||
} | ||
|
||
+ (SInt32)macOSXSystemVersion { | ||
SInt32 version; | ||
Gestalt (gestaltSystemVersion, &version); | ||
return version; | ||
+ (NSOperatingSystemVersion)macOSXSystemVersion { | ||
return [[NSProcessInfo processInfo] operatingSystemVersion]; | ||
} | ||
#pragma clang diagnostic pop | ||
#endif | ||
|
||
+ (NSString *)macOSXReleaseVersion { | ||
return [NSString stringWithFormat:@"%i.%i", (int)[self macOSXMajorVersion], (int)[self macOSXMinorVersion]]; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. hmm... my comment disappeared. Although I clicked 'start a review' instead of 'add single comment' (some new GH feature?) I was just saying that it's probably better to not cast to Tiny/nit-picking comment, sorry! :P There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. hmm... my comment disappeared. Although I clicked 'start a review' instead of 'add single comment' (some new GH feature?) I was just saying that it's probably better to not cast to Tiny/nit-picking comment, sorry! :P |
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm... my comment disappeared. Although I clicked 'start a review' instead of 'add single comment' (some new GH feature?)
I was just saying that it's probably better to not cast to
int
, although it probably won't make much of a difference. I'd use%ld
then cast to a long. Although this has other suggestions: http://stackoverflow.com/questions/4405006/nslog-printf-specifier-for-nsintegerTiny/nit-picking comment, sorry! :P