Run Windows games on Apple Silicon — free, open source, with an open compatibility database that tells you what actually works.
Swift apple-silicond3dmetaldxmtdxvkfexgame-porting-toolkitgamingmac-gamingmacosmetalmoltenvksteamswiftuivkd3d-protonwhisky-alternativewindows-gameswinewine-wrapper
The engine question says a move carries every other program along, and offers a new environment first when there are any (highball#262)
Gauthier Piarrette1b85298ec7eb
diff --git a/Sources/HighballApp/AppState.swift b/Sources/HighballApp/AppState.swiftindex 76cdb24..fe64236 100644--- a/Sources/HighballApp/AppState.swift+++ b/Sources/HighballApp/AppState.swift@@ -1226,6 +1226,13 @@ final class AppState {/// or re-runs the Windows setup without asking: the ask offers a new environment on that/// engine (other programs untouched) or moving this one.var pendingEngine: (recipe: HighballKit.Recipe, bottle: Bottle, manifest: EngineManifest)?+ /// How many other programs an environment has installed, the ones a move would carry onto the+ /// engine too: Steam games ready to play other than the recipe's own, plus added programs.+ func otherProgramCount(in bottle: Bottle, besides recipe: HighballKit.Recipe) -> Int {+ let own = gameDB.byTitle.values.first { $0.id == recipe.id }?.steam_appid+ let games = (gamesByBottle[bottle.name] ?? []).filter { $0.isReady && $0.appid != own }+ return games.count + bottle.settings.pins.count+ }/// A recipe naming an engine this build does not ship: the database moved ahead of the/// app (The Last Flame's fix needs r11, which 0.9.33 was the first to carry). The askdiff --git a/Sources/HighballApp/EngineAsk.swift b/Sources/HighballApp/EngineAsk.swiftindex 880bfd0..c8b1575 100644--- a/Sources/HighballApp/EngineAsk.swift+++ b/Sources/HighballApp/EngineAsk.swift@@ -20,9 +20,17 @@ extension GamePageCopy {recipe.title, engineID, play)}- static func engineAsk(recipe: HighballKit.Recipe, manifest: EngineManifest, installed: Bool) -> String {+ /// `others` is how many other programs the environment has installed (Steam games and added+ /// programs): moving the environment moves them all onto the engine, which a player found out+ /// the hard way when an old revision could not show Steam's window (highball#262).+ static func engineAsk(recipe: HighballKit.Recipe, manifest: EngineManifest, installed: Bool, others: Int) -> String {let download = installed ? "" : String(format: L(", after a download of about %@"), downloadSize(manifest))- return String(format: L("%@ is verified on the %@ engine, and this environment is not on it. Moving this environment switches it there%@ and keeps everything installed; the Windows setup re-runs when needed, a minute or two. A new environment keeps your other programs where they are and starts empty, so the game has to be installed again."),- recipe.title, shortEngineName(manifest), download)+ if others == 0 {+ return String(format: L("%@ is verified on the %@ engine, and this environment is not on it. Moving this environment switches it there%@ and keeps everything installed; the Windows setup re-runs when needed, a minute or two. A new environment starts empty, so the game has to be installed again."),+ recipe.title, shortEngineName(manifest), download)+ }+ let programs = others == 1 ? L("the other program installed here") : String(format: L("the %d other programs installed here"), others)+ return String(format: L("%@ is verified on the %@ engine, and this environment is not on it. A new environment keeps %@ where they are and starts empty, so the game has to be installed again. Moving this environment switches it there%@ and keeps everything installed, but %@ then run on that engine too, which suits some games and not others; the Windows setup re-runs when needed, a minute or two."),+ recipe.title, shortEngineName(manifest), programs, download, programs)}}diff --git a/Sources/HighballApp/HighballApp.swift b/Sources/HighballApp/HighballApp.swiftindex 6ee82aa..483f912 100644--- a/Sources/HighballApp/HighballApp.swift+++ b/Sources/HighballApp/HighballApp.swift@@ -323,11 +323,20 @@ private extension View {self.alert(state.pendingEngine.map { String(format: L("%@ needs the %@ engine"), $0.recipe.title, GamePageCopy.shortEngineName($0.manifest)) } ?? "",isPresented: .init(get: { state.pendingEngine != nil }, set: { if !$0 { state.pendingEngine = nil } }),presenting: state.pendingEngine) { pending in- Button(L("Move this environment")) { state.moveEnvironment(for: pending.recipe, bottle: pending.bottle, to: pending.manifest) }- Button(String(format: L("New environment for %@"), pending.recipe.title)) { state.createEnvironment(for: pending.recipe, on: pending.manifest) }+ // With other programs installed here, a new environment is the safe choice and comes+ // first (highball#262); for an environment holding only this game, moving it is.+ let others = state.otherProgramCount(in: pending.bottle, besides: pending.recipe)+ if others > 0 {+ Button(String(format: L("New environment for %@"), pending.recipe.title)) { state.createEnvironment(for: pending.recipe, on: pending.manifest) }+ Button(L("Move this environment")) { state.moveEnvironment(for: pending.recipe, bottle: pending.bottle, to: pending.manifest) }+ } else {+ Button(L("Move this environment")) { state.moveEnvironment(for: pending.recipe, bottle: pending.bottle, to: pending.manifest) }+ Button(String(format: L("New environment for %@"), pending.recipe.title)) { state.createEnvironment(for: pending.recipe, on: pending.manifest) }+ }Button(L("Not now"), role: .cancel) { state.pendingEngine = nil }} message: { pending in- Text(GamePageCopy.engineAsk(recipe: pending.recipe, manifest: pending.manifest, installed: state.engines.contains { $0.id == pending.manifest.id }))+ Text(GamePageCopy.engineAsk(recipe: pending.recipe, manifest: pending.manifest, installed: state.engines.contains { $0.id == pending.manifest.id },+ others: state.otherProgramCount(in: pending.bottle, besides: pending.recipe)))}}@MainActor func updateAsk(_ state: AppState) -> some View {diff --git a/Sources/HighballApp/L10n.swift b/Sources/HighballApp/L10n.swiftindex 68fb363..e549f61 100644--- a/Sources/HighballApp/L10n.swift+++ b/Sources/HighballApp/L10n.swift@@ -209,7 +209,10 @@ enum L10n {"Creating the %@ environment on %@": "Création de l'environnement %@ sur %@","a download when the engine is new, then a first boot of about 90 seconds": "un téléchargement si le moteur est nouveau, puis un premier démarrage d'environ 90 secondes",", after a download of about %@": ", après un téléchargement d'environ %@",- "%@ is verified on the %@ engine, and this environment is not on it. Moving this environment switches it there%@ and keeps everything installed; the Windows setup re-runs when needed, a minute or two. A new environment keeps your other programs where they are and starts empty, so the game has to be installed again.": "%@ est vérifié sur le moteur %@, et cet environnement n'est pas dessus. Déplacer cet environnement le bascule dessus%@ en gardant tout ce qui est installé, la configuration Windows se relance si nécessaire, une minute ou deux. Un nouvel environnement laisse vos autres programmes où ils sont et démarre vide, le jeu devra donc être réinstallé.",+ "%@ is verified on the %@ engine, and this environment is not on it. Moving this environment switches it there%@ and keeps everything installed; the Windows setup re-runs when needed, a minute or two. A new environment starts empty, so the game has to be installed again.": "%@ est vérifié sur le moteur %@, et cet environnement n'est pas dessus. Déplacer cet environnement le fait passer dessus%@ et garde tout ce qui est installé ; la configuration Windows se refait au besoin, une minute ou deux. Un nouvel environnement part vide, donc le jeu doit être réinstallé.",+ "%@ is verified on the %@ engine, and this environment is not on it. A new environment keeps %@ where they are and starts empty, so the game has to be installed again. Moving this environment switches it there%@ and keeps everything installed, but %@ then run on that engine too, which suits some games and not others; the Windows setup re-runs when needed, a minute or two.": "%@ est vérifié sur le moteur %@, et cet environnement n'est pas dessus. Un nouvel environnement laisse %@ en place et part vide, donc le jeu doit être réinstallé. Déplacer cet environnement le fait passer dessus%@ et garde tout ce qui est installé, mais %@ tournent alors aussi sur ce moteur, ce qui convient à certains jeux et pas à d'autres ; la configuration Windows se refait au besoin, une minute ou deux.",+ "the other program installed here": "l'autre programme installé ici",+ "the %d other programs installed here": "les %d autres programmes installés ici","Epic account connected": "Compte Epic connecté","Each release goes to beta a day or two before everyone else, less tested. Turning this off keeps the build you have until the next stable one is newer.": "Chaque version passe en bêta un jour ou deux avant tout le monde, moins testée. Désactiver garde la version actuelle jusqu'à ce qu'une version stable plus récente arrive.","vkd3d-proton — D3D12 → Vulkan (experimental)": "vkd3d-proton — D3D12 → Vulkan (expérimental)",