From 7dd7dd4cdc8e89f6c94855e7b52c5c6d9e14cf47 Mon Sep 17 00:00:00 2001 From: ohaiibuzzle <23693150+ohaiibuzzle@users.noreply.github.com> Date: Mon, 19 Jun 2023 02:47:07 +0700 Subject: [PATCH] fix: switch to ditto to properly handle the install proceess --- Harbor/Systems/GPKUtils.swift | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Harbor/Systems/GPKUtils.swift b/Harbor/Systems/GPKUtils.swift index 8a1eeb4..7ae22b3 100644 --- a/Harbor/Systems/GPKUtils.swift +++ b/Harbor/Systems/GPKUtils.swift @@ -166,20 +166,20 @@ final class GPKUtils { } let gpkVolume = URL(fileURLWithPath: "/Volumes/\(mountedVolume)") let gpkLib = gpkVolume.appendingPathComponent("lib") - let gpkLibDest = URL(fileURLWithPath: "/usr/local/opt/game-porting-toolkit/") + let gpkLibDest = URL(fileURLWithPath: "/usr/local/opt/game-porting-toolkit/lib") // Merge the content from /Volumes/Game Porting Toolkit*/lib to /usr/local/opt/game-porting-toolkit/lib - let cpProcess = Process() - cpProcess.executableURL = URL(fileURLWithPath: "/bin/cp") - cpProcess.arguments = ["-R", gpkLib.path, gpkLibDest.path] - cpProcess.standardOutput = nil - cpProcess.standardError = nil + let dittoProcess = Process() + dittoProcess.executableURL = URL(fileURLWithPath: "/usr/bin/ditto") + dittoProcess.arguments = ["-V", gpkLib.path, gpkLibDest.path] + dittoProcess.standardOutput = nil + dittoProcess.standardError = nil do { - try cpProcess.run() + try dittoProcess.run() } catch { HarborUtils.shared.quickError(error.localizedDescription) } - cpProcess.waitUntilExit() + dittoProcess.waitUntilExit() // Copy all the gameportingtoolkit* binaries to Harbor's container (for later use) let harborContainer = HarborUtils.shared.getContainerHome()