mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-11 02:51:10 +00:00
fix(storage): Clean up keeps Proton EasyAntiCheat and BattlEye runtimes
This commit is contained in:
1 parent
ef46c011db
commit
396d9214e9
5 files changed
+10
-2
No files matched your search
@@ -11,6 +11,8 @@ object SteamStorage {
|
||||
const val PROTON_11_ARM = 4628740
|
||||
const val REDISTRIBUTABLES = 228980
|
||||
const val FEX = 3127680
|
||||
const val EAC_RUNTIME = 1826330
|
||||
const val BATTLEYE_RUNTIME = 1161040
|
||||
|
||||
const val ARM_TOOL = "droiddeck-proton-arm64"
|
||||
const val ARM_11_TOOL = "droiddeck-proton-11-arm64"
|
||||
@@ -18,7 +20,7 @@ object SteamStorage {
|
||||
private val VALVE_TOOLS = setOf(
|
||||
858280, 961940, 1054830, 1113280, 1245040, 1420170, 1493710, 1580130, 1887720, 2180100, 2348590,
|
||||
2805730, 3029110, 3658110, 4183110, 4628710, 4690330,
|
||||
SCOUT, SOLDIER, SNIPER, ARM_RUNTIME, PROTON_ARM, PROTON_11_ARM, REDISTRIBUTABLES, FEX,
|
||||
SCOUT, SOLDIER, SNIPER, ARM_RUNTIME, PROTON_ARM, PROTON_11_ARM, REDISTRIBUTABLES, FEX, EAC_RUNTIME, BATTLEYE_RUNTIME,
|
||||
)
|
||||
|
||||
private val APP_ID = Regex("^\\s*\"appid\"\\s*\"(\\d+)\"", RegexOption.MULTILINE)
|
||||
@@ -93,6 +95,7 @@ object SteamStorage {
|
||||
val dir = m.installDir.orEmpty()
|
||||
return when {
|
||||
m.appId == SCOUT || m.appId == SOLDIER || dir == "SteamLinuxRuntime" || dir == "SteamLinuxRuntime_soldier" -> Kind.OLD_RUNTIME
|
||||
m.appId == EAC_RUNTIME || m.appId == BATTLEYE_RUNTIME -> Kind.REQUIRED
|
||||
dir.startsWith("Proton") && "ARM64" in dir -> Kind.ARM_PROTON
|
||||
m.appId == PROTON_ARM || m.appId == PROTON_11_ARM -> Kind.ARM_PROTON
|
||||
dir.startsWith("Proton ") -> Kind.X86_PROTON
|
||||
|
||||
@@ -26,7 +26,7 @@ class GameUsage(
|
||||
}
|
||||
|
||||
enum class ToolState { IN_USE, REQUIRED, UNUSED }
|
||||
enum class ToolReason { DEFAULT_PROTON, PROTON, FEX_RUNTIME, ARM_RUNTIME, REDISTRIBUTABLES, FEX, STEAM_TOOL, OLD_RUNTIME, X86_PROTON, CUSTOM, CUSTOM_UNKNOWN, X64_CLIENT }
|
||||
enum class ToolReason { DEFAULT_PROTON, PROTON, FEX_RUNTIME, ARM_RUNTIME, REDISTRIBUTABLES, FEX, ANTICHEAT_RUNTIME, STEAM_TOOL, OLD_RUNTIME, X86_PROTON, CUSTOM, CUSTOM_UNKNOWN, X64_CLIENT }
|
||||
|
||||
class ToolUsage(
|
||||
val key: String, val name: String, val bytes: Long, val state: ToolState, val reason: ToolReason,
|
||||
@@ -153,6 +153,7 @@ object StorageScan {
|
||||
SteamStorage.ARM_RUNTIME -> ToolReason.ARM_RUNTIME
|
||||
SteamStorage.REDISTRIBUTABLES -> ToolReason.REDISTRIBUTABLES
|
||||
SteamStorage.FEX -> ToolReason.FEX
|
||||
SteamStorage.EAC_RUNTIME, SteamStorage.BATTLEYE_RUNTIME -> ToolReason.ANTICHEAT_RUNTIME
|
||||
else -> ToolReason.STEAM_TOOL
|
||||
}
|
||||
}
|
||||
|
||||
@@ -714,6 +714,7 @@ private fun toolDetail(t: ToolUsage): String = when (t.reason) {
|
||||
ToolReason.ARM_RUNTIME -> stringResource(R.string.storage_tool_arm_runtime)
|
||||
ToolReason.REDISTRIBUTABLES -> stringResource(R.string.storage_tool_redist)
|
||||
ToolReason.FEX -> stringResource(R.string.storage_tool_fex)
|
||||
ToolReason.ANTICHEAT_RUNTIME -> stringResource(R.string.storage_tool_anticheat)
|
||||
ToolReason.STEAM_TOOL -> stringResource(R.string.storage_tool_steam)
|
||||
ToolReason.OLD_RUNTIME -> stringResource(R.string.storage_tool_old_runtime)
|
||||
ToolReason.X86_PROTON -> stringResource(R.string.storage_tool_x86_proton)
|
||||
|
||||
@@ -3222,6 +3222,7 @@
|
||||
<string name="storage_tool_redist">VC++ and DirectX installers games ask for</string>
|
||||
<string name="storage_tool_fex">Runs Linux x86 games</string>
|
||||
<string name="storage_tool_steam">Steam tool</string>
|
||||
<string name="storage_tool_anticheat">Steam downloads this for games that ship anti-cheat, even when it is off. Removing it stalls their install at 0%</string>
|
||||
<string name="storage_tool_old_runtime">DroidDeck runs games without this runtime</string>
|
||||
<string name="storage_tool_x86_proton">x86 Proton, which DroidDeck cannot run</string>
|
||||
<string name="storage_tool_custom_default">Default for every game</string>
|
||||
|
||||
@@ -50,6 +50,8 @@ class SteamStorageTest {
|
||||
assertEquals(SteamStorage.Kind.X86_PROTON, SteamStorage.kind(manifest(1493710, "Proton - Experimental")))
|
||||
assertEquals(SteamStorage.Kind.X86_PROTON, SteamStorage.kind(manifest(2805730, "Proton 9.0")))
|
||||
assertEquals(SteamStorage.Kind.REQUIRED, SteamStorage.kind(manifest(228980, "Steamworks Shared")))
|
||||
assertEquals(SteamStorage.Kind.REQUIRED, SteamStorage.kind(manifest(1826330, "Proton EasyAntiCheat Runtime")))
|
||||
assertEquals(SteamStorage.Kind.REQUIRED, SteamStorage.kind(manifest(1161040, "Proton BattlEye Runtime")))
|
||||
assertTrue(SteamStorage.isTool(manifest(2805730, "Proton 9.0")))
|
||||
assertFalse(SteamStorage.isTool(manifest(204360, "CastleCrashers")))
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user