mirror of
https://github.com/ZDoom/qzdoom.git
synced 2025-01-18 23:21:41 +00:00
- removed obsolete code path in Cocoa IWAD picker
Always use arch executable to restart GZDoom with additional command line parameters
This commit is contained in:
parent
7cd2d14672
commit
0f880bdb50
1 changed files with 4 additions and 15 deletions
|
@ -398,20 +398,9 @@ static void RestartWithParameters(const WadStuff& wad, NSString* parameters)
|
||||||
NSString* executablePath = [NSString stringWithUTF8String:Args->GetArg(0)];
|
NSString* executablePath = [NSString stringWithUTF8String:Args->GetArg(0)];
|
||||||
|
|
||||||
NSMutableArray* const arguments = [[NSMutableArray alloc] init];
|
NSMutableArray* const arguments = [[NSMutableArray alloc] init];
|
||||||
|
[arguments addObject:@"-arch"];
|
||||||
// The following value shoud be equal to NSAppKitVersionNumber10_5
|
[arguments addObject:GetArchitectureString()];
|
||||||
// It's hard-coded in order to build with earlier SDKs
|
[arguments addObject:executablePath];
|
||||||
const bool canSelectArchitecture = NSAppKitVersionNumber >= 949;
|
|
||||||
|
|
||||||
if (canSelectArchitecture)
|
|
||||||
{
|
|
||||||
[arguments addObject:@"-arch"];
|
|
||||||
[arguments addObject:GetArchitectureString()];
|
|
||||||
[arguments addObject:executablePath];
|
|
||||||
|
|
||||||
executablePath = @"/usr/bin/arch";
|
|
||||||
}
|
|
||||||
|
|
||||||
[arguments addObject:@"-iwad"];
|
[arguments addObject:@"-iwad"];
|
||||||
[arguments addObject:[NSString stringWithUTF8String:wad.Path]];
|
[arguments addObject:[NSString stringWithUTF8String:wad.Path]];
|
||||||
|
|
||||||
|
@ -435,7 +424,7 @@ static void RestartWithParameters(const WadStuff& wad, NSString* parameters)
|
||||||
wordfree(&expansion);
|
wordfree(&expansion);
|
||||||
}
|
}
|
||||||
|
|
||||||
[NSTask launchedTaskWithLaunchPath:executablePath
|
[NSTask launchedTaskWithLaunchPath:@"/usr/bin/arch"
|
||||||
arguments:arguments];
|
arguments:arguments];
|
||||||
|
|
||||||
_exit(0); // to avoid atexit()'s functions
|
_exit(0); // to avoid atexit()'s functions
|
||||||
|
|
Loading…
Reference in a new issue