feat: optional x86-64 Steam client (Valve's Linux client under FEX) beside the arm64 one (#152)

An opt-in second Steam client (Steam settings, Steam client: x86-64): Valve's
x86-64 Linux client, unchanged, runs under FEX in its own home with its own
game library and the same sign-in. Linux builds run directly, so titles such
as Team Fortress 2 and Half-Life use their Linux versions; Windows games use
DroidDeck-Proton as on arm64. The arm64 client stays the default.

- droiddeck-steam-x64: FEX and the x86-64 rootfs from DroidDeck-Components
  (sha256-pinned), client install and sync from Valve's CDN, sign-in shared
  with the arm64 client, its web helper on the GPU (ANGLE GL over FEX's GL
  thunk, zink, Turnip), Proton wrappers for the arm64 client's tools,
  DroidDeck direct for Linux builds, SD-card library (x86-64/ beside the
  arm64 one), repair.
- FEX 2610 built by build-fex.yml with thunks and three patches: an openat2
  fallback without openat2 (proot), newer-clang thunkgen, MAP_32BIT
  exhaustion returning ENOMEM. libblsession resolves RESOLVE_IN_ROOT paths
  inside the root.
- Session: x86-64 gating, shortcuts and compatibility tools per client,
  logs from the client that ran.
- App: client setting with the FEX version, an x86-64 chip on the Games
  header, the active client's library, art, storage, downloads, repair,
  Offline Mode, Decky, desktop mode, optional VAC diagnostics; per-client
  state for art, the content log, repair and leftovers.
- Strings in every locale.
- Review fixes: the library cache is saved only by the newest scan; an
  abandoned session's Steam logs come from the client it recorded; distinct
  VAC console names; FEXInterpreter in CPU pinning; clearer VAC hint in
  pl, ru, uk, cs and bg.
This commit is contained in:
The412Banner authored and GitHub committed 2026-10-17 23:57:52 -04:00
1 parent ab799e6938
commit db8d1c9910
125 files changed
+4953 -263

No files matched your search

@@ -28,6 +28,30 @@ class AddedGamesScanTest {
assertEquals(listOf("Example"), AddedGames.scan(app).map { it.name })
}
private fun cardWithX8664Library(): File {
val card = tmp.newFolder("Card")
File(card, "Example").mkdirs()
File(card, "Example/Example.exe").writeText("game")
File(card, "x86-64/steamapps/common/FlatOut").mkdirs()
File(card, "x86-64/steamapps/common/FlatOut/FlatOut.exe").writeText("steam game")
return card
}
@Test fun theX8664ClientsCardLibraryIsNotAGame() {
val card = cardWithX8664Library()
SessionPrefs.setGameStorage(app, card.path, "Card")
assertEquals(listOf("Example"), AddedGames.scan(app).map { it.name })
assertTrue(AddedGames.isSteamLibraryFolder("x86-64"))
assertFalse(AddedGames.isSteamLibraryFolder("x86-64 games"))
}
@Test fun anOldGamesFolderHoldingTheX8664LibraryDoesNotMigrateItAsAGame() {
val card = cardWithX8664Library()
SessionPrefs.setGameStorage(app, SessionPrefs.GAME_STORAGE_OFF, "")
SessionPrefs.setAddedGamesDirs(app, listOf(card.path))
assertEquals(listOf("Example"), AddedGames.scan(app).map { it.name })
}
@Test fun aStorePackageLaunchesTheExecutableItDeclares() {
val game = tmp.newFolder("Minecraft Dungeons")
File(game, "Dungeons.exe").writeText("unreal bootstrap")
@@ -0,0 +1,25 @@
package com.droiddeck.launcher.frontend
import com.droiddeck.launcher.session.SessionPrefs
import java.io.File
import org.junit.Assert.assertEquals
import org.junit.Test
import org.junit.runner.RunWith
import org.robolectric.RobolectricTestRunner
import org.robolectric.RuntimeEnvironment
import org.robolectric.annotation.Config
@RunWith(RobolectricTestRunner::class)
@Config(sdk = [33])
class LibraryArchTest {
private val app get() = RuntimeEnvironment.getApplication()
@Test fun aScanReadsTheClientItWasGivenNotTheSelectedOne() {
SessionPrefs.setGameStorage(app, SessionPrefs.GAME_STORAGE_OFF, "")
SessionPrefs.setSteamClientArch(app, "arm64")
val apps = File(SessionPrefs.steamRoot(app, "x86_64"), "steamapps").apply { mkdirs() }
File(apps, "appmanifest_440.acf").writeText("\"AppState\"\n{\n\t\"appid\"\t\t\"440\"\n\t\"name\"\t\t\"Team Fortress 2\"\n\t\"StateFlags\"\t\t\"4\"\n}\n")
assertEquals(listOf("Team Fortress 2"), Library.launchableGames(app, added = emptyList(), arch = "x86_64").map { it.name })
assertEquals(emptyList<String>(), Library.launchableGames(app, added = emptyList(), arch = "arm64").map { it.name })
}
}
@@ -0,0 +1,39 @@
package com.droiddeck.launcher.frontend
import org.junit.Assert.assertEquals
import org.junit.Assert.assertFalse
import org.junit.Assert.assertTrue
import org.junit.Test
import org.junit.runner.RunWith
import org.robolectric.RobolectricTestRunner
import org.robolectric.RuntimeEnvironment
import org.robolectric.annotation.Config
@RunWith(RobolectricTestRunner::class)
@Config(sdk = [33])
class LibraryCacheClientTest {
private val app get() = RuntimeEnvironment.getApplication()
private val games = listOf(Library.SteamGame(440, "Team Fortress 2", null, "Steam library"))
@Test fun aCacheFromBeforeTheClientWasRecordedIsArm64s() {
java.io.File(app.filesDir, "library-cache.json").writeText("""[{"appId":440,"name":"Team Fortress 2","library":"Steam library","gameId":440}]""")
val (games, x64) = LibraryCache.snapshot(app)
assertEquals(listOf("Team Fortress 2"), games.map { it.name })
assertFalse(x64)
}
@Test fun theListAndItsClientAreOneFile() {
LibraryCache.save(app, games, x64 = true)
assertEquals(listOf("library-cache.json"), app.filesDir.list().orEmpty().filter { it.startsWith("library-cache") })
assertEquals(listOf("Team Fortress 2") to true, LibraryCache.snapshot(app).let { (g, x) -> g.map { it.name } to x })
}
@Test fun theListsClientIsKeptUntilAListForAnotherIsSaved() {
LibraryCache.save(app, games, x64 = true)
assertTrue(LibraryCache.listedX64(app))
LibraryCache.save(app, emptyList())
assertTrue(LibraryCache.listedX64(app))
LibraryCache.save(app, games, x64 = false)
assertFalse(LibraryCache.listedX64(app))
}
}
@@ -0,0 +1,15 @@
package com.droiddeck.launcher.frontend
import org.junit.Assert.assertEquals
import org.junit.Test
class LibraryFromSteamClientTest {
@Test fun onlyTheClientsOwnInstallsAreDroppedOnASwitch() {
val games = listOf(
Library.SteamGame(440, "Team Fortress 2", null, "Steam library"),
Library.SteamGame(1, "God of War", null, Library.ADDED, gameId = 9_000_000_001L),
Library.SteamGame(2, "Store game", null, "Games", gameId = 9_000_000_002L, source = "gog"),
)
assertEquals(listOf("God of War", "Store game"), games.filterNot(Library::fromSteamClient).map { it.name })
}
}
@@ -129,6 +129,23 @@ class SteamGridTest {
assertNull(SteamGameArt.chosenFile(app, 620, AddedGameArt.Slot.BACKGROUND))
}
@Test fun theOtherClientsEmptyGridGetsTheChoiceInsteadOfDroppingIt() {
File(LinuxRuntime.rootDir(app), "root/.local/share/Steam/userdata/123/config").mkdirs()
val picked = image("mine.png", 12)
SteamGameArt.choose(app, game(), AddedGameArt.Slot.COVER, AddedGameArt.Option(AddedGameArt.FILE, picked.path, picked.path))
assertFalse(SteamGrid.sync(app, listOf(target())))
val x64 = File(SessionPrefs.steamRoot(app, "x86_64"), "userdata/123/config").apply { mkdirs() }
SessionPrefs.setSteamClientArch(app, "x86_64")
assertFalse(SteamGrid.sync(app, listOf(target())))
assertEquals(12L, SteamGameArt.chosenFile(app, 620, AddedGameArt.Slot.COVER)?.length())
assertEquals(12L, File(x64, "grid/620p.png").length())
SessionPrefs.setSteamClientArch(app, "arm64")
assertFalse(SteamGrid.sync(app, listOf(target())))
assertEquals(12L, File(grid, "620p.png").length())
}
@Test fun aChoiceMadeHereIsNotTakenBackAsASteamChange() {
File(LinuxRuntime.rootDir(app), "root/.local/share/Steam/userdata/123/config").mkdirs()
val picked = image("mine.png", 12)