Skip to content

Commit

Permalink
Handler.m: Switch to “/usr/bin/open”
Browse files Browse the repository at this point in the history
  • Loading branch information
khronokernel committed May 27, 2024
1 parent ce0d4ec commit 4fd4bf8
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions OCLP-Helper/Handler.m
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,17 @@ -(void)spawnProgressWindow {

-(void)postPKGRunApp:(BOOL)isUpdating {
NSTask *task = [[NSTask alloc] init];
[task setLaunchPath:@"/Library/Application Support/Dortania/OpenCore-Patcher.app/Contents/MacOS/OpenCore-Patcher"];

[task setLaunchPath:@"/usr/bin/open"];

if (isUpdating) {
[task setArguments:@[@"--update_installed"]];
[task setArguments:@[@"-a", @"/Library/Application Support/Dortania/OpenCore-Patcher.app", @"--args", @"--update_installed"]];
} else {
[task setArguments:@[@"-a", @"/Library/Application Support/Dortania/OpenCore-Patcher.app"]];
}

[task launch];

sleep(5); // Wait for the app to launch
[task waitUntilExit];
}

-(void)runProcess {
Expand Down

0 comments on commit 4fd4bf8

Please sign in to comment.