mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-19 04:46:08 +00:00
Share installed games between the arm64 and x86-64 Steam clients
This commit is contained in:
1 parent
8d407aa1e8
commit
c866bb90db
8 files changed
+486
-14
No files matched your search
@@ -23,6 +23,20 @@ class LibraryArchTest {
|
||||
assertEquals(emptyList<String>(), Library.launchableGames(app, added = emptyList(), arch = "arm64").map { it.name })
|
||||
}
|
||||
|
||||
@Test fun aGameTheOtherClientSharesIsListedFromItsFiles() {
|
||||
SessionPrefs.setGameStorage(app, SessionPrefs.GAME_STORAGE_OFF, "")
|
||||
val apps = File(SessionPrefs.steamRoot(app, "x86_64"), "steamapps").apply { mkdirs() }
|
||||
File(apps, "common/Team Fortress 2").mkdirs()
|
||||
val manifest = "\"AppState\"\n{\n\t\"appid\"\t\t\"440\"\n\t\"name\"\t\t\"Team Fortress 2\"\n\t\"StateFlags\"\t\t\"4\"\n\t\"installdir\"\t\t\"Team Fortress 2\"\n}\n"
|
||||
File(apps, "appmanifest_440.acf").writeText(manifest)
|
||||
val view = File(com.droiddeck.launcher.runtime.LinuxRuntime.rootDir(app), "root/.droiddeck-x64/shared/x86-64/steamapps").apply { mkdirs() }
|
||||
File(view, "appmanifest_440.acf").writeText(manifest)
|
||||
val shared = Library.steamGames(app, arch = "arm64").single()
|
||||
assertEquals("Team Fortress 2", shared.name)
|
||||
assertEquals(File(apps, "common/Team Fortress 2"), shared.gameFiles)
|
||||
assertEquals(listOf("Team Fortress 2"), Library.steamGames(app, arch = "x86_64").map { it.name })
|
||||
}
|
||||
|
||||
@Test fun anAddedGameSteamAlreadyListsFromItsFolderIsShownOnce() {
|
||||
SessionPrefs.setGameStorage(app, SessionPrefs.GAME_STORAGE_OFF, "")
|
||||
val folder = File(app.filesDir, "games/Example").apply { mkdirs() }
|
||||
|
||||
Reference in new issue
Block a user