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
Merge remote-tracking branch 'upstream/main' into integrate
raymondchins231089e9191a
diff --cc app/Sources/NotProtonApp/Model/DeploymentContent.swiftindex 4ee0054,c0df85f..a33d5ea--- a/app/Sources/NotProtonApp/Model/DeploymentContent.swift+++ b/app/Sources/NotProtonApp/Model/DeploymentContent.swift@@@ -106,9 -107,8 +107,9 @@@ enum DeploymentContentstatic func files(payload: InstallPayload.Located, bridgePayload: BridgePayload.Located,- app: URL, bridge: URL, signatures: URL, overlayShim: URL, iconmaker: URL, appinfo: URL,+ app: URL, bridge: URL, signatures: URL, fonts: URL, overlayShim: URL, iconmaker: URL, appinfo: URL,- compatTools: URL, tools: [InstalledTool], runners: URL+ compatTools: URL, tools: [InstalledTool], runners: URL,+ gamefixes: URL = SupportPaths.gamefixesDefault) -> [File] {var files = [File(source: payload.dylib, destination: SupportPaths.Steam.deployedDylib(inBundle: app),@@@ -121,10 -121,10 +122,14 @@@File(source: $0, destination: signatures.appending(path: $0.lastPathComponent),name: "signatures/\($0.lastPathComponent)")}+ files += payload.gamefixes.map {+ File(source: $0, destination: gamefixes.appending(path: $0.lastPathComponent),+ name: "gamefixes-default/\($0.lastPathComponent)")+ }+ files += payload.fonts.map {+ File(source: payload.fontsRoot.appending(path: $0), destination: fonts.appending(path: $0),+ name: "fonts/\($0)", needsClientStopped: false)+ }for entry in bridgePayload.sources {files += entry.bridgePaths.map {File(source: entry.source, destination: bridge.appending(path: $0), name: "bridge/\($0)")diff --cc app/Sources/NotProtonApp/Model/InstallPayload.swiftindex 0a80315,4c58b52..025e90b--- a/app/Sources/NotProtonApp/Model/InstallPayload.swift+++ b/app/Sources/NotProtonApp/Model/InstallPayload.swift@@@ -14,8 -14,8 +14,10 @@@ enum InstallPayloadlet builtAt: Int64let signatures: [URL]+ let fontsRoot: URL+ let fonts: [String]+ // payload/gamefixes/*.conf, installed into SupportPaths.gamefixesDefault.+ var gamefixes: [URL] = []}static func root(in bundle: Bundle = .module) throws -> URL {@@@ -85,7 -82,7 +92,8 @@@return Located(dylib: dylib, overlayShim: shim, iconmaker: iconmaker,appinfo: appinfo, run: run, builtAt: builtAt, signatures: signatures,- fontsRoot: fontsRoot, fonts: fonts++ fontsRoot: fontsRoot, fonts: fonts,+ gamefixes: gamefixes)}}diff --cc app/Sources/NotProtonApp/Model/SteamInstaller.swiftindex 0855a55,b8042f5..2837759--- a/app/Sources/NotProtonApp/Model/SteamInstaller.swift+++ b/app/Sources/NotProtonApp/Model/SteamInstaller.swift@@@ -99,9 -100,8 +100,9 @@@ enum SteamInstallerlet tools = CompatToolList.installed(runners: runners, file: support.appending(path: "tools"))let files = DeploymentContent.files(payload: payload, bridgePayload: bridgeLocated, app: app, bridge: bridge,- signatures: signatures, overlayShim: overlayShim, iconmaker: iconmaker, appinfo: appinfo,+ signatures: signatures, fonts: fonts, overlayShim: overlayShim, iconmaker: iconmaker, appinfo: appinfo,- compatTools: compatTools, tools: tools, runners: runners)+ compatTools: compatTools, tools: tools, runners: runners,+ gamefixes: support.appending(path: "gamefixes-default"))let content = try DeploymentContent.inspect(files: files, bundled: build, installed: previousBuild,legacyVersion: SteamBundle.deployedVersion(at: deployedVersion))guard content != .newerInstalled else {@@@ -150,8 -150,7 +151,9 @@@for file in files where file.destination != dylib {try installIfChanged(file)}+ pruneGamefixes(keeping: payload.gamefixes.map(\.lastPathComponent),+ in: deployedVersion.deletingLastPathComponent().appending(path: "gamefixes-default"))+ try removeStaleFonts(in: fonts, keeping: payload.fonts)var backedUp = falseif patching {@@@ -219,15 -218,19 +221,28 @@@with: JSONEncoder().encode(outcome.build), step: step)}+ // The shipped defaults are replaced as a set, so a fix dropped from the app stops applying.+ static func pruneGamefixes(keeping names: [String], in directory: URL) {+ let fm = FileManager.default+ let entries = (try? fm.contentsOfDirectory(at: directory, includingPropertiesForKeys: nil)) ?? []+ for entry in entries where !names.contains(entry.lastPathComponent) {+ try? fm.removeItem(at: entry)+ }+ }++ static func removeStaleFonts(in fonts: URL, keeping shipped: [String]) throws {+ let files = FileManager.default+ let keep = Set(shipped)+ for rel in files.subpaths(atPath: fonts.path(percentEncoded: false)) ?? [] where !keep.contains(rel) {+ let url = fonts.appending(path: rel)+ var isDirectory: ObjCBool = false+ if files.fileExists(atPath: url.path(percentEncoded: false), isDirectory: &isDirectory), isDirectory.boolValue {+ continue+ }+ try WriteRefused.catching(url) { try files.removeItem(at: url) }+ }+ }+static func installIfChanged(_ file: DeploymentContent.File) throws {if try file.matches() { return }try install(file.source, at: file.destination)diff --cc dylib/version.hindex 4a32c97,9fe2f2d..4904e48--- a/dylib/version.h+++ b/dylib/version.h@@@ -2,6 -2,6 +2,6 @@@#ifndef NOTPROTON_VERSION_H#define NOTPROTON_VERSION_H- #define NOTPROTON_VERSION "1.1.3-winehq.1-ray.1"-#define NOTPROTON_VERSION "1.1.4"++#define NOTPROTON_VERSION "1.1.4-winehq.1-ray.1"#endif // NOTPROTON_VERSION_H