[osx] Load packages from the support dir.

This commit is contained in:
Paul Chote
2011-01-27 20:45:26 +13:00
parent 492c025844
commit 8470399a0c
3 changed files with 3 additions and 1 deletions

View File

@@ -125,6 +125,7 @@ extern char **environ;
monoPath,
[NSString stringWithFormat:@"UtilityPath=%@", [[[NSBundle mainBundle] executablePath] stringByAddingPercentEscapesUsingEncoding:NSASCIIStringEncoding]],
[NSString stringWithFormat:@"SupportDir=%@",[@"~/Library/Application Support/OpenRA" stringByExpandingTildeInPath]],
[NSString stringWithFormat:@"SpecialPackageRoot=%@/",[@"~/Library/Application Support/OpenRA" stringByExpandingTildeInPath]],
nil];
FSRef appRef;
CFURLGetFSRef((CFURLRef)[NSURL URLWithString:[[[NSBundle mainBundle] executablePath] stringByAddingPercentEscapesUsingEncoding:NSASCIIStringEncoding]], &appRef);

View File

@@ -13,7 +13,7 @@ int main(int argc, char *argv[])
{
/* When launching a mod, the arguments are of the form
* --launch <game dir> <mono path> <utility path> <support dir option> <mod option> */
if (argc >= 7 && strcmp(argv[1], "--launch") == 0)
if (argc >= 8 && strcmp(argv[1], "--launch") == 0)
{
/* Change into the game dir */
chdir(argv[3]);
@@ -25,6 +25,7 @@ int main(int argc, char *argv[])
"OpenRA.Game.exe",
argv[5],
argv[6],
argv[7],
NULL
};