Skip to content

Commit

Permalink
Merge pull request #25 from ohaiibuzzle/fix/ditto-borked-installer
Browse files Browse the repository at this point in the history
fix: switch to ditto to properly handle the install proceess
  • Loading branch information
ohaiibuzzle authored Jun 18, 2023
2 parents 0551c57 + 7dd7dd4 commit 3d9432b
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions Harbor/Systems/GPKUtils.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 3d9432b

Please sign in to comment.