summaryrefslogtreecommitdiff
path: root/bindings/objc/src/services/OSXConfiguration.m
blob: 7d5398792ee29334013f75fd927c2e87e98b1b89 (plain)
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
//
//  OSXConfiguration.m
//  ObjCSword
//
//  Created by Manfred Bergmann on 12.06.10.
//  Copyright 2010 Software by MABE. All rights reserved.
//

#import "OSXConfiguration.h"


@implementation OSXConfiguration

- (NSString *)osVersion {
    return [[NSDictionary dictionaryWithContentsOfFile:@"/System/Library/CoreServices/SystemVersion.plist"] objectForKey:@"ProductVersion"];
}

- (NSString *)bundleVersion {
    return (NSString *)CFBundleGetValueForInfoDictionaryKey(CFBundleGetMainBundle(), kCFBundleVersionKey);
}

- (NSString *)defaultModulePath {
    return [@"~/Library/Application Support/Sword" stringByExpandingTildeInPath];
}

- (NSString *)defaultAppSupportPath {
    return [@"~/Library/Application Support/MacSword" stringByExpandingTildeInPath];
}

- (NSString *)tempFolder {
    return [@"~/Library/Caches/ObjCSword" stringByExpandingTildeInPath];
}

- (NSString *)logFile {
    return [@"~/Library/Logs/ObjCSword.log" stringByExpandingTildeInPath];
}

@end