Load last mod on startup.

This commit is contained in:
Paul Chote
2011-01-27 20:40:29 +13:00
parent 38b98bf358
commit 492c025844
5 changed files with 6 additions and 6 deletions

View File

@@ -50,7 +50,7 @@ extern char **environ;
[self installRAPackages:args];
else
[self launchMod:@"cnc"];
[self launch];
[NSApp terminate: nil];
}
@@ -112,7 +112,7 @@ extern char **environ;
return ![response isEqualToString:@"Windowed\n"];
}
-(void)launchMod:(NSString *)mod
-(void)launch
{
// Use LaunchServices because neither NSTask or NSWorkspace support Info.plist _and_ arguments pre-10.6
@@ -125,7 +125,6 @@ extern char **environ;
monoPath,
[NSString stringWithFormat:@"UtilityPath=%@", [[[NSBundle mainBundle] executablePath] stringByAddingPercentEscapesUsingEncoding:NSASCIIStringEncoding]],
[NSString stringWithFormat:@"SupportDir=%@",[@"~/Library/Application Support/OpenRA" stringByExpandingTildeInPath]],
[NSString stringWithFormat:@"Game.Mods=%@",mod],
nil];
FSRef appRef;
CFURLGetFSRef((CFURLRef)[NSURL URLWithString:[[[NSBundle mainBundle] executablePath] stringByAddingPercentEscapesUsingEncoding:NSASCIIStringEncoding]], &appRef);