Set the game path to the launcher resource dir. Can be overwritten using the system defaults mechanism.

This commit is contained in:
Paul Chote
2010-11-25 21:39:28 +13:00
parent 9f21d944d1
commit a0741ba26b
3 changed files with 12 additions and 2 deletions

View File

@@ -18,9 +18,18 @@
@synthesize allMods; @synthesize allMods;
@synthesize webView; @synthesize webView;
+ (void)initialize
{
[[NSUserDefaults standardUserDefaults]
registerDefaults:[NSDictionary dictionaryWithObject:[[NSBundle mainBundle] resourcePath]
forKey:@"gamepath"]];
}
- (void)awakeFromNib - (void)awakeFromNib
{ {
game = [[GameInstall alloc] initWithURL:[NSURL URLWithString:@"/Users/paul/src/OpenRA"]]; NSString *gamePath = [[NSUserDefaults standardUserDefaults] stringForKey:@"gamepath"];
game = [[GameInstall alloc] initWithURL:[NSURL URLWithString:gamePath]];
[[JSBridge sharedInstance] setController:self]; [[JSBridge sharedInstance] setController:self];
downloads = [[NSMutableDictionary alloc] init]; downloads = [[NSMutableDictionary alloc] init];
hasMono = [self hasSupportedMono]; hasMono = [self hasSupportedMono];

View File

@@ -20,4 +20,5 @@
+ (JSBridge *)sharedInstance; + (JSBridge *)sharedInstance;
- (void)setController:(Controller *)aController; - (void)setController:(Controller *)aController;
- (void)notifyDownloadProgress:(Download *)download; - (void)notifyDownloadProgress:(Download *)download;
- (void)notifyExtractProgress:(Download *)download;
@end @end

View File

@@ -13,7 +13,7 @@
<key>CFBundleDisplayName</key> <key>CFBundleDisplayName</key>
<string>OpenRA Launcher</string> <string>OpenRA Launcher</string>
<key>CFBundleIdentifier</key> <key>CFBundleIdentifier</key>
<string>org.open-ra.launcher.mac</string> <string>org.open-ra.launcher</string>
<key>CFBundleInfoDictionaryVersion</key> <key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string> <string>6.0</string>
<key>CFBundlePackageType</key> <key>CFBundlePackageType</key>