From 4fd4bf8544012f10126b87f2ba95dcf2bcda20e2 Mon Sep 17 00:00:00 2001 From: Mykola Grymalyuk Date: Mon, 27 May 2024 10:51:09 -0600 Subject: [PATCH] =?UTF-8?q?Handler.m:=20Switch=20to=20=E2=80=9C/usr/bin/op?= =?UTF-8?q?en=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- OCLP-Helper/Handler.m | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/OCLP-Helper/Handler.m b/OCLP-Helper/Handler.m index 59b7a6a..700aea9 100644 --- a/OCLP-Helper/Handler.m +++ b/OCLP-Helper/Handler.m @@ -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 {