forked from alinebee/Boxer
-
Notifications
You must be signed in to change notification settings - Fork 39
/
Copy pathBXAppKitVersionHelpers.m
40 lines (32 loc) · 1.12 KB
/
BXAppKitVersionHelpers.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/*
Boxer is copyright 2012 Alun Bestor and contributors.
Boxer is released under the GNU General Public License 2.0. A full copy of this license can be
found in this XCode project at Resources/English.lproj/GNU General Public License.txt, or read
online at [http://www.gnu.org/licenses/gpl-2.0.txt].
*/
#import "BXAppKitVersionHelpers.h"
BOOL isRunningOnLeopard()
{
double appKitVersion = floor(NSAppKitVersionNumber);
return (appKitVersion <= NSAppKitVersionNumber10_5);
}
BOOL isRunningOnSnowLeopard()
{
double appKitVersion = floor(NSAppKitVersionNumber);
return (appKitVersion <= NSAppKitVersionNumber10_6 && appKitVersion > NSAppKitVersionNumber10_5);
}
BOOL isRunningOnLion()
{
double appKitVersion = floor(NSAppKitVersionNumber);
return (appKitVersion <= NSAppKitVersionNumber10_7 && appKitVersion > NSAppKitVersionNumber10_6);
}
BOOL isRunningOnSnowLeopardOrAbove()
{
double appKitVersion = floor(NSAppKitVersionNumber);
return (appKitVersion > NSAppKitVersionNumber10_5);
}
BOOL isRunningOnLionOrAbove()
{
double appKitVersion = floor(NSAppKitVersionNumber);
return (appKitVersion > NSAppKitVersionNumber10_6);
}