mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-12-06 04:55:44 +00:00
Owned Steam games are listed in the Library's Steam tab like the other stores' games. Any of them installs from its page into the Steam library the user picks, with a Rust engine running in the app. - Sign-in reuses the Linux Steam client's saved login; there is no second login. - The engine picks the same depots and manifests the client would (licensed depots only) and checks every chunk's SHA-1 before writing it. - It registers the game the way the client does (app manifest, libraryfolders, shared redistributables), so the client neither re-verifies nor re-downloads it. Updates stay with the client. - A paused or interrupted download shows in the arm64 or x86-64 client as a resumable install. Taking over a client's stopped download keeps the files the client already staged. - Uninstall matches the client's and updates the client whose library holds the game. - Steam gets no Stores tab. Tested on an AYN Thor with both client architectures. The engine is The412Banner's feat/steam-store work, derived from WinNative's wn-steam-client (GPL-3.0); see src/steam/NOTICE.md.
109 lines
6.9 KiB
Kotlin
109 lines
6.9 KiB
Kotlin
package com.droiddeck.launcher
|
|
|
|
import android.app.Application
|
|
import com.droiddeck.launcher.runtime.BwrapSpawner
|
|
import com.droiddeck.launcher.session.CrashHandler
|
|
import com.droiddeck.launcher.session.EnhancedSessionLogShare
|
|
import com.droiddeck.launcher.session.GpuClockPin
|
|
|
|
class App : Application() {
|
|
override fun attachBaseContext(base: android.content.Context) {
|
|
super.attachBaseContext(com.droiddeck.launcher.core.AppLanguage.wrap(base))
|
|
val process = if (android.os.Build.VERSION.SDK_INT >= 28) Application.getProcessName() else packageName
|
|
com.droiddeck.launcher.lab.LabOverlay.load(this, process == packageName)
|
|
}
|
|
|
|
override fun onConfigurationChanged(newConfig: android.content.res.Configuration) {
|
|
super.onConfigurationChanged(newConfig)
|
|
com.droiddeck.launcher.core.AppLanguage.systemChanged(newConfig)
|
|
}
|
|
|
|
override fun onCreate() {
|
|
super.onCreate()
|
|
com.droiddeck.launcher.runtime.NativeGuest.init(this)
|
|
com.droiddeck.launcher.session.Onboarding.attach(this)
|
|
Thread({ runCatching { EnhancedSessionLogShare.cleanupAbandonedStages(this) } }, "diagnostic-stage-cleanup").start()
|
|
com.droiddeck.launcher.ui.Themes.loadGradient(this)
|
|
com.droiddeck.launcher.ui.BuildWatermark.install(this)
|
|
HomeApp.trackRecents(this)
|
|
val process = if (android.os.Build.VERSION.SDK_INT >= 28) Application.getProcessName()
|
|
else (getSystemService(ACTIVITY_SERVICE) as android.app.ActivityManager)
|
|
.runningAppProcesses?.firstOrNull { it.pid == android.os.Process.myPid() }?.processName
|
|
if (process == "$packageName:xboxlogin") {
|
|
if (android.os.Build.VERSION.SDK_INT >= 28) android.webkit.WebView.setDataDirectorySuffix("xbox")
|
|
return
|
|
}
|
|
if (process == "$packageName:xboxcloud") {
|
|
if (android.os.Build.VERSION.SDK_INT >= 28) android.webkit.WebView.setDataDirectorySuffix("xboxcloud")
|
|
return
|
|
}
|
|
if (process == "$packageName:xcloudnative") {
|
|
com.droiddeck.launcher.stores.StoresState.init(this)
|
|
return
|
|
}
|
|
if (process == "$packageName:vr_recovery" || process == "$packageName:rgb_diagnostic" ||
|
|
process == "$packageName:shortcuts_sync" || process == "$packageName:bottom_desktop") return
|
|
CrashHandler.install(this)
|
|
com.droiddeck.launcher.input.ShortcutsRelay.Holder.install(this)
|
|
com.droiddeck.launcher.agent.AgentHost.refresh(this)
|
|
com.droiddeck.launcher.ui.NavTabs.load(this)
|
|
com.droiddeck.launcher.ui.DrawerPages.load(this)
|
|
com.droiddeck.launcher.ui.DeveloperTools.load(this)
|
|
com.droiddeck.launcher.ui.AgentPet.install(this)
|
|
if (com.droiddeck.launcher.agent.AgentTab.visible) com.droiddeck.launcher.lab.LabNotice.openOnInstall = "agent"
|
|
com.droiddeck.launcher.lab.LabNotice.started(this)
|
|
com.droiddeck.launcher.session.QuestExperimental.initialize(this)
|
|
com.droiddeck.launcher.session.SessionPrefs.applyNtsyncDefault(this)
|
|
com.droiddeck.launcher.session.SessionPrefs.settleGpuDriverMode(this)
|
|
com.droiddeck.launcher.session.SessionPrefs.settleStoresTabOrder(this, com.droiddeck.launcher.stores.Store.tabbed.map { it.id })
|
|
com.droiddeck.launcher.update.AppUpdates.init(this)
|
|
com.droiddeck.launcher.update.UpdateWatch.sync(this, com.droiddeck.launcher.update.AppUpdates.follow(this, null))
|
|
com.droiddeck.launcher.core.DownloadSource.init(this)
|
|
prefetchAddonPacks()
|
|
GpuClockPin.clearLeftover(this)
|
|
com.droiddeck.launcher.input.UsbMouse.returnLeftover(this)
|
|
com.droiddeck.launcher.glasses.Glasses.init(this)
|
|
com.droiddeck.launcher.glasses.GlassesMenuMirror.initialize(this)
|
|
BwrapSpawner.start(this)
|
|
com.droiddeck.launcher.runtime.RootSpawner.start(this)
|
|
com.droiddeck.launcher.frontend.GameFileSync.start(this)
|
|
com.droiddeck.launcher.stores.StoresState.init(this)
|
|
com.droiddeck.launcher.stores.StoresState.register(com.droiddeck.launcher.stores.gog.GogBackend)
|
|
com.droiddeck.launcher.stores.StoresState.register(com.droiddeck.launcher.stores.epic.EpicBackend)
|
|
com.droiddeck.launcher.stores.StoresState.register(com.droiddeck.launcher.stores.amazon.AmazonBackend)
|
|
com.droiddeck.launcher.stores.StoresState.register(com.droiddeck.launcher.stores.itch.ItchBackend)
|
|
com.droiddeck.launcher.stores.StoresState.register(com.droiddeck.launcher.stores.gamejolt.GameJoltBackend)
|
|
com.droiddeck.launcher.stores.StoresState.register(com.droiddeck.launcher.stores.xbox.XboxBackend)
|
|
com.droiddeck.launcher.sync.Syncthing.init(this)
|
|
com.droiddeck.launcher.stores.StoresState.register(com.droiddeck.launcher.stores.battlenet.BattleNetBackend)
|
|
com.droiddeck.launcher.stores.StoresState.register(com.droiddeck.launcher.stores.ubisoft.UbisoftBackend)
|
|
com.droiddeck.launcher.stores.ea.EaBackend.app = this
|
|
com.droiddeck.launcher.stores.StoresState.register(com.droiddeck.launcher.stores.ea.EaBackend)
|
|
com.droiddeck.launcher.stores.StoresState.register(com.droiddeck.launcher.stores.rockstar.RockstarBackend)
|
|
com.droiddeck.launcher.stores.StoresState.register(com.droiddeck.launcher.stores.steam.SteamBackend)
|
|
}
|
|
|
|
private fun prefetchAddonPacks() {
|
|
val app = this
|
|
Thread({
|
|
runCatching {
|
|
if (com.droiddeck.launcher.runtime.LinuxRuntime.rootDir(app).isDirectory) {
|
|
if (!com.droiddeck.launcher.runtime.LinuxRuntime.patchedProot(app)) com.droiddeck.launcher.core.AddonPack.PROOT.ensure(app)
|
|
com.droiddeck.launcher.core.AddonPack.DIRECTAUDIO.ensure(app)
|
|
com.droiddeck.launcher.session.SessionFiles.ensureDirtStandIn(app)
|
|
}
|
|
if (com.droiddeck.launcher.stores.gog.GogComet.enabled(app)) com.droiddeck.launcher.core.AddonPack.COMET.ensure(app)
|
|
if (com.droiddeck.launcher.stores.StoreAccounts.signedInAs(app, com.droiddeck.launcher.stores.Store.XBOX) != null)
|
|
com.droiddeck.launcher.core.AddonPack.XBOX.ensure(app)
|
|
if (com.droiddeck.launcher.stores.StoreAccounts.signedInAs(app, com.droiddeck.launcher.stores.Store.UBISOFT) != null)
|
|
com.droiddeck.launcher.session.SessionFiles.ensureUbisoftService(app)
|
|
if (com.droiddeck.launcher.stores.StoreAccounts.signedInAs(app, com.droiddeck.launcher.stores.Store.ROCKSTAR) != null)
|
|
com.droiddeck.launcher.session.SessionFiles.ensureRockstarService(app)
|
|
if (com.droiddeck.launcher.stores.StoreAccounts.signedInAs(app, com.droiddeck.launcher.stores.Store.EPIC) != null)
|
|
com.droiddeck.launcher.session.SessionFiles.ensureEpicParent(app)
|
|
com.droiddeck.launcher.handtracking.HandTracking.load(app)
|
|
}.onFailure { android.util.Log.w("App", "add-on pack prefetch failed", it) }
|
|
}, "addon-packs").start()
|
|
}
|
|
}
|