Skip to content

Free fork of NotProton: Windows Steam games in Mac Steam, on CodeWeavers' Wine and Apple's Game Porting Toolkit

fix(app): shorter, accurate setup text and clean per-game tools on uninstall

raymondchins43619586c23d
diff --git a/app/Sources/BridgeplayApp/Model/RunnerInstaller.swift b/app/Sources/BridgeplayApp/Model/RunnerInstaller.swift
index cfde42c..c85226b 100644
--- a/app/Sources/BridgeplayApp/Model/RunnerInstaller.swift
+++ b/app/Sources/BridgeplayApp/Model/RunnerInstaller.swift
@@ -5,7 +5,7 @@ import Foundation
enum RunnerInstaller {
- static let step = String(localized: "Clone CrossOver")
+ static let step = String(localized: "Copy CrossOver's engine")
static func clone(
from install: CrossOverInstall,
diff --git a/app/Sources/BridgeplayApp/Model/SteamDefaultTool.swift b/app/Sources/BridgeplayApp/Model/SteamDefaultTool.swift
index f267a32..7d6f7d2 100644
--- a/app/Sources/BridgeplayApp/Model/SteamDefaultTool.swift
+++ b/app/Sources/BridgeplayApp/Model/SteamDefaultTool.swift
@@ -86,6 +86,46 @@ enum SteamDefaultTool {
return true
}
+ // Removes the per-game entries under CompatToolMapping whose tool is one of Bridgeplay's
+ // (the "0" default is restore()'s). nil when there is nothing to remove.
+ static func removingOurGameEntries(_ text: String) -> String? {
+ var lines = text.components(separatedBy: "\n")
+ guard let mapping = keyLine(lines, "CompatToolMapping", from: 0),
+ let open = openBrace(lines, after: mapping), let close = closeBrace(lines, open: open)
+ else { return nil }
+ let depth = indent(lines[mapping]) + 1
+ var ranges: [ClosedRange<Int>] = []
+ var index = open + 1
+ while index < close {
+ guard indent(lines[index]) == depth, key(lines[index]) != nil,
+ let entryOpen = openBrace(lines, after: index), let entryClose = closeBrace(lines, open: entryOpen)
+ else { index += 1; continue }
+ if key(lines[index]) != "0", lines[entryOpen + 1 ..< entryClose].contains(where: {
+ guard let (field, value, _) = BrandMigration.keyValue($0) else { return false }
+ return field.lowercased() == "name" && ToolName.isOurs(value)
+ }) { ranges.append(index ... entryClose) }
+ index = entryClose + 1
+ }
+ guard !ranges.isEmpty else { return nil }
+ for range in ranges.reversed() { lines.removeSubrange(range) }
+ return lines.joined(separator: "\n")
+ }
+
+ // Removes Bridgeplay's per-game tool choices from config.vdf, so no game is left naming a
+ // deleted tool. Refused while Steam runs. Returns whether it wrote.
+ @discardableResult
+ static func removeGameEntries(
+ in file: URL = config,
+ steamRunning: () -> Bool = { SteamBundle.isRunningForThisUser }
+ ) throws -> Bool {
+ guard let text = try? String(contentsOf: file, encoding: .utf8),
+ let result = removingOurGameEntries(text)
+ else { return false }
+ guard !steamRunning() else { throw SteamRunning() }
+ try WriteRefused.catching(file) { try result.write(to: file, atomically: true, encoding: .utf8) }
+ return true
+ }
+
static let step = "Set Steam's default compatibility tool"
// Replaces the "0" entry under CompatToolMapping, or adds it (and CompatToolMapping) when
diff --git a/app/Sources/BridgeplayApp/Model/Uninstall.swift b/app/Sources/BridgeplayApp/Model/Uninstall.swift
index 3a5cd6f..9efe4f9 100644
--- a/app/Sources/BridgeplayApp/Model/Uninstall.swift
+++ b/app/Sources/BridgeplayApp/Model/Uninstall.swift
@@ -179,6 +179,7 @@ enum Uninstall {
// that is about to be deleted would leave Steam pointing at nothing.
let restoredDefault = try SteamDefaultTool.restore(
in: leftovers.steamConfig, backup: leftovers.defaultToolBackup, steamRunning: leftovers.steamRunning)
+ try SteamDefaultTool.removeGameEntries(in: leftovers.steamConfig, steamRunning: leftovers.steamRunning)
report(.removing)
let kept = try keepGamefixes(leftovers.gamefixes, in: leftovers.keptGamefixes)
var removed = try remove(
diff --git a/app/Sources/BridgeplayApp/Resources/Localization/Localizable.xcstrings b/app/Sources/BridgeplayApp/Resources/Localization/Localizable.xcstrings
index 6c4198b..4dbb3f5 100644
--- a/app/Sources/BridgeplayApp/Resources/Localization/Localizable.xcstrings
+++ b/app/Sources/BridgeplayApp/Resources/Localization/Localizable.xcstrings
@@ -1548,18 +1548,18 @@
}
}
},
- "Apple's Game Porting Toolkit includes D3DMetal, which runs DirectX 11 and 12 games on Metal, with MetalFX upscaling. It's free, but only Apple can hand it out, so you download it once with your Apple Account." : {
+ "Apple's Game Porting Toolkit (D3DMetal) runs DirectX 11 and 12 games on Metal. The installer includes it under Apple's non-commercial license, or link your own copy from Apple." : {
"localizations" : {
"it" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Il Game Porting Toolkit di Apple include D3DMetal, che esegue i giochi DirectX 11 e 12 su Metal, con l'upscaling MetalFX. È gratuito, ma solo Apple può distribuirlo: lo scarichi una volta con il tuo Apple Account."
+ "value" : "Il Game Porting Toolkit di Apple (D3DMetal) esegue i giochi DirectX 11 e 12 su Metal. L'installer lo include con la licenza non commerciale di Apple, oppure collega una tua copia da Apple."
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Apple 的 Game Porting Toolkit 包含 D3DMetal,可通过 Metal 运行 DirectX 11 和 12 游戏,并支持 MetalFX 放大。它免费提供,但只能由 Apple 分发,因此需要用你的 Apple 账户下载一次。"
+ "value" : "Apple 的 Game Porting Toolkit(D3DMetal)可通过 Metal 运行 DirectX 11 和 12 游戏。安装器按 Apple 的非商业许可附带它,你也可以链接自己从 Apple 下载的副本。"
}
}
}
@@ -2047,6 +2047,22 @@
}
}
},
+ "Bridgeplay adds a library to Steam.app and re-signs Steam on this Mac. Valve doesn't support this, and it may go against Steam's terms. Repair Steam in Status undoes it." : {
+ "localizations" : {
+ "it" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Bridgeplay aggiunge una libreria a Steam.app e ri-firma Steam su questo Mac. Valve non lo supporta e potrebbe violare i termini di Steam. “Ripara Steam” in Stato lo annulla."
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Bridgeplay 会向 Steam.app 添加一个库,并在这台 Mac 上为 Steam 重新签名。Valve 不支持这样做,也可能违反 Steam 的条款。在“状态”中修复 Steam 即可撤销。"
+ }
+ }
+ }
+ },
"Bridgeplay adds itself to Steam, sets up the WineCX engine and makes it Steam's default. Steam closes for a moment." : {
"localizations" : {
"it" : {
@@ -2351,22 +2367,6 @@
}
}
},
- "Bridgeplay modifies Steam.app. It adds a library that Steam loads at startup and re-signs Steam on this Mac. Valve doesn't support this, and it may go against Steam's terms. Repair Steam or Remove Everything on the Status page undoes it." : {
- "localizations" : {
- "it" : {
- "stringUnit" : {
- "state" : "translated",
- "value" : "Bridgeplay modifica Steam.app. Aggiunge una libreria che Steam carica all'avvio e rifirma Steam su questo Mac. Valve non lo supporta e potrebbe andare contro i termini di Steam. Ripara Steam o Rimuovi tutto nella pagina Stato annullano la modifica."
- }
- },
- "zh-Hans" : {
- "stringUnit" : {
- "state" : "translated",
- "value" : "Bridgeplay 会修改 Steam.app:添加一个 Steam 启动时加载的库,并在这台 Mac 上重新签名 Steam。Valve 不支持这种做法,这可能违反 Steam 的条款。在状态页面使用“修复 Steam”或“全部移除”即可撤销。"
- }
- }
- }
- },
"Bridgeplay needs the App Management permission. Turn on Bridgeplay in System Settings › Privacy & Security › App Management. After a Bridgeplay update the switch can look on but no longer work: turn it off and on again." : {
"localizations" : {
"it" : {
@@ -2831,22 +2831,6 @@
}
}
},
- "Clone CrossOver" : {
- "localizations" : {
- "it" : {
- "stringUnit" : {
- "state" : "translated",
- "value" : "Copia di CrossOver"
- }
- },
- "zh-Hans" : {
- "stringUnit" : {
- "state" : "translated",
- "value" : "复制 CrossOver"
- }
- }
- }
- },
"Close" : {
"localizations" : {
"it" : {
@@ -3215,6 +3199,22 @@
}
}
},
+ "Copy CrossOver's engine" : {
+ "localizations" : {
+ "it" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Copia del motore di CrossOver"
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "复制 CrossOver 的引擎"
+ }
+ }
+ }
+ },
"Copy the built bridge files" : {
"localizations" : {
"it" : {
@@ -4402,18 +4402,18 @@
}
}
},
- "Found. Set it up in Status to run games on your licensed CrossOver." : {
+ "Found. Set it up in Status to play on it." : {
"localizations" : {
"it" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Trovato. Configuralo in Stato per avviare i giochi con il tuo CrossOver con licenza."
+ "value" : "Trovato. Configuralo in Stato per giocare con esso."
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "已找到。在“状态”中设置后,即可用你已授权的 CrossOver 运行游戏。"
+ "value" : "已找到。在“状态”中设置后即可用它玩游戏。"
}
}
}
@@ -5314,18 +5314,18 @@
}
}
},
- "Lets the game offer NVIDIA DLSS. Apple's MetalFX does the upscaling, and DLSS Frame Generation runs on MetalFX too. Turn DLSS on in the game's own settings as well." : {
+ "Lets the game offer NVIDIA DLSS. Apple's MetalFX does the upscaling, and DLSS Frame Generation is experimental and off by default. Turn DLSS on in the game's own settings as well." : {
"localizations" : {
"it" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Permette al gioco di offrire NVIDIA DLSS. L'upscaling è fatto da MetalFX di Apple, e anche la Frame Generation DLSS gira su MetalFX. Attiva DLSS anche nelle impostazioni del gioco."
+ "value" : "Permette al gioco di offrire NVIDIA DLSS. L'upscaling è fatto da MetalFX di Apple, e la Frame Generation DLSS è sperimentale e disattivata di default. Attiva DLSS anche nelle impostazioni del gioco."
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "让游戏提供 NVIDIA DLSS 选项。放大由 Apple 的 MetalFX 完成,DLSS 帧生成也基于 MetalFX 运行。同时请在游戏自己的设置中开启 DLSS。"
+ "value" : "让游戏提供 NVIDIA DLSS 选项。放大由 Apple 的 MetalFX 完成,DLSS 帧生成为实验性功能,默认关闭。同时请在游戏自己的设置中开启 DLSS。"
}
}
}
@@ -6066,18 +6066,18 @@
}
}
},
- "Online games with anti-cheat often won't start, and Bridgeplay can't promise that anti-cheat won't flag it. Play online and competitive games at your own risk." : {
+ "Online games with anti-cheat often won't start and may flag Bridgeplay. Play them at your own risk." : {
"localizations" : {
"it" : {
"stringUnit" : {
"state" : "translated",
- "value" : "I giochi online con anti-cheat spesso non si avviano, e Bridgeplay non può garantire che l'anti-cheat non lo segnali. Giochi online e competitivi sono a tuo rischio."
+ "value" : "I giochi online con anti-cheat spesso non si avviano e possono segnalare Bridgeplay. Giocaci a tuo rischio."
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "带反作弊的在线游戏经常无法启动,Bridgeplay 也无法保证反作弊不会将其标记。在线和竞技游戏请自行承担风险。"
+ "value" : "带反作弊的在线游戏常常无法启动,也可能把 Bridgeplay 标记出来。请自行承担风险。"
}
}
}
@@ -6290,18 +6290,18 @@
}
}
},
- "Own CrossOver? Bridgeplay finds it in Applications and can run games on it. Buying it funds Wine." : {
+ "Own CrossOver? Bridgeplay can run games on it. Buying it funds Wine." : {
"localizations" : {
"it" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Hai CrossOver? Bridgeplay lo trova in Applicazioni e può avviare i giochi con esso. Acquistarlo finanzia Wine."
+ "value" : "Hai CrossOver? Bridgeplay può eseguire i giochi con esso. Acquistarlo finanzia Wine."
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "已有 CrossOver?Bridgeplay 会在“应用程序”中找到它,并可用它运行游戏。购买 CrossOver 可以资助 Wine。"
+ "value" : "已有 CrossOver?Bridgeplay 可以用它运行游戏。购买它是在资助 Wine。"
}
}
}
@@ -7426,18 +7426,18 @@
}
}
},
- "Reports are posted publicly in Bridgeplay's GitHub Discussions and counted on the compatibility list. Each one has the game, how it ran, anything you write about it, your Mac's model, chip, GPU cores, memory and displays, whether it was on battery, in Low Power Mode or running hot, the macOS and Bridgeplay versions, the engine, backend and High Resolution setting, and the game's logs. Your home folder, user and computer names, Steam account name, Steam ID and email addresses are removed from the logs first. You don't need a GitHub account." : {
+ "Reports are posted publicly in Bridgeplay's GitHub Discussions and counted on the compatibility list. Each one has the game, how it ran, anything you write about it, your Mac's model, chip, GPU cores, memory and displays, whether it was on battery, in Low Power Mode or running hot, the macOS and Bridgeplay versions, the engine, backend and High Resolution setting, and the game's logs. Your home folder, user and computer names, Steam account name, Steam ID and email addresses are removed from the logs first. You don't need a GitHub account. It also sends a random install ID, used only for rate limits. The server sees your IP, like any website." : {
"localizations" : {
"it" : {
"stringUnit" : {
"state" : "translated",
- "value" : "I report vengono pubblicati nelle GitHub Discussions di Bridgeplay e contati nell'elenco di compatibilità. Ognuno contiene il gioco, come è andato, quello che scrivi al riguardo, modello, chip, core GPU, memoria e schermi del Mac, se era a batteria, in modalità Risparmio energia o surriscaldato, le versioni di macOS e Bridgeplay, motore, backend e impostazione Alta risoluzione, e i log del gioco. Prima dell'invio vengono rimossi dai log la cartella Inizio, i nomi utente e computer, il nome dell'account Steam, lo Steam ID e gli indirizzi email. Non serve un account GitHub."
+ "value" : "I report vengono pubblicati nelle GitHub Discussions di Bridgeplay e contati nell'elenco di compatibilità. Ognuno contiene il gioco, come è andato, quello che scrivi al riguardo, modello, chip, core GPU, memoria e schermi del Mac, se era a batteria, in modalità Risparmio energia o surriscaldato, le versioni di macOS e Bridgeplay, motore, backend e impostazione Alta risoluzione, e i log del gioco. Prima dell'invio vengono rimossi dai log la cartella Inizio, i nomi utente e computer, il nome dell'account Steam, lo Steam ID e gli indirizzi email. Non serve un account GitHub. Invia anche un ID di installazione casuale, usato solo per i limiti di frequenza. Il server vede il tuo IP, come qualsiasi sito web."
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "报告会公开发布到 Bridgeplay 的 GitHub Discussions,并计入兼容性列表。每份报告包含游戏、运行情况、你对此写下的说明、Mac 的型号、芯片、GPU 核心数、内存和显示器,是否使用电池供电、处于低电量模式或过热,macOS 和 Bridgeplay 版本,引擎、后端和高分辨率设置,以及游戏日志。发送前会从日志中移除你的个人文件夹、用户名和电脑名称、Steam 账户名称、Steam ID 和电子邮件地址。不需要 GitHub 账户。"
+ "value" : "报告会公开发布到 Bridgeplay 的 GitHub Discussions,并计入兼容性列表。每份报告包含游戏、运行情况、你对此写下的说明、Mac 的型号、芯片、GPU 核心数、内存和显示器,是否使用电池供电、处于低电量模式或过热,macOS 和 Bridgeplay 版本,引擎、后端和高分辨率设置,以及游戏日志。发送前会从日志中移除你的个人文件夹、用户名和电脑名称、Steam 账户名称、Steam ID 和电子邮件地址。不需要 GitHub 账户。它还会发送一个随机的安装 ID,仅用于频率限制。服务器会像任何网站一样看到你的 IP。"
}
}
}
@@ -8549,18 +8549,18 @@
}
}
},
- "Steam client updates may break Bridgeplay. If you don't want to wait for Bridgeplay to be updated to be compatible with future Steam versions at the cost of not getting updates to the Steam client, you can stop the Steam client from updating itself." : {
+ "Steam client updates may break Bridgeplay. If you don't want to wait for Bridgeplay to be updated to be compatible with future Steam versions at the cost of not getting updates to the Steam client, you can stop the Steam client from updating itself. You also miss Steam's security fixes." : {
"localizations" : {
"it" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Gli aggiornamenti del client Steam potrebbero rendere Bridgeplay inutilizzabile. Se non vuoi aspettare che Bridgeplay venga aggiornato per le future versioni di Steam, puoi impedire al client Steam di aggiornarsi, rinunciando però ai suoi aggiornamenti."
+ "value" : "Gli aggiornamenti del client Steam potrebbero rendere Bridgeplay inutilizzabile. Se non vuoi aspettare che Bridgeplay venga aggiornato per le future versioni di Steam, puoi impedire al client Steam di aggiornarsi, rinunciando però ai suoi aggiornamenti. Non ricevi nemmeno le correzioni di sicurezza di Steam."
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Steam 客户端更新可能导致 Bridgeplay 无法使用。你可以阻止 Steam 自动更新,避免等待 Bridgeplay 适配新版本,但这也意味着无法及时获得 Steam 客户端的功能改进和安全更新。"
+ "value" : "Steam 客户端更新可能导致 Bridgeplay 无法使用。你可以阻止 Steam 自动更新,避免等待 Bridgeplay 适配新版本,但这也意味着无法及时获得 Steam 客户端的功能改进和安全更新。你也无法获得 Steam 的安全修复。"
}
}
}
@@ -8901,6 +8901,22 @@
}
}
},
+ "Steam updates are blocked, security fixes included." : {
+ "localizations" : {
+ "it" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Gli aggiornamenti di Steam sono bloccati, comprese le correzioni di sicurezza."
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Steam 更新已被阻止,包括安全修复。"
+ }
+ }
+ }
+ },
"Steam was installed by another account on this Mac. Only that account can modify it. Log in to macOS with that account to reinstall Bridgeplay." : {
"localizations" : {
"it" : {
@@ -9397,22 +9413,6 @@
}
}
},
- "The Steam client will not update itself." : {
- "localizations" : {
- "it" : {
- "stringUnit" : {
- "state" : "translated",
- "value" : "Il client Steam non si aggiornerà da solo."
- }
- },
- "zh-Hans" : {
- "stringUnit" : {
- "state" : "translated",
- "value" : "Steam 客户端将不会自动更新。"
- }
- }
- }
- },
"The Valve file list %@" : {
"localizations" : {
"it" : {
@@ -10357,18 +10357,18 @@
}
}
},
- "Waiting for you to sign in. Bridgeplay never sees your password." : {
+ "Waiting for you to sign in to Steam. Bridgeplay doesn't read or store your password." : {
"localizations" : {
"it" : {
"stringUnit" : {
"state" : "translated",
- "value" : "In attesa che tu acceda. Bridgeplay non vede mai la tua password."
+ "value" : "In attesa del tuo accesso a Steam. Bridgeplay non legge né salva la tua password."
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "正在等待你登录。Bridgeplay 不会看到你的密码。"
+ "value" : "正在等你登录 Steam。Bridgeplay 不会读取或保存你的密码。"
}
}
}
diff --git a/app/Sources/BridgeplayApp/Views/GuideView.swift b/app/Sources/BridgeplayApp/Views/GuideView.swift
index aa15c40..706878e 100644
--- a/app/Sources/BridgeplayApp/Views/GuideView.swift
+++ b/app/Sources/BridgeplayApp/Views/GuideView.swift
@@ -89,7 +89,7 @@ struct GuideView: View {
SteamRow(.check(String(localized: "Metal HUD"), true),
note: String(localized: "Apple's performance overlay: frame rate, frame time and GPU use."))
SteamRow(.check("DLSS", true),
- note: String(localized: "Lets the game offer NVIDIA DLSS. Apple's MetalFX does the upscaling, and DLSS Frame Generation runs on MetalFX too. Turn DLSS on in the game's own settings as well."))
+ note: String(localized: "Lets the game offer NVIDIA DLSS. Apple's MetalFX does the upscaling, and DLSS Frame Generation is experimental and off by default. Turn DLSS on in the game's own settings as well."))
SteamRow(.check(String(localized: "Advertise AVX2 to Rosetta"), true),
note: String(localized: "Tells the game the processor supports AVX2, which some recent games need to start."))
SteamRow(.check("MSync", true),
diff --git a/app/Sources/BridgeplayApp/Views/PlayReportCard.swift b/app/Sources/BridgeplayApp/Views/PlayReportCard.swift
index ced6b1f..7b7d2a7 100644
--- a/app/Sources/BridgeplayApp/Views/PlayReportCard.swift
+++ b/app/Sources/BridgeplayApp/Views/PlayReportCard.swift
@@ -148,7 +148,7 @@ struct PlayReportConsent: View {
VStack(alignment: .leading, spacing: 14) {
Text("Share how your games run?")
.font(BP.sans(17, .semibold))
- Text("Reports are posted publicly in Bridgeplay's GitHub Discussions and counted on the compatibility list. Each one has the game, how it ran, anything you write about it, your Mac's model, chip, GPU cores, memory and displays, whether it was on battery, in Low Power Mode or running hot, the macOS and Bridgeplay versions, the engine, backend and High Resolution setting, and the game's logs. Your home folder, user and computer names, Steam account name, Steam ID and email addresses are removed from the logs first. You don't need a GitHub account.")
+ Text("Reports are posted publicly in Bridgeplay's GitHub Discussions and counted on the compatibility list. Each one has the game, how it ran, anything you write about it, your Mac's model, chip, GPU cores, memory and displays, whether it was on battery, in Low Power Mode or running hot, the macOS and Bridgeplay versions, the engine, backend and High Resolution setting, and the game's logs. Your home folder, user and computer names, Steam account name, Steam ID and email addresses are removed from the logs first. You don't need a GitHub account. It also sends a random install ID, used only for rate limits. The server sees your IP, like any website.")
.foregroundStyle(BP.fg2)
.fixedSize(horizontal: false, vertical: true)
if reports.consentRequest != .autoShare {
diff --git a/app/Sources/BridgeplayApp/Views/SetupAssistantView.swift b/app/Sources/BridgeplayApp/Views/SetupAssistantView.swift
index 78a8b5f..df58b36 100644
--- a/app/Sources/BridgeplayApp/Views/SetupAssistantView.swift
+++ b/app/Sources/BridgeplayApp/Views/SetupAssistantView.swift
@@ -188,7 +188,7 @@ struct SetupAssistantView: View {
@ViewBuilder
private var graphicsStep: some View {
StepHeader(step: model.step, title: "Add Apple's game graphics",
- detail: "Apple's Game Porting Toolkit includes D3DMetal, which runs DirectX 11 and 12 games on Metal, with MetalFX upscaling. It's free, but only Apple can hand it out, so you download it once with your Apple Account.")
+ detail: "Apple's Game Porting Toolkit (D3DMetal) runs DirectX 11 and 12 games on Metal. The installer includes it under Apple's non-commercial license, or link your own copy from Apple.")
SetupCard {
if let gptk = model.gptk {
WizardRow(row: StatusRow(title: String(localized: "Game Porting Toolkit"),
@@ -235,8 +235,8 @@ struct SetupAssistantView: View {
detail: "Sign in with your account in Steam. Bridgeplay continues on its own once you're in.")
// Above the rows, so it is read before the Set Up step patches Steam.
VStack(alignment: .leading, spacing: 6) {
- Text("Bridgeplay modifies Steam.app. It adds a library that Steam loads at startup and re-signs Steam on this Mac. Valve doesn't support this, and it may go against Steam's terms. Repair Steam or Remove Everything on the Status page undoes it.")
- Text("Online games with anti-cheat often won't start, and Bridgeplay can't promise that anti-cheat won't flag it. Play online and competitive games at your own risk.")
+ Text("Bridgeplay adds a library to Steam.app and re-signs Steam on this Mac. Valve doesn't support this, and it may go against Steam's terms. Repair Steam in Status undoes it.")
+ Text("Online games with anti-cheat often won't start and may flag Bridgeplay. Play them at your own risk.")
}
.font(BP.sans(12))
.foregroundStyle(BP.fg3)
@@ -252,7 +252,7 @@ struct SetupAssistantView: View {
) { Task { await model.installSteam() } }))
SetupHairline()
checked(1, StatusRow(title: String(localized: "Steam account"),
- value: model.signedIn ? String(localized: "Signed in.") : String(localized: "Waiting for you to sign in. Bridgeplay never sees your password."),
+ value: model.signedIn ? String(localized: "Signed in.") : String(localized: "Waiting for you to sign in to Steam. Bridgeplay doesn't read or store your password."),
tone: model.signedIn ? .ok : .info,
action: model.signedIn || !model.steamInstalled ? nil : StatusAction(label: String(localized: "Open Steam"), isProminent: true) { model.openSteam() }))
SetupHairline()
@@ -346,10 +346,10 @@ struct SetupAssistantView: View {
private var crossOverRow: StatusRow {
let title = String(localized: "CrossOver")
if CrossOverSource.discover().contains(where: \.isUsable) {
- return StatusRow(title: title, value: String(localized: "Found. Set it up in Status to run games on your licensed CrossOver."), tone: .ok)
+ return StatusRow(title: title, value: String(localized: "Found. Set it up in Status to play on it."), tone: .ok)
}
return StatusRow(title: title,
- value: String(localized: "Own CrossOver? Bridgeplay finds it in Applications and can run games on it. Buying it funds Wine."),
+ value: String(localized: "Own CrossOver? Bridgeplay can run games on it. Buying it funds Wine."),
tone: .neutral,
action: StatusAction(label: String(localized: "Get CrossOver")) {
NSWorkspace.shared.open(URL(string: "https://www.codeweavers.com/crossover")!)
diff --git a/app/Sources/BridgeplayApp/Views/StatusView.swift b/app/Sources/BridgeplayApp/Views/StatusView.swift
index 2446923..96d2731 100644
--- a/app/Sources/BridgeplayApp/Views/StatusView.swift
+++ b/app/Sources/BridgeplayApp/Views/StatusView.swift
@@ -171,7 +171,7 @@ struct StatusView: View {
@State private var gameDefaultsError: String?
private static let updateBlockPrompt =
- String(localized: "Steam client updates may break Bridgeplay. If you don't want to wait for Bridgeplay to be updated to be compatible with future Steam versions at the cost of not getting updates to the Steam client, you can stop the Steam client from updating itself.")
+ String(localized: "Steam client updates may break Bridgeplay. If you don't want to wait for Bridgeplay to be updated to be compatible with future Steam versions at the cost of not getting updates to the Steam client, you can stop the Steam client from updating itself. You also miss Steam's security fixes.")
var body: some View {
Group {
@@ -625,8 +625,9 @@ struct StatusView: View {
StatusRow(
title: String(localized: "Block Steam client updates"),
value: blocked
- ? String(localized: "The Steam client will not update itself.")
+ ? String(localized: "Steam updates are blocked, security fixes included.")
: String(localized: "A Steam client update may break Bridgeplay."),
+ tone: blocked ? .warning : nil,
toggle: blockUpdates
)
.disabled(!status.isIdle)
diff --git a/app/Tests/BridgeplayAppTests/SteamDefaultToolTests.swift b/app/Tests/BridgeplayAppTests/SteamDefaultToolTests.swift
index ab9f54e..6bac2a6 100644
--- a/app/Tests/BridgeplayAppTests/SteamDefaultToolTests.swift
+++ b/app/Tests/BridgeplayAppTests/SteamDefaultToolTests.swift
@@ -145,3 +145,52 @@ struct SteamDefaultToolTests {
#expect(SteamDefaultTool.current(in: Self.config(nil)) == nil)
}
}
+
+@Suite("Steam per-game tool entries")
+struct SteamGameEntriesTests {
+ private static func game(_ id: String, _ tool: String) -> String {
+ "\t\t\t\t\t\"\(id)\"\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\"\t\t\"\(tool)\"\n\t\t\t\t\t\t\"config\"\t\t\"\"\n\t\t\t\t\t\t\"priority\"\t\t\"250\"\n\t\t\t\t\t}"
+ }
+
+ private static func vdf(_ entries: [String]) -> String {
+ (["\"InstallConfigStore\"", "{", "\t\"Software\"", "\t{", "\t\t\"valve\"", "\t\t{", "\t\t\t\"Steam\"", "\t\t\t{",
+ "\t\t\t\t\"CompatToolMapping\"", "\t\t\t\t{"]
+ + entries + ["\t\t\t\t}", "\t\t\t}", "\t\t}", "\t}", "}"])
+ .joined(separator: "\n")
+ }
+
+ @Test("Removes Bridgeplay and legacy entries, keeps the rest")
+ func removesOurs() throws {
+ let text = Self.vdf([
+ Self.game("0", "bridgeplay-proton-winecx-11.17"), Self.game("10", "bridgeplay-proton-winecx-11.17"),
+ Self.game("20", "proton_9"), Self.game("30", "notproton-winecx-11.17"),
+ ])
+ let result = try #require(SteamDefaultTool.removingOurGameEntries(text))
+ #expect(result == Self.vdf([Self.game("0", "bridgeplay-proton-winecx-11.17"), Self.game("20", "proton_9")]))
+ }
+
+ @Test("Returns nil when no entry is ours")
+ func nothingToRemove() {
+ #expect(SteamDefaultTool.removingOurGameEntries(Self.vdf([Self.game("20", "proton_9")])) == nil)
+ #expect(SteamDefaultTool.removingOurGameEntries(Self.vdf([Self.game("0", "bridgeplay-proton")])) == nil)
+ }
+
+ @Test("Leaves the file untouched when nothing matches, and refuses while Steam runs")
+ func fileHandling() throws {
+ let dir = FileManager.default.temporaryDirectory.appending(path: "bp-gameentries-\(UUID().uuidString)")
+ try FileManager.default.createDirectory(at: dir, withIntermediateDirectories: true)
+ defer { try? FileManager.default.removeItem(at: dir) }
+ let file = dir.appending(path: "config.vdf")
+ let other = Self.vdf([Self.game("20", "proton_9")])
+ try other.write(to: file, atomically: true, encoding: .utf8)
+ #expect(try SteamDefaultTool.removeGameEntries(in: file, steamRunning: { true }) == false)
+ #expect(try String(contentsOf: file, encoding: .utf8) == other)
+
+ try Self.vdf([Self.game("10", "bridgeplay-proton-x")]).write(to: file, atomically: true, encoding: .utf8)
+ #expect(throws: SteamDefaultTool.SteamRunning.self) {
+ try SteamDefaultTool.removeGameEntries(in: file, steamRunning: { true })
+ }
+ #expect(try SteamDefaultTool.removeGameEntries(in: file, steamRunning: { false }))
+ #expect(try String(contentsOf: file, encoding: .utf8) == Self.vdf([]))
+ }
+}