mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-08 03:42:27 +02:00
Use old API to launch tasks on all versions of macOS
This commit is contained in:
parent
4f6e2c85f9
commit
9ae67c15b2
1 changed files with 8 additions and 18 deletions
|
@ -23,24 +23,14 @@
|
|||
|
||||
NSLog(@"calling interface at %@", self->pathTo);
|
||||
|
||||
if (@available(macOS 10.13, *)) {
|
||||
NSError *error = nil;
|
||||
if (![interface launchAndReturnError:&error]) {
|
||||
*outError = [NSError errorWithDomain:@"interface"
|
||||
code:-1
|
||||
userInfo:@{NSUnderlyingErrorKey: error}];
|
||||
return 0;
|
||||
}
|
||||
} else {
|
||||
NSError *error = nil;
|
||||
[interface launch];
|
||||
[interface waitUntilExit];
|
||||
if (0 != [interface terminationStatus]) {
|
||||
*outError = [NSError errorWithDomain:@"interface"
|
||||
code:-1
|
||||
userInfo:@{NSUnderlyingErrorKey: error}];
|
||||
return 0;
|
||||
}
|
||||
NSError *error = nil;
|
||||
[interface launch];
|
||||
[interface waitUntilExit];
|
||||
if (0 != [interface terminationStatus]) {
|
||||
*outError = [NSError errorWithDomain:@"interface"
|
||||
code:-1
|
||||
userInfo:@{NSUnderlyingErrorKey: error}];
|
||||
return 0;
|
||||
}
|
||||
|
||||
NSFileHandle * fh = [standardOut fileHandleForReading];
|
||||
|
|
Loading…
Reference in a new issue