Free fork of NotProton: Windows Steam games in Mac Steam, on CodeWeavers' Wine and Apple's Game Porting Toolkit
Swift apple-silicond3dmetaldxmtdxvkgame-porting-toolkitgptkmac-gamingmacosmetalfxrosetta-2steamsteam-playwinewinecx
fix(install): take the installation lock through upstream's new API
raymondchins2d718a4b81bb
diff --git a/app/Sources/NotProtonApp/Support/InstallIntoSteamCommand.swift b/app/Sources/NotProtonApp/Support/InstallIntoSteamCommand.swiftindex 83fe7c9..2f81890 100644--- a/app/Sources/NotProtonApp/Support/InstallIntoSteamCommand.swift+++ b/app/Sources/NotProtonApp/Support/InstallIntoSteamCommand.swift@@ -22,8 +22,8 @@ enum InstallIntoSteamCommand {throw StepFailure(step: SteamInstaller.step,detail: "A game or Wine tool is running. Quit it before updating NotProton.")}- let lock = try DeploymentContent.acquireInstallationLock(for: SupportPaths.Steam.app)- defer { close(lock) }+ let lock = try DeploymentContent.acquireInstallationLock()+ defer { lock.release() }let result = try SteamInstaller.run(holdingInstallationLock: true, report: { say($0.label) })let valve = try ValvePackageManifest.bundled()diff --git a/app/Sources/NotProtonApp/SystemStatus.swift b/app/Sources/NotProtonApp/SystemStatus.swiftindex 754e9c6..31288b5 100644--- a/app/Sources/NotProtonApp/SystemStatus.swift+++ b/app/Sources/NotProtonApp/SystemStatus.swift@@ -491,8 +491,8 @@ final class SystemStatus {func installFreeEngine() async {guard canInstall else { return }await perform(from: FreeEngine.step) { progress in- let lock = try DeploymentContent.acquireInstallationLock(for: SupportPaths.Steam.app)- defer { close(lock) }+ let lock = try DeploymentContent.acquireInstallationLock()+ defer { lock.release() }try await requireInstallableContent()let install = try await FreeEngine.install { progress($0.label) }let result = try await Task.detached(priority: .userInitiated) {@@ -507,8 +507,8 @@ final class SystemStatus {func installWinecxEngine() async {guard canInstall else { return }await perform(from: FreeEngineWinecx.step) { progress in- let lock = try DeploymentContent.acquireInstallationLock(for: SupportPaths.Steam.app)- defer { close(lock) }+ let lock = try DeploymentContent.acquireInstallationLock()+ defer { lock.release() }try await requireInstallableContent()let install = try await FreeEngineWinecx.install { progress($0.label) }let result = try await Task.detached(priority: .userInitiated) {@@ -525,8 +525,8 @@ final class SystemStatus {func rescanGameportingToolkit() async {guard canInstall else { return }await perform(from: Self.rescanStep) { _ in- let lock = try DeploymentContent.acquireInstallationLock(for: SupportPaths.Steam.app)- defer { close(lock) }+ let lock = try DeploymentContent.acquireInstallationLock()+ defer { lock.release() }try await requireInstallableContent()let found = await Task.detached(priority: .userInitiated) {Self.relinkGameportingToolkit()