diff --git a/packaging/osx/OpenRA.app/Contents/MacOS/OpenRA b/packaging/osx/OpenRA.app/Contents/MacOS/OpenRA index 2700d2ac10..a512ac67a8 100755 --- a/packaging/osx/OpenRA.app/Contents/MacOS/OpenRA +++ b/packaging/osx/OpenRA.app/Contents/MacOS/OpenRA @@ -5,9 +5,4 @@ APP_PATH=`echo $0 | awk '{split($0,patharr,"/"); idx=1; while(patharr[idx+3] != "") { if (patharr[idx] != "/") {printf("%s/", patharr[idx]); idx++ }} }'` cd "$APP_PATH/Contents/Resources" - -if [ ! -e mods/ra/packages/redalert.mix ]; then -osascript install_ra_mix.scpt -else -./OpenRA settings=../../../launcher.ini -fi \ No newline at end of file +./OpenRA $@ diff --git a/packaging/osx/OpenRA.app/Contents/Resources/install_ra_mix.scpt b/packaging/osx/OpenRA.app/Contents/Resources/install_ra_mix.scpt deleted file mode 100644 index af57a2124a..0000000000 Binary files a/packaging/osx/OpenRA.app/Contents/Resources/install_ra_mix.scpt and /dev/null differ diff --git a/packaging/osx/launcher/Controller.m b/packaging/osx/launcher/Controller.m index 357ed65570..0a21d98244 100644 --- a/packaging/osx/launcher/Controller.m +++ b/packaging/osx/launcher/Controller.m @@ -37,7 +37,23 @@ [settings setValue:modString forSetting:@"InitialMods"]; [settings save]; - [[NSWorkspace sharedWorkspace] launchApplication:[[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"OpenRA.app"]]; + // Launch the game + NSMutableArray *args = [NSMutableArray arrayWithObjects:@"settings=../../../launcher.ini",nil]; + NSString *path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"OpenRA.app/Contents/MacOS/OpenRA"]; + + NSTask *task = [[NSTask alloc] init]; + [task setLaunchPath:path]; + [task setArguments:args]; + [task launch]; + + // Bring the game to the front + ProcessSerialNumber psn; + if (noErr == GetProcessForPID([task processIdentifier], &psn)) { + SetFrontProcess(&psn); + } + [task release]; + + // Close the launcher [NSApp terminate: nil]; }