diff --git a/OpenRA.Game/Game.cs b/OpenRA.Game/Game.cs index 8ff59b5fa7..259a074c2a 100755 --- a/OpenRA.Game/Game.cs +++ b/OpenRA.Game/Game.cs @@ -266,6 +266,8 @@ namespace OpenRA // Discard any invalid mods var mm = mods.Where( m => Mod.AllMods.ContainsKey( m ) ).ToArray(); Console.WriteLine("Loading mods: {0}",string.Join(",",mm)); + Settings.Game.Mods = mm; + Settings.Save(); Sound.Initialize(); diff --git a/OpenRA.Launcher.Mac/Controller.h b/OpenRA.Launcher.Mac/Controller.h index 577a21d017..7804a520aa 100644 --- a/OpenRA.Launcher.Mac/Controller.h +++ b/OpenRA.Launcher.Mac/Controller.h @@ -18,7 +18,7 @@ - (void)launchFilePicker:(NSArray *)args; - (void)extractZip:(NSArray *)args; - (void)installRAPackages:(NSArray *)args; -- (void)launchMod:(NSString *)mod; +- (void)launch; - (BOOL)initMono; - (void)runUtilityWithArgs:(NSArray *)arg; - (void)utilityResponded:(NSNotification *)n; diff --git a/OpenRA.Launcher.Mac/Controller.m b/OpenRA.Launcher.Mac/Controller.m index 62da368070..5b96a0947b 100644 --- a/OpenRA.Launcher.Mac/Controller.m +++ b/OpenRA.Launcher.Mac/Controller.m @@ -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); diff --git a/OpenRA.Launcher.Mac/build/Release/OpenRA.app/Contents/MacOS/OpenRA b/OpenRA.Launcher.Mac/build/Release/OpenRA.app/Contents/MacOS/OpenRA index 4670cb2627..82e725fa14 100755 Binary files a/OpenRA.Launcher.Mac/build/Release/OpenRA.app/Contents/MacOS/OpenRA and b/OpenRA.Launcher.Mac/build/Release/OpenRA.app/Contents/MacOS/OpenRA differ diff --git a/OpenRA.Launcher.Mac/main.m b/OpenRA.Launcher.Mac/main.m index 8987557928..1da612fe84 100644 --- a/OpenRA.Launcher.Mac/main.m +++ b/OpenRA.Launcher.Mac/main.m @@ -13,7 +13,7 @@ int main(int argc, char *argv[]) { /* When launching a mod, the arguments are of the form * --launch */ - if (argc >= 8 && strcmp(argv[1], "--launch") == 0) + if (argc >= 7 && strcmp(argv[1], "--launch") == 0) { /* Change into the game dir */ chdir(argv[3]); @@ -25,7 +25,6 @@ int main(int argc, char *argv[]) "OpenRA.Game.exe", argv[5], argv[6], - argv[7], NULL };