Compare commits
5
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
48fa1df3ba | ||
|
|
2770a481c2 | ||
|
|
d80e4485ac | ||
|
|
1e23bb6d8d | ||
|
|
9222a1fe4d |
No files matched your search
@@ -450,7 +450,7 @@ jobs:
|
||||
~/.cargo/git/db
|
||||
~/.cargo/bin/cargo-ndk
|
||||
app/src/main/rust/stores/target
|
||||
key: stores-v2-${{ runner.os }}-${{ runner.arch }}-${{ env.NDK_VERSION }}-${{ steps.rust.outputs.rustc }}-${{ hashFiles('app/src/main/rust/stores/Cargo.lock') }}-${{ hashFiles('app/src/main/rust/stores/src/**', 'app/src/main/rust/stores/Cargo.toml', 'app/src/main/rust/stores/build.rs', 'app/src/main/rust/stores/.cargo/**', 'app/build.gradle') }}
|
||||
key: stores-v2-${{ runner.os }}-${{ runner.arch }}-${{ env.NDK_VERSION }}-${{ steps.rust.outputs.rustc }}-${{ hashFiles('app/src/main/rust/stores/Cargo.lock') }}-${{ hashFiles('app/src/main/rust/stores/amazon/**', 'tools/stores/**', 'app/src/main/rust/stores/src/**', 'app/src/main/rust/stores/Cargo.toml', 'app/src/main/rust/stores/build.rs', 'app/src/main/rust/stores/.cargo/**', 'app/build.gradle') }}
|
||||
restore-keys: |
|
||||
stores-v2-${{ runner.os }}-${{ runner.arch }}-${{ env.NDK_VERSION }}-${{ steps.rust.outputs.rustc }}-${{ hashFiles('app/src/main/rust/stores/Cargo.lock') }}-
|
||||
stores-v2-${{ runner.os }}-${{ runner.arch }}-${{ env.NDK_VERSION }}-${{ steps.rust.outputs.rustc }}-
|
||||
@@ -523,6 +523,13 @@ jobs:
|
||||
cd app/src/main/rust/stores
|
||||
cargo test --locked 2>&1 | tail -60
|
||||
|
||||
- name: Amazon engine host tests
|
||||
timeout-minutes: 10
|
||||
run: |
|
||||
set -euo pipefail
|
||||
export CARGO_TARGET_DIR="$PWD/app/src/main/rust/stores/target"
|
||||
cargo test --manifest-path app/src/main/rust/stores/amazon/Cargo.toml --locked
|
||||
|
||||
- name: Upload the regenerated Cargo.lock
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@v4
|
||||
|
||||
@@ -61,7 +61,7 @@ jobs:
|
||||
jq -r --arg n "$2" '.assets // [] | .[] | select(.name == $n) | .digest // empty'
|
||||
}
|
||||
commit=$(gh api "repos/$GITHUB_REPOSITORY/actions/runs/$BUILD_RUN" --jq .head_sha 2>/dev/null || echo "$GITHUB_SHA")
|
||||
for name in proot directaudio tracking xbox comet; do
|
||||
for name in proot directaudio tracking xbox comet amazon; do
|
||||
file="packs/$name.tar.zst"
|
||||
[ -f "$file" ] || { echo "::error::$name.tar.zst is missing from Build APK run $BUILD_RUN"; exit 1; }
|
||||
sha=$(sha256sum "$file" | cut -d' ' -f1)
|
||||
|
||||
@@ -15,6 +15,7 @@ app/src/main/jniLibs/arm64-v8a/.proot-outputs
|
||||
app/src/main/jniLibs/arm64-v8a/libproot-loader.so
|
||||
app/src/main/jniLibs/arm64-v8a/libdirectaudiorelay.so
|
||||
app/src/main/rust/stores/target/
|
||||
app/src/main/rust/amazon/target/
|
||||
app/src/main/assets/droiddeck-esync/
|
||||
|
||||
.kotlin/
|
||||
|
||||
@@ -9,16 +9,6 @@ DroidDeck brings the SteamOS experience to Android: Valve's Steam client in Big
|
||||
|
||||
<p align="center"><a href="https://discord.gg/JRGAvawjsm"><img src="https://img.shields.io/badge/Discord-Join%20the%20community-5865F2?logo=discord&logoColor=white" alt="Join the DroidDeck Discord"></a></p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://trendshift.io/repositories/267852?utm_source=trendshift-badge&utm_medium=badge&utm_campaign=badge-trendshift-267852" target="_blank" rel="noopener noreferrer"><img src="https://trendshift.io/api/badge/trendshift/repositories/267852/daily?language=C" alt="Droid-Deck%2FDroidDeck | Trendshift" width="250" height="55"/></a>
|
||||
<a href="https://trendshift.io/repositories/267852?utm_source=trendshift-badge&utm_medium=badge&utm_campaign=badge-trendshift-267852" target="_blank" rel="noopener noreferrer"><img src="https://trendshift.io/api/badge/trendshift/repositories/267852/daily?language=Kotlin" alt="Droid-Deck%2FDroidDeck | Trendshift" width="250" height="55"/></a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://trendshift.io/repositories/267852?utm_source=trendshift-badge&utm_medium=badge&utm_campaign=badge-trendshift-267852" target="_blank" rel="noopener noreferrer"><img src="https://trendshift.io/api/badge/trendshift/repositories/267852/weekly?language=C" alt="Droid-Deck%2FDroidDeck | Trendshift" width="250" height="55"/></a>
|
||||
<a href="https://trendshift.io/repositories/267852?utm_source=trendshift-badge&utm_medium=badge&utm_campaign=badge-trendshift-267852" target="_blank" rel="noopener noreferrer"><img src="https://trendshift.io/api/badge/trendshift/repositories/267852/weekly?language=Kotlin" alt="Droid-Deck%2FDroidDeck | Trendshift" width="250" height="55"/></a>
|
||||
</p>
|
||||
|
||||
<p align="center"><img src="docs/releases/media/0.2.0/launch-into-steam.gif" width="80%" alt="Tapping DroidDeck on the Android home screen and landing in Steam Big Picture"></p>
|
||||
|
||||
> Note: DroidDeck does not have a stand-alone website. Do not click on any download links from websites claiming to be the DroidDeck team.
|
||||
@@ -57,7 +47,7 @@ Compatibility and performance vary by device; hardware validation is limited. De
|
||||
|
||||
## Credits and licence
|
||||
|
||||
GPL-3.0. Runtime, shim, input, and controller work build on WinNative and Bannerlator (maxjivi05). Epic Games and GOG support build on [Phobos’s](https://github.com/phobos665) adaptation of [Legendary](https://github.com/legendary-gl/legendary) and [gogdl](https://github.com/Heroic-Games-Launcher/heroic-gogdl), respectively. The registry entries a GOG game's install script (`goggame-<id>.script`) sets are read the way [Heroic Games Launcher](https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher)'s GOG setup (GPL-3.0) reads them. LSFG frame generation is from the work of Camille LaVey and the [Eden](https://eden-emu.dev) emulator project, following [lsfg-vk](https://github.com/PancakeTAS/lsfg-vk), ported to WinNative and DroidDeck by [@maxjivi05](https://github.com/maxjivi05); it needs your own copy of [Lossless Scaling](https://store.steampowered.com/app/993090/) and ships none of its shaders. x86 AppImages, and any whose own runtime cannot unpack them, are unpacked with [uruntime](https://github.com/VHSgunzo/uruntime) by VHSgunzo (MIT), shipped unmodified with its licence, which also starts the arm64 emulator AppImages whose own runtime cannot run its extractor on Android. The Steam client's audio goes through [@The412Banner](https://github.com/The412Banner)'s [DirectAudio](https://github.com/The412Banner/directaudio) PulseAudio sink (LGPL-2.1-or-later), built from `tools/directaudio/sink` with its request size kept to its ring so clients are not asked to queue 100 ms ahead. mmap ring-buffer controller input was developed by ribbit384 ([WinNative #345](https://github.com/WinNative-Emu/WinNative/pull/345)). Why the x86-64 Steam client refused the arm64 client's sign-in was checked by reading Steam's saved token with the `ConnectCache` format from [deadlock-api-ingest](https://github.com/deadlock-api/deadlock-api-ingest). x86 programs that link OpenSSL 3 under FEX use the copy in the [Steam Linux Runtime 4.0](https://gitlab.steamos.cloud/steamrt/steamrt) platform. Hooks written with `WriteProcessMemory` into code [FEX](https://github.com/FEX-Emu/FEX) has translated go through `/proc/<pid>/mem` again when the kernel refuses `process_vm_writev`, as [Wine](https://gitlab.winehq.org/wine/wine)'s `server/ptrace.c` wrote them before Wine 11. x86 Linux games under FEX get the same `/etc/asound.conf` that [pressure-vessel](https://gitlab.steamos.cloud/steamrt/steam-runtime-tools) writes into the Steam Linux Runtime, so ALSA plays through PulseAudio. Games render with [Mesa](https://gitlab.freedesktop.org/mesa/mesa) Turnip's own per-render-pass choice between tile memory and system memory, while the Steam client keeps `TU_DEBUG=sysmem`; [FEX](https://github.com/FEX-Emu/FEX)'s code disk cache was checked in its source and is already on through Proton. The proot fast path picks the guest name of a host file bound under several names in the order [PRoot](https://github.com/proot-me/proot)'s `path/binding.c` (GPL-2.0-or-later) sorts its bindings, so links and `/proc/self/fd` read back as they do through proot. The session's [PipeWire](https://gitlab.freedesktop.org/pipewire/pipewire) (MIT) opens its sockets with the per-socket access settings documented in its `module-access.c`, and [WirePlumber](https://gitlab.freedesktop.org/pipewire/wireplumber) (MIT) keeps those clients at full permissions through its `access.rules`. Wine write watches use the userfaultfd support in [Proton](https://github.com/ValveSoftware/wine)'s `dlls/ntdll/unix/virtual.c` (LGPL-2.1-or-later): libblsession gives it the arm64 syscall number and answers its `PAGEMAP_SCAN` from `/proc/self/pagemap` where Android refuses the ioctl. Wine on arm64 sets a thread's full context by raising `SIGUSR2` from `syscall_dispatcher_return_slowpath` in [Wine](https://gitlab.winehq.org/wine/wine)'s `dlls/ntdll/unix/signal_arm64.c` (LGPL-2.1-or-later); libblsession runs that handler in place on a frame laid out as the [Linux](https://github.com/torvalds/linux) kernel's `arch/arm64/kernel/signal.c` builds it and returns through `rt_sigreturn`, so proot does not stop the thread for it. Wine's process list reads each process's memory counters from `/proc/<pid>/status` in `fill_vm_counters` ([Wine](https://gitlab.winehq.org/wine/wine) `dlls/ntdll/unix/process.c`, LGPL-2.1-or-later), so libblsession gives those reads the kernel's file instead of a copy with `TracerPid` cleared. droiddeck-ntsync is checked against the object, wait and error semantics documented for the [Linux](https://github.com/torvalds/linux) ntsync driver in `Documentation/userspace-api/ntsync.rst` (GPL-2.0). Xbox games load the Windows modules of [@domsvoboda](https://github.com/domsvoboda)'s [xodus-nexus](https://github.com/domsvoboda/xodus-nexus) runtime (LGPL-2.1-or-later), including its `wintypes.dll`, whose `ApiInformation` answer Minecraft for Windows needs to start; how Minecraft installs GameInput under Wine was checked against [@Wyze3306](https://github.com/Wyze3306)'s [BedrockOnLinuLine truncated
|
||||
GPL-3.0. Runtime, shim, input, and controller work build on WinNative and Bannerlator (maxjivi05). Epic Games and GOG support build on [Phobos’s](https://github.com/phobos665) adaptation of [Legendary](https://github.com/legendary-gl/legendary) and [gogdl](https://github.com/Heroic-Games-Launcher/heroic-gogdl), respectively. The registry entries a GOG game's install script (`goggame-<id>.script`) sets are read the way [Heroic Games Launcher](https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher)'s GOG setup (GPL-3.0) reads them. LSFG frame generation is from the work of Camille LaVey and the [Eden](https://eden-emu.dev) emulator project, following [lsfg-vk](https://github.com/PancakeTAS/lsfg-vk), ported to WinNative and DroidDeck by [@maxjivi05](https://github.com/maxjivi05); it needs your own copy of [Lossless Scaling](https://store.steampowered.com/app/993090/) and ships none of its shaders. x86 AppImages, and any whose own runtime cannot unpack them, are unpacked with [uruntime](https://github.com/VHSgunzo/uruntime) by VHSgunzo (MIT), shipped unmodified with its licence, which also starts the arm64 emulator AppImages whose own runtime cannot run its extractor on Android. The Steam client's audio goes through [@The412Banner](https://github.com/The412Banner)'s [DirectAudio](https://github.com/The412Banner/directaudio) PulseAudio sink (LGPL-2.1-or-later), built from `tools/directaudio/sink` with its request size kept to its ring so clients are not asked to queue 100 ms ahead. mmap ring-buffer controller input was developed by ribbit384 ([WinNative #345](https://github.com/WinNative-Emu/WinNative/pull/345)). Why the x86-64 Steam client refused the arm64 client's sign-in was checked by reading Steam's saved token with the `ConnectCache` format from [deadlock-api-ingest](https://github.com/deadlock-api/deadlock-api-ingest). x86 programs that link OpenSSL 3 under FEX use the copy in the [Steam Linux Runtime 4.0](https://gitlab.steamos.cloud/steamrt/steamrt) platform. Hooks written with `WriteProcessMemory` into code [FEX](https://github.com/FEX-Emu/FEX) has translated go through `/proc/<pid>/mem` again when the kernel refuses `process_vm_writev`, as [Wine](https://gitlab.winehq.org/wine/wine)'s `server/ptrace.c` wrote them before Wine 11. x86 Linux games under FEX get the same `/etc/asound.conf` that [pressure-vessel](https://gitlab.steamos.cloud/steamrt/steam-runtime-tools) writes into the Steam Linux Runtime, so ALSA plays through PulseAudio. Games render with [Mesa](https://gitlab.freedesktop.org/mesa/mesa) Turnip's own per-render-pass choice between tile memory and system memory, while the Steam client keeps `TU_DEBUG=sysmem`; [FEX](https://github.com/FEX-Emu/FEX)'s code disk cache was checked in its source and is already on through Proton. The proot fast path picks the guest name of a host file bound under several names in the order [PRoot](https://github.com/proot-me/proot)'s `path/binding.c` (GPL-2.0-or-later) sorts its bindings, so links and `/proc/self/fd` read back as they do through proot. The session's [PipeWire](https://gitlab.freedesktop.org/pipewire/pipewire) (MIT) opens its sockets with the per-socket access settings documented in its `module-access.c`, and [WirePlumber](https://gitlab.freedesktop.org/pipewire/wireplumber) (MIT) keeps those clients at full permissions through its `access.rules`. Wine write watches use the userfaultfd support in [Proton](https://github.com/ValveSoftware/wine)'s `dlls/ntdll/unix/virtual.c` (LGPL-2.1-or-later): libblsession gives it the arm64 syscall number and answers its `PAGEMAP_SCAN` from `/proc/self/pagemap` where Android refuses the ioctl. Wine on arm64 sets a thread's full context by raising `SIGUSR2` from `syscall_dispatcher_return_slowpath` in [Wine](https://gitlab.winehq.org/wine/wine)'s `dlls/ntdll/unix/signal_arm64.c` (LGPL-2.1-or-later); libblsession runs that handler in place on a frame laid out as the [Linux](https://github.com/torvalds/linux) kernel's `arch/arm64/kernel/signal.c` builds it and returns through `rt_sigreturn`, so proot does not stop the thread for it. Wine's process list reads each process's memory counters from `/proc/<pid>/status` in `fill_vm_counters` ([Wine](https://gitlab.winehq.org/wine/wine) `dlls/ntdll/unix/process.c`, LGPL-2.1-or-later), so libblsession gives those reads the kernel's file instead of a copy with `TracerPid` cleared. droiddeck-ntsync is checked against the object, wait and error semantics documented for the [Linux](https://github.com/torvalds/linux) ntsync driver in `Documentation/userspace-api/ntsync.rst` (GPL-2.0). See [LICENSE](LICENSE). Steam and Proton belong to Valve Corporation; this project is not affiliated with Valve.
|
||||
|
||||
XR glasses support builds on WinNative's VITURE glasses work. VITURE protocol details were checked against [XRLinuxDriver](https://github.com/wheaney/XRLinuxDriver) by [@wheaney](https://github.com/wheaney), including the VITURE protocol header it ships, [ar-drivers-rs](https://github.com/badicsalex/ar-drivers-rs) by [@badicsalex](https://github.com/badicsalex) and the [go-macos/iokit VITURE package](https://pkg.go.dev/github.com/go-macos/iokit/viture); the optional VITURE SDK belongs to VITURE and is not included. RayNeo support adapts [@informalTechCode](https://github.com/informalTechCode)'s [RayNeo-Air-Series-3DoF-Scaffold](https://github.com/informalTechCode/RayNeo-Air-Series-3DoF-Scaffold) (Apache-2.0) and references [@verncat](https://github.com/verncat)'s [RayNeo-Air-3S-Pro-OpenVR](https://github.com/verncat/RayNeo-Air-3S-Pro-OpenVR) (MIT) and [Monado](https://gitlab.freedesktop.org/monado/monado) (BSL-1.0); see [docs/third-party/rayneo](docs/third-party/rayneo/README.md). XREAL 1S support references [XRLinuxDriver](https://github.com/wheaney/XRLinuxDriver) and [xrealOneDeviceKit](https://github.com/wheaney/xrealOneDeviceKit) by @wheaney, [xreal_one_driver](https://github.com/rohitsangwan01/xreal_one_driver) by [@rohitsangwan01](https://github.com/rohitsangwan01) (MIT) and [xr-tools](https://github.com/0xcaff/xr-tools) by [@0xcaff](https://github.com/0xcaff). Rokid support follows the Rokid protocol notes in [ar-drivers-rs](https://github.com/badicsalex/ar-drivers-rs) and @badicsalex's [Void Computing write-ups](https://voidcomputing.hu/blog/worse-better-prettier/), and [Monado](https://gitlab.freedesktop.org/monado/monado)'s Rokid driver. The REDMAGIC glasses-display findings draw on [@mekhontsev](https://github.com/mekhontsev)'s [MagicDesk investigation](https://github.com/mekhontsev/magicdesk/blob/main/docs/xr-resolution-fix.md) and [@Coding-BR](https://github.com/Coding-BR)'s [decompiled Nubia kernel](https://github.com/Coding-BR/android_kernel_nubia_sm8850_qwjujube). VITURE, RayNeo, XREAL, Rokid and REDMAGIC are trademarks of their owners; this project is not affiliated with them.
|
||||
|
||||
@@ -66,5 +56,3 @@ Joy-Con VR controllers port the arm model of Google's [Google VR SDK for Unity](
|
||||
Camera hand tracking runs Google's [MediaPipe](https://github.com/google-ai-edge/mediapipe) Tasks Vision library with its Pose Landmarker (Lite) model, BlazePose GHUM 3D, and its Hand Landmarker model (all Apache-2.0), on frames from AndroidX [CameraX](https://developer.android.com/jetpack/androidx/releases/camera) (Apache-2.0); MediaPipe's usage reports are switched off. The design was checked against [@F8LEFT](https://github.com/F8LEFT)'s [JoyConVr](https://github.com/F8LEFT/JoyConVr) camera app (MIT), and the short Joy-Con movements follow the accelerometer mode of the [Google VR SDK for Unity](https://github.com/googlevr/gvr-unity-sdk)'s arm model, Eric Foxlin's zero-velocity updates and Frosio, Pedersini and Borghese's accelerometer autocalibration, and the camera and Joy-Con are joined by a Kalman filter (R. E. Kalman, 1960). Bare camera hands take their gestures after [ALVR](https://github.com/alvr-org/ALVR)'s `hand_gestures.rs` (MIT) and Meta Quest's menu pinch, with distances checked on photos from the [HaGRID](https://github.com/hukenovs/hagrid) gesture set (CC BY-SA 4.0, not included), fit the palm with Horn's quaternion method (1987) and smooth it with the 1€ filter (Casiez, Roussel and Vogel, 2012); the white glove model follows Valve's OpenVR render model reference and Index controller poses, is meshed with surface nets (Gibson, 1998; Mikola Lysenko) and blends and shades it with Inigo Quilez's smooth minimum and distance-field ambient occlusion, porting his polygon distance (MIT); see [docs/third-party/handtracking](docs/third-party/handtracking/README.md).
|
||||
|
||||
The Store installs and runs apps with [Flatpak](https://github.com/flatpak/flatpak) (LGPL-2.1). Its sandbox goes through DroidDeck's own bubblewrap shim, which follows how Flatpak hands bwrap its environment. Chromium and Electron apps from Flathub start their browser processes through [zypak](https://github.com/refi64/zypak) by [@refi64](https://github.com/refi64) (BSD-3-Clause); its source was read to see that it always spawns them through Flatpak's spawn portal, which is why DroidDeck starts them directly without Chromium's sandbox instead.
|
||||
|
||||
Steam's Browse buttons open a GTK 3 file chooser through PyGObject (LGPL-2.1-or-later). It runs under Steam's own `reaper` with Steam's app ID, which [gamescope](https://github.com/ValveSoftware/gamescope) (BSD-2-Clause) reads from the process tree (`GetAppIdFromReaper` in `src/Utils/Process.cpp`) to show it over Steam.
|
||||
+3
-2
@@ -87,7 +87,7 @@ def desktopKde = rootProject.file('tools/desktop-kde/release.env').readLines()
|
||||
def trackingPack = rootProject.file('tools/packs/tracking/release.env').readLines()
|
||||
.findAll { it.contains('=') && !it.startsWith('#') }
|
||||
.collectEntries { def kv = it.split('=', 2); [(kv[0].trim()): kv[1].trim()] }
|
||||
def addonPacks = ['proot', 'directaudio', 'tracking', 'xbox', 'comet'].collectEntries { name ->
|
||||
def addonPacks = ['proot', 'directaudio', 'tracking', 'xbox', 'comet', 'amazon'].collectEntries { name ->
|
||||
def pack = file("build/packs/${name}.tar.zst")
|
||||
if (!pack.isFile()) {
|
||||
if (ciBuild) throw new GradleException("Add-on pack ${pack} is missing: run tools/packs/build.sh app/build/packs")
|
||||
@@ -296,6 +296,7 @@ def buildRustStores = tasks.register('buildRustStores', Exec) {
|
||||
inputs.dir(rustCrateDir.dir('src'))
|
||||
inputs.files(rustCrateDir.file('Cargo.toml'), rustCrateDir.file('Cargo.lock'))
|
||||
inputs.property('ndkVersion', android.ndkVersion)
|
||||
inputs.property('storeFeatures', 'gog,epic')
|
||||
if (!skipRust) inputs.property('rustToolchain', providers.exec {
|
||||
environment 'PATH', "${System.getProperty('user.home')}/.cargo/bin${File.pathSeparator}${System.getenv('PATH')}"
|
||||
commandLine 'rustup', 'run', 'stable', 'rustc', '-Vv'
|
||||
@@ -311,7 +312,7 @@ def buildRustStores = tasks.register('buildRustStores', Exec) {
|
||||
}.standardOutput.asText.get().trim()
|
||||
commandLine 'rustup', 'run', 'stable', 'cargo', 'ndk', '--target', 'arm64-v8a', '--platform', '26',
|
||||
'--output-dir', rustJniLibsDir.get().asFile.absolutePath,
|
||||
'build', '--release', '--locked'
|
||||
'build', '--release', '--locked', '--no-default-features', '--features', 'gog,epic'
|
||||
}
|
||||
if (!skipRust) android.sourceSets.main.jniLibs.srcDir(rustJniLibsDir)
|
||||
tasks.named('preBuild').configure { dependsOn(buildRustStores) }
|
||||
|
||||
@@ -29,16 +29,11 @@
|
||||
<uses-feature android:name="android.hardware.camera.autofocus" android:required="false" />
|
||||
<uses-feature android:name="android.hardware.vr.headtracking" android:version="1" android:required="false" />
|
||||
|
||||
<queries>
|
||||
<package android:name="com.valvesoftware.steamlink" />
|
||||
</queries>
|
||||
|
||||
<application
|
||||
android:name=".App"
|
||||
android:localeConfig="@xml/locales_config"
|
||||
android:networkSecurityConfig="@xml/network_security_config"
|
||||
android:allowBackup="false"
|
||||
android:allowAudioPlaybackCapture="true"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:label="@string/app_name"
|
||||
android:theme="@style/AppTheme"
|
||||
@@ -49,8 +44,6 @@
|
||||
android:isGame="true">
|
||||
|
||||
<meta-data android:name="android.game_mode_config" android:resource="@xml/game_mode_config" />
|
||||
<activity android:name=".lan.LocalLanActivity" android:exported="false" />
|
||||
<service android:name=".lan.LocalHotspotService" android:exported="false" />
|
||||
<service android:name=".glasses.LumaRgbCaptureService" android:exported="false"
|
||||
android:process=":rgb_diagnostic" />
|
||||
<meta-data android:name="com.oculus.supportedDevices" android:value="quest2|quest3|quest3s" />
|
||||
|
||||
@@ -808,14 +808,10 @@ static uint32_t nominal_refresh_ns(void) {
|
||||
}
|
||||
|
||||
static int64_t presented_ns(int64_t render_ns) {
|
||||
int64_t tick = g_tick_vsync_ns;
|
||||
int64_t refresh = (int64_t)nominal_refresh_ns();
|
||||
if (!tick || render_ns - g_last_vsync_ns > refresh)
|
||||
if (!g_tick_vsync_ns || render_ns - g_last_vsync_ns > (int64_t)nominal_refresh_ns() ||
|
||||
render_ns < g_tick_vsync_ns)
|
||||
return render_ns;
|
||||
int64_t delta = render_ns - tick;
|
||||
if (delta > refresh || -delta > refresh)
|
||||
return render_ns;
|
||||
return tick;
|
||||
return g_tick_vsync_ns;
|
||||
}
|
||||
|
||||
static void feedback_present_all(struct wl_list *list, int64_t t) {
|
||||
|
||||
@@ -120,7 +120,7 @@ class FrontEndActivity : ComponentActivity() {
|
||||
private var glThread by mutableStateOf(true)
|
||||
private var noGlError by mutableStateOf(true)
|
||||
private var returnAfterGame by mutableStateOf(true)
|
||||
private var shaderPrecache by mutableStateOf<Boolean?>(null)
|
||||
private var shaderPrecache by mutableStateOf(true)
|
||||
private var steamRepairQueued by mutableStateOf(false)
|
||||
private var mangoapp by mutableStateOf(true)
|
||||
private var steamController by mutableStateOf(SessionPrefs.CONTROLLER_DECK)
|
||||
@@ -544,12 +544,12 @@ class FrontEndActivity : ComponentActivity() {
|
||||
}
|
||||
startActivity(Intent(this, SessionActivity::class.java).setAction(SessionService.ACTION_RESUME)
|
||||
.putExtra(SessionActivity.EXTRA_STEAMVR, steamVr)
|
||||
.returnTo(returnHome)
|
||||
.putExtra(SessionActivity.EXTRA_RETURN_HOME, returnHome)
|
||||
.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP or Intent.FLAG_ACTIVITY_SINGLE_TOP))
|
||||
return true
|
||||
}
|
||||
return startSession(Intent(this, SessionActivity::class.java)
|
||||
.returnTo(returnHome)
|
||||
.putExtra(SessionActivity.EXTRA_RETURN_HOME, returnHome)
|
||||
.apply {
|
||||
if (game.gameIdString == com.droiddeck.launcher.gpu.SteamVr.APP_ID) {
|
||||
putExtra(SessionActivity.EXTRA_STEAMVR, true)
|
||||
@@ -560,12 +560,6 @@ class FrontEndActivity : ComponentActivity() {
|
||||
}, steamSession = true)
|
||||
}
|
||||
|
||||
private fun Intent.returnTo(returnHome: Boolean): Intent {
|
||||
val task = taskId
|
||||
return putExtra(SessionActivity.EXTRA_RETURN_HOME, returnHome)
|
||||
.apply { if (returnHome) putExtra(SessionActivity.EXTRA_LINK_TASK, task) }
|
||||
}
|
||||
|
||||
private fun launchWithoutSteam(game: Library.SteamGame, returnHome: Boolean): Boolean {
|
||||
val app = applicationContext
|
||||
Thread({
|
||||
@@ -579,7 +573,7 @@ class FrontEndActivity : ComponentActivity() {
|
||||
}
|
||||
com.droiddeck.launcher.session.NoSteamLaunch.remember(command)
|
||||
val next = Intent(this, SessionActivity::class.java)
|
||||
.returnTo(returnHome)
|
||||
.putExtra(SessionActivity.EXTRA_RETURN_HOME, returnHome)
|
||||
.putExtra(SessionService.EXTRA_MODE, SessionService.MODE_RUN)
|
||||
.putExtra(SessionService.EXTRA_PROGRAM, command.program)
|
||||
.putExtra(SessionService.EXTRA_PROGRAM_ARGS, command.args.toTypedArray())
|
||||
@@ -588,7 +582,7 @@ class FrontEndActivity : ComponentActivity() {
|
||||
SessionState.stopRequested -> android.widget.Toast.makeText(this, R.string.game_link_session_busy, android.widget.Toast.LENGTH_LONG).show()
|
||||
SessionState.mode == SessionService.MODE_RUN && SessionState.program == command.program && SessionState.programArgs == command.args ->
|
||||
startActivity(Intent(this, SessionActivity::class.java).setAction(SessionService.ACTION_RESUME)
|
||||
.returnTo(returnHome)
|
||||
.putExtra(SessionActivity.EXTRA_RETURN_HOME, returnHome)
|
||||
.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP or Intent.FLAG_ACTIVITY_SINGLE_TOP))
|
||||
else -> pendingSwitch = next
|
||||
}
|
||||
@@ -1733,7 +1727,7 @@ class FrontEndActivity : ComponentActivity() {
|
||||
onSteamClientArch = { id ->
|
||||
SessionPrefs.setSteamClientArch(this, id)
|
||||
steamClientArch = id
|
||||
loadShaderPrecache(mode)
|
||||
shaderPrecache = SessionPrefs.shaderPrecache(this)
|
||||
refresh()
|
||||
},
|
||||
onMangoapp = { on -> SessionPrefs.setMangoapp(this, on); mangoapp = on },
|
||||
@@ -1895,19 +1889,6 @@ class FrontEndActivity : ComponentActivity() {
|
||||
private var pipAutoEnter by mutableStateOf(false)
|
||||
private var unfoldedControls by mutableStateOf(false)
|
||||
private var unfoldedControlsWithController by mutableStateOf(false)
|
||||
private var shaderPrecacheGeneration = 0
|
||||
|
||||
private fun loadShaderPrecache(mode: String) {
|
||||
val generation = ++shaderPrecacheGeneration
|
||||
shaderPrecache = null
|
||||
if (mode != SessionService.MODE_STEAM) return
|
||||
Thread({
|
||||
val precache = SessionPrefs.shaderPrecache(this)
|
||||
ui.post {
|
||||
if (!isDestroyed && generation == shaderPrecacheGeneration) shaderPrecache = precache
|
||||
}
|
||||
}, "shader-precache").start()
|
||||
}
|
||||
|
||||
private fun loadModeSettings(mode: String) {
|
||||
pipAutoEnter = SessionPrefs.pipAutoEnter(this)
|
||||
@@ -1923,7 +1904,7 @@ class FrontEndActivity : ComponentActivity() {
|
||||
steamRepairQueued = SteamRepair.queued(this)
|
||||
mangoapp = SessionPrefs.mangoapp(this)
|
||||
returnAfterGame = SessionPrefs.returnAfterGame(this)
|
||||
loadShaderPrecache(mode)
|
||||
shaderPrecache = SessionPrefs.shaderPrecache(this)
|
||||
steamController = SessionPrefs.steamController(this)
|
||||
runSteamAtStartup = SessionPrefs.runSteamAtStartup(this)
|
||||
loadBootMovie()
|
||||
|
||||
@@ -1926,7 +1926,6 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
|
||||
SessionState.relaunch?.let { next ->
|
||||
SessionState.relaunch = null
|
||||
next.putExtra(EXTRA_RETURN_HOME, intent.getBooleanExtra(EXTRA_RETURN_HOME, false))
|
||||
next.putExtra(EXTRA_LINK_TASK, intent.getIntExtra(EXTRA_LINK_TASK, -1))
|
||||
setIntent(next)
|
||||
recreate()
|
||||
return@runOnUiThread
|
||||
@@ -3028,7 +3027,6 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
|
||||
return
|
||||
}
|
||||
if (this.intent.getBooleanExtra(EXTRA_RETURN_HOME, false)) intent.putExtra(EXTRA_RETURN_HOME, true)
|
||||
if (!intent.hasExtra(EXTRA_LINK_TASK)) intent.putExtra(EXTRA_LINK_TASK, this.intent.getIntExtra(EXTRA_LINK_TASK, -1))
|
||||
setIntent(intent)
|
||||
if (intent.getBooleanExtra(EXTRA_STEAMVR, false) && SessionState.mode == SessionService.MODE_STEAM) {
|
||||
SessionState.steamVr = true
|
||||
@@ -3551,33 +3549,17 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
|
||||
}
|
||||
return
|
||||
}
|
||||
super.finish()
|
||||
if (!closeAtOnce && intent.getBooleanExtra(EXTRA_RETURN_HOME, false)) {
|
||||
com.droiddeck.launcher.ui.QuitFlood.take()
|
||||
com.droiddeck.launcher.ui.LaunchOrigin.flooding = null
|
||||
closeLinkTasks()
|
||||
if (!isTaskRoot) moveTaskToBack(true)
|
||||
super.finishAndRemoveTask()
|
||||
} else super.finish()
|
||||
startActivity(Intent(Intent.ACTION_MAIN).addCategory(Intent.CATEGORY_HOME)
|
||||
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK))
|
||||
}
|
||||
if (quitFlooded) overridePendingTransition(0, 0)
|
||||
else overridePendingTransition(R.anim.session_hold, R.anim.session_sink)
|
||||
}
|
||||
|
||||
private fun closeLinkTasks() {
|
||||
val linkTask = intent.getIntExtra(EXTRA_LINK_TASK, -1)
|
||||
if (linkTask == -1) return
|
||||
val tasks = runCatching { getSystemService(android.app.ActivityManager::class.java)?.appTasks }.getOrNull().orEmpty()
|
||||
for (task in tasks) {
|
||||
runCatching {
|
||||
val info = task.taskInfo
|
||||
@Suppress("DEPRECATION")
|
||||
val id = if (android.os.Build.VERSION.SDK_INT >= 29) info.taskId else info.persistentId
|
||||
val base = info.baseIntent
|
||||
if (id == linkTask && base.component?.className == FrontEndActivity::class.java.name &&
|
||||
com.droiddeck.launcher.frontend.GameLaunchIntent.accepts(base.action)) task.finishAndRemoveTask()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun completeLeave() {
|
||||
if (isFinishing) return
|
||||
val signal = com.droiddeck.launcher.ui.Themes.current(this).signal
|
||||
@@ -3589,7 +3571,6 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
|
||||
|
||||
companion object {
|
||||
const val EXTRA_RETURN_HOME = "returnHome"
|
||||
const val EXTRA_LINK_TASK = "linkTask"
|
||||
const val EXTRA_STEAMVR = "steamVr"
|
||||
const val EXTRA_REPAIR_RUNTIME = "repairRuntime"
|
||||
private const val LEAVE_TIMEOUT_MS = 1_500L
|
||||
|
||||
@@ -146,5 +146,7 @@ internal class AddonPack(
|
||||
listOf("version", "xodus-cli", "xodus-service"))
|
||||
val COMET = AddonPack("comet", BuildConfig.PACK_COMET_SHA256, BuildConfig.PACK_COMET_SIZE,
|
||||
listOf("version", "comet"))
|
||||
val AMAZON = AddonPack("amazon", BuildConfig.PACK_AMAZON_SHA256, BuildConfig.PACK_AMAZON_SIZE,
|
||||
listOf("engine.json", "libdroiddeckamazon.so"), reuseDeviceCopy = false)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.droiddeck.launcher.core
|
||||
|
||||
import com.droiddeck.launcher.gpu.GpuInfo
|
||||
import com.droiddeck.launcher.gpu.SocNames
|
||||
|
||||
object CpuAllocationDefaults {
|
||||
data class Allocation(val client: String, val game: String)
|
||||
|
||||
val device: Allocation? by lazy {
|
||||
forDevice(SocNames.model(), GpuInfo.systemProperty("ro.board.platform"),
|
||||
CpuCores.all.associateWith(CpuCores::maxGhz))
|
||||
}
|
||||
|
||||
fun forDevice(model: String, platform: String, frequencies: Map<Int, Double?>): Allocation? {
|
||||
val chip = model.trim().uppercase().substringBefore('-')
|
||||
val gen2 = chip in setOf("SM8550", "QCS8550") ||
|
||||
(chip.isEmpty() && platform.trim().equals("kalama", ignoreCase = true))
|
||||
if (!gen2 || frequencies.size != 8 || frequencies.keys.any { it < 0 } ||
|
||||
frequencies.values.any { it == null || !it.isFinite() || it <= 0.0 }) return null
|
||||
val clusters = frequencies.entries.groupBy { it.value }.toSortedMap(compareBy { it ?: 0.0 }).values.toList()
|
||||
if (clusters.map { it.size } != listOf(3, 4, 1)) return null
|
||||
return Allocation(
|
||||
client = CpuCores.format(clusters[2].map { it.key }.toSet()),
|
||||
game = CpuCores.format(clusters[1].map { it.key }.toSet()),
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -152,17 +152,13 @@ object DeviceReport {
|
||||
k("RAM total", FileUtils.sizeToString(mi.totalMem))
|
||||
k("RAM available", FileUtils.sizeToString(mi.availMem))
|
||||
}
|
||||
val pm = runCatching { context.getSystemService(Context.POWER_SERVICE) as? PowerManager }.getOrNull()
|
||||
if (pm != null) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
|
||||
k("Thermal status", runCatching { thermalStatusName(pm.currentThermalStatus) }.getOrNull())
|
||||
}
|
||||
runCatching {
|
||||
val pm = context.getSystemService(Context.POWER_SERVICE) as PowerManager
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) k("Thermal status", thermalStatusName(pm.currentThermalStatus))
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
|
||||
k("Thermal headroom (10 s)", runCatching {
|
||||
pm.getThermalHeadroom(10).let { if (it.isNaN()) "not reported" else String.format(Locale.US, "%.2f", it) }
|
||||
}.getOrNull())
|
||||
k("Thermal headroom (10 s)", pm.getThermalHeadroom(10).let { if (it.isNaN()) "not reported" else String.format(Locale.US, "%.2f", it) })
|
||||
}
|
||||
k("Power saver", runCatching { pm.isPowerSaveMode }.getOrNull())
|
||||
k("Power saver", pm.isPowerSaveMode)
|
||||
}
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
|
||||
val rate = runCatching { context.getSystemService(PerformanceHintManager::class.java)?.preferredUpdateRateNanos }.getOrNull()
|
||||
|
||||
@@ -387,17 +387,11 @@ object AddedGames {
|
||||
}
|
||||
}
|
||||
|
||||
private class LoginUser(val id: String, val mostRecent: Boolean, val autoLogin: Boolean, val timestamp: Long)
|
||||
|
||||
internal fun accountConfig(root: File): File? {
|
||||
val users = runCatching { File(root, "config/loginusers.vdf").readText() }.getOrDefault("")
|
||||
val recent = Regex(""""(\d{5,})"\s*\{([^}]*)\}""").findAll(users).map {
|
||||
val body = it.groupValues[2]
|
||||
LoginUser(it.groupValues[1], Regex(""""MostRecent"\s*"1"""").containsMatchIn(body), Regex(""""AutoLogin"\s*"1"""").containsMatchIn(body),
|
||||
Regex(""""timestamp"\s*"(\d+)"""").find(body)?.groupValues?.get(1)?.toLongOrNull() ?: 0L)
|
||||
}.filter { it.mostRecent || it.autoLogin || it.timestamp > 0 }.toList().asReversed()
|
||||
.maxWithOrNull(compareBy<LoginUser>({ it.mostRecent }, { it.autoLogin }, { it.timestamp }))
|
||||
val account = recent?.id?.toLongOrNull()?.let { (it - 76561197960265728L).toString() }
|
||||
val recent = Regex(""""(\d{5,})"\s*\{([^}]*)\}""").findAll(users)
|
||||
.lastOrNull { Regex(""""MostRecent"\s*"1"""").containsMatchIn(it.groupValues[2]) }
|
||||
val account = recent?.groupValues?.get(1)?.toLongOrNull()?.let { (it - 76561197960265728L).toString() }
|
||||
?: File(root, "userdata").list()?.filter { it.isNotEmpty() && it.all(Char::isDigit) && it != "0" }?.singleOrNull()
|
||||
return account?.let { File(root, "userdata/$it/config") }
|
||||
}
|
||||
|
||||
@@ -46,14 +46,12 @@ object Library {
|
||||
1054830,
|
||||
1070560,
|
||||
1113280,
|
||||
1161040,
|
||||
1245040,
|
||||
1391110,
|
||||
1420170,
|
||||
1493710,
|
||||
1580130,
|
||||
1628350,
|
||||
1826330,
|
||||
1887720,
|
||||
2180100,
|
||||
228980,
|
||||
@@ -123,9 +121,8 @@ object Library {
|
||||
val name = NAME.find(text)?.groupValues?.get(1)?.trim().orEmpty()
|
||||
val flags = STATE.find(text)?.groupValues?.get(1)?.toIntOrNull() ?: 0
|
||||
if (name.isEmpty() || flags and 4 == 0) return@forEach
|
||||
val images = SteamCacheImages(File(cache, appId.toString()))
|
||||
val art = images.find(STEAM_CAPSULES)
|
||||
val hero = images.find(STEAM_HEROES)
|
||||
val art = steamCacheImage(cache, appId, STEAM_CAPSULES)
|
||||
val hero = steamCacheImage(cache, appId, STEAM_HEROES)
|
||||
val lastPlayed = LAST_PLAYED.find(text)?.groupValues?.get(1)?.toLongOrNull() ?: 0L
|
||||
val installDir = INSTALL_DIR.find(text)?.groupValues?.get(1)?.trim()
|
||||
?.takeIf { it.isNotEmpty() && it != "." && it != ".." && '/' !in it && '\\' !in it }
|
||||
@@ -134,8 +131,9 @@ object Library {
|
||||
appId, name, art, label, hero = hero, lastPlayed = lastPlayed,
|
||||
gameFiles = gameFiles,
|
||||
protonPrefix = protonPrefix(context, appId.toLong(), library, roots),
|
||||
icon = images.icon(),
|
||||
logo = images.find(STEAM_LOGOS),
|
||||
icon = steamCacheImage(cache, appId, listOf("icon.jpg", "icon.png"))
|
||||
?: File(cache, appId.toString()).listFiles()?.firstOrNull { it.isFile && STEAM_ICON.matches(it.name) },
|
||||
logo = steamCacheImage(cache, appId, STEAM_LOGOS),
|
||||
))
|
||||
}
|
||||
}
|
||||
@@ -212,19 +210,13 @@ object Library {
|
||||
)
|
||||
}
|
||||
|
||||
internal fun steamCacheImage(cache: File, appId: Int, names: List<String>): File? =
|
||||
SteamCacheImages(File(cache, appId.toString())).find(names)
|
||||
|
||||
internal class SteamCacheImages(appDir: File) {
|
||||
private val entries = appDir.listFiles().orEmpty()
|
||||
private val dirs = listOf(appDir) + entries.filter { it.isDirectory }.sortedBy { it.name }
|
||||
|
||||
fun find(names: List<String>): File? = names.asSequence()
|
||||
internal fun steamCacheImage(cache: File, appId: Int, names: List<String>): File? {
|
||||
val appDir = File(cache, appId.toString())
|
||||
val dirs = listOf(appDir) + appDir.listFiles()
|
||||
.orEmpty().filter { it.isDirectory }.sortedBy { it.name }
|
||||
return names.asSequence()
|
||||
.flatMap { name -> dirs.asSequence().map { File(it, name) } }
|
||||
.firstOrNull { it.isFile && it.length() > 0L }
|
||||
|
||||
fun icon(): File? = find(listOf("icon.jpg", "icon.png"))
|
||||
?: entries.firstOrNull { it.isFile && STEAM_ICON.matches(it.name) }
|
||||
}
|
||||
|
||||
private class Spec(val id: String, val name: String, val system: String, val program: String, val folders: List<String>, val exts: Set<String>, val atPanel: Boolean = false)
|
||||
|
||||
@@ -1,127 +0,0 @@
|
||||
package com.droiddeck.launcher.lan
|
||||
|
||||
import android.Manifest
|
||||
import android.app.Notification
|
||||
import android.app.NotificationChannel
|
||||
import android.app.NotificationManager
|
||||
import android.app.PendingIntent
|
||||
import android.app.Service
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.content.pm.PackageManager
|
||||
import android.location.LocationManager
|
||||
import android.net.wifi.WifiManager
|
||||
import android.os.Build
|
||||
import android.os.Handler
|
||||
import android.os.IBinder
|
||||
import android.os.Looper
|
||||
import com.droiddeck.launcher.R
|
||||
|
||||
class LocalHotspotService : Service() {
|
||||
private var reservation: WifiManager.LocalOnlyHotspotReservation? = null
|
||||
private var requesting = false
|
||||
private var alive = false
|
||||
|
||||
override fun onBind(intent: Intent?): IBinder? = null
|
||||
|
||||
override fun onCreate() {
|
||||
super.onCreate()
|
||||
alive = true
|
||||
val notifications = getSystemService(NotificationManager::class.java)
|
||||
notifications.createNotificationChannel(NotificationChannel(CHANNEL, getString(R.string.lan_title), NotificationManager.IMPORTANCE_LOW))
|
||||
val open = PendingIntent.getActivity(this, 0, Intent(this, LocalLanActivity::class.java), PendingIntent.FLAG_IMMUTABLE)
|
||||
val stop = PendingIntent.getService(this, 0, Intent(this, LocalHotspotService::class.java).setAction(STOP), PendingIntent.FLAG_IMMUTABLE)
|
||||
startForeground(1842, Notification.Builder(this, CHANNEL)
|
||||
.setSmallIcon(R.drawable.ic_stat_session)
|
||||
.setContentTitle(getString(R.string.lan_title))
|
||||
.setContentText(getString(R.string.lan_notification))
|
||||
.setContentIntent(open).setOngoing(true)
|
||||
.addAction(Notification.Action.Builder(null, getString(R.string.lan_stop), stop).build())
|
||||
.build())
|
||||
}
|
||||
|
||||
@Suppress("DEPRECATION")
|
||||
override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
|
||||
if (intent?.action == STOP) {
|
||||
stopSelf()
|
||||
return START_NOT_STICKY
|
||||
}
|
||||
if (requesting || reservation != null) return START_NOT_STICKY
|
||||
if (checkSelfPermission(Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
|
||||
fail(R.string.lan_permission_needed)
|
||||
return START_NOT_STICKY
|
||||
}
|
||||
if (Build.VERSION.SDK_INT >= 28 && !getSystemService(LocationManager::class.java).isLocationEnabled) {
|
||||
fail(R.string.lan_location_needed)
|
||||
return START_NOT_STICKY
|
||||
}
|
||||
requesting = true
|
||||
LocalLan.hotspotState.value = HotspotState(starting = true)
|
||||
try {
|
||||
val wifi = applicationContext.getSystemService(Context.WIFI_SERVICE) as? WifiManager
|
||||
if (wifi == null) fail(R.string.lan_failed)
|
||||
else wifi.startLocalOnlyHotspot(object : WifiManager.LocalOnlyHotspotCallback() {
|
||||
override fun onStarted(ready: WifiManager.LocalOnlyHotspotReservation) {
|
||||
if (!alive) {
|
||||
ready.close()
|
||||
return
|
||||
}
|
||||
requesting = false
|
||||
reservation = ready
|
||||
val ssid: String?
|
||||
val password: String?
|
||||
if (Build.VERSION.SDK_INT >= 30) {
|
||||
ssid = ready.softApConfiguration.ssid
|
||||
password = ready.softApConfiguration.passphrase
|
||||
} else {
|
||||
ssid = ready.wifiConfiguration?.SSID
|
||||
password = ready.wifiConfiguration?.preSharedKey
|
||||
}
|
||||
if (ssid.isNullOrEmpty() || password.isNullOrEmpty()) fail(R.string.lan_failed)
|
||||
else LocalLan.hotspotState.value = HotspotState(ssid = ssid, password = password)
|
||||
}
|
||||
|
||||
override fun onStopped() {
|
||||
if (!alive) return
|
||||
LocalLan.hotspotState.value = HotspotState()
|
||||
stopSelf()
|
||||
}
|
||||
|
||||
override fun onFailed(reason: Int) {
|
||||
if (alive) fail(when (reason) {
|
||||
ERROR_INCOMPATIBLE_MODE -> R.string.lan_incompatible
|
||||
ERROR_TETHERING_DISALLOWED -> R.string.lan_disallowed
|
||||
ERROR_NO_CHANNEL -> R.string.lan_no_channel
|
||||
else -> R.string.lan_failed
|
||||
})
|
||||
}
|
||||
}, Handler(Looper.getMainLooper()))
|
||||
} catch (_: SecurityException) {
|
||||
fail(R.string.lan_permission_needed)
|
||||
} catch (_: IllegalStateException) {
|
||||
fail(R.string.lan_incompatible)
|
||||
} catch (_: UnsupportedOperationException) {
|
||||
fail(R.string.lan_failed)
|
||||
}
|
||||
return START_NOT_STICKY
|
||||
}
|
||||
|
||||
private fun fail(message: Int) {
|
||||
LocalLan.hotspotState.value = HotspotState(error = message)
|
||||
stopSelf()
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
alive = false
|
||||
reservation?.close()
|
||||
reservation = null
|
||||
requesting = false
|
||||
LocalLan.hotspotState.value = HotspotState(error = LocalLan.hotspot.value.error)
|
||||
super.onDestroy()
|
||||
}
|
||||
|
||||
companion object {
|
||||
private const val CHANNEL = "local-lan"
|
||||
private const val STOP = "com.droiddeck.launcher.lan.STOP"
|
||||
}
|
||||
}
|
||||
@@ -1,61 +0,0 @@
|
||||
package com.droiddeck.launcher.lan
|
||||
|
||||
import android.content.Context
|
||||
import android.net.wifi.WifiManager
|
||||
import kotlinx.coroutines.flow.MutableStateFlow
|
||||
import kotlinx.coroutines.flow.asStateFlow
|
||||
import java.net.Inet4Address
|
||||
import java.net.InetAddress
|
||||
import java.net.NetworkInterface
|
||||
import java.net.SocketException
|
||||
|
||||
data class LanAddress(val address: InetAddress, val prefixLength: Int)
|
||||
|
||||
data class LanInterface(
|
||||
val name: String,
|
||||
val index: Int,
|
||||
val mtu: Int,
|
||||
val addresses: List<LanAddress>,
|
||||
)
|
||||
|
||||
data class HotspotState(val starting: Boolean = false, val ssid: String? = null, val password: String? = null, val error: Int? = null)
|
||||
|
||||
object LocalLan {
|
||||
private val selection = MutableStateFlow<String?>(null)
|
||||
val selected = selection.asStateFlow()
|
||||
internal val hotspotState = MutableStateFlow(HotspotState())
|
||||
val hotspot = hotspotState.asStateFlow()
|
||||
private var multicast: WifiManager.MulticastLock? = null
|
||||
|
||||
@Synchronized fun select(name: String?, context: Context? = null) {
|
||||
multicast?.let { if (it.isHeld) it.release() }
|
||||
multicast = null
|
||||
if (name != null && context != null) {
|
||||
val wifi = context.applicationContext.getSystemService(Context.WIFI_SERVICE) as? WifiManager
|
||||
multicast = wifi?.createMulticastLock("droiddeck-lan")?.apply {
|
||||
setReferenceCounted(false)
|
||||
acquire()
|
||||
}
|
||||
}
|
||||
selection.value = name
|
||||
}
|
||||
|
||||
fun interfaces(): List<LanInterface> = try {
|
||||
NetworkInterface.getNetworkInterfaces()?.toList().orEmpty().mapNotNull { network ->
|
||||
val addresses = network.interfaceAddresses.filter {
|
||||
it.address is Inet4Address && usableAddress(it.address as Inet4Address, it.networkPrefixLength.toInt())
|
||||
}.map { LanAddress(it.address, it.networkPrefixLength.toInt()) }
|
||||
if (!network.isUp || network.isLoopback || network.isPointToPoint || addresses.isEmpty() || network.index <= 1) null
|
||||
else LanInterface(network.name, network.index, network.mtu.coerceAtLeast(576), addresses)
|
||||
}.sortedBy { it.name }
|
||||
} catch (_: SocketException) {
|
||||
emptyList()
|
||||
} catch (_: SecurityException) {
|
||||
emptyList()
|
||||
}
|
||||
|
||||
internal fun usableAddress(address: Inet4Address, prefix: Int) =
|
||||
(address.isSiteLocalAddress || address.isLinkLocalAddress) && prefix in 1..32
|
||||
|
||||
internal fun selectedInterface() = selected.value?.let { name -> interfaces().firstOrNull { it.name == name } }
|
||||
}
|
||||
@@ -1,162 +0,0 @@
|
||||
package com.droiddeck.launcher.lan
|
||||
|
||||
import android.Manifest
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.content.pm.PackageManager
|
||||
import android.os.Bundle
|
||||
import android.provider.Settings
|
||||
import androidx.activity.ComponentActivity
|
||||
import androidx.activity.compose.rememberLauncherForActivityResult
|
||||
import androidx.activity.compose.setContent
|
||||
import androidx.activity.result.contract.ActivityResultContracts
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.fillMaxSize
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.rememberScrollState
|
||||
import androidx.compose.foundation.text.selection.SelectionContainer
|
||||
import androidx.compose.foundation.verticalScroll
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.material3.Surface
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.LaunchedEffect
|
||||
import androidx.compose.runtime.collectAsState
|
||||
import androidx.compose.runtime.getValue
|
||||
import androidx.compose.runtime.mutableStateOf
|
||||
import androidx.compose.runtime.remember
|
||||
import androidx.compose.runtime.setValue
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.unit.dp
|
||||
import com.droiddeck.launcher.R
|
||||
import com.droiddeck.launcher.SessionActivity
|
||||
import com.droiddeck.launcher.core.AppLanguage
|
||||
import com.droiddeck.launcher.session.SessionPrefs
|
||||
import com.droiddeck.launcher.session.SessionService
|
||||
import com.droiddeck.launcher.session.SessionState
|
||||
import com.droiddeck.launcher.ui.ActionRow
|
||||
import com.droiddeck.launcher.ui.DroidDeckTheme
|
||||
import com.droiddeck.launcher.ui.Note
|
||||
import com.droiddeck.launcher.ui.PrimaryButton
|
||||
import com.droiddeck.launcher.ui.SecondaryButton
|
||||
import com.droiddeck.launcher.ui.SettingsGroup
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.delay
|
||||
import kotlinx.coroutines.withContext
|
||||
|
||||
class LocalLanActivity : ComponentActivity() {
|
||||
private var clientInstalled by mutableStateOf(false)
|
||||
private var hostRunning by mutableStateOf(false)
|
||||
|
||||
override fun attachBaseContext(base: Context) = super.attachBaseContext(AppLanguage.wrap(base))
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContent {
|
||||
DroidDeckTheme(SessionPrefs.theme(this)) {
|
||||
Surface(Modifier.fillMaxSize()) { LanSetup() }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
clientInstalled = SteamLinkCoop.clientIntent(this) != null
|
||||
hostRunning = SessionState.running && SessionState.mode == SessionService.MODE_STEAM
|
||||
}
|
||||
|
||||
@Composable
|
||||
private fun LanSetup() {
|
||||
val hotspot by LocalLan.hotspot.collectAsState()
|
||||
val selected by LocalLan.selected.collectAsState()
|
||||
var interfaces by remember { mutableStateOf(emptyList<LanInterface>()) }
|
||||
var denied by remember { mutableStateOf(false) }
|
||||
val permission = rememberLauncherForActivityResult(ActivityResultContracts.RequestPermission()) { granted ->
|
||||
denied = !granted
|
||||
if (granted) startHotspot()
|
||||
}
|
||||
LaunchedEffect(Unit) {
|
||||
while (true) {
|
||||
interfaces = withContext(Dispatchers.IO) { LocalLan.interfaces() }
|
||||
hostRunning = SessionState.running && SessionState.mode == SessionService.MODE_STEAM
|
||||
delay(2000)
|
||||
}
|
||||
}
|
||||
Column(Modifier.verticalScroll(rememberScrollState()).padding(20.dp), verticalArrangement = Arrangement.spacedBy(12.dp)) {
|
||||
Text(stringResource(R.string.lan_title), style = MaterialTheme.typography.headlineSmall)
|
||||
Note(stringResource(R.string.lan_experimental))
|
||||
SteamLinkCoopPanel(
|
||||
hostAddress = interfaces.firstOrNull { it.name == selected }?.addresses?.firstOrNull()?.address?.hostAddress,
|
||||
hostRunning = hostRunning,
|
||||
clientInstalled = clientInstalled,
|
||||
onHost = {
|
||||
if (SessionState.running && SessionState.mode == SessionService.MODE_STEAM) {
|
||||
startActivity(Intent(this@LocalLanActivity, SessionActivity::class.java)
|
||||
.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT))
|
||||
} else finish()
|
||||
},
|
||||
onClient = {
|
||||
if (!SteamLinkCoop.openClientOrStore(this@LocalLanActivity)) {
|
||||
android.widget.Toast.makeText(this@LocalLanActivity, R.string.lan_coop_client_unavailable, android.widget.Toast.LENGTH_LONG).show()
|
||||
}
|
||||
},
|
||||
)
|
||||
SettingsGroup(stringResource(R.string.lan_wireless)) {
|
||||
Column(Modifier.padding(14.dp), verticalArrangement = Arrangement.spacedBy(10.dp)) {
|
||||
Text(stringResource(R.string.lan_wireless_help))
|
||||
if (hotspot.ssid != null) {
|
||||
SelectionContainer { Text(stringResource(R.string.lan_credentials, hotspot.ssid!!, hotspot.password.orEmpty())) }
|
||||
}
|
||||
if (hotspot.starting || hotspot.ssid != null) {
|
||||
SecondaryButton(stringResource(R.string.lan_stop)) { stopService(Intent(this@LocalLanActivity, LocalHotspotService::class.java)) }
|
||||
} else {
|
||||
PrimaryButton(stringResource(R.string.lan_host)) {
|
||||
denied = false
|
||||
if (checkSelfPermission(Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED) startHotspot()
|
||||
else permission.launch(Manifest.permission.ACCESS_FINE_LOCATION)
|
||||
}
|
||||
}
|
||||
if (hotspot.starting) Text(stringResource(R.string.lan_starting))
|
||||
hotspot.error?.let { Text(stringResource(it), color = MaterialTheme.colorScheme.error) }
|
||||
if (denied) {
|
||||
Text(stringResource(R.string.lan_permission_needed))
|
||||
SecondaryButton(stringResource(R.string.lan_app_settings)) {
|
||||
openSettings(Settings.ACTION_APPLICATION_DETAILS_SETTINGS, android.net.Uri.parse("package:$packageName"))
|
||||
}
|
||||
}
|
||||
SecondaryButton(stringResource(R.string.lan_wifi_settings)) { openSettings(Settings.ACTION_WIFI_SETTINGS) }
|
||||
SecondaryButton(stringResource(R.string.lan_location_settings)) { openSettings(Settings.ACTION_LOCATION_SOURCE_SETTINGS) }
|
||||
}
|
||||
}
|
||||
SettingsGroup(stringResource(R.string.lan_wired)) {
|
||||
Column(Modifier.padding(14.dp), verticalArrangement = Arrangement.spacedBy(10.dp)) {
|
||||
Text(stringResource(R.string.lan_wired_help))
|
||||
SecondaryButton(stringResource(R.string.lan_network_settings)) { openSettings(Settings.ACTION_WIRELESS_SETTINGS) }
|
||||
}
|
||||
}
|
||||
SettingsGroup(stringResource(R.string.lan_interface)) {
|
||||
Column(Modifier.padding(14.dp), verticalArrangement = Arrangement.spacedBy(10.dp)) {
|
||||
Text(stringResource(R.string.lan_interface_help))
|
||||
if (interfaces.isEmpty()) Text(stringResource(R.string.lan_no_interfaces))
|
||||
if (selected != null && interfaces.none { it.name == selected }) Text(stringResource(R.string.lan_interface_lost, selected!!), color = MaterialTheme.colorScheme.error)
|
||||
}
|
||||
interfaces.forEach { network ->
|
||||
ActionRow(network.name, network.addresses.joinToString { it.address.hostAddress.orEmpty() },
|
||||
stringResource(if (selected == network.name) R.string.lan_selected else R.string.lan_use), onClick = { LocalLan.select(network.name, this@LocalLanActivity) })
|
||||
}
|
||||
ActionRow(stringResource(R.string.lan_default), null,
|
||||
stringResource(if (selected == null) R.string.lan_selected else R.string.lan_use), onClick = { LocalLan.select(null) })
|
||||
}
|
||||
SecondaryButton(stringResource(R.string.common_back)) { finish() }
|
||||
}
|
||||
}
|
||||
|
||||
private fun startHotspot() = startForegroundService(Intent(this, LocalHotspotService::class.java))
|
||||
|
||||
private fun openSettings(action: String, data: android.net.Uri? = null) {
|
||||
val intent = Intent(action, data)
|
||||
if (intent.resolveActivity(packageManager) != null) startActivity(intent)
|
||||
}
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
package com.droiddeck.launcher.lan
|
||||
|
||||
import android.content.ActivityNotFoundException
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.net.Uri
|
||||
|
||||
object SteamLinkCoop {
|
||||
const val PACKAGE = "com.valvesoftware.steamlink"
|
||||
private const val STORE_URL = "https://play.google.com/store/apps/details?id=$PACKAGE"
|
||||
|
||||
fun clientIntent(context: Context): Intent? = context.packageManager.getLaunchIntentForPackage(PACKAGE)
|
||||
?: context.packageManager.getLeanbackLaunchIntentForPackage(PACKAGE)
|
||||
|
||||
fun openClientOrStore(context: Context): Boolean {
|
||||
val choices = listOfNotNull(
|
||||
clientIntent(context),
|
||||
Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=$PACKAGE")),
|
||||
Intent(Intent.ACTION_VIEW, Uri.parse(STORE_URL)),
|
||||
)
|
||||
for (intent in choices) {
|
||||
try {
|
||||
context.startActivity(intent)
|
||||
return true
|
||||
} catch (_: ActivityNotFoundException) {
|
||||
} catch (_: SecurityException) {
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
package com.droiddeck.launcher.lan
|
||||
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.text.selection.SelectionContainer
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.unit.dp
|
||||
import com.droiddeck.launcher.R
|
||||
import com.droiddeck.launcher.ui.PrimaryButton
|
||||
import com.droiddeck.launcher.ui.SecondaryButton
|
||||
import com.droiddeck.launcher.ui.SettingsGroup
|
||||
|
||||
@Composable
|
||||
internal fun SteamLinkCoopPanel(
|
||||
hostAddress: String?,
|
||||
hostRunning: Boolean,
|
||||
clientInstalled: Boolean,
|
||||
onHost: () -> Unit,
|
||||
onClient: () -> Unit,
|
||||
) {
|
||||
SettingsGroup(stringResource(R.string.lan_coop_title)) {
|
||||
Column(Modifier.padding(14.dp), verticalArrangement = Arrangement.spacedBy(12.dp)) {
|
||||
Text(stringResource(R.string.lan_coop_overview))
|
||||
Text(stringResource(R.string.lan_coop_network))
|
||||
Text(stringResource(R.string.lan_coop_host))
|
||||
SecondaryButton(stringResource(if (hostRunning) R.string.lan_coop_return_host else R.string.lan_coop_open_launcher), onClick = onHost)
|
||||
if (hostAddress != null) {
|
||||
SelectionContainer { Text(stringResource(R.string.lan_coop_host_address, hostAddress)) }
|
||||
} else Text(stringResource(R.string.lan_coop_find_host))
|
||||
Text(stringResource(R.string.lan_coop_client))
|
||||
PrimaryButton(stringResource(if (clientInstalled) R.string.lan_coop_open_client else R.string.lan_coop_get_client), onClick = onClient)
|
||||
Text(stringResource(R.string.lan_coop_controllers))
|
||||
Text(stringResource(R.string.lan_coop_offline))
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -19,9 +19,6 @@ import android.provider.Settings
|
||||
import android.util.Log
|
||||
import com.droiddeck.launcher.core.SessionPart
|
||||
import com.droiddeck.launcher.core.WifiDiscovery
|
||||
import com.droiddeck.launcher.lan.LanInterface
|
||||
import com.droiddeck.launcher.lan.LanAddress
|
||||
import com.droiddeck.launcher.lan.LocalLan
|
||||
import java.io.File
|
||||
import java.io.IOException
|
||||
import java.net.Inet4Address
|
||||
@@ -32,7 +29,6 @@ import org.json.JSONObject
|
||||
class LinuxNetworkLinkComponent(
|
||||
context: Context,
|
||||
private val rootDir: File,
|
||||
private val lanInterface: () -> LanInterface? = LocalLan::selectedInterface,
|
||||
) : SessionPart() {
|
||||
private val appContext = context.applicationContext
|
||||
private val connectivity =
|
||||
@@ -47,16 +43,9 @@ class LinuxNetworkLinkComponent(
|
||||
private var wifiReceiver: BroadcastReceiver? = null
|
||||
private var scanRequestStamp = 0L
|
||||
private var lastScanRequest = -SCAN_INTERVAL_MS
|
||||
private var publishedLanSelection: String? = null
|
||||
private var publishedLanInterface: LanInterface? = null
|
||||
@Volatile private var lastNamesAllowed = false
|
||||
private val scanRequests = object : Runnable {
|
||||
override fun run() {
|
||||
val selection = LocalLan.selected.value
|
||||
val lan = lanInterface()
|
||||
synchronized(lock) {
|
||||
if (selection != publishedLanSelection || lan != publishedLanInterface) write(currentProperties, currentCapabilities)
|
||||
}
|
||||
if (canReadWifiNames() != lastNamesAllowed) {
|
||||
synchronized(lock) { writeNetworkState(currentProperties, currentCapabilities) }
|
||||
requestWifiScan()
|
||||
@@ -164,16 +153,11 @@ class LinuxNetworkLinkComponent(
|
||||
private fun write(properties: LinkProperties?, capabilities: NetworkCapabilities?) {
|
||||
val file = File(rootDir, LINK_FILE)
|
||||
synchronized(lock) {
|
||||
val selection = LocalLan.selected.value
|
||||
val lan = lanInterface()
|
||||
try {
|
||||
file.parentFile?.mkdirs()
|
||||
val staged = File(file.path + ".staged")
|
||||
staged.writeText(if (selection == null) describe(properties)
|
||||
else if (lan != null) describe(null, lan) else "")
|
||||
staged.writeText(describe(properties))
|
||||
if (!staged.renameTo(file)) throw IOException("Could not replace $file")
|
||||
publishedLanSelection = selection
|
||||
publishedLanInterface = lan
|
||||
} catch (e: IOException) {
|
||||
Log.w(TAG, "Could not publish the network link", e)
|
||||
}
|
||||
@@ -183,18 +167,13 @@ class LinuxNetworkLinkComponent(
|
||||
}
|
||||
|
||||
@Suppress("DEPRECATION")
|
||||
private fun writeNetworkState(defaultProperties: LinkProperties?, defaultCapabilities: NetworkCapabilities?) {
|
||||
val selection = LocalLan.selected.value
|
||||
val lan = if (selection != null) lanInterface() else null
|
||||
val properties = if (selection == null) defaultProperties else null
|
||||
val capabilities = if (selection == null) defaultCapabilities else null
|
||||
private fun writeNetworkState(properties: LinkProperties?, capabilities: NetworkCapabilities?) {
|
||||
val namesAllowed = canReadWifiNames()
|
||||
lastNamesAllowed = namesAllowed
|
||||
val scans = if (namesAllowed && wifiManager?.isWifiEnabled == true) {
|
||||
try { wifiManager.scanResults.orEmpty() } catch (e: SecurityException) { emptyList() }
|
||||
} else emptyList()
|
||||
val transport = when {
|
||||
lan != null -> "other"
|
||||
capabilities == null -> "none"
|
||||
capabilities.hasTransport(NetworkCapabilities.TRANSPORT_WIFI) -> "wifi"
|
||||
capabilities.hasTransport(NetworkCapabilities.TRANSPORT_CELLULAR) -> "cellular"
|
||||
@@ -204,10 +183,9 @@ class LinuxNetworkLinkComponent(
|
||||
}
|
||||
val state = JSONObject().apply {
|
||||
put("transport", transport)
|
||||
put("interface", lan?.name ?: properties?.interfaceName ?: "android")
|
||||
put("mtu", lan?.mtu ?: properties?.mtu?.takeIf { it > 0 } ?: DEFAULT_MTU)
|
||||
put("connected", lan != null || (properties != null && capabilities != null))
|
||||
put("localLan", selection != null)
|
||||
put("interface", properties?.interfaceName ?: "android")
|
||||
put("mtu", properties?.mtu?.takeIf { it > 0 } ?: DEFAULT_MTU)
|
||||
put("connected", properties != null && capabilities != null)
|
||||
put("validated", capabilities?.hasCapability(NetworkCapabilities.NET_CAPABILITY_VALIDATED) == true)
|
||||
put("captivePortal", capabilities?.hasCapability(NetworkCapabilities.NET_CAPABILITY_CAPTIVE_PORTAL) == true)
|
||||
put("metered", capabilities?.let { !it.hasCapability(NetworkCapabilities.NET_CAPABILITY_NOT_METERED) })
|
||||
@@ -227,7 +205,7 @@ class LinuxNetworkLinkComponent(
|
||||
}
|
||||
})
|
||||
put("addresses", JSONArray().apply {
|
||||
(lan?.addresses ?: properties?.linkAddresses.orEmpty().map { LanAddress(it.address, it.prefixLength) }).forEach {
|
||||
properties?.linkAddresses.orEmpty().forEach {
|
||||
put(JSONObject().put("address", it.address.hostAddress?.substringBefore('%')).put("prefix", it.prefixLength))
|
||||
}
|
||||
})
|
||||
@@ -299,14 +277,13 @@ class LinuxNetworkLinkComponent(
|
||||
}
|
||||
}
|
||||
|
||||
private fun describe(properties: LinkProperties?, lan: LanInterface? = null): String {
|
||||
val addresses = (lan?.addresses ?: properties?.linkAddresses.orEmpty().map { LanAddress(it.address, it.prefixLength) })
|
||||
private fun describe(properties: LinkProperties?): String {
|
||||
val addresses = properties?.linkAddresses.orEmpty()
|
||||
.filter { it.address is Inet4Address || it.address is Inet6Address }
|
||||
val name = (lan?.name ?: properties?.interfaceName)?.takeIf { addresses.isNotEmpty() } ?: OFFLINE_NAME
|
||||
val mtu = lan?.mtu ?: if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) properties?.mtu ?: 0 else 0
|
||||
val name = properties?.interfaceName?.takeIf { addresses.isNotEmpty() } ?: OFFLINE_NAME
|
||||
val mtu = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) properties?.mtu ?: 0 else 0
|
||||
return buildString {
|
||||
append("if $name ${lan?.index ?: LINK_INDEX} ${if (mtu > 0) mtu else DEFAULT_MTU}\n")
|
||||
if (lan != null) append("selected 1\n")
|
||||
append("if $name $LINK_INDEX ${if (mtu > 0) mtu else DEFAULT_MTU}\n")
|
||||
append("mac ${seededMac()}\n")
|
||||
if (addresses.isEmpty()) {
|
||||
append("addr $OFFLINE_ADDRESS\n")
|
||||
|
||||
@@ -110,11 +110,6 @@ public final class LinuxRuntime {
|
||||
File root = rootDir(context);
|
||||
List<String> binds = binds(context, sessionRoot, runtimeDir, externalStorage, extraBinds);
|
||||
if (sessionRoot != null) lastBinds = binds;
|
||||
return commandWithBinds(context, root, binds, guestCommand);
|
||||
}
|
||||
|
||||
public static List<String> commandWithBinds(Context context, File root, List<String> binds,
|
||||
List<String> guestCommand) {
|
||||
List<String> cmd = prootPrefix(context, root, "/root");
|
||||
for (String spec : binds) bind(cmd, spec);
|
||||
cmd.addAll(guestCommand);
|
||||
|
||||
@@ -51,7 +51,7 @@ object BootMovie {
|
||||
SessionPrefs.setBootMovieApplyNext(context, true)
|
||||
BootMovieReport.note(context, "picked $id here; Steam names ${SessionFiles.startupMoviePath(BootMovieLibrary.steamConfig(context))}")
|
||||
// Whatever Steam names right now is about to be replaced, so it is not a pick to adopt later.
|
||||
SessionFiles.startupMovieLocalPath(BootMovieLibrary.steamConfig(context))?.let { SessionPrefs.setBootMovieSteamSeen(context, it) }
|
||||
SessionFiles.startupMoviePath(BootMovieLibrary.steamConfig(context))?.let { SessionPrefs.setBootMovieSteamSeen(context, it) }
|
||||
}
|
||||
|
||||
fun customName(context: Context): String? =
|
||||
@@ -167,12 +167,10 @@ object BootMovie {
|
||||
* that movie becomes the choice here. Steam already plays it, so nothing is staged over it. True when the choice changed.
|
||||
*/
|
||||
fun syncFromSteam(context: Context): Boolean {
|
||||
val named = SessionFiles.startupMovieLocalPath(BootMovieLibrary.steamConfig(context)) ?: return false
|
||||
val seen = SessionPrefs.bootMovieSteamSeen(context)
|
||||
if (named == seen) return false
|
||||
SessionPrefs.setBootMovieSteamSeen(context, named)
|
||||
if (named == SessionFiles.BOOT_MOVIE_PATH || (named.isEmpty() && seen == null)) return false
|
||||
val path = named.ifEmpty { "/movies/steam_os_startup.webm" }
|
||||
val path = SessionFiles.startupMoviePath(BootMovieLibrary.steamConfig(context)) ?: return false
|
||||
if (path == SessionPrefs.bootMovieSteamSeen(context)) return false
|
||||
SessionPrefs.setBootMovieSteamSeen(context, path)
|
||||
if (path == SessionFiles.BOOT_MOVIE_PATH) return false
|
||||
val prefix = "/uioverrides/movies/"
|
||||
// The list names a bought movie from the Steam folder (/config/communityitemscache/...), Steam's config from its config folder.
|
||||
val id = if (path.startsWith(prefix)) BootMovieLibrary.idOf(path.removePrefix(prefix)) else {
|
||||
|
||||
@@ -79,9 +79,8 @@ object BootMovieLibrary {
|
||||
return customMovieDirs(context).map { File(it, name) }.firstOrNull { it.isFile && it.length() > 0L }
|
||||
}
|
||||
|
||||
private fun isMovie(file: File) = isWebm(file) && file.name !in STAGED
|
||||
|
||||
private fun isWebm(file: File) = file.isFile && file.length() > 0L && file.name.endsWith(".webm", ignoreCase = true) && !file.name.startsWith(".")
|
||||
private fun isMovie(file: File) = file.isFile && file.length() > 0L && file.name.endsWith(".webm", ignoreCase = true) &&
|
||||
file.name !in STAGED && !file.name.startsWith(".")
|
||||
|
||||
private fun readMeta(context: Context): JSONObject =
|
||||
runCatching { JSONObject(metaFile(context).readText()) }.getOrDefault(JSONObject())
|
||||
@@ -137,7 +136,7 @@ object BootMovieLibrary {
|
||||
}
|
||||
val bought = HashMap<String, String>()
|
||||
for (root in steamRoots(context)) {
|
||||
File(root, "steamui/movies").listFiles { f -> isWebm(f) && f.nameWithoutExtension.lowercase() in NATIVE }.orEmpty()
|
||||
File(root, "steamui/movies").listFiles { f -> isMovie(f) && f.nameWithoutExtension.lowercase() in NATIVE }.orEmpty()
|
||||
.sortedBy { it.name.lowercase() }.forEach { steam.putIfAbsent(STEAM_PREFIX + "/movies/" + it.name, it) }
|
||||
val scan = pointShopMovies(root)
|
||||
bought.putAll(scan.titles)
|
||||
@@ -145,8 +144,8 @@ object BootMovieLibrary {
|
||||
}
|
||||
val seen = HashSet<String>()
|
||||
for ((id, file) in steam) {
|
||||
if (file.name in STAGED || !seen.add(file.canonicalPath)) continue
|
||||
val native = file.nameWithoutExtension.lowercase() in NATIVE
|
||||
if ((file.name in STAGED && !native) || !seen.add(file.canonicalPath)) continue
|
||||
// Steam names a bought movie by an item number and a hash; the points shop's own title is shown when Steam has it.
|
||||
val title = if (native) NATIVE[file.nameWithoutExtension.lowercase()] ?: file.nameWithoutExtension else bought[file.path] ?: boughtId(file)?.let { "#$it" } ?: file.nameWithoutExtension
|
||||
out.add(Entry(id, title, if (native) SOURCE_STEAM else SOURCE_POINTSHOP, file, removable = false))
|
||||
@@ -154,11 +153,8 @@ object BootMovieLibrary {
|
||||
return out
|
||||
}
|
||||
|
||||
/** The four startup movies Steam ships with; Steam's movies folder holds many more videos that are not startup movies. */
|
||||
private val NATIVE = mapOf(
|
||||
"deck_startup" to "Deck startup", "oled_startup" to "Oled startup", "startup_machine" to "Machine startup",
|
||||
"steam_os_startup" to "SteamOS startup",
|
||||
)
|
||||
/** The three startup movies Steam ships with; Steam's movies folder holds many more videos that are not startup movies. */
|
||||
private val NATIVE = mapOf("deck_startup" to "Deck startup", "oled_startup" to "Oled startup", "startup_machine" to "Machine startup")
|
||||
|
||||
private val skippedFolders = setOf("uioverrides", "steamapps", "librarycache", "httpcache", "logs", "compatdata", "shadercache")
|
||||
|
||||
|
||||
@@ -721,19 +721,13 @@ object ComponentsManager {
|
||||
class StoredOriginal(val protonId: String, val protonName: String?, val comp: String, val protonVersion: String, val size: Long, val kept: Boolean)
|
||||
class Stored(val packages: List<StoredPackage>, val originals: List<StoredOriginal>)
|
||||
|
||||
internal fun liveSelection(key: String, entry: JSONObject, proton: Proton?): Boolean =
|
||||
proton != null && (key == "queued" || entry.optString("protonVersion") == proton.version)
|
||||
|
||||
private fun packagesInUse(state: JSONObject, installed: Map<String, Proton>): Set<String> {
|
||||
private fun packagesInUse(state: JSONObject): Set<String> {
|
||||
val names = HashSet<String>()
|
||||
for (key in listOf("active", "queued")) {
|
||||
val byProton = state.optJSONObject(key) ?: continue
|
||||
for (pid in byProton.keys()) {
|
||||
val comps = byProton.optJSONObject(pid) ?: continue
|
||||
for (comp in comps.keys()) {
|
||||
val entry = comps.optJSONObject(comp) ?: continue
|
||||
if (liveSelection(key, entry, installed[pid])) entry.optString("file").takeIf { it.isNotEmpty() }?.let(names::add)
|
||||
}
|
||||
for (comp in comps.keys()) comps.optJSONObject(comp)?.optString("file")?.takeIf { it.isNotEmpty() }?.let(names::add)
|
||||
}
|
||||
}
|
||||
val profiles = state.optJSONObject("profiles")
|
||||
@@ -753,8 +747,8 @@ object ComponentsManager {
|
||||
|
||||
fun stored(context: Context): Stored = synchronized(lock) {
|
||||
val state = loadState(context)
|
||||
val installed = protons(context).distinctBy { it.id }.associateBy { it.id }
|
||||
val used = packagesInUse(state, installed)
|
||||
val used = packagesInUse(state)
|
||||
val installed = protons(context).associateBy { it.id }
|
||||
val originals = originalsDir(context).listFiles()?.filter { it.isDirectory }?.flatMap { proton ->
|
||||
proton.listFiles()?.filter { it.isDirectory }?.flatMap { version ->
|
||||
COMPONENTS.mapNotNull { comp ->
|
||||
@@ -780,50 +774,27 @@ object ComponentsManager {
|
||||
true
|
||||
}
|
||||
|
||||
fun forgetProton(context: Context, dirName: String) {
|
||||
synchronized(lock) {
|
||||
val id = safeName(dirName)
|
||||
if (protons(context).any { it.id == id }) return
|
||||
val state = loadState(context)
|
||||
val selected = listOf("active", "queued").map { state.sub(it).remove(id) != null }.any { it }
|
||||
if (selected && runCatching { saveState(context, state) }.onFailure { Log.w(TAG, "forget $id", it) }.isFailure) return
|
||||
File(originalsDir(context), id).deleteRecursively()
|
||||
}
|
||||
}
|
||||
|
||||
fun deletePackage(context: Context, file: String): String = synchronized(lock) {
|
||||
val name = safeName(file)
|
||||
val state = loadState(context)
|
||||
val installed = protons(context).distinctBy { it.id }.associateBy { it.id }
|
||||
var changed = false
|
||||
for (key in listOf("queued", "active")) {
|
||||
val byProton = state.sub(key)
|
||||
for (pid in byProton.keys().asSequence().toList()) {
|
||||
val comps = byProton.optJSONObject(pid) ?: continue
|
||||
for (comp in comps.keys().asSequence().toList()) {
|
||||
val entry = comps.optJSONObject(comp) ?: continue
|
||||
if (entry.optString("file") != name) continue
|
||||
check(!liveSelection(key, entry, installed[pid])) { context.getString(R.string.cmgr_package_in_use, name, installed[pid]?.name ?: pid) }
|
||||
comps.remove(comp)
|
||||
changed = true
|
||||
}
|
||||
if (comps.length() == 0) byProton.remove(pid)
|
||||
}
|
||||
val queued = state.sub("queued")
|
||||
for (pid in queued.keys()) {
|
||||
val comps = queued.optJSONObject(pid) ?: continue
|
||||
for (comp in comps.keys()) check(comps.optJSONObject(comp)?.optString("file") != name) { context.getString(R.string.cmgr_package_in_use, name, pid) }
|
||||
}
|
||||
val active = state.sub("active")
|
||||
for (pid in active.keys()) {
|
||||
val comps = active.optJSONObject(pid) ?: continue
|
||||
for (comp in comps.keys()) check(comps.optJSONObject(comp)?.optString("file") != name) { context.getString(R.string.cmgr_package_in_use, name, pid) }
|
||||
}
|
||||
val profiles = state.sub("profiles")
|
||||
for (scope in profiles.keys()) {
|
||||
val profile = profiles.optJSONObject(scope) ?: continue
|
||||
check(COMPONENTS.none { profile.optString(it) == name }) { context.getString(R.string.cmgr_package_in_use, name, scope) }
|
||||
}
|
||||
val f = File(packagesDir(context), name)
|
||||
check(f.isFile) { context.getString(R.string.cmgr_package_not_stored, name) }
|
||||
val profiles = state.sub("profiles")
|
||||
for (scope in profiles.keys().asSequence().toList()) {
|
||||
val profile = profiles.optJSONObject(scope) ?: continue
|
||||
for (comp in COMPONENTS.filter { profile.optString(it) == name }) {
|
||||
rememberProfiledComponent(state, comp)
|
||||
profile.remove(comp)
|
||||
changed = true
|
||||
}
|
||||
if (profile.length() == 0) profiles.remove(scope)
|
||||
}
|
||||
check(f.delete()) { name }
|
||||
if (changed) saveState(context, state)
|
||||
f.delete()
|
||||
context.getString(R.string.cmgr_deleted, name)
|
||||
}
|
||||
|
||||
|
||||
@@ -87,10 +87,11 @@ class LoadingState(context: Context, private val steam: Boolean = true) {
|
||||
if (line.startsWith("== STEP ")) {
|
||||
stepAt = at
|
||||
stepText = line.substringAfter("== STEP ").substringAfter(' ')
|
||||
clientDownload(line)?.let { (what, percent) ->
|
||||
val m = INSTALL_COUNT.find(line)
|
||||
if (m != null) {
|
||||
clientDownloadAt = at
|
||||
clientDownload = what
|
||||
clientPercent = percent
|
||||
clientDownload = m.groupValues[1]
|
||||
clientPercent = m.groupValues[2].toInt() * 100 / maxOf(1, m.groupValues[3].toInt())
|
||||
}
|
||||
} else {
|
||||
val m = UPDATE_PROGRESS.find(line)
|
||||
@@ -131,19 +132,6 @@ class LoadingState(context: Context, private val steam: Boolean = true) {
|
||||
}
|
||||
}
|
||||
|
||||
internal fun clientDownload(line: String): Pair<String, Int>? {
|
||||
val count = INSTALL_COUNT.find(line) ?: return null
|
||||
val mb = INSTALL_MEGABYTES.find(line.substring(count.range.last + 1))
|
||||
val done = mb?.groupValues?.get(1)?.toLongOrNull()
|
||||
val total = mb?.groupValues?.get(2)?.toLongOrNull()
|
||||
if (done != null && total != null && total > 0) {
|
||||
return "$done / $total MB" to (done * 100 / total).toInt().coerceIn(0, 100)
|
||||
}
|
||||
val part = count.groupValues[2].toIntOrNull() ?: return null
|
||||
val all = count.groupValues[3].toIntOrNull() ?: return null
|
||||
return count.groupValues[1] to (part.toLong() * 100 / maxOf(1, all)).coerceIn(0L, 100L).toInt()
|
||||
}
|
||||
|
||||
internal fun readableScriptStep(scriptStep: String): Boolean {
|
||||
val t = scriptStep.lowercase()
|
||||
return t.startsWith("download") || t.startsWith("checking the linux") || t.startsWith("unpacking") || t.startsWith("installing")
|
||||
@@ -152,6 +140,5 @@ class LoadingState(context: Context, private val steam: Boolean = true) {
|
||||
private const val TAIL_BYTES = 48L * 1024
|
||||
private val UPDATE_PROGRESS = Regex("""Downloading update \((\d+) of (\d+) KB\)""")
|
||||
private val INSTALL_COUNT = Regex("""downloading Steam: (\S+) \((\d+)/(\d+)\)""")
|
||||
private val INSTALL_MEGABYTES = Regex("""^, (\d+) of (\d+) MB""")
|
||||
}
|
||||
}
|
||||
@@ -136,13 +136,11 @@ object ProtonExtras {
|
||||
|
||||
fun remove(context: Context, tool: Tool, dir: String? = null) {
|
||||
val name = if (dir != null) dir.takeIf { it in installedAll(context, tool) } ?: return else installed(context, tool) ?: return
|
||||
if (File(toolsDir(context), name).deleteRecursively()) ComponentsManager.forgetProton(context, name)
|
||||
File(toolsDir(context), name).deleteRecursively()
|
||||
}
|
||||
|
||||
fun removeOlder(context: Context, tool: Tool) {
|
||||
installedAll(context, tool).dropLast(1).forEach {
|
||||
if (File(toolsDir(context), it).deleteRecursively()) ComponentsManager.forgetProton(context, it)
|
||||
}
|
||||
installedAll(context, tool).dropLast(1).forEach { File(toolsDir(context), it).deleteRecursively() }
|
||||
}
|
||||
|
||||
@Synchronized
|
||||
|
||||
@@ -200,86 +200,22 @@ object SessionArtifacts {
|
||||
internal fun recordedClient(dir: File): String? =
|
||||
runCatching { File(dir, CLIENT_FILE).readText().trim() }.getOrNull()?.takeIf { it == "arm64" || it == "x86_64" }
|
||||
|
||||
private const val LOG_MARKS = "steam-log-marks.txt"
|
||||
private const val MAX_STEAM_LOG = 8L * 1024 * 1024
|
||||
private const val HEAD = 4096L
|
||||
|
||||
private class Mark(val size: Long, val head: String)
|
||||
|
||||
fun markSteamLogs(dir: File, logs: File) {
|
||||
val lines = logs.listFiles { f -> f.isFile }?.mapNotNull { f ->
|
||||
val size = f.length()
|
||||
head(f, size)?.let { "$size\t$it\t${f.name}" }
|
||||
} ?: return
|
||||
runCatching { File(dir, LOG_MARKS).writeText(lines.joinToString("") { "$it\n" }) }
|
||||
}
|
||||
|
||||
private fun head(f: File, length: Long): String? = runCatching {
|
||||
val buf = ByteArray(minOf(length, HEAD).toInt())
|
||||
f.inputStream().use { input ->
|
||||
var off = 0
|
||||
while (off < buf.size) {
|
||||
val n = input.read(buf, off, buf.size - off)
|
||||
if (n < 0) return@runCatching null
|
||||
off += n
|
||||
}
|
||||
}
|
||||
java.security.MessageDigest.getInstance("SHA-1").digest(buf).joinToString("") { "%02x".format(it) }
|
||||
}.getOrNull()
|
||||
|
||||
private fun steamLogMarks(dir: File): List<Mark>? = runCatching {
|
||||
File(dir, LOG_MARKS).readLines().mapNotNull { line ->
|
||||
val parts = line.split('\t', limit = 3)
|
||||
parts.getOrNull(0)?.toLongOrNull()?.let { size -> parts.getOrNull(1)?.let { Mark(size, it) } }
|
||||
}
|
||||
}.getOrNull()
|
||||
|
||||
private fun startOf(src: File, size: Long, marks: List<Mark>): Long {
|
||||
val heads = HashMap<Long, String?>()
|
||||
return marks.filter { it.size <= size }.sortedByDescending { it.size }
|
||||
.firstOrNull { m -> heads.getOrPut(minOf(m.size, HEAD)) { head(src, m.size) } == m.head }?.size ?: 0L
|
||||
}
|
||||
|
||||
private fun copySteamLogs(context: Context, dir: File, record: Record, steamArch: String? = null) {
|
||||
val logs = File(steamArch?.let { SessionPrefs.steamRoot(context, it) } ?: SessionPrefs.activeSteamRoot(context), "logs")
|
||||
if (!logs.isDirectory) return
|
||||
val out = File(dir, "steam").apply { mkdirs() }
|
||||
copySessionLogs(logs, dir, out).forEach { dst -> record.files[dst] = Scrubbed(dst.length(), dst.lastModified()) }
|
||||
Log.i(TAG, "collected ${out.listFiles()?.size ?: 0} Steam log(s), scrubbed, into $out")
|
||||
}
|
||||
|
||||
internal fun copySessionLogs(logs: File, dir: File, out: File): List<File> {
|
||||
val marks = steamLogMarks(dir)
|
||||
val copied = ArrayList<File>()
|
||||
logs.listFiles { f -> f.isFile }?.forEach { src ->
|
||||
val size = src.length()
|
||||
val from = marks?.let { startOf(src, size, it) } ?: 0L
|
||||
if (marks != null && from == size || size - from >= MAX_STEAM_LOG) return@forEach
|
||||
logs.listFiles { f -> f.isFile && f.length() < 8L * 1024 * 1024 }?.forEach { src ->
|
||||
try {
|
||||
val dst = File(out, src.name)
|
||||
src.inputStream().buffered().use { input ->
|
||||
var left = if (from > 0) from - 1 else 0L
|
||||
while (left > 0) {
|
||||
val skipped = input.skip(left)
|
||||
if (skipped <= 0) break
|
||||
left -= skipped
|
||||
}
|
||||
if (from > 0 && input.read() != '\n'.code) {
|
||||
while (true) {
|
||||
val c = input.read()
|
||||
if (c < 0 || c == '\n'.code) break
|
||||
}
|
||||
}
|
||||
dst.bufferedWriter().use { w ->
|
||||
input.bufferedReader().forEachLine { line -> w.write(LogRedactor.redact(line)); w.newLine() }
|
||||
}
|
||||
dst.bufferedWriter().use { w ->
|
||||
src.forEachLine { line -> w.write(LogRedactor.redact(line)); w.newLine() }
|
||||
}
|
||||
copied.add(dst)
|
||||
record.files[dst] = Scrubbed(dst.length(), dst.lastModified())
|
||||
} catch (e: Exception) {
|
||||
Log.w(TAG, "could not scrub ${src.name}", e)
|
||||
}
|
||||
}
|
||||
return copied
|
||||
Log.i(TAG, "collected ${out.listFiles()?.size ?: 0} Steam log(s), scrubbed, into $out")
|
||||
}
|
||||
|
||||
@Synchronized
|
||||
|
||||
@@ -390,12 +390,10 @@ object SessionFiles {
|
||||
private fun activeStartupMovie(text: String): VdfBlock? = customizationMovie(text) ?: olderMovie(text)
|
||||
|
||||
/** The movie Steam's config selects, as a path like `/uioverrides/movies/x.webm`; null when none is named. */
|
||||
internal fun startupMoviePath(config: File): String? = startupMovieLocalPath(config)?.takeIf { it.isNotEmpty() }
|
||||
|
||||
internal fun startupMovieLocalPath(config: File): String? {
|
||||
internal fun startupMoviePath(config: File): String? {
|
||||
val text = runCatching { config.readText() }.getOrNull() ?: return null
|
||||
val movie = activeStartupMovie(text) ?: return null
|
||||
return scalar(text.substring(movie.keyStart, movie.close + 1), "LocalPath")
|
||||
return scalar(text.substring(movie.keyStart, movie.close + 1), "LocalPath")?.takeIf { it.isNotEmpty() }
|
||||
}
|
||||
|
||||
/** Both `StartupMovie` sections of Steam's config as written there, for the report; null when there is none. */
|
||||
|
||||
@@ -4,6 +4,7 @@ import android.content.Context
|
||||
import android.content.pm.ActivityInfo
|
||||
import androidx.annotation.StringRes
|
||||
import com.droiddeck.launcher.R
|
||||
import com.droiddeck.launcher.core.CpuAllocationDefaults
|
||||
import com.droiddeck.launcher.core.GameEnvironment
|
||||
import com.droiddeck.launcher.core.TextureFiltering
|
||||
import com.droiddeck.launcher.gpu.Cardboard
|
||||
@@ -381,19 +382,30 @@ object SessionPrefs {
|
||||
prefs(context).edit().putBoolean("wifiDiscoveryAsked", true).apply()
|
||||
}
|
||||
|
||||
fun clientCpusOverride(context: Context): Boolean = prefs(context).getBoolean("clientCpusOverride", false)
|
||||
internal data class CoreAllocation(val clientOverride: Boolean, val clientCpus: String, val gameCpus: String)
|
||||
|
||||
internal fun coreAllocation(context: Context, defaults: CpuAllocationDefaults.Allocation? = CpuAllocationDefaults.device): CoreAllocation {
|
||||
val saved = prefs(context)
|
||||
return CoreAllocation(
|
||||
saved.getBoolean("clientCpusOverride", defaults != null && !saved.contains("clientCpus")),
|
||||
saved.getString("clientCpus", defaults?.client.orEmpty()).orEmpty(),
|
||||
saved.getString("gameCpus", defaults?.game.orEmpty()).orEmpty(),
|
||||
)
|
||||
}
|
||||
|
||||
fun clientCpusOverride(context: Context): Boolean = coreAllocation(context).clientOverride
|
||||
|
||||
fun setClientCpusOverride(context: Context, on: Boolean) {
|
||||
prefs(context).edit().putBoolean("clientCpusOverride", on).apply()
|
||||
}
|
||||
|
||||
fun clientCpus(context: Context): String = prefs(context).getString("clientCpus", "").orEmpty()
|
||||
fun clientCpus(context: Context): String = coreAllocation(context).clientCpus
|
||||
|
||||
fun setClientCpus(context: Context, list: String) {
|
||||
prefs(context).edit().putString("clientCpus", list).apply()
|
||||
}
|
||||
|
||||
fun gameCpus(context: Context): String = prefs(context).getString("gameCpus", "").orEmpty()
|
||||
fun gameCpus(context: Context): String = coreAllocation(context).gameCpus
|
||||
|
||||
fun setGameCpus(context: Context, list: String) {
|
||||
prefs(context).edit().putString("gameCpus", list).apply()
|
||||
|
||||
@@ -71,7 +71,6 @@ class SessionService : Service() {
|
||||
private val steamDownloadMonitor = SteamDownloadMonitor()
|
||||
private var downloadMonitorTask: Runnable? = null
|
||||
private var downloadActive = false
|
||||
private var clientInstallActive = false
|
||||
@Volatile private var steamLibraryMounts = emptyMap<String, File>()
|
||||
private var suspendDownloadNow = false
|
||||
private var suspendPolicy = SessionPrefs.SUSPEND_MANUAL
|
||||
@@ -322,7 +321,6 @@ class SessionService : Service() {
|
||||
suspendDownloadNow = false
|
||||
steamDownloadMonitor.reset()
|
||||
downloadActive = false
|
||||
clientInstallActive = false
|
||||
steamSleepToken = null
|
||||
completeNativeSleep()
|
||||
suspendOperationPending = false
|
||||
@@ -642,8 +640,8 @@ class SessionService : Service() {
|
||||
}
|
||||
},
|
||||
)
|
||||
updateDownloadMonitoring()
|
||||
mainHandler.post { updateSuspendPolicy() }
|
||||
updateDownloadMonitoring()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -710,10 +708,7 @@ class SessionService : Service() {
|
||||
SessionState.steamClientArch = if (steamHere) SessionPrefs.steamClientArch(this) else null
|
||||
SessionState.steamClientArch?.let { arch ->
|
||||
guest.add("BL_STEAM_CLIENT_ARCH=$arch")
|
||||
SessionPaths.current()?.let {
|
||||
SessionArtifacts.recordClient(it, arch)
|
||||
SessionArtifacts.markSteamLogs(it, File(SessionPrefs.steamRoot(this, arch), "logs"))
|
||||
}
|
||||
SessionPaths.current()?.let { SessionArtifacts.recordClient(it, arch) }
|
||||
if (arch == "x86_64") FexCatalog.cached(this)?.let { guest.addAll(FexCatalog.environment(it)) }
|
||||
}
|
||||
if (SessionState.mode == MODE_STEAM) {
|
||||
@@ -1418,7 +1413,8 @@ class SessionService : Service() {
|
||||
private fun updateSuspendPolicy() {
|
||||
if (!SessionState.running) return
|
||||
val hidden = !hasVisibleSurface
|
||||
val downloadsBlockingSuspend = downloadsKeepAwake() && hidden && !suspendDownloadNow
|
||||
val downloadsBlockingSuspend = steamDownloadsInBackground && SessionState.mode == MODE_STEAM &&
|
||||
suspendPolicy != SessionPrefs.SUSPEND_NEVER && hidden && downloadActive && !suspendDownloadNow
|
||||
if (suspendPolicy == SessionPrefs.SUSPEND_MANUAL && hidden && !downloadsBlockingSuspend) {
|
||||
manualPauseRequested = true
|
||||
} else if (!hidden && !SessionState.suspended) {
|
||||
@@ -1832,7 +1828,8 @@ class SessionService : Service() {
|
||||
.setContentText(getString(
|
||||
when {
|
||||
SessionState.suspended -> R.string.session_notification_paused
|
||||
downloadsKeepAwake() -> R.string.session_notification_downloads
|
||||
downloadActive && steamDownloadsInBackground &&
|
||||
suspendPolicy != SessionPrefs.SUSPEND_NEVER -> R.string.session_notification_downloads
|
||||
else -> R.string.session_notification
|
||||
}
|
||||
))
|
||||
@@ -1840,7 +1837,8 @@ class SessionService : Service() {
|
||||
.apply {
|
||||
if (SessionState.suspended) {
|
||||
addAction(Notification.Action.Builder(null, getString(R.string.resume_session), resume).build())
|
||||
} else if (downloadsKeepAwake()) {
|
||||
} else if (downloadActive && steamDownloadsInBackground &&
|
||||
suspendPolicy != SessionPrefs.SUSPEND_NEVER) {
|
||||
val suspend = PendingIntent.getService(
|
||||
this@SessionService, 3,
|
||||
Intent(this@SessionService, SessionService::class.java).setAction(ACTION_SUSPEND_NOW),
|
||||
@@ -1860,50 +1858,33 @@ class SessionService : Service() {
|
||||
getSystemService(NotificationManager::class.java)?.notify(NOTIFICATION_ID, buildNotification())
|
||||
}
|
||||
|
||||
private fun downloadsKeepAwake(): Boolean =
|
||||
downloadActive && (steamDownloadsInBackground || clientInstallActive) &&
|
||||
SessionState.mode == MODE_STEAM && suspendPolicy != SessionPrefs.SUSPEND_NEVER
|
||||
|
||||
private fun downloadWatchWanted(): Boolean =
|
||||
SessionState.running && SessionState.mode == MODE_STEAM && suspendPolicy != SessionPrefs.SUSPEND_NEVER &&
|
||||
(steamDownloadsInBackground || !SessionState.firstFrameSeen)
|
||||
|
||||
private fun updateDownloadMonitoring() {
|
||||
if (!downloadWatchWanted()) {
|
||||
val enabled = SessionState.running && SessionState.mode == MODE_STEAM &&
|
||||
steamDownloadsInBackground && suspendPolicy != SessionPrefs.SUSPEND_NEVER
|
||||
if (!enabled) {
|
||||
val wasActive = downloadActive
|
||||
downloadMonitorTask?.let(mainHandler::removeCallbacks)
|
||||
downloadMonitorTask = null
|
||||
steamDownloadMonitor.reset()
|
||||
downloadActive = false
|
||||
if (clientInstallActive) SessionEvents.record("steam.client_download", mapOf("active" to false))
|
||||
clientInstallActive = false
|
||||
if (wasActive) refreshNotification()
|
||||
return
|
||||
}
|
||||
if (downloadMonitorTask != null) return
|
||||
val poll = object : Runnable {
|
||||
override fun run() {
|
||||
if (downloadMonitorTask !== this) return
|
||||
if (!downloadWatchWanted()) {
|
||||
downloadMonitorTask = null
|
||||
updateDownloadMonitoring()
|
||||
updateSuspendPolicy()
|
||||
if (downloadMonitorTask !== this || !SessionState.running ||
|
||||
SessionState.mode != MODE_STEAM || !steamDownloadsInBackground ||
|
||||
suspendPolicy == SessionPrefs.SUSPEND_NEVER) {
|
||||
return
|
||||
}
|
||||
val root = LinuxRuntime.rootDir(this@SessionService)
|
||||
val wasActive = downloadActive
|
||||
val wasInstalling = clientInstallActive
|
||||
clientInstallActive = !SessionState.firstFrameSeen &&
|
||||
(clientInstallActive || SteamDownloadMonitor.clientInstallPending(root))
|
||||
downloadActive = clientInstallActive || steamDownloadsInBackground && steamDownloadMonitor.poll(
|
||||
root,
|
||||
downloadActive = steamDownloadMonitor.poll(
|
||||
LinuxRuntime.rootDir(this@SessionService),
|
||||
receivedBytes = TrafficStats.getUidRxBytes(android.os.Process.myUid()),
|
||||
client = SessionState.steamClientArch,
|
||||
mounts = steamLibraryMounts,
|
||||
)
|
||||
if (wasInstalling != clientInstallActive) {
|
||||
SessionEvents.record("steam.client_download", mapOf("active" to clientInstallActive))
|
||||
}
|
||||
if (wasActive != downloadActive) refreshNotification()
|
||||
updateSuspendPolicy()
|
||||
mainHandler.postDelayed(this, DOWNLOAD_POLL_MS)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.droiddeck.launcher.session
|
||||
|
||||
import java.io.File
|
||||
import java.io.FileInputStream
|
||||
import java.io.RandomAccessFile
|
||||
|
||||
internal class SteamDownloadMonitor {
|
||||
private data class ManifestState(
|
||||
@@ -63,17 +63,16 @@ internal class SteamDownloadMonitor {
|
||||
lastContentActivityAt = 0L
|
||||
}
|
||||
runCatching {
|
||||
FileInputStream(log).use { input ->
|
||||
input.channel.position(contentLogOffset)
|
||||
val reader = input.bufferedReader(Charsets.ISO_8859_1)
|
||||
RandomAccessFile(log, "r").use { input ->
|
||||
input.seek(contentLogOffset)
|
||||
while (true) {
|
||||
val line = reader.readLine() ?: break
|
||||
val line = input.readLine() ?: break
|
||||
when {
|
||||
"Client version:" in line -> {
|
||||
activeContentUpdates.clear()
|
||||
lastContentActivityAt = 0L
|
||||
}
|
||||
" update changed : " in line && CONTENT_UPDATE.find(line)?.let { match ->
|
||||
CONTENT_UPDATE.find(line)?.let { match ->
|
||||
val appId = match.groupValues[1]
|
||||
val updateType = match.groupValues[2]
|
||||
val state = match.groupValues[3]
|
||||
@@ -86,15 +85,14 @@ internal class SteamDownloadMonitor {
|
||||
}
|
||||
true
|
||||
} == true -> Unit
|
||||
"Current download rate: " in line &&
|
||||
CURRENT_RATE.find(line)?.groupValues?.get(1)?.toDoubleOrNull()?.let { it > 0.0 } == true ->
|
||||
CURRENT_RATE.find(line)?.groupValues?.get(1)?.toDoubleOrNull()?.let { it > 0.0 } == true ->
|
||||
lastContentActivityAt = now
|
||||
"Downloading " in line && " chunks for depot " in line ->
|
||||
lastContentActivityAt = now
|
||||
}
|
||||
if (activeContentUpdates.isNotEmpty()) lastContentActivityAt = now
|
||||
}
|
||||
contentLogOffset = input.channel.position()
|
||||
contentLogOffset = input.filePointer
|
||||
}
|
||||
}
|
||||
return activeContentUpdates.isNotEmpty() && lastContentActivityAt > 0L &&
|
||||
@@ -140,21 +138,13 @@ internal class SteamDownloadMonitor {
|
||||
private fun value(text: String, key: String): String? =
|
||||
Regex("\"$key\"\\s+\"([^\"]*)\"").find(text)?.groupValues?.get(1)
|
||||
|
||||
companion object {
|
||||
fun clientInstallPending(runtimeRoot: File): Boolean {
|
||||
val home = File(runtimeRoot, "root")
|
||||
val steam = File(home, ".local/share/Steam")
|
||||
val stamped = File(steam, "package/droiddeck-installed").isFile ||
|
||||
File(steam, "package/bannerlator-installed").isFile
|
||||
return !(stamped && File(steam, "steamrtarm64/steam").isFile) || File(home, ".bl-steam-repair").exists()
|
||||
}
|
||||
|
||||
private const val MANIFEST_PROGRESS_GRACE_MS = 8_000L
|
||||
private const val CONTENT_ACTIVITY_GRACE_MS = 90_000L
|
||||
private const val MIN_RECEIVE_BYTES_PER_SEC = 64L * 1024L
|
||||
private val PATH = Regex("\"path\"\\s+\"([^\"]+)\"")
|
||||
private val STEAM_HOMES = listOf("root/.local/share/Steam", "root/.droiddeck-x64/.local/share/Steam")
|
||||
private val CONTENT_UPDATE = Regex("""AppID (\d+) (App|Workshop|Shader) update changed : (.*)""")
|
||||
private val CURRENT_RATE = Regex("""Current download rate: ([\d.]+) Mbps""")
|
||||
private companion object {
|
||||
const val MANIFEST_PROGRESS_GRACE_MS = 8_000L
|
||||
const val CONTENT_ACTIVITY_GRACE_MS = 90_000L
|
||||
const val MIN_RECEIVE_BYTES_PER_SEC = 64L * 1024L
|
||||
val PATH = Regex("\"path\"\\s+\"([^\"]+)\"")
|
||||
val STEAM_HOMES = listOf("root/.local/share/Steam", "root/.droiddeck-x64/.local/share/Steam")
|
||||
val CONTENT_UPDATE = Regex("""AppID (\d+) (App|Workshop|Shader) update changed : (.*)""")
|
||||
val CURRENT_RATE = Regex("""Current download rate: ([\d.]+) Mbps""")
|
||||
}
|
||||
}
|
||||
@@ -104,29 +104,6 @@ object StoreInstallRoot {
|
||||
.map { it to guestFor(context, it) }
|
||||
}
|
||||
|
||||
/** Xodus has its own PRoot mount table and cannot see the selected Steam library's SD bind. */
|
||||
fun externalRootsForXodus(context: Context): List<Pair<File, String>> {
|
||||
val roots = externalRoots(context).toMutableList()
|
||||
val selectedLibrary = GameStorage.effective(context)?.let { File(it.path, ON_VOLUME) }
|
||||
?.takeUnless { isInternal(context, it) }
|
||||
if (selectedLibrary != null && roots.none { it.first.absolutePath == selectedLibrary.absolutePath }) {
|
||||
roots += selectedLibrary to guestFor(context, selectedLibrary)
|
||||
}
|
||||
return roots
|
||||
}
|
||||
|
||||
fun externalBindSpecs(context: Context): List<String> = externalBindSpecs(externalRoots(context), LinuxRuntime.rootDir(context))
|
||||
|
||||
fun externalBindSpecsForXodus(context: Context): List<String> =
|
||||
externalBindSpecs(externalRootsForXodus(context), LinuxRuntime.rootDir(context))
|
||||
|
||||
internal fun externalBindSpecs(roots: List<Pair<File, String>>, guestRoot: File): List<String> =
|
||||
roots.mapNotNull { (host, guest) ->
|
||||
if (!host.isDirectory || !host.canRead()) return@mapNotNull null
|
||||
val target = File(guestRoot, guest.removePrefix("/"))
|
||||
if (target.isDirectory || target.mkdirs()) "${host.path}:$guest" else null
|
||||
}
|
||||
|
||||
private fun guestFor(context: Context, root: File): String {
|
||||
val sm = context.getSystemService(StorageManager::class.java)
|
||||
val uuid = runCatching { sm?.getStorageVolume(root)?.uuid }.getOrNull()?.takeIf { it.isNotBlank() }?.replace(Regex("[^A-Za-z0-9-]"), "")
|
||||
@@ -137,21 +114,11 @@ object StoreInstallRoot {
|
||||
fun isInternal(context: Context, root: File): Boolean = root.absolutePath == internalRoot(context).absolutePath
|
||||
|
||||
fun externalGuestPath(context: Context, host: File): String? {
|
||||
return externalGuestPath(host, externalRoots(context))
|
||||
}
|
||||
|
||||
fun guestPath(context: Context, host: File): String = externalGuestPath(context, host) ?: host.path
|
||||
|
||||
fun guestPathForXodus(context: Context, host: File): String =
|
||||
externalGuestPath(host, externalRootsForXodus(context)) ?: host.path
|
||||
|
||||
internal fun externalGuestPath(host: File, roots: List<Pair<File, String>>): String? {
|
||||
val path = host.absolutePath
|
||||
for ((root, guest) in roots.sortedByDescending { it.first.absolutePath.length }) {
|
||||
val dir = root.absolutePath.trimEnd(File.separatorChar)
|
||||
for ((root, guest) in externalRoots(context)) {
|
||||
val dir = root.absolutePath
|
||||
if (path == dir) return guest
|
||||
val prefix = dir + File.separator
|
||||
if (path.startsWith(prefix)) return guest + "/" + path.removePrefix(prefix).replace(File.separatorChar, '/')
|
||||
if (path.startsWith("$dir/")) return guest + "/" + path.removePrefix("$dir/")
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
||||
@@ -130,6 +130,7 @@ class StoreLoginActivity : ComponentActivity() {
|
||||
private fun newFlow(state: String): Flow? {
|
||||
val url = clientUrl
|
||||
if (url != null) return com.droiddeck.launcher.stores.epic.EpicClient.loginFlow(url, chromeUa)
|
||||
if (store == Store.AMAZON && !com.droiddeck.launcher.stores.amazon.AmazonNative.loadInstalled(applicationContext)) return null
|
||||
return store?.let { LoginFlows.forStore(it, state) }
|
||||
}
|
||||
|
||||
|
||||
@@ -126,9 +126,7 @@ object StoresState {
|
||||
fun installedGame(store: Store, id: String): InstalledStoreGame? = installed.firstOrNull { it.sidecar.store == store && it.sidecar.id == id }
|
||||
|
||||
fun detailItem(store: Store, id: String): CatalogItem? = detailCatalogItem(
|
||||
store, id, library[store].orEmpty(),
|
||||
found[store].orEmpty() + if (store == Store.ITCH) com.droiddeck.launcher.stores.itch.ItchBrowseState.items else emptyList(),
|
||||
shelves[store],
|
||||
store, id, library[store].orEmpty(), found[store].orEmpty(), shelves[store],
|
||||
)
|
||||
|
||||
fun open(context: Context, store: Store, force: Boolean = false) {
|
||||
|
||||
@@ -2,6 +2,8 @@ package com.droiddeck.launcher.stores.amazon
|
||||
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.util.Log
|
||||
import com.droiddeck.launcher.R
|
||||
import com.droiddeck.launcher.stores.CatalogItem
|
||||
import com.droiddeck.launcher.stores.InstalledStoreGame
|
||||
import com.droiddeck.launcher.stores.LoginFlows
|
||||
@@ -16,25 +18,53 @@ import org.json.JSONObject
|
||||
|
||||
object AmazonBackend : StoreBackend {
|
||||
override val store: Store = Store.AMAZON
|
||||
private val signingIn = java.util.concurrent.atomic.AtomicBoolean(false)
|
||||
|
||||
init {
|
||||
LoginFlows.amazonFlow = { AmazonLogin.create() }
|
||||
}
|
||||
|
||||
private fun engineMissing(): Boolean {
|
||||
if (AmazonNative.ready()) return false
|
||||
StoresState.logLine(AmazonNative.ENGINE_MISSING)
|
||||
StoresState.post { StoresState.problems[store] = AmazonNative.ENGINE_MISSING }
|
||||
return true
|
||||
}
|
||||
|
||||
override fun signIn(context: Context) {
|
||||
if (engineMissing()) return
|
||||
context.startActivity(
|
||||
Intent(context, StoreLoginActivity::class.java)
|
||||
.putExtra(StoreLoginActivity.EXTRA_STORE, store.id)
|
||||
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK),
|
||||
)
|
||||
if (!signingIn.compareAndSet(false, true)) return
|
||||
val app = context.applicationContext
|
||||
try {
|
||||
Thread({
|
||||
try {
|
||||
val available = runCatching {
|
||||
AmazonNative.prepare(app) { state ->
|
||||
if (state is com.droiddeck.launcher.core.AddonPack.State.Downloading) {
|
||||
StoresState.post { StoresState.status[store] = app.getString(R.string.stores_engine_downloading, store.label, (state.progress * 100).toInt()) }
|
||||
}
|
||||
}
|
||||
}.onFailure { Log.w("AmazonBackend", "Engine preparation failed", it) }.getOrDefault(false)
|
||||
StoresState.post {
|
||||
try {
|
||||
StoresState.status.remove(store)
|
||||
if (available) {
|
||||
StoresState.problems.remove(store)
|
||||
app.startActivity(Intent(app, StoreLoginActivity::class.java)
|
||||
.putExtra(StoreLoginActivity.EXTRA_STORE, store.id)
|
||||
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK))
|
||||
} else {
|
||||
StoresState.problems[store] = app.getString(R.string.stores_engine_failed, store.label)
|
||||
}
|
||||
} finally {
|
||||
signingIn.set(false)
|
||||
}
|
||||
}
|
||||
} catch (error: Exception) {
|
||||
signingIn.set(false)
|
||||
Log.w("AmazonBackend", "Could not finish engine preparation", error)
|
||||
}
|
||||
}, "amazon-engine").start()
|
||||
} catch (error: Exception) {
|
||||
signingIn.set(false)
|
||||
StoresState.post {
|
||||
StoresState.status.remove(store)
|
||||
StoresState.problems[store] = app.getString(R.string.stores_engine_failed, store.label)
|
||||
}
|
||||
Log.w("AmazonBackend", "Could not start engine preparation", error)
|
||||
}
|
||||
}
|
||||
|
||||
override fun signOut(context: Context) {
|
||||
|
||||
@@ -75,6 +75,7 @@ object AmazonCredentialStore {
|
||||
|
||||
private fun refreshLocked(context: Context, a: Account): String? {
|
||||
if (a.refreshToken.isEmpty()) return null
|
||||
if (!AmazonNative.prepare(context)) return null
|
||||
val answer = AmazonNative.call("auth.refresh", JSONObject().put("refreshToken", a.refreshToken))
|
||||
val access = answer?.takeIf { !it.has("error") }?.optString(ACCESS_TOKEN, "").orEmpty()
|
||||
if (access.isEmpty()) {
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.droiddeck.launcher.stores.amazon
|
||||
|
||||
import java.io.File
|
||||
import java.security.MessageDigest
|
||||
import org.json.JSONObject
|
||||
|
||||
internal object AmazonEngine {
|
||||
fun verify(directory: File): Boolean = runCatching {
|
||||
val manifest = File(directory, "engine.json")
|
||||
val library = File(directory, "libdroiddeckamazon.so")
|
||||
val root = directory.canonicalFile
|
||||
check(manifest.canonicalFile == File(root, manifest.name) && library.canonicalFile == File(root, library.name))
|
||||
check(manifest.length() in 1..131_072 && library.isFile)
|
||||
val data = JSONObject(manifest.readText())
|
||||
check(data.getInt("schema") == 1 && data.getInt("abi") == 1)
|
||||
check(data.getString("engine") == "amazon" && data.getString("target") == "aarch64-linux-android")
|
||||
val hash = MessageDigest.getInstance("SHA-256")
|
||||
library.inputStream().use { input ->
|
||||
val block = ByteArray(64 * 1024)
|
||||
while (true) {
|
||||
val count = input.read(block)
|
||||
if (count < 0) break
|
||||
hash.update(block, 0, count)
|
||||
}
|
||||
}
|
||||
val actual = hash.digest().joinToString("") { "%02x".format(it.toInt() and 0xff) }
|
||||
check(actual == data.getString("library_sha256"))
|
||||
true
|
||||
}.getOrDefault(false)
|
||||
}
|
||||
@@ -24,6 +24,11 @@ internal class AmazonInstaller(
|
||||
private val cancelled = AtomicBoolean(false)
|
||||
|
||||
override fun run(handle: DownloadQueue.JobHandle): String? {
|
||||
handle.stage(DownloadStage.MANIFEST, app.getString(R.string.stores_engine_preparing, Store.AMAZON.label))
|
||||
if (!AmazonNative.prepare(app, { !cancelled.get() })) {
|
||||
if (cancelled.get()) return null
|
||||
throw IllegalStateException(AmazonNative.ENGINE_MISSING)
|
||||
}
|
||||
handle.stage(DownloadStage.MANIFEST, app.getString(R.string.stores_sync_sign_in))
|
||||
val token = AmazonCredentialStore.getValidAccessToken(app) ?: throw IllegalStateException("Not signed in to Amazon Games")
|
||||
val entitlementId = item.extra["entitlementId"].orEmpty()
|
||||
|
||||
@@ -163,7 +163,6 @@ object AmazonLibrary {
|
||||
}
|
||||
try {
|
||||
if (cache.isNotEmpty()) publish(app, cache)
|
||||
if (!AmazonNative.ready()) return problem(AmazonNative.ENGINE_MISSING)
|
||||
val syncedAt = prefs.getLong(KEY_SYNCED_AT, 0L)
|
||||
if (!force && cache.isNotEmpty() && System.currentTimeMillis() - syncedAt in 0 until THROTTLE_MS) {
|
||||
backfillPosters(app, cache)
|
||||
@@ -173,6 +172,7 @@ object AmazonLibrary {
|
||||
|
||||
status(R.string.stores_sync_sign_in)
|
||||
val account = AmazonCredentialStore.load(app) ?: return problem(StoresState.notSignedInLine(store))
|
||||
if (!AmazonNative.prepare(app)) return problem(AmazonNative.ENGINE_MISSING)
|
||||
val token = AmazonCredentialStore.getValidAccessToken(app) ?: return problem(StoresState.notSignedInLine(store))
|
||||
status(R.string.stores_sync_game_list)
|
||||
var answer = entitlements(token, account.deviceSerial)
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
package com.droiddeck.launcher.stores.amazon
|
||||
|
||||
import android.content.Context
|
||||
import android.util.Log
|
||||
import com.droiddeck.launcher.BuildConfig
|
||||
import com.droiddeck.launcher.stores.StoresNative
|
||||
import com.droiddeck.launcher.core.AddonPack
|
||||
import org.json.JSONObject
|
||||
import java.util.concurrent.CountDownLatch
|
||||
import java.util.concurrent.TimeUnit
|
||||
@@ -16,16 +17,32 @@ object AmazonNative {
|
||||
|
||||
@Volatile private var configured = false
|
||||
|
||||
fun ready(): Boolean {
|
||||
if (!StoresNative.ensureLoaded()) return false
|
||||
if (!configured) synchronized(this) {
|
||||
if (!configured) {
|
||||
runCatching { nativeConfigure(BuildConfig.VERSION_NAME) }
|
||||
.onFailure { Log.w(TAG, "configure: ${it.javaClass.simpleName}") }
|
||||
configured = true
|
||||
@Volatile private var loaded = false
|
||||
|
||||
fun ready(): Boolean = loaded && configured
|
||||
|
||||
internal fun prepare(context: Context, running: () -> Boolean = { true },
|
||||
onState: (AddonPack.State) -> Unit = {}): Boolean {
|
||||
if (ready()) return true
|
||||
if (!AddonPack.AMAZON.await(context, running, onState)) return false
|
||||
return loadInstalled(context)
|
||||
}
|
||||
|
||||
@Synchronized
|
||||
internal fun loadInstalled(context: Context): Boolean {
|
||||
if (ready()) return true
|
||||
if (!AddonPack.AMAZON.installed(context)) return false
|
||||
return runCatching {
|
||||
check(AmazonEngine.verify(AddonPack.AMAZON.dir(context))) { "Amazon engine verification failed" }
|
||||
if (!loaded) {
|
||||
System.load(AddonPack.AMAZON.file(context, "libdroiddeckamazon.so").absolutePath)
|
||||
check(nativeEngineAbi() == 1) { "Incompatible Amazon engine" }
|
||||
loaded = true
|
||||
}
|
||||
}
|
||||
return true
|
||||
nativeConfigure(BuildConfig.VERSION_NAME)
|
||||
configured = true
|
||||
true
|
||||
}.onFailure { Log.w(TAG, "Amazon engine could not load", it) }.getOrDefault(false)
|
||||
}
|
||||
|
||||
fun call(op: String, request: JSONObject = JSONObject()): JSONObject? {
|
||||
@@ -109,6 +126,7 @@ object AmazonNative {
|
||||
return holder[0] ?: InstallOutcome(false, false, "The Amazon install ended without a result", null)
|
||||
}
|
||||
|
||||
@JvmStatic private external fun nativeEngineAbi(): Int
|
||||
@JvmStatic private external fun nativeConfigure(appVersion: String)
|
||||
@JvmStatic private external fun nativeCall(op: String, request: String): String?
|
||||
@JvmStatic private external fun nativeFetch(op: String, request: String): ByteArray?
|
||||
|
||||
@@ -251,7 +251,7 @@ internal object EpicClientLibrary {
|
||||
SessionPrefs.addedGameStoredAppId(app, oldFolder.path)?.let { SteamLiveShortcuts.remove(app, it) }
|
||||
changed = true
|
||||
}
|
||||
val next = withLaunchArgs(StoreGameSidecar(
|
||||
val next = StoreGameSidecar(
|
||||
Store.EPIC, appName, item.optString("DisplayName").ifEmpty { appName }, exe,
|
||||
installVersion = item.optString("AppVersionString"), installedAt = existing?.installedAt?.takeIf { it > 0 } ?: folder.lastModified(),
|
||||
cover = existing?.cover, hero = existing?.hero,
|
||||
@@ -260,7 +260,7 @@ internal object EpicClientLibrary {
|
||||
epic = existing?.epic ?: com.droiddeck.launcher.stores.EpicOptions(),
|
||||
cloud = existing?.cloud ?: true,
|
||||
launcher = StoreLaunch.LAUNCHER,
|
||||
), commandArgs(item.optString("LaunchCommand")))
|
||||
)
|
||||
val sidecarChanged = existing?.toJson()?.toString(2) != next.toJson().toString(2)
|
||||
val launcher = File(folder, StoreLaunch.LAUNCHER)
|
||||
if (sidecarChanged || runCatching { launcher.readText() }.getOrNull() != StoreLaunch.launcherText(next)) {
|
||||
@@ -328,7 +328,6 @@ internal object EpicClientLibrary {
|
||||
.put("CatalogItemId", record.optString("itemId"))
|
||||
.put("InstallLocation", dir)
|
||||
.put("LaunchExecutable", record.optString("launchExecutable"))
|
||||
.put("LaunchCommand", record.optString("launchCommand"))
|
||||
.put("AppVersionString", record.optString("version"))
|
||||
.put("SidecarDeploymentId", record.optJSONObject("sidecar")?.optString("deploymentId").orEmpty())
|
||||
.put("DisplayName", title?.takeIf(String::isNotBlank) ?: dir.substringAfterLast('/'))
|
||||
@@ -359,11 +358,7 @@ internal object EpicClientLibrary {
|
||||
write(File(manifests, "$guid.item"), item(install, tags, ownership == true).toString(2))
|
||||
runCatching { egstore(install, guid) { token } }.onFailure { Log.w(TAG, "${install.appName}: .egstore not written (${it.javaClass.simpleName})") }
|
||||
after.put(install.appName, JSONObject().put("guid", guid).put("signature", install.signature).apply { if (ownership != null) put("ownership", ownership) })
|
||||
StoreGameSidecar.read(install.folder)?.let { sidecar ->
|
||||
val next = runCatching { manifestArgs(install, guid) }.getOrNull()?.let { withLaunchArgs(sidecar, it) } ?: sidecar
|
||||
if (next !== sidecar) next.write(install.folder)
|
||||
StoreLaunch.refreshLauncher(install.folder, next)
|
||||
}
|
||||
StoreGameSidecar.read(install.folder)?.let { StoreLaunch.refreshLauncher(install.folder, it) }
|
||||
}
|
||||
for (name in before.keys().asSequence().toList()) {
|
||||
if (after.has(name)) continue
|
||||
@@ -381,33 +376,6 @@ internal object EpicClientLibrary {
|
||||
return changed
|
||||
}
|
||||
|
||||
private const val LAUNCH_ARGS = "launchArgs"
|
||||
|
||||
private fun manifestArgs(install: Install, guid: String): List<String>? {
|
||||
val manifest = File(install.folder, ".egstore/$guid.manifest").takeIf { it.isFile } ?: return null
|
||||
val launch = EpicNative.inspect(manifest.readBytes(), JSONObject().put("op", "launch")) ?: return null
|
||||
val build = launch.optString("buildVersion")
|
||||
if (install.version.isNotEmpty() && build != install.version) return null
|
||||
val args = launch.optJSONArray("args") ?: return null
|
||||
return List(args.length()) { args.optString(it) }.filter { it.isNotEmpty() }
|
||||
}
|
||||
|
||||
private fun commandArgs(command: String): List<String> {
|
||||
if (command.isBlank()) return emptyList()
|
||||
val args = EpicNative.call("launch.split", JSONObject().put("command", command))?.optJSONArray("args") ?: return emptyList()
|
||||
return List(args.length()) { args.optString(it) }.filter { it.isNotEmpty() }
|
||||
}
|
||||
|
||||
internal fun withLaunchArgs(sidecar: StoreGameSidecar, args: List<String>): StoreGameSidecar {
|
||||
val previous = sidecar.extra[LAUNCH_ARGS]?.split('\n')?.filter { it.isNotEmpty() }.orEmpty()
|
||||
val kept = sidecar.args.filterNot { it in previous }
|
||||
val added = args.filterNot { it in kept }
|
||||
val next = kept + added
|
||||
val extra = LinkedHashMap(sidecar.extra).apply { if (added.isEmpty()) remove(LAUNCH_ARGS) else put(LAUNCH_ARGS, added.joinToString("\n")) }
|
||||
if (next == sidecar.args && extra == sidecar.extra) return sidecar
|
||||
return sidecar.copy(args = next, extra = extra)
|
||||
}
|
||||
|
||||
private fun ownershipToken(token: String, install: Install): Boolean? =
|
||||
runCatching { EpicApiClient.getCustomAttribute(token, install.namespace, install.catalogItemId, "OwnershipToken") }
|
||||
.getOrNull()?.trim()?.lowercase()?.let { it == "true" }
|
||||
|
||||
@@ -1,176 +0,0 @@
|
||||
package com.droiddeck.launcher.stores.itch
|
||||
|
||||
import android.content.Context
|
||||
import androidx.compose.runtime.getValue
|
||||
import androidx.compose.runtime.mutableStateOf
|
||||
import androidx.compose.runtime.setValue
|
||||
import com.droiddeck.launcher.stores.CatalogItem
|
||||
import com.droiddeck.launcher.stores.StoresState
|
||||
import org.json.JSONArray
|
||||
import java.io.File
|
||||
import java.security.MessageDigest
|
||||
|
||||
internal data class BrowseQuery(
|
||||
val sort: String = ItchBrowse.SORT_POPULAR,
|
||||
val price: String = ItchBrowse.PRICE_ANY,
|
||||
val platforms: Set<String> = emptySet(),
|
||||
val tags: List<String> = emptyList(),
|
||||
) {
|
||||
val isDefault: Boolean get() = this == BrowseQuery()
|
||||
}
|
||||
|
||||
internal class BrowsePage(val items: List<CatalogItem>, val code: Int, val cached: Boolean)
|
||||
|
||||
internal object ItchBrowse {
|
||||
const val SORT_POPULAR = "popular"
|
||||
const val SORT_NEW_POPULAR = "new-and-popular"
|
||||
const val SORT_TOP_SELLERS = "top-sellers"
|
||||
const val SORT_TOP_RATED = "top-rated"
|
||||
const val SORT_NEWEST = "newest"
|
||||
val sorts = listOf(SORT_POPULAR, SORT_NEW_POPULAR, SORT_TOP_SELLERS, SORT_TOP_RATED, SORT_NEWEST)
|
||||
|
||||
const val PRICE_ANY = "any"
|
||||
const val PRICE_FREE = "free"
|
||||
const val PRICE_SALE = "on-sale"
|
||||
const val PRICE_PAID = "store"
|
||||
const val PRICE_UNDER_5 = "5-dollars-or-less"
|
||||
const val PRICE_UNDER_15 = "15-dollars-or-less"
|
||||
val prices = listOf(PRICE_ANY, PRICE_FREE, PRICE_SALE, PRICE_PAID, PRICE_UNDER_5, PRICE_UNDER_15)
|
||||
|
||||
val platformNames = listOf("windows", "osx", "linux", "android", "ios", "web", "mobile-web")
|
||||
|
||||
private const val BASE = "https://itch.io/games"
|
||||
private const val FRESH_MS = 3 * 60 * 60 * 1000L
|
||||
private const val GAP_MS = 1_200L
|
||||
private const val RETRY_MS = 8_000L
|
||||
private const val FOLDER = "itch-browse"
|
||||
|
||||
@Volatile private var lastRequestAt = 0L
|
||||
private val lock = Any()
|
||||
|
||||
private fun sortSegment(sort: String): String? = sort.takeIf { it != SORT_POPULAR && it in sorts }
|
||||
|
||||
private fun priceSegment(price: String): String? = price.takeIf { it != PRICE_ANY && it in prices }
|
||||
|
||||
fun path(query: BrowseQuery): String {
|
||||
val segments = listOfNotNull(sortSegment(query.sort), priceSegment(query.price)) +
|
||||
platformNames.filter { it in query.platforms }.map { "platform-$it" } +
|
||||
query.tags.map { "tag-" + tagSlug(it) }
|
||||
return if (segments.isEmpty()) BASE else BASE + "/" + segments.joinToString("/")
|
||||
}
|
||||
|
||||
fun url(query: BrowseQuery, page: Int): String = path(query) + ".xml" + if (page > 1) "?page=$page" else ""
|
||||
|
||||
fun tagSlug(tag: String): String = tag.trim().lowercase().replace(Regex("[^a-z0-9]+"), "-").trim('-')
|
||||
|
||||
fun page(context: Context, query: BrowseQuery, page: Int, force: Boolean = false): BrowsePage {
|
||||
val app = context.applicationContext
|
||||
val url = url(query, page)
|
||||
if (!force) read(app, url)?.let { return BrowsePage(it, 200, true) }
|
||||
val (status, body) = fetch(url)
|
||||
val items = if (status in 200..299 && body != null) ItchShelves.parse(body) else emptyList()
|
||||
StoresState.logLine("itch.io browse: $url answered $status with ${items.size} games")
|
||||
if (items.isNotEmpty()) write(app, url, items)
|
||||
return BrowsePage(items, status, false)
|
||||
}
|
||||
|
||||
private fun fetch(url: String): Pair<Int, String?> {
|
||||
synchronized(lock) {
|
||||
pause()
|
||||
var answer = ItchShelves.open(url)
|
||||
if (answer.first == 429) {
|
||||
StoresState.logLine("itch.io browse: 429, waiting before one more try")
|
||||
Thread.sleep(RETRY_MS)
|
||||
pause()
|
||||
answer = ItchShelves.open(url)
|
||||
}
|
||||
lastRequestAt = System.currentTimeMillis()
|
||||
return answer
|
||||
}
|
||||
}
|
||||
|
||||
private fun pause() {
|
||||
val gap = GAP_MS - (System.currentTimeMillis() - lastRequestAt)
|
||||
if (gap > 0) Thread.sleep(gap)
|
||||
}
|
||||
|
||||
private fun file(context: Context, url: String): File {
|
||||
val digest = MessageDigest.getInstance("SHA-1").digest(url.toByteArray()).joinToString("") { "%02x".format(it) }
|
||||
return File(File(context.cacheDir, FOLDER), "$digest.json")
|
||||
}
|
||||
|
||||
private fun read(context: Context, url: String): List<CatalogItem>? {
|
||||
val file = file(context, url)
|
||||
if (!file.isFile || System.currentTimeMillis() - file.lastModified() > FRESH_MS) return null
|
||||
return runCatching { ItchCatalog.list(JSONArray(file.readText())) }.getOrNull()?.takeIf { it.isNotEmpty() }
|
||||
}
|
||||
|
||||
private fun write(context: Context, url: String, items: List<CatalogItem>) {
|
||||
val file = file(context, url)
|
||||
runCatching {
|
||||
file.parentFile?.mkdirs()
|
||||
file.writeText(ItchCatalog.array(items).toString())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
internal object ItchBrowseState {
|
||||
var query by mutableStateOf(BrowseQuery())
|
||||
private set
|
||||
var items by mutableStateOf<List<CatalogItem>>(emptyList())
|
||||
private set
|
||||
var loading by mutableStateOf(false)
|
||||
private set
|
||||
var ended by mutableStateOf(false)
|
||||
private set
|
||||
var failed by mutableStateOf(false)
|
||||
private set
|
||||
|
||||
private var next = 1
|
||||
private var generation = 0
|
||||
|
||||
val active: Boolean get() = !query.isDefault
|
||||
|
||||
fun choose(context: Context, wanted: BrowseQuery) {
|
||||
if (wanted == query) return
|
||||
generation++
|
||||
query = wanted
|
||||
items = emptyList()
|
||||
ended = false
|
||||
failed = false
|
||||
loading = false
|
||||
next = 1
|
||||
if (active) more(context)
|
||||
}
|
||||
|
||||
fun more(context: Context, retry: Boolean = false) {
|
||||
if (loading || ended || !active || (failed && !retry)) return
|
||||
loading = true
|
||||
failed = false
|
||||
val app = context.applicationContext
|
||||
val mine = generation
|
||||
val asked = query
|
||||
val page = next
|
||||
Thread({
|
||||
val answer = runCatching { ItchBrowse.page(app, asked, page) }.getOrNull()
|
||||
StoresState.post {
|
||||
if (mine != generation) return@post
|
||||
loading = false
|
||||
if (answer == null || answer.code !in 200..299) {
|
||||
failed = true
|
||||
return@post
|
||||
}
|
||||
if (answer.items.isEmpty()) {
|
||||
ended = true
|
||||
return@post
|
||||
}
|
||||
val known = items.mapTo(HashSet()) { it.id }
|
||||
val fresh = answer.items.filter { known.add(it.id) }
|
||||
if (fresh.isEmpty()) ended = true else {
|
||||
items = items + fresh
|
||||
next = page + 1
|
||||
}
|
||||
}
|
||||
}, "itch-browse").start()
|
||||
}
|
||||
}
|
||||
@@ -108,7 +108,7 @@ internal object ItchShelves {
|
||||
return shelves.takeUnless { it.isEmpty }
|
||||
}
|
||||
|
||||
internal fun open(url: String): Pair<Int, String?> {
|
||||
private fun open(url: String): Pair<Int, String?> {
|
||||
var conn: HttpURLConnection? = null
|
||||
return try {
|
||||
conn = (URL(url).openConnection() as HttpURLConnection).apply {
|
||||
|
||||
@@ -39,17 +39,11 @@ internal class XboxInstaller(private val app: Context, private val item: Catalog
|
||||
var sequence = -1L
|
||||
try {
|
||||
val source = if (content) selected else item.id
|
||||
val guestFolder = StoreInstallRoot.guestPathForXodus(app, folder)
|
||||
val selection = if (content) emptyList() else listOf("--selected-content-id", selected)
|
||||
Xodus.start(app, listOf("streaming", source, guestFolder, "--market", market,
|
||||
Xodus.start(app, listOf("streaming", source, folder.path, "--market", market,
|
||||
"--progress-json", "--control-stdin") + selection).use { process ->
|
||||
child = process
|
||||
val rejected = AtomicBoolean(false)
|
||||
val rejectedLine = Regex(Xodus.SIGN_IN_REJECTED)
|
||||
val diagnostics = Xodus.diagnostics(process) { line ->
|
||||
StoresState.logLine("Xbox: $line")
|
||||
if (line.matches(rejectedLine)) rejected.set(true)
|
||||
}
|
||||
val diagnostics = Xodus.diagnostics(process)
|
||||
if (cancelled.get()) process.process.destroy()
|
||||
process.process.inputStream.bufferedReader().useLines { lines -> lines.forEach { line ->
|
||||
if (line.startsWith("NEXUS_PROGRESS ")) {
|
||||
@@ -68,7 +62,6 @@ internal class XboxInstaller(private val app: Context, private val item: Catalog
|
||||
check(process.process.waitFor(15, TimeUnit.SECONDS)) { "Xbox installer did not exit." }
|
||||
diagnostics.join(2000)
|
||||
if (cancelled.get()) return null
|
||||
check(!rejected.get()) { app.getString(com.droiddeck.launcher.R.string.stores_xbox_sign_in_again) }
|
||||
check(process.process.exitValue() == 0 && complete) { "Xbox download did not complete. Resume to retry with fresh licenses." }
|
||||
}
|
||||
if (content) {
|
||||
|
||||
@@ -46,7 +46,7 @@ internal object XboxRuntime {
|
||||
val market = game.second.extra["market"]?.takeIf { it.matches(Regex("[A-Z]{2}")) } ?: Xodus.market()
|
||||
val directory = views.create(app.filesDir)
|
||||
val process = try {
|
||||
Xodus.start(app, listOf("run", StoreInstallRoot.guestPathForXodus(app, game.first), "droiddeck:prepare", "--exe", game.second.exe,
|
||||
Xodus.start(app, listOf("run", game.first.path, "droiddeck:prepare", "--exe", game.second.exe,
|
||||
"--materialize-chain", "--market", market), launchDirectory = directory, credentialGeneration = credentials)
|
||||
} catch (e: Exception) { XboxLaunchViews.remove(directory); throw e }
|
||||
if (!launches.attach(token, process)) { process.close(); error("Xbox launch was cancelled") }
|
||||
|
||||
@@ -5,9 +5,7 @@ import android.os.Environment
|
||||
import com.droiddeck.launcher.core.AddonPack
|
||||
import com.droiddeck.launcher.runtime.LinuxNetworkLinkComponent
|
||||
import com.droiddeck.launcher.runtime.LinuxRuntime
|
||||
import com.droiddeck.launcher.runtime.ProotFastPath
|
||||
import com.droiddeck.launcher.session.SessionPrefs
|
||||
import com.droiddeck.launcher.stores.StoreInstallRoot
|
||||
import org.json.JSONObject
|
||||
import java.io.Closeable
|
||||
import java.io.File
|
||||
@@ -81,24 +79,10 @@ internal object Xodus {
|
||||
networkLink.publish()
|
||||
networkLink.start()
|
||||
val runtime = (runtimeDirectory ?: File(app.filesDir, "xbox-runtime")).apply { mkdirs() }
|
||||
val root = LinuxRuntime.rootDir(app)
|
||||
val external = Environment.getExternalStorageDirectory()
|
||||
val extraBinds = StoreInstallRoot.externalBindSpecsForXodus(app)
|
||||
val binds = LinuxRuntime.binds(app, null, null, external, extraBinds)
|
||||
val fastPathPreloaded = runCatching {
|
||||
File(root, "etc/ld.so.preload").useLines { lines -> lines.any { it.trim() == ProotFastPath.LIBRARY } }
|
||||
}.getOrDefault(false)
|
||||
val fastPathKey = if (ProotFastPath.enabled(app) && fastPathPreloaded &&
|
||||
File(root, ProotFastPath.LIBRARY.removePrefix("/")).isFile) ProotFastPath.key(root, binds) else null
|
||||
val guestCommand = mutableListOf(
|
||||
val command = LinuxRuntime.command(app, null, null, Environment.getExternalStorageDirectory(), listOf(
|
||||
"/usr/bin/env", "HOME=/root", "XODUS_LOG=off", "RUST_LOG=off",
|
||||
"XDG_RUNTIME_DIR=${runtime.path}", "DROIDDECK_XBOX_CREDENTIAL_SOCKET=${credentials.name}", binary,
|
||||
)
|
||||
fastPathKey?.let { key ->
|
||||
guestCommand.addAll(guestCommand.lastIndex, ProotFastPath.guestEnv(root, binds, key))
|
||||
}
|
||||
guestCommand.addAll(args)
|
||||
val command = LinuxRuntime.commandWithBinds(app, root, binds, guestCommand)
|
||||
) + args)
|
||||
val builder = ProcessBuilder(command).directory(LinuxRuntime.rootDir(app))
|
||||
if (launchDirectory != null) builder.environment()["TMPDIR"] = launchDirectory.path
|
||||
builder.environment().apply {
|
||||
@@ -106,7 +90,6 @@ internal object Xodus {
|
||||
put("PROOT_LOADER", LinuxRuntime.prootLoader(app).path)
|
||||
put("PROOT_TMP_DIR", LinuxRuntime.prootTempDir(app).path)
|
||||
if (SessionPrefs.prootNoSeccomp(app)) put("PROOT_NO_SECCOMP", "1")
|
||||
fastPathKey?.let { ProotFastPath.hostEnv(it).let { (key, value) -> put(key, value) } }
|
||||
LinuxRuntime.prootLibraryPath(app).takeIf { it.isNotEmpty() }?.let { put("LD_LIBRARY_PATH", it) }
|
||||
}
|
||||
val digest = java.security.MessageDigest.getInstance("SHA-256")
|
||||
@@ -150,13 +133,11 @@ internal object Xodus {
|
||||
}
|
||||
}
|
||||
|
||||
const val SIGN_IN_REJECTED = "Microsoft content licensing rejected sign-in \\(HTTP 401\\)\\. Sign in again in Settings\\."
|
||||
|
||||
/** Passes the backend's known stderr diagnostics to [report]; other stderr text never leaves the process. */
|
||||
fun diagnostics(child: Child, report: (String) -> Unit = { com.droiddeck.launcher.stores.StoresState.logLine("Xbox: $it") }): Thread = Thread({
|
||||
runCatching {
|
||||
child.process.errorStream.bufferedReader().useLines { lines -> lines.forEach { line ->
|
||||
if (line.matches(Regex("NEXUS_CREDENTIAL_ERROR_V1 [a-z-]{1,48}|NEXUS_LIBRARY_DIAGNOSTIC_V1 [a-z-]{1,48} [0-9]{1,3} [0-9]{1,6}|NEXUS_SESSION_DIAGNOSTIC_V1 [a-z-]{1,64}|Account library unavailable \\([a-z-]{1,64}\\); credentials and installed games are unchanged\\.|Account library timed out; installed games are unchanged\\.|Xbox profile is temporarily unavailable \\([a-z-]{1,48}\\); stored account is unchanged\\.|Xbox profile request timed out; stored account is unchanged\\.|NEXUS_CONTENT_LICENSE_DIAGNOSTIC_V1 [a-z-]{1,48} [0-9]{3}|$SIGN_IN_REJECTED")))
|
||||
if (line.matches(Regex("NEXUS_CREDENTIAL_ERROR_V1 [a-z-]{1,48}|NEXUS_LIBRARY_DIAGNOSTIC_V1 [a-z-]{1,48} [0-9]{1,3} [0-9]{1,6}|NEXUS_SESSION_DIAGNOSTIC_V1 [a-z-]{1,64}|Account library unavailable \\([a-z-]{1,64}\\); credentials and installed games are unchanged\\.|Account library timed out; installed games are unchanged\\.|Xbox profile is temporarily unavailable \\([a-z-]{1,48}\\); stored account is unchanged\\.|Xbox profile request timed out; stored account is unchanged\\.")))
|
||||
report(line)
|
||||
} }
|
||||
}
|
||||
|
||||
@@ -676,15 +676,14 @@ private fun MoviePreview(url: String, modifier: Modifier = Modifier) {
|
||||
|
||||
/** A dialog with one text box, for a search term or a page number; the Android keyboard comes up with it. */
|
||||
@Composable
|
||||
internal fun TextEntryDialog(
|
||||
private fun TextEntryDialog(
|
||||
title: String, initial: String, number: Boolean, confirm: String, onSubmit: (String) -> Unit, onDismiss: () -> Unit,
|
||||
id: String = "boot-movie-entry",
|
||||
) {
|
||||
val shown = rememberShown(onDismiss)
|
||||
val close = { shown.targetState = false }
|
||||
var text by remember { mutableStateOf(initial) }
|
||||
val submit = { onSubmit(text.trim()); close() }
|
||||
AppDialog(shown, close, id, wide = false, maxWidth = 460.dp) {
|
||||
AppDialog(shown, close, "boot-movie-entry", wide = false, maxWidth = 460.dp) {
|
||||
DialogTitleRow(title, close)
|
||||
AdbTextField(
|
||||
value = text, onValueChange = { text = it }, label = "", keyboardType = if (number) KeyboardType.Number else KeyboardType.Text,
|
||||
|
||||
@@ -70,7 +70,6 @@ import androidx.compose.ui.graphics.graphicsLayer
|
||||
import androidx.compose.ui.layout.ContentScale
|
||||
import androidx.compose.ui.layout.boundsInRoot
|
||||
import androidx.compose.ui.layout.onGloballyPositioned
|
||||
import androidx.compose.ui.platform.LocalConfiguration
|
||||
import androidx.compose.ui.platform.LocalContext
|
||||
import androidx.compose.ui.platform.LocalDensity
|
||||
import androidx.compose.ui.res.painterResource
|
||||
@@ -103,7 +102,6 @@ internal fun DesktopPage(s: FrontEndState, a: FrontEndActions, modifier: Modifie
|
||||
val ctx = LocalContext.current
|
||||
val density = LocalDensity.current
|
||||
val narrow = LocalNarrowPane.current
|
||||
val short = compactDesktop()
|
||||
val colors = MaterialTheme.colorScheme
|
||||
LaunchedEffect(Unit) { UserAppsState.refresh(ctx) }
|
||||
LaunchedEffect(s.ready) { com.droiddeck.launcher.store.StoreState.refresh(ctx) }
|
||||
@@ -122,7 +120,7 @@ internal fun DesktopPage(s: FrontEndState, a: FrontEndActions, modifier: Modifie
|
||||
key = "desktop", tabs = tabs,
|
||||
onOpen = a.onDesktopSettings, onPrimary = a.onDesktop,
|
||||
modifier = modifier.clipToBounds(),
|
||||
start = if (narrow) 20.dp else 44.dp, bottom = 44.dp,
|
||||
start = if (narrow) 20.dp else 44.dp, bottom = if (narrow) 20.dp else 44.dp,
|
||||
background = {
|
||||
DesktopWall(installed.map { it.iconRes } + apps.mapNotNull { it.icon })
|
||||
},
|
||||
@@ -134,8 +132,8 @@ internal fun DesktopPage(s: FrontEndState, a: FrontEndActions, modifier: Modifie
|
||||
},
|
||||
words = {
|
||||
Column(verticalArrangement = Arrangement.spacedBy(8.dp)) {
|
||||
if (LocalConfiguration.current.screenHeightDp >= 400) Text(
|
||||
stringResource(R.string.rail_desktop), fontSize = if (short) 30.sp else 42.sp, lineHeight = if (short) 34.sp else 46.sp,
|
||||
Text(
|
||||
stringResource(R.string.rail_desktop), fontSize = if (narrow) 30.sp else 42.sp, lineHeight = if (narrow) 34.sp else 46.sp,
|
||||
fontWeight = FontWeight.Black, color = colors.onBackground,
|
||||
)
|
||||
BusyChip(s)
|
||||
@@ -145,12 +143,11 @@ internal fun DesktopPage(s: FrontEndState, a: FrontEndActions, modifier: Modifie
|
||||
PrimaryButton(open, enabled = !s.busy, main = true, large = true, icon = Icons.Outlined.DesktopWindows, onClick = click)
|
||||
},
|
||||
beside = {
|
||||
Row(
|
||||
horizontalArrangement = Arrangement.spacedBy(10.dp), verticalAlignment = Alignment.CenterVertically,
|
||||
modifier = Modifier.horizontalScroll(rememberScrollState()),
|
||||
) {
|
||||
HeroIconButton(Icons.Outlined.Storefront, stringResource(R.string.flathub_name), FlathubTeal, "desktop:flathub") { at -> openFrom(at, null, "store") }
|
||||
HeroIconButton(Icons.Filled.Add, stringResource(R.string.user_apps_add), null, "desktop:add") { if (!s.busy) adding = true }
|
||||
Column(verticalArrangement = Arrangement.spacedBy(10.dp)) {
|
||||
Row(horizontalArrangement = Arrangement.spacedBy(10.dp)) {
|
||||
HeroIconButton(Icons.Outlined.Storefront, stringResource(R.string.flathub_name), FlathubTeal, "desktop:flathub") { at -> openFrom(at, null, "store") }
|
||||
HeroIconButton(Icons.Filled.Add, stringResource(R.string.user_apps_add), null, "desktop:add") { if (!s.busy) adding = true }
|
||||
}
|
||||
if (s.desktopPresent) UninstallDesktop(enabled = !s.runtimeActionsBlocked, onUninstall = a.onRemoveDesktop)
|
||||
}
|
||||
},
|
||||
@@ -162,9 +159,6 @@ internal fun DesktopPage(s: FrontEndState, a: FrontEndActions, modifier: Modifie
|
||||
if (adding && !s.busy) AddAppDialog(s.ready, onDismiss = { adding = false }) { request, label -> UserAppsState.add(ctx, request, label) }
|
||||
}
|
||||
|
||||
@Composable
|
||||
private fun compactDesktop() = LocalNarrowPane.current || LocalConfiguration.current.screenHeightDp < 600
|
||||
|
||||
@Composable
|
||||
private fun DesktopDock(
|
||||
s: FrontEndState, a: FrontEndActions, installed: List<Library.Emulator>, apps: List<UserApps.App>,
|
||||
@@ -183,7 +177,7 @@ private fun DesktopDock(
|
||||
LaunchedEffect(Unit) { mounted[0] = true }
|
||||
val scroll = rememberScrollState()
|
||||
if (keys.isEmpty() && available.isEmpty() && UserAppsState.working == null && UserAppsState.lastError == null) return
|
||||
Column(Modifier.fillMaxWidth().padding(top = if (compactDesktop()) 14.dp else 22.dp)) {
|
||||
Column(Modifier.fillMaxWidth().padding(top = if (narrow) 14.dp else 22.dp)) {
|
||||
Text(
|
||||
stringResource(R.string.user_apps_section).uppercase(), fontSize = 11.sp, fontWeight = FontWeight.Bold, letterSpacing = 1.6.sp,
|
||||
color = colors.onSurfaceVariant, modifier = Modifier.padding(start = if (narrow) 20.dp else 44.dp, bottom = 8.dp),
|
||||
|
||||
@@ -335,11 +335,6 @@ internal fun SetupPanel(
|
||||
}
|
||||
}
|
||||
SettingsGroup(stringResource(R.string.setup_runtime)) { runtimeCheck(false) }
|
||||
SettingsGroup(stringResource(R.string.lan_title)) {
|
||||
ActionRow(stringResource(R.string.lan_title), stringResource(R.string.lan_setup_hint), stringResource(R.string.setup_manage), onClick = {
|
||||
ctx.startActivity(android.content.Intent(ctx, com.droiddeck.launcher.lan.LocalLanActivity::class.java))
|
||||
})
|
||||
}
|
||||
}
|
||||
1 -> {
|
||||
val controller = s.controller
|
||||
|
||||
@@ -1,145 +0,0 @@
|
||||
package com.droiddeck.launcher.ui
|
||||
|
||||
import androidx.compose.foundation.LocalIndication
|
||||
import androidx.compose.foundation.background
|
||||
import androidx.compose.foundation.horizontalScroll
|
||||
import androidx.compose.foundation.hoverable
|
||||
import androidx.compose.foundation.interaction.MutableInteractionSource
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.Box
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.Row
|
||||
import androidx.compose.foundation.layout.fillMaxWidth
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.rememberScrollState
|
||||
import androidx.compose.foundation.selection.selectable
|
||||
import androidx.compose.foundation.selection.selectableGroup
|
||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||
import androidx.compose.material3.LinearProgressIndicator
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.LaunchedEffect
|
||||
import androidx.compose.runtime.getValue
|
||||
import androidx.compose.runtime.mutableStateOf
|
||||
import androidx.compose.runtime.remember
|
||||
import androidx.compose.runtime.setValue
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.draw.clip
|
||||
import androidx.compose.ui.platform.LocalContext
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.semantics.Role
|
||||
import androidx.compose.ui.text.font.FontWeight
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.sp
|
||||
import com.droiddeck.launcher.R
|
||||
import com.droiddeck.launcher.stores.itch.ItchBrowse
|
||||
import com.droiddeck.launcher.stores.itch.ItchBrowseState
|
||||
|
||||
@Composable
|
||||
internal fun ItchBrowseBar() {
|
||||
val ctx = LocalContext.current
|
||||
val query = ItchBrowseState.query
|
||||
var picking by remember { mutableStateOf(false) }
|
||||
Column(Modifier.fillMaxWidth().padding(top = 6.dp, bottom = 8.dp), verticalArrangement = Arrangement.spacedBy(6.dp)) {
|
||||
ChipRow {
|
||||
for (sort in ItchBrowse.sorts) BrowseChip(sortLabel(sort), query.sort == sort) { ItchBrowseState.choose(ctx, query.copy(sort = sort)) }
|
||||
}
|
||||
ChipRow {
|
||||
for (price in ItchBrowse.prices) BrowseChip(priceLabel(price), query.price == price) { ItchBrowseState.choose(ctx, query.copy(price = price)) }
|
||||
}
|
||||
ChipRow {
|
||||
BrowseChip(stringResource(R.string.stores_itch_platform_any), query.platforms.isEmpty()) { ItchBrowseState.choose(ctx, query.copy(platforms = emptySet())) }
|
||||
for (platform in ItchBrowse.platformNames) {
|
||||
val on = platform in query.platforms
|
||||
BrowseChip(platformLabel(platform), on) { ItchBrowseState.choose(ctx, query.copy(platforms = if (on) query.platforms - platform else query.platforms + platform)) }
|
||||
}
|
||||
}
|
||||
ChipRow {
|
||||
for (tag in query.tags) BrowseChip("$tag ✕", true) { ItchBrowseState.choose(ctx, query.copy(tags = query.tags - tag)) }
|
||||
BrowseChip(stringResource(R.string.stores_itch_tag_add), false) { picking = true }
|
||||
}
|
||||
}
|
||||
if (picking) TextEntryDialog(
|
||||
stringResource(R.string.stores_itch_tag_title), "", number = false, confirm = stringResource(R.string.common_ok),
|
||||
onSubmit = { value -> ItchBrowse.tagSlug(value).takeIf { it.isNotEmpty() }?.let { ItchBrowseState.choose(ctx, query.copy(tags = (query.tags + it).distinct())) } },
|
||||
onDismiss = { picking = false }, id = "itch-tag",
|
||||
)
|
||||
}
|
||||
|
||||
@Composable
|
||||
internal fun ItchLoadMore() {
|
||||
val ctx = LocalContext.current
|
||||
val count = ItchBrowseState.items.size
|
||||
LaunchedEffect(Unit) { ItchBrowseState.more(ctx) }
|
||||
if (ItchBrowseState.loading) LinearProgressIndicator(Modifier.fillMaxWidth().padding(vertical = 12.dp))
|
||||
else if (ItchBrowseState.failed) Box(Modifier.fillMaxWidth().padding(vertical = 8.dp), contentAlignment = Alignment.Center) {
|
||||
BrowseChip(stringResource(R.string.stores_dl_retry), false) { ItchBrowseState.more(ctx, retry = true) }
|
||||
}
|
||||
else if (!ItchBrowseState.ended && count > 0) Box(Modifier.fillMaxWidth().padding(vertical = 8.dp), contentAlignment = Alignment.Center) {
|
||||
BrowseChip(stringResource(R.string.stores_itch_load_more), false) { ItchBrowseState.more(ctx) }
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
private fun ChipRow(content: @Composable () -> Unit) {
|
||||
Row(
|
||||
horizontalArrangement = Arrangement.spacedBy(6.dp), verticalAlignment = Alignment.CenterVertically,
|
||||
modifier = Modifier.fillMaxWidth().horizontalScroll(rememberScrollState()).selectableGroup(),
|
||||
) { content() }
|
||||
}
|
||||
|
||||
@Composable
|
||||
private fun BrowseChip(label: String, selected: Boolean, onClick: () -> Unit) {
|
||||
val colors = MaterialTheme.colorScheme
|
||||
val pal = LocalPalette.current
|
||||
val shape = RoundedCornerShape(8.dp)
|
||||
val src = remember { MutableInteractionSource() }
|
||||
val hot = rememberHot(src)
|
||||
Text(
|
||||
label, fontSize = 13.sp, fontWeight = FontWeight.SemiBold, maxLines = 1,
|
||||
color = if (selected) pal.onSignal else if (hot) colors.onBackground else colors.onSurfaceVariant,
|
||||
modifier = Modifier.clip(shape).background(if (selected) pal.signal else colors.surfaceVariant)
|
||||
.glideBorder(hot, shape, pal.signal)
|
||||
.hoverable(src).selectable(selected = selected, interactionSource = src, indication = LocalIndication.current, role = Role.Tab, onClick = onClick)
|
||||
.controllerConfirm(onClick = onClick)
|
||||
.padding(horizontal = 12.dp, vertical = 7.dp),
|
||||
)
|
||||
}
|
||||
|
||||
@Composable
|
||||
private fun sortLabel(sort: String): String = stringResource(
|
||||
when (sort) {
|
||||
ItchBrowse.SORT_NEW_POPULAR -> R.string.stores_itch_sort_new_popular
|
||||
ItchBrowse.SORT_TOP_SELLERS -> R.string.stores_itch_sort_top_sellers
|
||||
ItchBrowse.SORT_TOP_RATED -> R.string.stores_itch_sort_top_rated
|
||||
ItchBrowse.SORT_NEWEST -> R.string.stores_itch_sort_new
|
||||
else -> R.string.stores_itch_sort_popular
|
||||
},
|
||||
)
|
||||
|
||||
@Composable
|
||||
private fun platformLabel(platform: String): String = stringResource(
|
||||
when (platform) {
|
||||
"windows" -> R.string.stores_itch_platform_windows
|
||||
"osx" -> R.string.stores_itch_platform_macos
|
||||
"linux" -> R.string.stores_itch_platform_linux
|
||||
"android" -> R.string.stores_itch_platform_android
|
||||
"ios" -> R.string.stores_itch_platform_ios
|
||||
"web" -> R.string.stores_itch_platform_web
|
||||
else -> R.string.stores_itch_platform_mobile_web
|
||||
},
|
||||
)
|
||||
|
||||
@Composable
|
||||
private fun priceLabel(price: String): String = stringResource(
|
||||
when (price) {
|
||||
ItchBrowse.PRICE_FREE -> R.string.stores_itch_price_free
|
||||
ItchBrowse.PRICE_SALE -> R.string.stores_itch_price_sale
|
||||
ItchBrowse.PRICE_PAID -> R.string.stores_itch_price_paid
|
||||
ItchBrowse.PRICE_UNDER_5 -> R.string.stores_itch_price_under_5
|
||||
ItchBrowse.PRICE_UNDER_15 -> R.string.stores_itch_price_under_15
|
||||
else -> R.string.stores_itch_price_any
|
||||
},
|
||||
)
|
||||
@@ -128,7 +128,6 @@ import androidx.compose.ui.graphics.lerp
|
||||
import androidx.compose.ui.graphics.graphicsLayer
|
||||
import androidx.compose.ui.layout.ContentScale
|
||||
import androidx.compose.ui.platform.LocalContext
|
||||
import androidx.compose.ui.platform.LocalFocusManager
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.semantics.Role
|
||||
import androidx.compose.ui.semantics.contentDescription
|
||||
@@ -146,7 +145,6 @@ import com.droiddeck.launcher.R
|
||||
import com.droiddeck.launcher.frontend.Library
|
||||
import com.droiddeck.launcher.session.SessionPrefs
|
||||
import com.droiddeck.launcher.stores.CatalogItem
|
||||
import com.droiddeck.launcher.stores.itch.ItchBrowseState
|
||||
import com.droiddeck.launcher.stores.Store
|
||||
import com.droiddeck.launcher.stores.StoreTab
|
||||
import com.droiddeck.launcher.stores.StoresState
|
||||
@@ -174,7 +172,6 @@ private data class PaneKey(val chip: String, val tab: String, val signedIn: Bool
|
||||
@Composable
|
||||
internal fun StoresPage(s: FrontEndState, a: FrontEndActions, modifier: Modifier) {
|
||||
val ctx = LocalContext.current
|
||||
val focusManager = LocalFocusManager.current
|
||||
com.droiddeck.launcher.stores.xbox.XboxContent.plan?.let { content ->
|
||||
androidx.compose.material3.AlertDialog(
|
||||
onDismissRequest = { com.droiddeck.launcher.stores.xbox.XboxContent.dismiss() },
|
||||
@@ -282,7 +279,7 @@ internal fun StoresPage(s: FrontEndState, a: FrontEndActions, modifier: Modifier
|
||||
val heroFocus = remember { androidx.compose.ui.focus.FocusRequester() }
|
||||
var detailFocused by remember { mutableStateOf(false) }
|
||||
fun move(kind: String) { focusMove = kind to (focusMove?.second ?: 0) + 1 }
|
||||
fun open(key: String) { focusManager.clearFocus(force = true); lastOpened = key; openGame = key; move("detail") }
|
||||
fun open(key: String) { lastOpened = key; openGame = key; move("detail") }
|
||||
fun closeGame() { openGame = null; move("card") }
|
||||
fun switchTab(to: String) { tab = to; move("first") }
|
||||
val pickChip: (String) -> Unit = { id ->
|
||||
@@ -480,11 +477,7 @@ internal fun StoresPage(s: FrontEndState, a: FrontEndActions, modifier: Modifier
|
||||
androidx.compose.material3.LinearProgressIndicator(Modifier.fillMaxWidth().height(3.dp))
|
||||
}
|
||||
!k.signedIn -> Box(Modifier.fillMaxWidth().verticalScroll(scroll).padding(top = 4.dp, bottom = 16.dp)) { SignInCard(st, viewportH - 20.dp) }
|
||||
else -> Storefront(
|
||||
st, k.tab, query, s, a, grids.getOrPut(k) { LazyGridState() },
|
||||
clearSearchFocus = openGame != null,
|
||||
onQuery = { query = it }, onOpen = { open(it) }, onTab = { switchTab(it) },
|
||||
)
|
||||
else -> Storefront(st, k.tab, query, s, a, grids.getOrPut(k) { LazyGridState() }, onQuery = { query = it }, onOpen = { open(it) }, onTab = { switchTab(it) })
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -545,7 +538,7 @@ internal fun StoresPage(s: FrontEndState, a: FrontEndActions, modifier: Modifier
|
||||
seenActive.clear(); seenActive.addAll(activeKeys)
|
||||
if (fresh.isNotEmpty()) StoresMotion.takeInstall()?.let { StoresMotion.fly(it) }
|
||||
}
|
||||
StoresState.pendingInstall?.let { item -> StoreTheme(item.store) { InstallWhere(item) } }
|
||||
StoresState.pendingInstall?.let { item -> InstallWhere(item) }
|
||||
}
|
||||
|
||||
@Composable
|
||||
@@ -944,7 +937,6 @@ internal fun StoreLogo(store: Store, size: Dp) {
|
||||
private fun Storefront(
|
||||
store: Store, tab: String, query: String, s: FrontEndState, a: FrontEndActions,
|
||||
grid: LazyGridState,
|
||||
clearSearchFocus: Boolean,
|
||||
onQuery: (String) -> Unit, onOpen: (String) -> Unit, onTab: (String) -> Unit,
|
||||
) {
|
||||
val ctx = LocalContext.current
|
||||
@@ -962,8 +954,7 @@ private fun Storefront(
|
||||
val everything = remember(library, shelves, found) { (found + library + (shelves?.all ?: emptyList())).distinctBy { it.id } }
|
||||
LaunchedEffect(store, q) { StoresState.search(ctx, store, q) }
|
||||
val loaded = StoresState.library.containsKey(store)
|
||||
val browsing = store == Store.ITCH && tab == "store" && q.isEmpty() && ItchBrowseState.active
|
||||
val showGrid = tab != "store" || q.isNotEmpty() || browsing
|
||||
val showGrid = tab != "store" || q.isNotEmpty()
|
||||
val sort = s.storesSort
|
||||
val lastPlayedFor = remember(s.steamGames) {
|
||||
val byKey = s.steamGames.associate { "${it.source}:${it.storeId}" to it.lastPlayed }
|
||||
@@ -976,13 +967,8 @@ private fun Storefront(
|
||||
lookup
|
||||
}
|
||||
val isSizeSort = tab == "library" && (sort == "sizeAsc" || sort == "sizeDesc")
|
||||
val browseItems = if (browsing) ItchBrowseState.items else emptyList()
|
||||
val candidates = remember(library, everything, tab, q, s.storesShowMature, browsing, browseItems) {
|
||||
if (tab == "library") library.filter(::matches)
|
||||
else if (browsing) {
|
||||
val owned = library.associateBy { it.id }
|
||||
browseItems.map { owned[it.id] ?: it }.filter(::shown)
|
||||
} else everything.filter { matches(it) && shown(it) }
|
||||
val candidates = remember(library, everything, tab, q, s.storesShowMature) {
|
||||
if (tab == "library") library.filter(::matches) else everything.filter { matches(it) && shown(it) }
|
||||
}
|
||||
val candidateKeys = remember(candidates) { candidates.map { it.key } }
|
||||
var resolvedSizeSortKey by remember(store, tab) { mutableStateOf<List<String>?>(null) }
|
||||
@@ -1020,8 +1006,6 @@ private fun Storefront(
|
||||
}
|
||||
val empty = stringResource(when {
|
||||
tab == "library" && library.isEmpty() && StoresState.status[store] != null -> R.string.stores_library_loading
|
||||
browsing && ItchBrowseState.loading -> R.string.stores_shelves_loading
|
||||
browsing && ItchBrowseState.failed -> R.string.stores_itch_browse_failed
|
||||
else -> R.string.stores_nothing_matches
|
||||
})
|
||||
var firstPlaced = false
|
||||
@@ -1032,9 +1016,8 @@ private fun Storefront(
|
||||
// A bar only where the tab has nothing else on it: shelves, the shelf of owned games, or a grid still loading.
|
||||
val gridEmpty = if (showGrid) visible.isEmpty() else (shelves == null || shelves.isEmpty) && library.isEmpty()
|
||||
val barLine = StoresState.status[store]?.takeIf { gridEmpty && syncCount(it) != null }
|
||||
val itchBar = store == Store.ITCH && tab == "store" && q.isEmpty()
|
||||
val headerItems = 1 + (if (sizeSortPending) 1 else 0) + (if (barLine != null) 1 else 0) +
|
||||
(if (StoresState.problems[store] != null) 1 else 0) + (if (itchBar) 1 else 0)
|
||||
(if (StoresState.problems[store] != null) 1 else 0)
|
||||
val listMode = s.storesView == "list" && tab == "library"
|
||||
val capsules = s.storesView == "capsules" && tab == "library"
|
||||
val tileWidth = if (capsules) CapsuleWidth else CardWidth
|
||||
@@ -1089,7 +1072,6 @@ private fun Storefront(
|
||||
libraryLabel,
|
||||
query, onQuery,
|
||||
placeholder = if (tab == "store") stringResource(R.string.stores_search_catalog, store.label) else stringResource(R.string.stores_search_library),
|
||||
clearSearchFocus = clearSearchFocus,
|
||||
lead = if (tabs.size < 2) null else { {
|
||||
val labels = tabs.map { if (it == "store") stringResource(R.string.stores_tab_store) else libraryLabel }
|
||||
HeaderTabs(labels, tabs.indexOf(tab).coerceAtLeast(0)) { onTab(tabs[it]) }
|
||||
@@ -1120,7 +1102,6 @@ private fun Storefront(
|
||||
}
|
||||
barLine?.let { line -> item(key = "sync", span = { GridItemSpan(maxLineSpan) }) { Rise(3) { SyncBar(line) } } }
|
||||
StoresState.problems[store]?.let { line -> item(key = "problem", span = { GridItemSpan(maxLineSpan) }) { Rise(3) { Box(Modifier.padding(bottom = 8.dp)) { Note(line) } } } }
|
||||
if (itchBar) item(key = "itch-browse-bar", span = { GridItemSpan(maxLineSpan) }) { ItchBrowseBar() }
|
||||
when (tab) {
|
||||
"library" -> if (!loaded) Unit
|
||||
else if (split == 0) storeGrid(visible, empty, card)
|
||||
@@ -1131,10 +1112,8 @@ private fun Storefront(
|
||||
storeGrid(visible.drop(split), empty, card)
|
||||
}
|
||||
else -> {
|
||||
if (q.isNotEmpty() || browsing) {
|
||||
storeGrid(visible, empty, card)
|
||||
if (browsing) item(key = "itch-more", span = { GridItemSpan(maxLineSpan) }) { ItchLoadMore() }
|
||||
} else {
|
||||
if (q.isNotEmpty()) storeGrid(visible, empty, card)
|
||||
else {
|
||||
item(key = "shelves", span = { GridItemSpan(maxLineSpan) }) {
|
||||
Column {
|
||||
Shelf(stringResource(R.string.stores_shelf_new), shelf(shelves?.whatsNew), card)
|
||||
@@ -1193,7 +1172,6 @@ private fun HeaderTabs(labels: List<String>, selected: Int, onSelect: (Int) -> U
|
||||
@Composable
|
||||
internal fun ModeHeader(
|
||||
title: String, query: String, onQuery: (String) -> Unit, placeholder: String,
|
||||
clearSearchFocus: Boolean = false,
|
||||
lead: (@Composable () -> Unit)? = null, trailing: @Composable () -> Unit,
|
||||
) {
|
||||
val colors = MaterialTheme.colorScheme
|
||||
@@ -1215,7 +1193,6 @@ internal fun ModeHeader(
|
||||
AdbTextField(
|
||||
value = query, onValueChange = onQuery, label = "", keyboardType = KeyboardType.Text, imeAction = ImeAction.Search,
|
||||
placeholder = placeholder, compact = true, focusOnShow = focusOnOpen,
|
||||
clearFocus = clearSearchFocus,
|
||||
onFocusChange = { focused -> if (!focused && query.isEmpty()) { searching = false; focusOnOpen = false } },
|
||||
)
|
||||
}
|
||||
|
||||
@@ -356,7 +356,6 @@ internal fun AdbTextField(
|
||||
placeholder: String? = null,
|
||||
compact: Boolean = false,
|
||||
onFocusChange: (Boolean) -> Unit = {},
|
||||
clearFocus: Boolean = false,
|
||||
onNext: (() -> Unit)? = null,
|
||||
onDone: (() -> Unit)? = null,
|
||||
focusOnShow: Boolean = false,
|
||||
@@ -445,11 +444,6 @@ internal fun AdbTextField(
|
||||
?.showSoftInput(editText, android.view.inputmethod.InputMethodManager.SHOW_IMPLICIT)
|
||||
}
|
||||
}
|
||||
if (clearFocus && editText.hasFocus()) {
|
||||
editText.clearFocus()
|
||||
(editText.context.getSystemService(android.content.Context.INPUT_METHOD_SERVICE) as? android.view.inputmethod.InputMethodManager)
|
||||
?.hideSoftInputFromWindow(editText.windowToken, 0)
|
||||
}
|
||||
editText.setTextColor(colors.onBackground.toArgb())
|
||||
editText.setHintTextColor(colors.onSurfaceVariant.toArgb())
|
||||
editText.hint = placeholder
|
||||
|
||||
@@ -2088,23 +2088,6 @@
|
||||
<string name="stores_itch_no_exe">لم يتم العثور على لعبة Windows في التنزيل</string>
|
||||
<string name="stores_itch_extract_failed">تعذر استخراج التنزيل (رمز الخروج %1$d)</string>
|
||||
<string name="stores_itch_no_catalog">لم يستجب itch.io</string>
|
||||
<string name="stores_itch_sort_popular">الأكثر شعبية</string>
|
||||
<string name="stores_itch_sort_new">الأحدث</string>
|
||||
<string name="stores_itch_sort_new_popular">جديد ورائج</string>
|
||||
<string name="stores_itch_price_paid">مدفوع</string>
|
||||
<string name="stores_itch_price_under_5">5 دولارات أو أقل</string>
|
||||
<string name="stores_itch_price_under_15">15 دولارًا أو أقل</string>
|
||||
<string name="stores_itch_sort_top_rated">الأعلى تقييمًا</string>
|
||||
<string name="stores_itch_sort_top_sellers">الأكثر مبيعًا</string>
|
||||
<string name="stores_itch_price_any">أي سعر</string>
|
||||
<string name="stores_itch_price_free">مجاني</string>
|
||||
<string name="stores_itch_price_sale">مخفّض</string>
|
||||
<string name="stores_itch_load_more">تحميل المزيد</string>
|
||||
<string name="stores_itch_platform_any">أي منصة</string>
|
||||
<string name="stores_itch_platform_mobile_web">ويب الجوال</string>
|
||||
<string name="stores_itch_tag_add">إضافة وسم</string>
|
||||
<string name="stores_itch_tag_title">التصفية حسب الوسم</string>
|
||||
<string name="stores_itch_browse_failed">تعذّر تحميل الألعاب من itch.io</string>
|
||||
<string name="stores_itch_archive">أرشيفات %1$s غير مدعومة</string>
|
||||
<string name="stores_itch_download_failed">استجاب itch.io بـ HTTP %1$d</string>
|
||||
<string name="stores_free">مجاني</string>
|
||||
@@ -2259,7 +2242,6 @@
|
||||
<string name="stores_login_close">إغلاق</string>
|
||||
<string name="stores_login_retry">حاوِل مرة أخرى</string>
|
||||
<string name="stores_login_finishing">جارٍ إنهاء تسجيل الدخول…</string>
|
||||
<string name="stores_xbox_sign_in_again">رفضت Microsoft تسجيل الدخول إلى Xbox. سجّل الخروج من Xbox في المتاجر، ثم سجّل الدخول مجددًا، ثم استأنف.</string>
|
||||
<string name="stores_login_error_network">تعذّر تحميل صفحة تسجيل الدخول: %1$s</string>
|
||||
<string name="stores_login_error_idp_blocked">يرفض هذا المزوّد تسجيل الدخول من صفحة مضمَّنة. سجِّل الدخول باستخدام كلمة مرور المتجر بدلاً من ذلك.</string>
|
||||
<string name="stores_login_error_http">استجابت صفحة تسجيل الدخول بخطأ (HTTP %1$d).</string>
|
||||
|
||||
@@ -2194,7 +2194,6 @@
|
||||
<string name="stores_login_close">Cerrar</string>
|
||||
<string name="stores_login_retry">Reintentar</string>
|
||||
<string name="stores_login_finishing">Terminando de iniciar sesión…</string>
|
||||
<string name="stores_xbox_sign_in_again">Microsoft rechazó el inicio de sesión de Xbox. Cierra sesión de Xbox en Tiendas, vuelve a iniciar sesión y luego reanuda.</string>
|
||||
<string name="stores_login_error_network">No se pudo cargar la página de inicio de sesión: %1$s</string>
|
||||
<string name="stores_login_error_idp_blocked">Este proveedor no permite iniciar sesión desde una página integrada. Inicia sesión con la contraseña de la tienda.</string>
|
||||
<string name="stores_login_error_http">La página de inicio de sesión respondió con un error (HTTP %1$d).</string>
|
||||
@@ -2772,23 +2771,6 @@
|
||||
<string name="stores_itch_no_exe">No se encontró un juego de Windows en la descarga</string>
|
||||
<string name="stores_itch_extract_failed">No se pudo extraer la descarga (salida %1$d)</string>
|
||||
<string name="stores_itch_no_catalog">itch.io no respondió</string>
|
||||
<string name="stores_itch_sort_popular">Populares</string>
|
||||
<string name="stores_itch_sort_new">Más recientes</string>
|
||||
<string name="stores_itch_sort_new_popular">Nuevos y populares</string>
|
||||
<string name="stores_itch_price_paid">De pago</string>
|
||||
<string name="stores_itch_price_under_5">$5 o menos</string>
|
||||
<string name="stores_itch_price_under_15">$15 o menos</string>
|
||||
<string name="stores_itch_sort_top_rated">Mejor valorados</string>
|
||||
<string name="stores_itch_sort_top_sellers">Más vendidos</string>
|
||||
<string name="stores_itch_price_any">Cualquier precio</string>
|
||||
<string name="stores_itch_price_free">Gratis</string>
|
||||
<string name="stores_itch_price_sale">En oferta</string>
|
||||
<string name="stores_itch_load_more">Cargar más</string>
|
||||
<string name="stores_itch_platform_any">Cualquier plataforma</string>
|
||||
<string name="stores_itch_platform_mobile_web">Web móvil</string>
|
||||
<string name="stores_itch_tag_add">Agregar una etiqueta</string>
|
||||
<string name="stores_itch_tag_title">Filtrar por etiqueta</string>
|
||||
<string name="stores_itch_browse_failed">No se pudieron cargar los juegos de itch.io</string>
|
||||
<string name="stores_itch_archive">Los archivos %1$s no son compatibles</string>
|
||||
<string name="stores_itch_download_failed">itch.io respondió HTTP %1$d</string>
|
||||
<string name="glasses_experimental">Cámaras Luma Ultra — Experimental</string>
|
||||
|
||||
@@ -2004,23 +2004,6 @@
|
||||
<string name="stores_itch_no_exe">В изтеглянето не е намерена игра за Windows</string>
|
||||
<string name="stores_itch_extract_failed">Изтеглянето не можа да бъде разархивирано (код %1$d)</string>
|
||||
<string name="stores_itch_no_catalog">itch.io не отговори</string>
|
||||
<string name="stores_itch_sort_popular">Популярни</string>
|
||||
<string name="stores_itch_sort_new">Най-нови</string>
|
||||
<string name="stores_itch_sort_new_popular">Нови и популярни</string>
|
||||
<string name="stores_itch_price_paid">Платени</string>
|
||||
<string name="stores_itch_price_under_5">До $5</string>
|
||||
<string name="stores_itch_price_under_15">До $15</string>
|
||||
<string name="stores_itch_sort_top_rated">Най-високо оценени</string>
|
||||
<string name="stores_itch_sort_top_sellers">Най-продавани</string>
|
||||
<string name="stores_itch_price_any">Всякаква цена</string>
|
||||
<string name="stores_itch_price_free">Безплатни</string>
|
||||
<string name="stores_itch_price_sale">С намаление</string>
|
||||
<string name="stores_itch_load_more">Зареди още</string>
|
||||
<string name="stores_itch_platform_any">Всяка платформа</string>
|
||||
<string name="stores_itch_platform_mobile_web">Мобилен уеб</string>
|
||||
<string name="stores_itch_tag_add">Добавяне на таг</string>
|
||||
<string name="stores_itch_tag_title">Филтриране по таг</string>
|
||||
<string name="stores_itch_browse_failed">Игрите от itch.io не можаха да се заредят</string>
|
||||
<string name="stores_itch_archive">Архивите %1$s не се поддържат</string>
|
||||
<string name="stores_itch_download_failed">itch.io отговори HTTP %1$d</string>
|
||||
<string name="stores_free">Безплатна</string>
|
||||
@@ -2175,7 +2158,6 @@
|
||||
<string name="stores_login_close">Затвори</string>
|
||||
<string name="stores_login_retry">Опитай отново</string>
|
||||
<string name="stores_login_finishing">Завършване на входа…</string>
|
||||
<string name="stores_xbox_sign_in_again">Microsoft отхвърли входа в Xbox. Излезте от Xbox в Магазини, влезте отново и след това продължете.</string>
|
||||
<string name="stores_login_error_network">Страницата за вход не можа да се зареди: %1$s</string>
|
||||
<string name="stores_login_error_idp_blocked">Този доставчик отказва вход от вградена страница. Впиши се с паролата си за магазина.</string>
|
||||
<string name="stores_login_error_http">Страницата за вход отговори с грешка (HTTP %1$d).</string>
|
||||
|
||||
@@ -2046,23 +2046,6 @@
|
||||
<string name="stores_itch_no_exe">Ve stahování nebyla nalezena hra pro Windows</string>
|
||||
<string name="stores_itch_extract_failed">Stažený soubor nelze rozbalit (kód %1$d)</string>
|
||||
<string name="stores_itch_no_catalog">itch.io neodpovědělo</string>
|
||||
<string name="stores_itch_sort_popular">Populární</string>
|
||||
<string name="stores_itch_sort_new">Nejnovější</string>
|
||||
<string name="stores_itch_sort_new_popular">Nové a populární</string>
|
||||
<string name="stores_itch_price_paid">Placené</string>
|
||||
<string name="stores_itch_price_under_5">Do $5</string>
|
||||
<string name="stores_itch_price_under_15">Do $15</string>
|
||||
<string name="stores_itch_sort_top_rated">Nejlépe hodnocené</string>
|
||||
<string name="stores_itch_sort_top_sellers">Nejprodávanější</string>
|
||||
<string name="stores_itch_price_any">Jakákoli cena</string>
|
||||
<string name="stores_itch_price_free">Zdarma</string>
|
||||
<string name="stores_itch_price_sale">Ve slevě</string>
|
||||
<string name="stores_itch_load_more">Načíst další</string>
|
||||
<string name="stores_itch_platform_any">Libovolná platforma</string>
|
||||
<string name="stores_itch_platform_mobile_web">Mobilní web</string>
|
||||
<string name="stores_itch_tag_add">Přidat štítek</string>
|
||||
<string name="stores_itch_tag_title">Filtrovat podle štítku</string>
|
||||
<string name="stores_itch_browse_failed">Hry z itch.io se nepodařilo načíst</string>
|
||||
<string name="stores_itch_archive">Archivy %1$s nejsou podporovány</string>
|
||||
<string name="stores_itch_download_failed">itch.io odpovědělo HTTP %1$d</string>
|
||||
<string name="stores_free">Zdarma</string>
|
||||
@@ -2217,7 +2200,6 @@
|
||||
<string name="stores_login_close">Zavřít</string>
|
||||
<string name="stores_login_retry">Zkusit znovu</string>
|
||||
<string name="stores_login_finishing">Dokončování přihlášení…</string>
|
||||
<string name="stores_xbox_sign_in_again">Microsoft odmítl přihlášení k Xboxu. V Obchodech se z Xboxu odhlaste, znovu se přihlaste a pak pokračujte.</string>
|
||||
<string name="stores_login_error_network">Přihlašovací stránku se nepodařilo načíst: %1$s</string>
|
||||
<string name="stores_login_error_idp_blocked">Tento poskytovatel odmítá přihlášení ze vložené stránky. Přihlaste se místo toho heslem k obchodu.</string>
|
||||
<string name="stores_login_error_http">Přihlašovací stránka odpověděla chybou (HTTP %1$d).</string>
|
||||
|
||||
@@ -2004,23 +2004,6 @@
|
||||
<string name="stores_itch_no_exe">Der blev ikke fundet et Windows-spil i downloaden</string>
|
||||
<string name="stores_itch_extract_failed">Downloaden kunne ikke udpakkes (kode %1$d)</string>
|
||||
<string name="stores_itch_no_catalog">itch.io svarede ikke</string>
|
||||
<string name="stores_itch_sort_popular">Populære</string>
|
||||
<string name="stores_itch_sort_new">Seneste</string>
|
||||
<string name="stores_itch_sort_new_popular">Nye og populære</string>
|
||||
<string name="stores_itch_price_paid">Betalt</string>
|
||||
<string name="stores_itch_price_under_5">$5 eller mindre</string>
|
||||
<string name="stores_itch_price_under_15">$15 eller mindre</string>
|
||||
<string name="stores_itch_sort_top_rated">Bedst bedømte</string>
|
||||
<string name="stores_itch_sort_top_sellers">Mest solgte</string>
|
||||
<string name="stores_itch_price_any">Alle priser</string>
|
||||
<string name="stores_itch_price_free">Gratis</string>
|
||||
<string name="stores_itch_price_sale">På tilbud</string>
|
||||
<string name="stores_itch_load_more">Indlæs flere</string>
|
||||
<string name="stores_itch_platform_any">Alle platforme</string>
|
||||
<string name="stores_itch_platform_mobile_web">Mobilweb</string>
|
||||
<string name="stores_itch_tag_add">Tilføj et tag</string>
|
||||
<string name="stores_itch_tag_title">Filtrer efter tag</string>
|
||||
<string name="stores_itch_browse_failed">Kunne ikke hente spil fra itch.io</string>
|
||||
<string name="stores_itch_archive">%1$s-arkiver understøttes ikke</string>
|
||||
<string name="stores_itch_download_failed">itch.io svarede HTTP %1$d</string>
|
||||
<string name="stores_free">Gratis</string>
|
||||
@@ -2175,7 +2158,6 @@
|
||||
<string name="stores_login_close">Luk</string>
|
||||
<string name="stores_login_retry">Forsøg igen</string>
|
||||
<string name="stores_login_finishing">Afslutter login…</string>
|
||||
<string name="stores_xbox_sign_in_again">Microsoft afviste Xbox-login. Log ud af Xbox under Butikker, log ind igen, og genoptag derefter.</string>
|
||||
<string name="stores_login_error_network">Loginsiden kunne ikke indlæses: %1$s</string>
|
||||
<string name="stores_login_error_idp_blocked">Denne udbyder afviser login fra en indlejret side. Log i stedet ind med din butikskodeord.</string>
|
||||
<string name="stores_login_error_http">Loginsiden svarede med en fejl (HTTP %1$d).</string>
|
||||
|
||||
@@ -1996,23 +1996,6 @@
|
||||
<string name="stores_itch_no_exe">Im Download wurde kein Windows-Spiel gefunden</string>
|
||||
<string name="stores_itch_extract_failed">Download konnte nicht entpackt werden (Code %1$d)</string>
|
||||
<string name="stores_itch_no_catalog">itch.io hat nicht geantwortet</string>
|
||||
<string name="stores_itch_sort_popular">Beliebt</string>
|
||||
<string name="stores_itch_sort_new">Neueste</string>
|
||||
<string name="stores_itch_sort_new_popular">Neu und beliebt</string>
|
||||
<string name="stores_itch_price_paid">Kostenpflichtig</string>
|
||||
<string name="stores_itch_price_under_5">5 $ oder weniger</string>
|
||||
<string name="stores_itch_price_under_15">15 $ oder weniger</string>
|
||||
<string name="stores_itch_sort_top_rated">Bestbewertet</string>
|
||||
<string name="stores_itch_sort_top_sellers">Meistverkauft</string>
|
||||
<string name="stores_itch_price_any">Beliebiger Preis</string>
|
||||
<string name="stores_itch_price_free">Kostenlos</string>
|
||||
<string name="stores_itch_price_sale">Im Angebot</string>
|
||||
<string name="stores_itch_load_more">Mehr laden</string>
|
||||
<string name="stores_itch_platform_any">Beliebige Plattform</string>
|
||||
<string name="stores_itch_platform_mobile_web">Mobiles Web</string>
|
||||
<string name="stores_itch_tag_add">Tag hinzufügen</string>
|
||||
<string name="stores_itch_tag_title">Nach Tag filtern</string>
|
||||
<string name="stores_itch_browse_failed">Spiele von itch.io konnten nicht geladen werden</string>
|
||||
<string name="stores_itch_archive">%1$s-Archive werden nicht unterstützt</string>
|
||||
<string name="stores_itch_download_failed">itch.io antwortete mit HTTP %1$d</string>
|
||||
<string name="stores_free">Kostenlos</string>
|
||||
@@ -2164,7 +2147,6 @@
|
||||
<string name="stores_login_close">Schließen</string>
|
||||
<string name="stores_login_retry">Erneut versuchen</string>
|
||||
<string name="stores_login_finishing">Anmeldung wird abgeschlossen…</string>
|
||||
<string name="stores_xbox_sign_in_again">Microsoft hat die Xbox-Anmeldung abgelehnt. Melde dich unter Stores von Xbox ab, melde dich erneut an und setze dann fort.</string>
|
||||
<string name="stores_login_error_network">Die Anmeldeseite konnte nicht geladen werden: %1$s</string>
|
||||
<string name="stores_login_error_idp_blocked">Dieser Anbieter lässt keine Anmeldung über eine eingebettete Seite zu. Melde dich stattdessen mit deinem Store-Passwort an.</string>
|
||||
<string name="stores_login_error_http">Die Anmeldeseite antwortete mit einem Fehler (HTTP %1$d).</string>
|
||||
|
||||
@@ -2004,23 +2004,6 @@
|
||||
<string name="stores_itch_no_exe">Δεν βρέθηκε παιχνίδι Windows στη λήψη</string>
|
||||
<string name="stores_itch_extract_failed">Δεν ήταν δυνατή η αποσυμπίεση της λήψης (κωδικός %1$d)</string>
|
||||
<string name="stores_itch_no_catalog">Το itch.io δεν απάντησε</string>
|
||||
<string name="stores_itch_sort_popular">Δημοφιλή</string>
|
||||
<string name="stores_itch_sort_new">Πιο πρόσφατα</string>
|
||||
<string name="stores_itch_sort_new_popular">Νέα και δημοφιλή</string>
|
||||
<string name="stores_itch_price_paid">Επί πληρωμή</string>
|
||||
<string name="stores_itch_price_under_5">$5 ή λιγότερο</string>
|
||||
<string name="stores_itch_price_under_15">$15 ή λιγότερο</string>
|
||||
<string name="stores_itch_sort_top_rated">Κορυφαία βαθμολογία</string>
|
||||
<string name="stores_itch_sort_top_sellers">Μπεστ σέλερ</string>
|
||||
<string name="stores_itch_price_any">Οποιαδήποτε τιμή</string>
|
||||
<string name="stores_itch_price_free">Δωρεάν</string>
|
||||
<string name="stores_itch_price_sale">Σε προσφορά</string>
|
||||
<string name="stores_itch_load_more">Φόρτωση περισσότερων</string>
|
||||
<string name="stores_itch_platform_any">Οποιαδήποτε πλατφόρμα</string>
|
||||
<string name="stores_itch_platform_mobile_web">Mobile web</string>
|
||||
<string name="stores_itch_tag_add">Προσθήκη ετικέτας</string>
|
||||
<string name="stores_itch_tag_title">Φιλτράρισμα ανά ετικέτα</string>
|
||||
<string name="stores_itch_browse_failed">Δεν ήταν δυνατή η φόρτωση παιχνιδιών από το itch.io</string>
|
||||
<string name="stores_itch_archive">Τα αρχεία %1$s δεν υποστηρίζονται</string>
|
||||
<string name="stores_itch_download_failed">Το itch.io απάντησε HTTP %1$d</string>
|
||||
<string name="stores_free">Δωρεάν</string>
|
||||
@@ -2175,7 +2158,6 @@
|
||||
<string name="stores_login_close">Κλείσιμο</string>
|
||||
<string name="stores_login_retry">Δοκιμάστε ξανά</string>
|
||||
<string name="stores_login_finishing">Ολοκλήρωση σύνδεσης…</string>
|
||||
<string name="stores_xbox_sign_in_again">Η Microsoft απέρριψε τη σύνδεση στο Xbox. Αποσυνδεθείτε από το Xbox στα Καταστήματα, συνδεθείτε ξανά και μετά συνεχίστε.</string>
|
||||
<string name="stores_login_error_network">Δεν ήταν δυνατή η φόρτωση της σελίδας σύνδεσης: %1$s</string>
|
||||
<string name="stores_login_error_idp_blocked">Αυτός ο πάροχος αρνείται να συνδεθεί από μια ενσωματωμένη σελίδα. Συνδεθείτε με τον κωδικό πρόσβασης του καταστήματός σας αντ\' αυτού.</string>
|
||||
<string name="stores_login_error_http">Η σελίδα σύνδεσης απάντησε με σφάλμα (HTTP %1$d).</string>
|
||||
|
||||
@@ -2027,23 +2027,6 @@
|
||||
<string name="stores_itch_no_exe">No se ha encontrado un juego de Windows en la descarga</string>
|
||||
<string name="stores_itch_extract_failed">No se ha podido extraer la descarga (código %1$d)</string>
|
||||
<string name="stores_itch_no_catalog">itch.io no respondió</string>
|
||||
<string name="stores_itch_sort_popular">Populares</string>
|
||||
<string name="stores_itch_sort_new">Más recientes</string>
|
||||
<string name="stores_itch_sort_new_popular">Nuevos y populares</string>
|
||||
<string name="stores_itch_price_paid">De pago</string>
|
||||
<string name="stores_itch_price_under_5">5 $ o menos</string>
|
||||
<string name="stores_itch_price_under_15">15 $ o menos</string>
|
||||
<string name="stores_itch_sort_top_rated">Mejor valorados</string>
|
||||
<string name="stores_itch_sort_top_sellers">Más vendidos</string>
|
||||
<string name="stores_itch_price_any">Cualquier precio</string>
|
||||
<string name="stores_itch_price_free">Gratis</string>
|
||||
<string name="stores_itch_price_sale">En oferta</string>
|
||||
<string name="stores_itch_load_more">Cargar más</string>
|
||||
<string name="stores_itch_platform_any">Cualquier plataforma</string>
|
||||
<string name="stores_itch_platform_mobile_web">Web móvil</string>
|
||||
<string name="stores_itch_tag_add">Añadir una etiqueta</string>
|
||||
<string name="stores_itch_tag_title">Filtrar por etiqueta</string>
|
||||
<string name="stores_itch_browse_failed">No se pudieron cargar los juegos de itch.io</string>
|
||||
<string name="stores_itch_archive">Los archivos %1$s no son compatibles</string>
|
||||
<string name="stores_itch_download_failed">itch.io respondió HTTP %1$d</string>
|
||||
<string name="stores_free">Gratis</string>
|
||||
@@ -2195,7 +2178,6 @@
|
||||
<string name="stores_login_close">Cerrar</string>
|
||||
<string name="stores_login_retry">Reintentar</string>
|
||||
<string name="stores_login_finishing">Terminando de iniciar sesión…</string>
|
||||
<string name="stores_xbox_sign_in_again">Microsoft ha rechazado el inicio de sesión de Xbox. Cierra sesión de Xbox en Tiendas, vuelve a iniciar sesión y reanuda.</string>
|
||||
<string name="stores_login_error_network">No se pudo cargar la página de inicio de sesión: %1$s</string>
|
||||
<string name="stores_login_error_idp_blocked">Este proveedor no permite iniciar sesión desde una página integrada. Inicia sesión con la contraseña de la tienda.</string>
|
||||
<string name="stores_login_error_http">La página de inicio de sesión respondió con un error (HTTP %1$d).</string>
|
||||
|
||||
@@ -2004,23 +2004,6 @@
|
||||
<string name="stores_itch_no_exe">Latauksesta ei löytynyt Windows-peliä</string>
|
||||
<string name="stores_itch_extract_failed">Latausta ei voitu purkaa (koodi %1$d)</string>
|
||||
<string name="stores_itch_no_catalog">itch.io ei vastannut</string>
|
||||
<string name="stores_itch_sort_popular">Suositut</string>
|
||||
<string name="stores_itch_sort_new">Uusimmat</string>
|
||||
<string name="stores_itch_sort_new_popular">Uudet ja suositut</string>
|
||||
<string name="stores_itch_price_paid">Maksulliset</string>
|
||||
<string name="stores_itch_price_under_5">Enintään 5 $</string>
|
||||
<string name="stores_itch_price_under_15">Enintään 15 $</string>
|
||||
<string name="stores_itch_sort_top_rated">Parhaiten arvioidut</string>
|
||||
<string name="stores_itch_sort_top_sellers">Myydyimmät</string>
|
||||
<string name="stores_itch_price_any">Mikä tahansa hinta</string>
|
||||
<string name="stores_itch_price_free">Ilmaiset</string>
|
||||
<string name="stores_itch_price_sale">Alennuksessa</string>
|
||||
<string name="stores_itch_load_more">Lataa lisää</string>
|
||||
<string name="stores_itch_platform_any">Mikä tahansa alusta</string>
|
||||
<string name="stores_itch_platform_mobile_web">Mobiiliweb</string>
|
||||
<string name="stores_itch_tag_add">Lisää tunniste</string>
|
||||
<string name="stores_itch_tag_title">Suodata tunnisteella</string>
|
||||
<string name="stores_itch_browse_failed">Pelien lataaminen itch.io:sta epäonnistui</string>
|
||||
<string name="stores_itch_archive">%1$s-arkistot eivät ole tuettuja</string>
|
||||
<string name="stores_itch_download_failed">itch.io vastasi HTTP %1$d</string>
|
||||
<string name="stores_free">Ilmainen</string>
|
||||
@@ -2175,7 +2158,6 @@
|
||||
<string name="stores_login_close">Sulje</string>
|
||||
<string name="stores_login_retry">Yritä uudelleen</string>
|
||||
<string name="stores_login_finishing">Viimeistellään kirjautumista…</string>
|
||||
<string name="stores_xbox_sign_in_again">Microsoft hylkäsi Xbox-kirjautumisen. Kirjaudu ulos Xboxista Kaupoissa, kirjaudu uudelleen sisään ja jatka sitten.</string>
|
||||
<string name="stores_login_error_network">Kirjautumissivua ei voitu latata: %1$s</string>
|
||||
<string name="stores_login_error_idp_blocked">Tämä palveluntarjoaja ei salli kirjautumista upotetulta sivulta. Kirjaudu sisään kaupan salasanalla sen sijaan.</string>
|
||||
<string name="stores_login_error_http">Kirjautumissivu vastasi virheellä (HTTP %1$d).</string>
|
||||
|
||||
@@ -2027,23 +2027,6 @@
|
||||
<string name="stores_itch_no_exe">Aucun jeu Windows trouvé dans le téléchargement</string>
|
||||
<string name="stores_itch_extract_failed">Impossible d\'extraire le téléchargement (code %1$d)</string>
|
||||
<string name="stores_itch_no_catalog">itch.io n\'a pas répondu</string>
|
||||
<string name="stores_itch_sort_popular">Populaires</string>
|
||||
<string name="stores_itch_sort_new">Plus récents</string>
|
||||
<string name="stores_itch_sort_new_popular">Nouveautés populaires</string>
|
||||
<string name="stores_itch_price_paid">Payants</string>
|
||||
<string name="stores_itch_price_under_5">5 $ ou moins</string>
|
||||
<string name="stores_itch_price_under_15">15 $ ou moins</string>
|
||||
<string name="stores_itch_sort_top_rated">Les mieux notés</string>
|
||||
<string name="stores_itch_sort_top_sellers">Meilleures ventes</string>
|
||||
<string name="stores_itch_price_any">Tous les prix</string>
|
||||
<string name="stores_itch_price_free">Gratuits</string>
|
||||
<string name="stores_itch_price_sale">En promotion</string>
|
||||
<string name="stores_itch_load_more">Charger plus</string>
|
||||
<string name="stores_itch_platform_any">Toute plateforme</string>
|
||||
<string name="stores_itch_platform_mobile_web">Web mobile</string>
|
||||
<string name="stores_itch_tag_add">Ajouter un tag</string>
|
||||
<string name="stores_itch_tag_title">Filtrer par tag</string>
|
||||
<string name="stores_itch_browse_failed">Impossible de charger les jeux d\'itch.io</string>
|
||||
<string name="stores_itch_archive">Les archives %1$s ne sont pas prises en charge</string>
|
||||
<string name="stores_itch_download_failed">itch.io a répondu HTTP %1$d</string>
|
||||
<string name="stores_free">Gratuit</string>
|
||||
@@ -2195,7 +2178,6 @@
|
||||
<string name="stores_login_close">Fermer</string>
|
||||
<string name="stores_login_retry">Réessayer</string>
|
||||
<string name="stores_login_finishing">Finalisation de la connexion…</string>
|
||||
<string name="stores_xbox_sign_in_again">Microsoft a refusé la connexion Xbox. Déconnectez-vous de Xbox dans Boutiques, reconnectez-vous, puis reprenez.</string>
|
||||
<string name="stores_login_error_network">Impossible de charger la page de connexion : %1$s</string>
|
||||
<string name="stores_login_error_idp_blocked">Ce fournisseur refuse la connexion depuis une page intégrée. Connectez-vous plutôt avec le mot de passe de la boutique.</string>
|
||||
<string name="stores_login_error_http">La page de connexion a renvoyé une erreur (HTTP %1$d).</string>
|
||||
|
||||
@@ -2004,23 +2004,6 @@
|
||||
<string name="stores_itch_no_exe">डाउनलोड में कोई Windows गेम नहीं मिला</string>
|
||||
<string name="stores_itch_extract_failed">डाउनलोड एक्सट्रैक्ट नहीं हो सका (कोड %1$d)</string>
|
||||
<string name="stores_itch_no_catalog">itch.io ने जवाब नहीं दिया</string>
|
||||
<string name="stores_itch_sort_popular">लोकप्रिय</string>
|
||||
<string name="stores_itch_sort_new">सबसे हाल के</string>
|
||||
<string name="stores_itch_sort_new_popular">नए और लोकप्रिय</string>
|
||||
<string name="stores_itch_price_paid">सशुल्क</string>
|
||||
<string name="stores_itch_price_under_5">$5 या कम</string>
|
||||
<string name="stores_itch_price_under_15">$15 या कम</string>
|
||||
<string name="stores_itch_sort_top_rated">सबसे ऊँची रेटिंग</string>
|
||||
<string name="stores_itch_sort_top_sellers">सबसे ज़्यादा बिकने वाले</string>
|
||||
<string name="stores_itch_price_any">कोई भी कीमत</string>
|
||||
<string name="stores_itch_price_free">मुफ़्त</string>
|
||||
<string name="stores_itch_price_sale">सेल में</string>
|
||||
<string name="stores_itch_load_more">और लोड करें</string>
|
||||
<string name="stores_itch_platform_any">कोई भी प्लेटफ़ॉर्म</string>
|
||||
<string name="stores_itch_platform_mobile_web">मोबाइल वेब</string>
|
||||
<string name="stores_itch_tag_add">टैग जोड़ें</string>
|
||||
<string name="stores_itch_tag_title">टैग के अनुसार फ़िल्टर करें</string>
|
||||
<string name="stores_itch_browse_failed">itch.io से गेम लोड नहीं हो सके</string>
|
||||
<string name="stores_itch_archive">%1$s आर्काइव समर्थित नहीं हैं</string>
|
||||
<string name="stores_itch_download_failed">itch.io ने HTTP %1$d लौटाया</string>
|
||||
<string name="stores_free">फ़्री</string>
|
||||
@@ -2175,7 +2158,6 @@
|
||||
<string name="stores_login_close">बंद करें</string>
|
||||
<string name="stores_login_retry">फिर कोशिश करें</string>
|
||||
<string name="stores_login_finishing">साइन-इन पूरा हो रहा है…</string>
|
||||
<string name="stores_xbox_sign_in_again">Microsoft ने Xbox साइन-इन अस्वीकार कर दिया। स्टोर्स में Xbox से साइन आउट करें, फिर से साइन इन करें, फिर जारी रखें।</string>
|
||||
<string name="stores_login_error_network">साइन-इन पेज लोड नहीं हो सका: %1$s</string>
|
||||
<string name="stores_login_error_idp_blocked">यह प्रोवाइडर एम्बेडेड पेज से साइन इन करने से मना करता है। इसके बदले अपने स्टोर पासवर्ड से साइन इन करें।</string>
|
||||
<string name="stores_login_error_http">साइन-इन पेज ने एक एरर के साथ जवाब दिया (HTTP %1$d)।</string>
|
||||
|
||||
@@ -2004,23 +2004,6 @@
|
||||
<string name="stores_itch_no_exe">A letöltésben nem található Windows-játék</string>
|
||||
<string name="stores_itch_extract_failed">A letöltés nem bontható ki (kód: %1$d)</string>
|
||||
<string name="stores_itch_no_catalog">Az itch.io nem válaszolt</string>
|
||||
<string name="stores_itch_sort_popular">Népszerű</string>
|
||||
<string name="stores_itch_sort_new">Legfrissebb</string>
|
||||
<string name="stores_itch_sort_new_popular">Új és népszerű</string>
|
||||
<string name="stores_itch_price_paid">Fizetős</string>
|
||||
<string name="stores_itch_price_under_5">Legfeljebb 5 $</string>
|
||||
<string name="stores_itch_price_under_15">Legfeljebb 15 $</string>
|
||||
<string name="stores_itch_sort_top_rated">Legjobbra értékelt</string>
|
||||
<string name="stores_itch_sort_top_sellers">Legkelendőbb</string>
|
||||
<string name="stores_itch_price_any">Bármilyen ár</string>
|
||||
<string name="stores_itch_price_free">Ingyenes</string>
|
||||
<string name="stores_itch_price_sale">Akciós</string>
|
||||
<string name="stores_itch_load_more">Továbbiak betöltése</string>
|
||||
<string name="stores_itch_platform_any">Bármely platform</string>
|
||||
<string name="stores_itch_platform_mobile_web">Mobilweb</string>
|
||||
<string name="stores_itch_tag_add">Címke hozzáadása</string>
|
||||
<string name="stores_itch_tag_title">Szűrés címke szerint</string>
|
||||
<string name="stores_itch_browse_failed">Nem sikerült betölteni a játékokat az itch.io-ról</string>
|
||||
<string name="stores_itch_archive">A(z) %1$s archívumok nem támogatottak</string>
|
||||
<string name="stores_itch_download_failed">Az itch.io HTTP %1$d választ adott</string>
|
||||
<string name="stores_free">Ingyenes</string>
|
||||
@@ -2175,7 +2158,6 @@
|
||||
<string name="stores_login_close">Bezárás</string>
|
||||
<string name="stores_login_retry">Próbálja újra</string>
|
||||
<string name="stores_login_finishing">A bejelentkezés befejezése…</string>
|
||||
<string name="stores_xbox_sign_in_again">A Microsoft elutasította az Xbox-bejelentkezést. Az Áruházakban jelentkezz ki az Xboxból, jelentkezz be újra, majd folytasd.</string>
|
||||
<string name="stores_login_error_network">Nem sikerült betölteni a bejelentkezési oldalt: %1$s</string>
|
||||
<string name="stores_login_error_idp_blocked">Ez a szolgáltató nem engedi a bejelentkezést egy beágyazott oldalról. Jelentkezzen be helyette az áruház jelszavával.</string>
|
||||
<string name="stores_login_error_http">A bejelentkezési oldal hibával válaszolt (HTTP %1$d).</string>
|
||||
|
||||
@@ -1983,23 +1983,6 @@
|
||||
<string name="stores_itch_no_exe">Tidak ada game Windows di unduhan</string>
|
||||
<string name="stores_itch_extract_failed">Tidak dapat mengekstrak unduhan (kode %1$d)</string>
|
||||
<string name="stores_itch_no_catalog">itch.io tidak menjawab</string>
|
||||
<string name="stores_itch_sort_popular">Populer</string>
|
||||
<string name="stores_itch_sort_new">Terbaru</string>
|
||||
<string name="stores_itch_sort_new_popular">Baru dan populer</string>
|
||||
<string name="stores_itch_price_paid">Berbayar</string>
|
||||
<string name="stores_itch_price_under_5">$5 atau kurang</string>
|
||||
<string name="stores_itch_price_under_15">$15 atau kurang</string>
|
||||
<string name="stores_itch_sort_top_rated">Rating tertinggi</string>
|
||||
<string name="stores_itch_sort_top_sellers">Terlaris</string>
|
||||
<string name="stores_itch_price_any">Harga apa saja</string>
|
||||
<string name="stores_itch_price_free">Gratis</string>
|
||||
<string name="stores_itch_price_sale">Diskon</string>
|
||||
<string name="stores_itch_load_more">Muat lebih banyak</string>
|
||||
<string name="stores_itch_platform_any">Platform apa saja</string>
|
||||
<string name="stores_itch_platform_mobile_web">Web seluler</string>
|
||||
<string name="stores_itch_tag_add">Tambah tag</string>
|
||||
<string name="stores_itch_tag_title">Filter berdasarkan tag</string>
|
||||
<string name="stores_itch_browse_failed">Tidak dapat memuat game dari itch.io</string>
|
||||
<string name="stores_itch_archive">Arsip %1$s tidak didukung</string>
|
||||
<string name="stores_itch_download_failed">itch.io menjawab HTTP %1$d</string>
|
||||
<string name="stores_free">Gratis</string>
|
||||
@@ -2154,7 +2137,6 @@
|
||||
<string name="stores_login_close">Tutup</string>
|
||||
<string name="stores_login_retry">Coba lagi</string>
|
||||
<string name="stores_login_finishing">Menyelesaikan proses masuk…</string>
|
||||
<string name="stores_xbox_sign_in_again">Microsoft menolak masuk Xbox. Keluar dari Xbox di Toko, masuk lagi, lalu lanjutkan.</string>
|
||||
<string name="stores_login_error_network">Halaman masuk tidak dapat dimuat: %1$s</string>
|
||||
<string name="stores_login_error_idp_blocked">Penyedia ini menolak proses masuk dari halaman tersemat. Masuk dengan kata sandi toko Anda sebagai gantinya.</string>
|
||||
<string name="stores_login_error_http">Halaman masuk merespons dengan kesalahan (HTTP %1$d).</string>
|
||||
|
||||
@@ -2017,23 +2017,6 @@
|
||||
<string name="stores_itch_no_exe">Nessun gioco Windows trovato nel download</string>
|
||||
<string name="stores_itch_extract_failed">Impossibile estrarre il download (codice %1$d)</string>
|
||||
<string name="stores_itch_no_catalog">itch.io non ha risposto</string>
|
||||
<string name="stores_itch_sort_popular">Popolari</string>
|
||||
<string name="stores_itch_sort_new">Più recenti</string>
|
||||
<string name="stores_itch_sort_new_popular">Nuovi e popolari</string>
|
||||
<string name="stores_itch_price_paid">A pagamento</string>
|
||||
<string name="stores_itch_price_under_5">5 $ o meno</string>
|
||||
<string name="stores_itch_price_under_15">15 $ o meno</string>
|
||||
<string name="stores_itch_sort_top_rated">I più votati</string>
|
||||
<string name="stores_itch_sort_top_sellers">I più venduti</string>
|
||||
<string name="stores_itch_price_any">Qualsiasi prezzo</string>
|
||||
<string name="stores_itch_price_free">Gratis</string>
|
||||
<string name="stores_itch_price_sale">In offerta</string>
|
||||
<string name="stores_itch_load_more">Carica altri</string>
|
||||
<string name="stores_itch_platform_any">Qualsiasi piattaforma</string>
|
||||
<string name="stores_itch_platform_mobile_web">Web mobile</string>
|
||||
<string name="stores_itch_tag_add">Aggiungi un tag</string>
|
||||
<string name="stores_itch_tag_title">Filtra per tag</string>
|
||||
<string name="stores_itch_browse_failed">Impossibile caricare i giochi da itch.io</string>
|
||||
<string name="stores_itch_archive">Gli archivi %1$s non sono supportati</string>
|
||||
<string name="stores_itch_download_failed">itch.io ha risposto HTTP %1$d</string>
|
||||
<string name="stores_free">Gratis</string>
|
||||
@@ -2185,7 +2168,6 @@
|
||||
<string name="stores_login_close">Chiudi</string>
|
||||
<string name="stores_login_retry">Riprova</string>
|
||||
<string name="stores_login_finishing">Completamento dell\'accesso…</string>
|
||||
<string name="stores_xbox_sign_in_again">Microsoft ha rifiutato l\'accesso a Xbox. Esci da Xbox in Negozi, accedi di nuovo, poi riprendi.</string>
|
||||
<string name="stores_login_error_network">Impossibile caricare la pagina di accesso: %1$s</string>
|
||||
<string name="stores_login_error_idp_blocked">Questo provider non consente l\'accesso da una pagina incorporata. Accedi invece con la password del negozio.</string>
|
||||
<string name="stores_login_error_http">La pagina di accesso ha risposto con un errore (HTTP %1$d).</string>
|
||||
|
||||
@@ -1985,23 +1985,6 @@
|
||||
<string name="stores_itch_no_exe">ダウンロードに Windows 版のゲームが見つかりません</string>
|
||||
<string name="stores_itch_extract_failed">ダウンロードを展開できませんでした (終了コード %1$d)</string>
|
||||
<string name="stores_itch_no_catalog">itch.io から応答がありません</string>
|
||||
<string name="stores_itch_sort_popular">人気</string>
|
||||
<string name="stores_itch_sort_new">新着順</string>
|
||||
<string name="stores_itch_sort_new_popular">新着&人気</string>
|
||||
<string name="stores_itch_price_paid">有料</string>
|
||||
<string name="stores_itch_price_under_5">5ドル以下</string>
|
||||
<string name="stores_itch_price_under_15">15ドル以下</string>
|
||||
<string name="stores_itch_sort_top_rated">高評価</string>
|
||||
<string name="stores_itch_sort_top_sellers">売れ筋</string>
|
||||
<string name="stores_itch_price_any">すべての価格</string>
|
||||
<string name="stores_itch_price_free">無料</string>
|
||||
<string name="stores_itch_price_sale">セール中</string>
|
||||
<string name="stores_itch_load_more">さらに読み込む</string>
|
||||
<string name="stores_itch_platform_any">すべてのプラットフォーム</string>
|
||||
<string name="stores_itch_platform_mobile_web">モバイルWeb</string>
|
||||
<string name="stores_itch_tag_add">タグを追加</string>
|
||||
<string name="stores_itch_tag_title">タグで絞り込む</string>
|
||||
<string name="stores_itch_browse_failed">itch.io のゲームを読み込めませんでした</string>
|
||||
<string name="stores_itch_archive">%1$s 形式のアーカイブには対応していません</string>
|
||||
<string name="stores_itch_download_failed">itch.io が HTTP %1$d を返しました</string>
|
||||
<string name="stores_free">無料</string>
|
||||
@@ -2156,7 +2139,6 @@
|
||||
<string name="stores_login_close">閉じる</string>
|
||||
<string name="stores_login_retry">再試行</string>
|
||||
<string name="stores_login_finishing">ログインを完了しています…</string>
|
||||
<string name="stores_xbox_sign_in_again">Microsoft が Xbox のサインインを拒否しました。ストアで Xbox からサインアウトし、もう一度サインインしてから再開してください。</string>
|
||||
<string name="stores_login_error_network">ログインページを読み込めませんでした:%1$s</string>
|
||||
<string name="stores_login_error_idp_blocked">このプロバイダーは埋め込みページからのログインを拒否しています。代わりにストアのパスワードでログインしてください。</string>
|
||||
<string name="stores_login_error_http">ログインページがエラーを返しました(HTTP %1$d)。</string>
|
||||
|
||||
@@ -1985,23 +1985,6 @@
|
||||
<string name="stores_itch_no_exe">다운로드에서 Windows 게임을 찾을 수 없습니다</string>
|
||||
<string name="stores_itch_extract_failed">다운로드한 파일의 압축을 풀 수 없습니다(코드 %1$d)</string>
|
||||
<string name="stores_itch_no_catalog">itch.io가 응답하지 않았습니다</string>
|
||||
<string name="stores_itch_sort_popular">인기</string>
|
||||
<string name="stores_itch_sort_new">최신순</string>
|
||||
<string name="stores_itch_sort_new_popular">신규 및 인기</string>
|
||||
<string name="stores_itch_price_paid">유료</string>
|
||||
<string name="stores_itch_price_under_5">$5 이하</string>
|
||||
<string name="stores_itch_price_under_15">$15 이하</string>
|
||||
<string name="stores_itch_sort_top_rated">평점 높은 순</string>
|
||||
<string name="stores_itch_sort_top_sellers">베스트셀러</string>
|
||||
<string name="stores_itch_price_any">모든 가격</string>
|
||||
<string name="stores_itch_price_free">무료</string>
|
||||
<string name="stores_itch_price_sale">할인 중</string>
|
||||
<string name="stores_itch_load_more">더 불러오기</string>
|
||||
<string name="stores_itch_platform_any">모든 플랫폼</string>
|
||||
<string name="stores_itch_platform_mobile_web">모바일 웹</string>
|
||||
<string name="stores_itch_tag_add">태그 추가</string>
|
||||
<string name="stores_itch_tag_title">태그로 필터링</string>
|
||||
<string name="stores_itch_browse_failed">itch.io에서 게임을 불러오지 못했습니다</string>
|
||||
<string name="stores_itch_archive">%1$s 압축 파일은 지원하지 않습니다</string>
|
||||
<string name="stores_itch_download_failed">itch.io가 HTTP %1$d을(를) 반환했습니다</string>
|
||||
<string name="stores_free">무료</string>
|
||||
@@ -2156,7 +2139,6 @@
|
||||
<string name="stores_login_close">닫기</string>
|
||||
<string name="stores_login_retry">다시 시도</string>
|
||||
<string name="stores_login_finishing">로그인 완료 중…</string>
|
||||
<string name="stores_xbox_sign_in_again">Microsoft에서 Xbox 로그인을 거부했습니다. 스토어에서 Xbox 로그아웃 후 다시 로그인한 다음 재개하세요.</string>
|
||||
<string name="stores_login_error_network">로그인 페이지를 불러올 수 없습니다: %1$s</string>
|
||||
<string name="stores_login_error_idp_blocked">이 제공업체는 앱에 포함된 페이지에서 로그인을 허용하지 않습니다. 대신 스토어 비밀번호로 로그인하세요.</string>
|
||||
<string name="stores_login_error_http">로그인 페이지에서 오류를 반환했습니다(HTTP %1$d).</string>
|
||||
|
||||
@@ -1983,23 +1983,6 @@
|
||||
<string name="stores_itch_no_exe">Tiada permainan Windows ditemui dalam muat turun</string>
|
||||
<string name="stores_itch_extract_failed">Tidak dapat mengekstrak muat turun (kod %1$d)</string>
|
||||
<string name="stores_itch_no_catalog">itch.io tidak menjawab</string>
|
||||
<string name="stores_itch_sort_popular">Popular</string>
|
||||
<string name="stores_itch_sort_new">Terkini</string>
|
||||
<string name="stores_itch_sort_new_popular">Baharu dan popular</string>
|
||||
<string name="stores_itch_price_paid">Berbayar</string>
|
||||
<string name="stores_itch_price_under_5">$5 atau kurang</string>
|
||||
<string name="stores_itch_price_under_15">$15 atau kurang</string>
|
||||
<string name="stores_itch_sort_top_rated">Penilaian tertinggi</string>
|
||||
<string name="stores_itch_sort_top_sellers">Terlaris</string>
|
||||
<string name="stores_itch_price_any">Sebarang harga</string>
|
||||
<string name="stores_itch_price_free">Percuma</string>
|
||||
<string name="stores_itch_price_sale">Diskaun</string>
|
||||
<string name="stores_itch_load_more">Muat lagi</string>
|
||||
<string name="stores_itch_platform_any">Mana-mana platform</string>
|
||||
<string name="stores_itch_platform_mobile_web">Web mudah alih</string>
|
||||
<string name="stores_itch_tag_add">Tambah tag</string>
|
||||
<string name="stores_itch_tag_title">Tapis mengikut tag</string>
|
||||
<string name="stores_itch_browse_failed">Tidak dapat memuatkan permainan daripada itch.io</string>
|
||||
<string name="stores_itch_archive">Arkib %1$s tidak disokong</string>
|
||||
<string name="stores_itch_download_failed">itch.io menjawab HTTP %1$d</string>
|
||||
<string name="stores_free">Percuma</string>
|
||||
@@ -2154,7 +2137,6 @@
|
||||
<string name="stores_login_close">Tutup</string>
|
||||
<string name="stores_login_retry">Cuba lagi</string>
|
||||
<string name="stores_login_finishing">Menyelesaikan log masuk…</string>
|
||||
<string name="stores_xbox_sign_in_again">Microsoft menolak log masuk Xbox. Log keluar daripada Xbox di Kedai, log masuk semula, kemudian sambung.</string>
|
||||
<string name="stores_login_error_network">Halaman log masuk tidak dapat dimuatkan: %1$s</string>
|
||||
<string name="stores_login_error_idp_blocked">Penyedia ini menolak log masuk daripada halaman terbenam. Log masuk dengan kata laluan kedai anda sebaliknya.</string>
|
||||
<string name="stores_login_error_http">Halaman log masuk menjawab dengan ralat (HTTP %1$d).</string>
|
||||
|
||||
@@ -2004,23 +2004,6 @@
|
||||
<string name="stores_itch_no_exe">Fant ikke noe Windows-spill i nedlastingen</string>
|
||||
<string name="stores_itch_extract_failed">Kunne ikke pakke ut nedlastingen (kode %1$d)</string>
|
||||
<string name="stores_itch_no_catalog">itch.io svarte ikke</string>
|
||||
<string name="stores_itch_sort_popular">Populære</string>
|
||||
<string name="stores_itch_sort_new">Nyeste</string>
|
||||
<string name="stores_itch_sort_new_popular">Nye og populære</string>
|
||||
<string name="stores_itch_price_paid">Betalt</string>
|
||||
<string name="stores_itch_price_under_5">$5 eller mindre</string>
|
||||
<string name="stores_itch_price_under_15">$15 eller mindre</string>
|
||||
<string name="stores_itch_sort_top_rated">Best vurdert</string>
|
||||
<string name="stores_itch_sort_top_sellers">Mest solgt</string>
|
||||
<string name="stores_itch_price_any">Alle priser</string>
|
||||
<string name="stores_itch_price_free">Gratis</string>
|
||||
<string name="stores_itch_price_sale">På salg</string>
|
||||
<string name="stores_itch_load_more">Last inn flere</string>
|
||||
<string name="stores_itch_platform_any">Alle plattformer</string>
|
||||
<string name="stores_itch_platform_mobile_web">Web på mobil</string>
|
||||
<string name="stores_itch_tag_add">Legg til en tagg</string>
|
||||
<string name="stores_itch_tag_title">Filtrer etter tagg</string>
|
||||
<string name="stores_itch_browse_failed">Kunne ikke laste spill fra itch.io</string>
|
||||
<string name="stores_itch_archive">%1$s-arkiver støttes ikke</string>
|
||||
<string name="stores_itch_download_failed">itch.io svarte HTTP %1$d</string>
|
||||
<string name="stores_free">Gratis</string>
|
||||
@@ -2175,7 +2158,6 @@
|
||||
<string name="stores_login_close">Lukk</string>
|
||||
<string name="stores_login_retry">Prøv igjen</string>
|
||||
<string name="stores_login_finishing">Fullfører innlogging…</string>
|
||||
<string name="stores_xbox_sign_in_again">Microsoft avviste Xbox-påloggingen. Logg ut av Xbox under Butikker, logg på igjen, og fortsett deretter.</string>
|
||||
<string name="stores_login_error_network">Innloggingssiden kunne ikke lastes: %1$s</string>
|
||||
<string name="stores_login_error_idp_blocked">Denne leverandøren tillater ikke innlogging fra en innebygd side. Logg inn med butikkpassordet ditt i stedet.</string>
|
||||
<string name="stores_login_error_http">Innloggingssiden svarte med en feil (HTTP %1$d).</string>
|
||||
|
||||
@@ -2004,23 +2004,6 @@
|
||||
<string name="stores_itch_no_exe">Geen Windows-game gevonden in de download</string>
|
||||
<string name="stores_itch_extract_failed">Download kan niet worden uitgepakt (code %1$d)</string>
|
||||
<string name="stores_itch_no_catalog">itch.io gaf geen antwoord</string>
|
||||
<string name="stores_itch_sort_popular">Populair</string>
|
||||
<string name="stores_itch_sort_new">Meest recent</string>
|
||||
<string name="stores_itch_sort_new_popular">Nieuw en populair</string>
|
||||
<string name="stores_itch_price_paid">Betaald</string>
|
||||
<string name="stores_itch_price_under_5">$5 of minder</string>
|
||||
<string name="stores_itch_price_under_15">$15 of minder</string>
|
||||
<string name="stores_itch_sort_top_rated">Hoogst beoordeeld</string>
|
||||
<string name="stores_itch_sort_top_sellers">Bestverkocht</string>
|
||||
<string name="stores_itch_price_any">Elke prijs</string>
|
||||
<string name="stores_itch_price_free">Gratis</string>
|
||||
<string name="stores_itch_price_sale">In de aanbieding</string>
|
||||
<string name="stores_itch_load_more">Meer laden</string>
|
||||
<string name="stores_itch_platform_any">Elk platform</string>
|
||||
<string name="stores_itch_platform_mobile_web">Mobiel web</string>
|
||||
<string name="stores_itch_tag_add">Tag toevoegen</string>
|
||||
<string name="stores_itch_tag_title">Filteren op tag</string>
|
||||
<string name="stores_itch_browse_failed">Games van itch.io konden niet worden geladen</string>
|
||||
<string name="stores_itch_archive">%1$s-archieven worden niet ondersteund</string>
|
||||
<string name="stores_itch_download_failed">itch.io antwoordde HTTP %1$d</string>
|
||||
<string name="stores_free">Gratis</string>
|
||||
@@ -2175,7 +2158,6 @@
|
||||
<string name="stores_login_close">Sluiten</string>
|
||||
<string name="stores_login_retry">Probeer het opnieuw</string>
|
||||
<string name="stores_login_finishing">Aanmelden afronden…</string>
|
||||
<string name="stores_xbox_sign_in_again">Microsoft heeft de Xbox-aanmelding geweigerd. Meld je af bij Xbox in Winkels, meld je opnieuw aan en hervat daarna.</string>
|
||||
<string name="stores_login_error_network">De aanmeldpagina kon niet worden geladen: %1$s</string>
|
||||
<string name="stores_login_error_idp_blocked">Deze provider staat geen aanmelding via een ingesloten pagina toe. Meld je in plaats daarvan aan met je winkelwachtwoord.</string>
|
||||
<string name="stores_login_error_http">De aanmeldpagina gaf een foutmelding (HTTP %1$d).</string>
|
||||
|
||||
@@ -2046,23 +2046,6 @@
|
||||
<string name="stores_itch_no_exe">W pobranych plikach nie znaleziono gry na Windows</string>
|
||||
<string name="stores_itch_extract_failed">Nie można rozpakować pobranego pliku (kod %1$d)</string>
|
||||
<string name="stores_itch_no_catalog">itch.io nie odpowiedziało</string>
|
||||
<string name="stores_itch_sort_popular">Popularne</string>
|
||||
<string name="stores_itch_sort_new">Najnowsze</string>
|
||||
<string name="stores_itch_sort_new_popular">Nowe i popularne</string>
|
||||
<string name="stores_itch_price_paid">Płatne</string>
|
||||
<string name="stores_itch_price_under_5">Do 5 $</string>
|
||||
<string name="stores_itch_price_under_15">Do 15 $</string>
|
||||
<string name="stores_itch_sort_top_rated">Najwyżej oceniane</string>
|
||||
<string name="stores_itch_sort_top_sellers">Najlepiej sprzedające się</string>
|
||||
<string name="stores_itch_price_any">Dowolna cena</string>
|
||||
<string name="stores_itch_price_free">Za darmo</string>
|
||||
<string name="stores_itch_price_sale">Na wyprzedaży</string>
|
||||
<string name="stores_itch_load_more">Wczytaj więcej</string>
|
||||
<string name="stores_itch_platform_any">Dowolna platforma</string>
|
||||
<string name="stores_itch_platform_mobile_web">Web mobilny</string>
|
||||
<string name="stores_itch_tag_add">Dodaj tag</string>
|
||||
<string name="stores_itch_tag_title">Filtruj według tagu</string>
|
||||
<string name="stores_itch_browse_failed">Nie udało się wczytać gier z itch.io</string>
|
||||
<string name="stores_itch_archive">Archiwa %1$s nie są obsługiwane</string>
|
||||
<string name="stores_itch_download_failed">itch.io odpowiedziało HTTP %1$d</string>
|
||||
<string name="stores_free">Bezpłatna</string>
|
||||
@@ -2220,7 +2203,6 @@
|
||||
<string name="stores_login_close">Zamknij</string>
|
||||
<string name="stores_login_retry">Spróbuj ponownie</string>
|
||||
<string name="stores_login_finishing">Kończenie logowania…</string>
|
||||
<string name="stores_xbox_sign_in_again">Microsoft odrzucił logowanie do Xbox. Wyloguj się z Xbox w Sklepach, zaloguj się ponownie, a potem wznów.</string>
|
||||
<string name="stores_login_error_network">Nie udało się wczytać strony logowania: %1$s</string>
|
||||
<string name="stores_login_error_idp_blocked">Ten dostawca odmawia logowania z osadzonej strony. Zaloguj się za pomocą hasła do sklepu.</string>
|
||||
<string name="stores_login_error_http">Strona logowania odpowiedziała błędem (HTTP %1$d).</string>
|
||||
|
||||
@@ -2017,23 +2017,6 @@
|
||||
<string name="stores_itch_no_exe">Não foi encontrado nenhum jogo para Windows na transferência</string>
|
||||
<string name="stores_itch_extract_failed">Não foi possível extrair a transferência (código %1$d)</string>
|
||||
<string name="stores_itch_no_catalog">O itch.io não respondeu</string>
|
||||
<string name="stores_itch_sort_popular">Populares</string>
|
||||
<string name="stores_itch_sort_new">Mais recentes</string>
|
||||
<string name="stores_itch_sort_new_popular">Novos e populares</string>
|
||||
<string name="stores_itch_price_paid">Pagos</string>
|
||||
<string name="stores_itch_price_under_5">5 $ ou menos</string>
|
||||
<string name="stores_itch_price_under_15">15 $ ou menos</string>
|
||||
<string name="stores_itch_sort_top_rated">Mais bem avaliados</string>
|
||||
<string name="stores_itch_sort_top_sellers">Mais vendidos</string>
|
||||
<string name="stores_itch_price_any">Qualquer preço</string>
|
||||
<string name="stores_itch_price_free">Grátis</string>
|
||||
<string name="stores_itch_price_sale">Em promoção</string>
|
||||
<string name="stores_itch_load_more">Carregar mais</string>
|
||||
<string name="stores_itch_platform_any">Qualquer plataforma</string>
|
||||
<string name="stores_itch_platform_mobile_web">Web móvel</string>
|
||||
<string name="stores_itch_tag_add">Adicionar uma etiqueta</string>
|
||||
<string name="stores_itch_tag_title">Filtrar por etiqueta</string>
|
||||
<string name="stores_itch_browse_failed">Não foi possível carregar os jogos do itch.io</string>
|
||||
<string name="stores_itch_archive">Ficheiros %1$s não são suportados</string>
|
||||
<string name="stores_itch_download_failed">O itch.io respondeu HTTP %1$d</string>
|
||||
<string name="stores_free">Grátis</string>
|
||||
@@ -2185,7 +2168,6 @@
|
||||
<string name="stores_login_close">Fechar</string>
|
||||
<string name="stores_login_retry">Tentar novamente</string>
|
||||
<string name="stores_login_finishing">A concluir o início de sessão…</string>
|
||||
<string name="stores_xbox_sign_in_again">A Microsoft recusou o início de sessão da Xbox. Termine a sessão da Xbox em Lojas, inicie sessão novamente e retome.</string>
|
||||
<string name="stores_login_error_network">Não foi possível carregar a página de início de sessão: %1$s</string>
|
||||
<string name="stores_login_error_idp_blocked">Este fornecedor recusa o início de sessão a partir de uma página incorporada. Inicie sessão com a palavra-passe da loja.</string>
|
||||
<string name="stores_login_error_http">A página de início de sessão respondeu com um erro (HTTP %1$d).</string>
|
||||
|
||||
@@ -2017,23 +2017,6 @@
|
||||
<string name="stores_itch_no_exe">Nenhum jogo para Windows encontrado no download</string>
|
||||
<string name="stores_itch_extract_failed">Não foi possível extrair o download (código %1$d)</string>
|
||||
<string name="stores_itch_no_catalog">O itch.io não respondeu</string>
|
||||
<string name="stores_itch_sort_popular">Populares</string>
|
||||
<string name="stores_itch_sort_new">Mais recentes</string>
|
||||
<string name="stores_itch_sort_new_popular">Novos e populares</string>
|
||||
<string name="stores_itch_price_paid">Pagos</string>
|
||||
<string name="stores_itch_price_under_5">US$ 5 ou menos</string>
|
||||
<string name="stores_itch_price_under_15">US$ 15 ou menos</string>
|
||||
<string name="stores_itch_sort_top_rated">Mais bem avaliados</string>
|
||||
<string name="stores_itch_sort_top_sellers">Mais vendidos</string>
|
||||
<string name="stores_itch_price_any">Qualquer preço</string>
|
||||
<string name="stores_itch_price_free">Grátis</string>
|
||||
<string name="stores_itch_price_sale">Em promoção</string>
|
||||
<string name="stores_itch_load_more">Carregar mais</string>
|
||||
<string name="stores_itch_platform_any">Qualquer plataforma</string>
|
||||
<string name="stores_itch_platform_mobile_web">Web mobile</string>
|
||||
<string name="stores_itch_tag_add">Adicionar uma tag</string>
|
||||
<string name="stores_itch_tag_title">Filtrar por tag</string>
|
||||
<string name="stores_itch_browse_failed">Não foi possível carregar os jogos do itch.io</string>
|
||||
<string name="stores_itch_archive">Arquivos %1$s não são suportados</string>
|
||||
<string name="stores_itch_download_failed">O itch.io respondeu HTTP %1$d</string>
|
||||
<string name="stores_free">Grátis</string>
|
||||
@@ -2185,7 +2168,6 @@
|
||||
<string name="stores_login_close">Fechar</string>
|
||||
<string name="stores_login_retry">Tentar de novo</string>
|
||||
<string name="stores_login_finishing">Concluindo o login…</string>
|
||||
<string name="stores_xbox_sign_in_again">A Microsoft recusou o login do Xbox. Saia do Xbox em Lojas, entre novamente e depois retome.</string>
|
||||
<string name="stores_login_error_network">Não foi possível carregar a página de login: %1$s</string>
|
||||
<string name="stores_login_error_idp_blocked">Este provedor não permite login a partir de uma página incorporada. Faça login com a senha da loja.</string>
|
||||
<string name="stores_login_error_http">A página de login respondeu com um erro (HTTP %1$d).</string>
|
||||
|
||||
@@ -2025,23 +2025,6 @@
|
||||
<string name="stores_itch_no_exe">Nu s-a găsit niciun joc Windows în descărcare</string>
|
||||
<string name="stores_itch_extract_failed">Descărcarea nu a putut fi extrasă (cod %1$d)</string>
|
||||
<string name="stores_itch_no_catalog">itch.io nu a răspuns</string>
|
||||
<string name="stores_itch_sort_popular">Populare</string>
|
||||
<string name="stores_itch_sort_new">Cele mai recente</string>
|
||||
<string name="stores_itch_sort_new_popular">Noi și populare</string>
|
||||
<string name="stores_itch_price_paid">Cu plată</string>
|
||||
<string name="stores_itch_price_under_5">5 $ sau mai puțin</string>
|
||||
<string name="stores_itch_price_under_15">15 $ sau mai puțin</string>
|
||||
<string name="stores_itch_sort_top_rated">Cele mai bine cotate</string>
|
||||
<string name="stores_itch_sort_top_sellers">Cele mai vândute</string>
|
||||
<string name="stores_itch_price_any">Orice preț</string>
|
||||
<string name="stores_itch_price_free">Gratuite</string>
|
||||
<string name="stores_itch_price_sale">La reducere</string>
|
||||
<string name="stores_itch_load_more">Încarcă mai multe</string>
|
||||
<string name="stores_itch_platform_any">Orice platformă</string>
|
||||
<string name="stores_itch_platform_mobile_web">Web mobil</string>
|
||||
<string name="stores_itch_tag_add">Adaugă o etichetă</string>
|
||||
<string name="stores_itch_tag_title">Filtrează după etichetă</string>
|
||||
<string name="stores_itch_browse_failed">Nu s-au putut încărca jocurile de pe itch.io</string>
|
||||
<string name="stores_itch_archive">Arhivele %1$s nu sunt acceptate</string>
|
||||
<string name="stores_itch_download_failed">itch.io a răspuns HTTP %1$d</string>
|
||||
<string name="stores_free">Gratuit</string>
|
||||
@@ -2196,7 +2179,6 @@
|
||||
<string name="stores_login_close">Închide</string>
|
||||
<string name="stores_login_retry">Încearcă din nou</string>
|
||||
<string name="stores_login_finishing">Se finalizează autentificarea…</string>
|
||||
<string name="stores_xbox_sign_in_again">Microsoft a respins conectarea la Xbox. Deconectează-te de la Xbox în Magazine, conectează-te din nou, apoi reia.</string>
|
||||
<string name="stores_login_error_network">Pagina de autentificare nu a putut fi încărcată: %1$s</string>
|
||||
<string name="stores_login_error_idp_blocked">Acest furnizor refuză autentificarea dintr-o pagină încorporată. Autentifică-te cu parola magazinului în schimb.</string>
|
||||
<string name="stores_login_error_http">Pagina de autentificare a răspuns cu o eroare (HTTP %1$d).</string>
|
||||
|
||||
@@ -2048,23 +2048,6 @@
|
||||
<string name="stores_itch_no_exe">В загрузке не найдена игра для Windows</string>
|
||||
<string name="stores_itch_extract_failed">Не удалось распаковать загрузку (код %1$d)</string>
|
||||
<string name="stores_itch_no_catalog">itch.io не ответил</string>
|
||||
<string name="stores_itch_sort_popular">Популярные</string>
|
||||
<string name="stores_itch_sort_new">Самые новые</string>
|
||||
<string name="stores_itch_sort_new_popular">Новые и популярные</string>
|
||||
<string name="stores_itch_price_paid">Платные</string>
|
||||
<string name="stores_itch_price_under_5">До $5</string>
|
||||
<string name="stores_itch_price_under_15">До $15</string>
|
||||
<string name="stores_itch_sort_top_rated">С лучшими оценками</string>
|
||||
<string name="stores_itch_sort_top_sellers">Бестселлеры</string>
|
||||
<string name="stores_itch_price_any">Любая цена</string>
|
||||
<string name="stores_itch_price_free">Бесплатные</string>
|
||||
<string name="stores_itch_price_sale">Со скидкой</string>
|
||||
<string name="stores_itch_load_more">Загрузить ещё</string>
|
||||
<string name="stores_itch_platform_any">Любая платформа</string>
|
||||
<string name="stores_itch_platform_mobile_web">Мобильный веб</string>
|
||||
<string name="stores_itch_tag_add">Добавить тег</string>
|
||||
<string name="stores_itch_tag_title">Фильтр по тегу</string>
|
||||
<string name="stores_itch_browse_failed">Не удалось загрузить игры с itch.io</string>
|
||||
<string name="stores_itch_archive">Архивы %1$s не поддерживаются</string>
|
||||
<string name="stores_itch_download_failed">itch.io ответил HTTP %1$d</string>
|
||||
<string name="stores_free">Бесплатно</string>
|
||||
@@ -2216,7 +2199,6 @@
|
||||
<string name="stores_login_close">Закрыть</string>
|
||||
<string name="stores_login_retry">Повторить</string>
|
||||
<string name="stores_login_finishing">Завершение входа…</string>
|
||||
<string name="stores_xbox_sign_in_again">Microsoft отклонила вход в Xbox. Выйдите из Xbox в разделе «Магазины», войдите снова и продолжите.</string>
|
||||
<string name="stores_login_error_network">Не удалось загрузить страницу входа: %1$s</string>
|
||||
<string name="stores_login_error_idp_blocked">Этот сервис не разрешает вход со встроенной страницы. Войдите с паролем от магазина.</string>
|
||||
<string name="stores_login_error_http">Страница входа вернула ошибку (HTTP %1$d).</string>
|
||||
|
||||
@@ -2004,23 +2004,6 @@
|
||||
<string name="stores_itch_no_exe">Inget Windows-spel hittades i nedladdningen</string>
|
||||
<string name="stores_itch_extract_failed">Det gick inte att packa upp nedladdningen (kod %1$d)</string>
|
||||
<string name="stores_itch_no_catalog">itch.io svarade inte</string>
|
||||
<string name="stores_itch_sort_popular">Populära</string>
|
||||
<string name="stores_itch_sort_new">Senaste</string>
|
||||
<string name="stores_itch_sort_new_popular">Nya och populära</string>
|
||||
<string name="stores_itch_price_paid">Betalda</string>
|
||||
<string name="stores_itch_price_under_5">$5 eller mindre</string>
|
||||
<string name="stores_itch_price_under_15">$15 eller mindre</string>
|
||||
<string name="stores_itch_sort_top_rated">Högst betyg</string>
|
||||
<string name="stores_itch_sort_top_sellers">Mest sålda</string>
|
||||
<string name="stores_itch_price_any">Alla priser</string>
|
||||
<string name="stores_itch_price_free">Gratis</string>
|
||||
<string name="stores_itch_price_sale">På rea</string>
|
||||
<string name="stores_itch_load_more">Ladda fler</string>
|
||||
<string name="stores_itch_platform_any">Alla plattformar</string>
|
||||
<string name="stores_itch_platform_mobile_web">Mobilwebb</string>
|
||||
<string name="stores_itch_tag_add">Lägg till en tagg</string>
|
||||
<string name="stores_itch_tag_title">Filtrera efter tagg</string>
|
||||
<string name="stores_itch_browse_failed">Det gick inte att läsa in spel från itch.io</string>
|
||||
<string name="stores_itch_archive">%1$s-arkiv stöds inte</string>
|
||||
<string name="stores_itch_download_failed">itch.io svarade HTTP %1$d</string>
|
||||
<string name="stores_free">Gratis</string>
|
||||
@@ -2175,7 +2158,6 @@
|
||||
<string name="stores_login_close">Stäng</string>
|
||||
<string name="stores_login_retry">Försök igen</string>
|
||||
<string name="stores_login_finishing">Slutför inloggningen…</string>
|
||||
<string name="stores_xbox_sign_in_again">Microsoft avvisade Xbox-inloggningen. Logga ut från Xbox under Butiker, logga in igen och återuppta sedan.</string>
|
||||
<string name="stores_login_error_network">Inloggningssidan kunde inte läsas in: %1$s</string>
|
||||
<string name="stores_login_error_idp_blocked">Den här leverantören vägrar logga in från en inbäddad sida. Logga in med ditt butikslösenord istället.</string>
|
||||
<string name="stores_login_error_http">Inloggningssidan svarade med ett fel (HTTP %1$d).</string>
|
||||
|
||||
@@ -1983,23 +1983,6 @@
|
||||
<string name="stores_itch_no_exe">ไม่พบเกม Windows ในไฟล์ที่ดาวน์โหลด</string>
|
||||
<string name="stores_itch_extract_failed">แตกไฟล์ที่ดาวน์โหลดไม่ได้ (รหัส %1$d)</string>
|
||||
<string name="stores_itch_no_catalog">itch.io ไม่ตอบสนอง</string>
|
||||
<string name="stores_itch_sort_popular">ยอดนิยม</string>
|
||||
<string name="stores_itch_sort_new">ล่าสุด</string>
|
||||
<string name="stores_itch_sort_new_popular">ใหม่และยอดนิยม</string>
|
||||
<string name="stores_itch_price_paid">เสียเงิน</string>
|
||||
<string name="stores_itch_price_under_5">ไม่เกิน $5</string>
|
||||
<string name="stores_itch_price_under_15">ไม่เกิน $15</string>
|
||||
<string name="stores_itch_sort_top_rated">คะแนนสูงสุด</string>
|
||||
<string name="stores_itch_sort_top_sellers">ขายดี</string>
|
||||
<string name="stores_itch_price_any">ทุกราคา</string>
|
||||
<string name="stores_itch_price_free">ฟรี</string>
|
||||
<string name="stores_itch_price_sale">ลดราคา</string>
|
||||
<string name="stores_itch_load_more">โหลดเพิ่มเติม</string>
|
||||
<string name="stores_itch_platform_any">ทุกแพลตฟอร์ม</string>
|
||||
<string name="stores_itch_platform_mobile_web">เว็บมือถือ</string>
|
||||
<string name="stores_itch_tag_add">เพิ่มแท็ก</string>
|
||||
<string name="stores_itch_tag_title">กรองตามแท็ก</string>
|
||||
<string name="stores_itch_browse_failed">โหลดเกมจาก itch.io ไม่ได้</string>
|
||||
<string name="stores_itch_archive">ไม่รองรับไฟล์ %1$s</string>
|
||||
<string name="stores_itch_download_failed">itch.io ตอบกลับ HTTP %1$d</string>
|
||||
<string name="stores_free">ฟรี</string>
|
||||
@@ -2154,7 +2137,6 @@
|
||||
<string name="stores_login_close">ปิด</string>
|
||||
<string name="stores_login_retry">ลองใหม่</string>
|
||||
<string name="stores_login_finishing">กำลังเสร็จสิ้นการลงชื่อเข้าใช้…</string>
|
||||
<string name="stores_xbox_sign_in_again">Microsoft ปฏิเสธการลงชื่อเข้าใช้ Xbox ลงชื่อออกจาก Xbox ในสโตร์ ลงชื่อเข้าใช้อีกครั้ง แล้วดำเนินการต่อ</string>
|
||||
<string name="stores_login_error_network">ไม่สามารถโหลดหน้าลงชื่อเข้าใช้ได้: %1$s</string>
|
||||
<string name="stores_login_error_idp_blocked">ผู้ให้บริการนี้ปฏิเสธการลงชื่อเข้าใช้จากหน้าที่ฝังอยู่ ให้ลงชื่อเข้าใช้ด้วยรหัสผ่านของสโตร์แทน</string>
|
||||
<string name="stores_login_error_http">หน้าลงชื่อเข้าใช้ตอบกลับด้วยข้อผิดพลาด (HTTP %1$d)</string>
|
||||
|
||||
@@ -1998,23 +1998,6 @@
|
||||
<string name="stores_itch_no_exe">İndirmede Windows oyunu bulunamadı</string>
|
||||
<string name="stores_itch_extract_failed">İndirme ayıklanamadı (kod %1$d)</string>
|
||||
<string name="stores_itch_no_catalog">itch.io yanıt vermedi</string>
|
||||
<string name="stores_itch_sort_popular">Popüler</string>
|
||||
<string name="stores_itch_sort_new">En yeniler</string>
|
||||
<string name="stores_itch_sort_new_popular">Yeni ve popüler</string>
|
||||
<string name="stores_itch_price_paid">Ücretli</string>
|
||||
<string name="stores_itch_price_under_5">$5 veya altı</string>
|
||||
<string name="stores_itch_price_under_15">$15 veya altı</string>
|
||||
<string name="stores_itch_sort_top_rated">En yüksek puanlı</string>
|
||||
<string name="stores_itch_sort_top_sellers">En çok satanlar</string>
|
||||
<string name="stores_itch_price_any">Herhangi bir fiyat</string>
|
||||
<string name="stores_itch_price_free">Ücretsiz</string>
|
||||
<string name="stores_itch_price_sale">İndirimde</string>
|
||||
<string name="stores_itch_load_more">Daha fazla yükle</string>
|
||||
<string name="stores_itch_platform_any">Herhangi bir platform</string>
|
||||
<string name="stores_itch_platform_mobile_web">Mobil web</string>
|
||||
<string name="stores_itch_tag_add">Etiket ekle</string>
|
||||
<string name="stores_itch_tag_title">Etikete göre filtrele</string>
|
||||
<string name="stores_itch_browse_failed">itch.io oyunları yüklenemedi</string>
|
||||
<string name="stores_itch_archive">%1$s arşivleri desteklenmiyor</string>
|
||||
<string name="stores_itch_download_failed">itch.io HTTP %1$d yanıtı verdi</string>
|
||||
<string name="stores_free">Ücretsiz</string>
|
||||
@@ -2166,7 +2149,6 @@
|
||||
<string name="stores_login_close">Kapat</string>
|
||||
<string name="stores_login_retry">Yeniden dene</string>
|
||||
<string name="stores_login_finishing">Oturum açma tamamlanıyor…</string>
|
||||
<string name="stores_xbox_sign_in_again">Microsoft, Xbox oturum açmayı reddetti. Mağazalar\'da Xbox oturumunu kapatın, yeniden oturum açın ve devam edin.</string>
|
||||
<string name="stores_login_error_network">Oturum açma sayfası yüklenemedi: %1$s</string>
|
||||
<string name="stores_login_error_idp_blocked">Bu sağlayıcı yerleşik bir sayfadan oturum açmayı reddediyor. Bunun yerine mağaza parolanızla oturum açın.</string>
|
||||
<string name="stores_login_error_http">Oturum açma sayfası bir hatayla yanıt verdi (HTTP %1$d).</string>
|
||||
|
||||
@@ -2046,23 +2046,6 @@
|
||||
<string name="stores_itch_no_exe">У завантаженні не знайдено гри для Windows</string>
|
||||
<string name="stores_itch_extract_failed">Не вдалося розпакувати завантаження (код %1$d)</string>
|
||||
<string name="stores_itch_no_catalog">itch.io не відповів</string>
|
||||
<string name="stores_itch_sort_popular">Популярні</string>
|
||||
<string name="stores_itch_sort_new">Найновіші</string>
|
||||
<string name="stores_itch_sort_new_popular">Нові й популярні</string>
|
||||
<string name="stores_itch_price_paid">Платні</string>
|
||||
<string name="stores_itch_price_under_5">До $5</string>
|
||||
<string name="stores_itch_price_under_15">До $15</string>
|
||||
<string name="stores_itch_sort_top_rated">З найвищими оцінками</string>
|
||||
<string name="stores_itch_sort_top_sellers">Бестселери</string>
|
||||
<string name="stores_itch_price_any">Будь-яка ціна</string>
|
||||
<string name="stores_itch_price_free">Безкоштовні</string>
|
||||
<string name="stores_itch_price_sale">Зі знижкою</string>
|
||||
<string name="stores_itch_load_more">Завантажити ще</string>
|
||||
<string name="stores_itch_platform_any">Будь-яка платформа</string>
|
||||
<string name="stores_itch_platform_mobile_web">Мобільний веб</string>
|
||||
<string name="stores_itch_tag_add">Додати тег</string>
|
||||
<string name="stores_itch_tag_title">Фільтр за тегом</string>
|
||||
<string name="stores_itch_browse_failed">Не вдалося завантажити ігри з itch.io</string>
|
||||
<string name="stores_itch_archive">Архіви %1$s не підтримуються</string>
|
||||
<string name="stores_itch_download_failed">itch.io відповів HTTP %1$d</string>
|
||||
<string name="stores_free">Безкоштовно</string>
|
||||
@@ -2217,7 +2200,6 @@
|
||||
<string name="stores_login_close">Закрити</string>
|
||||
<string name="stores_login_retry">Спробувати ще раз</string>
|
||||
<string name="stores_login_finishing">Завершення входу…</string>
|
||||
<string name="stores_xbox_sign_in_again">Microsoft відхилила вхід у Xbox. Вийдіть з Xbox у розділі «Магазини», увійдіть знову й продовжте.</string>
|
||||
<string name="stores_login_error_network">Не вдалося завантажити сторінку входу: %1$s</string>
|
||||
<string name="stores_login_error_idp_blocked">Цей провайдер не дозволяє вхід із вбудованої сторінки. Увійдіть за допомогою пароля магазину.</string>
|
||||
<string name="stores_login_error_http">Сторінка входу відповіла помилкою (HTTP %1$d).</string>
|
||||
|
||||
@@ -1983,23 +1983,6 @@
|
||||
<string name="stores_itch_no_exe">Không tìm thấy trò chơi Windows trong bản tải xuống</string>
|
||||
<string name="stores_itch_extract_failed">Không thể giải nén bản tải xuống (mã %1$d)</string>
|
||||
<string name="stores_itch_no_catalog">itch.io không phản hồi</string>
|
||||
<string name="stores_itch_sort_popular">Phổ biến</string>
|
||||
<string name="stores_itch_sort_new">Mới nhất</string>
|
||||
<string name="stores_itch_sort_new_popular">Mới và phổ biến</string>
|
||||
<string name="stores_itch_price_paid">Trả phí</string>
|
||||
<string name="stores_itch_price_under_5">Từ $5 trở xuống</string>
|
||||
<string name="stores_itch_price_under_15">Từ $15 trở xuống</string>
|
||||
<string name="stores_itch_sort_top_rated">Đánh giá cao nhất</string>
|
||||
<string name="stores_itch_sort_top_sellers">Bán chạy nhất</string>
|
||||
<string name="stores_itch_price_any">Mọi mức giá</string>
|
||||
<string name="stores_itch_price_free">Miễn phí</string>
|
||||
<string name="stores_itch_price_sale">Đang giảm giá</string>
|
||||
<string name="stores_itch_load_more">Tải thêm</string>
|
||||
<string name="stores_itch_platform_any">Mọi nền tảng</string>
|
||||
<string name="stores_itch_platform_mobile_web">Web di động</string>
|
||||
<string name="stores_itch_tag_add">Thêm thẻ</string>
|
||||
<string name="stores_itch_tag_title">Lọc theo thẻ</string>
|
||||
<string name="stores_itch_browse_failed">Không tải được game từ itch.io</string>
|
||||
<string name="stores_itch_archive">Không hỗ trợ tệp %1$s</string>
|
||||
<string name="stores_itch_download_failed">itch.io trả về HTTP %1$d</string>
|
||||
<string name="stores_free">Miễn phí</string>
|
||||
@@ -2154,7 +2137,6 @@
|
||||
<string name="stores_login_close">Đóng</string>
|
||||
<string name="stores_login_retry">Thử lại</string>
|
||||
<string name="stores_login_finishing">Đang hoàn tất đăng nhập…</string>
|
||||
<string name="stores_xbox_sign_in_again">Microsoft đã từ chối đăng nhập Xbox. Hãy đăng xuất Xbox trong Cửa hàng game, đăng nhập lại rồi tiếp tục.</string>
|
||||
<string name="stores_login_error_network">Không thể tải trang đăng nhập: %1$s</string>
|
||||
<string name="stores_login_error_idp_blocked">Nhà cung cấp này từ chối đăng nhập từ một trang nhúng. Hãy đăng nhập bằng mật khẩu store của bạn thay vào đó.</string>
|
||||
<string name="stores_login_error_http">Trang đăng nhập trả về lỗi (HTTP %1$d).</string>
|
||||
|
||||
@@ -2062,23 +2062,6 @@
|
||||
<string name="stores_itch_no_exe">下载内容中未找到 Windows 游戏</string>
|
||||
<string name="stores_itch_extract_failed">无法解压下载内容(代码 %1$d)</string>
|
||||
<string name="stores_itch_no_catalog">itch.io 没有响应</string>
|
||||
<string name="stores_itch_sort_popular">热门</string>
|
||||
<string name="stores_itch_sort_new">最新发布</string>
|
||||
<string name="stores_itch_sort_new_popular">新品与热门</string>
|
||||
<string name="stores_itch_price_paid">付费</string>
|
||||
<string name="stores_itch_price_under_5">5 美元以下</string>
|
||||
<string name="stores_itch_price_under_15">15 美元以下</string>
|
||||
<string name="stores_itch_sort_top_rated">评分最高</string>
|
||||
<string name="stores_itch_sort_top_sellers">热销</string>
|
||||
<string name="stores_itch_price_any">任意价格</string>
|
||||
<string name="stores_itch_price_free">免费</string>
|
||||
<string name="stores_itch_price_sale">特价</string>
|
||||
<string name="stores_itch_load_more">加载更多</string>
|
||||
<string name="stores_itch_platform_any">任意平台</string>
|
||||
<string name="stores_itch_platform_mobile_web">移动网页</string>
|
||||
<string name="stores_itch_tag_add">添加标签</string>
|
||||
<string name="stores_itch_tag_title">按标签筛选</string>
|
||||
<string name="stores_itch_browse_failed">无法从 itch.io 加载游戏</string>
|
||||
<string name="stores_itch_archive">不支持 %1$s 压缩包</string>
|
||||
<string name="stores_itch_download_failed">itch.io 返回 HTTP %1$d</string>
|
||||
<string name="stores_free">免费</string>
|
||||
@@ -2230,7 +2213,6 @@
|
||||
<string name="stores_login_close">关闭</string>
|
||||
<string name="stores_login_retry">重试</string>
|
||||
<string name="stores_login_finishing">正在完成登录…</string>
|
||||
<string name="stores_xbox_sign_in_again">Microsoft 拒绝了 Xbox 登录。请在游戏商店中退出 Xbox,重新登录,然后继续。</string>
|
||||
<string name="stores_login_error_network">无法加载登录页面:%1$s</string>
|
||||
<string name="stores_login_error_idp_blocked">该第三方登录方式不允许在内嵌页面中登录。请改用商店密码登录。</string>
|
||||
<string name="stores_login_error_http">登录页面返回了错误(HTTP %1$d)。</string>
|
||||
|
||||
@@ -1986,23 +1986,6 @@
|
||||
<string name="stores_itch_no_exe">下載內容中找不到 Windows 遊戲</string>
|
||||
<string name="stores_itch_extract_failed">無法解壓下載內容(代碼 %1$d)</string>
|
||||
<string name="stores_itch_no_catalog">itch.io 沒有回應</string>
|
||||
<string name="stores_itch_sort_popular">熱門</string>
|
||||
<string name="stores_itch_sort_new">最新發布</string>
|
||||
<string name="stores_itch_sort_new_popular">新品與熱門</string>
|
||||
<string name="stores_itch_price_paid">付費</string>
|
||||
<string name="stores_itch_price_under_5">5 美元以下</string>
|
||||
<string name="stores_itch_price_under_15">15 美元以下</string>
|
||||
<string name="stores_itch_sort_top_rated">評分最高</string>
|
||||
<string name="stores_itch_sort_top_sellers">熱賣</string>
|
||||
<string name="stores_itch_price_any">任何價格</string>
|
||||
<string name="stores_itch_price_free">免費</string>
|
||||
<string name="stores_itch_price_sale">特價</string>
|
||||
<string name="stores_itch_load_more">載入更多</string>
|
||||
<string name="stores_itch_platform_any">任何平台</string>
|
||||
<string name="stores_itch_platform_mobile_web">行動網頁</string>
|
||||
<string name="stores_itch_tag_add">新增標籤</string>
|
||||
<string name="stores_itch_tag_title">按標籤篩選</string>
|
||||
<string name="stores_itch_browse_failed">無法從 itch.io 載入遊戲</string>
|
||||
<string name="stores_itch_archive">不支援 %1$s 壓縮檔</string>
|
||||
<string name="stores_itch_download_failed">itch.io 回應 HTTP %1$d</string>
|
||||
<string name="stores_free">免費</string>
|
||||
@@ -2157,7 +2140,6 @@
|
||||
<string name="stores_login_close">關閉</string>
|
||||
<string name="stores_login_retry">再試一次</string>
|
||||
<string name="stores_login_finishing">正在完成登入…</string>
|
||||
<string name="stores_xbox_sign_in_again">Microsoft 拒絕了 Xbox 登入。請在商店中登出 Xbox,重新登入,然後繼續。</string>
|
||||
<string name="stores_login_error_network">無法載入登入頁面:%1$s</string>
|
||||
<string name="stores_login_error_idp_blocked">此提供者不允許從內嵌頁面登入。請改用商店密碼登入。</string>
|
||||
<string name="stores_login_error_http">登入頁面回應錯誤(HTTP %1$d)。</string>
|
||||
|
||||
@@ -1986,23 +1986,6 @@
|
||||
<string name="stores_itch_no_exe">下載內容中找不到 Windows 遊戲</string>
|
||||
<string name="stores_itch_extract_failed">無法解壓縮下載內容(代碼 %1$d)</string>
|
||||
<string name="stores_itch_no_catalog">itch.io 沒有回應</string>
|
||||
<string name="stores_itch_sort_popular">熱門</string>
|
||||
<string name="stores_itch_sort_new">最新發布</string>
|
||||
<string name="stores_itch_sort_new_popular">新品與熱門</string>
|
||||
<string name="stores_itch_price_paid">付費</string>
|
||||
<string name="stores_itch_price_under_5">5 美元以下</string>
|
||||
<string name="stores_itch_price_under_15">15 美元以下</string>
|
||||
<string name="stores_itch_sort_top_rated">評分最高</string>
|
||||
<string name="stores_itch_sort_top_sellers">熱銷</string>
|
||||
<string name="stores_itch_price_any">任何價格</string>
|
||||
<string name="stores_itch_price_free">免費</string>
|
||||
<string name="stores_itch_price_sale">特價</string>
|
||||
<string name="stores_itch_load_more">載入更多</string>
|
||||
<string name="stores_itch_platform_any">任何平台</string>
|
||||
<string name="stores_itch_platform_mobile_web">行動網頁</string>
|
||||
<string name="stores_itch_tag_add">新增標籤</string>
|
||||
<string name="stores_itch_tag_title">依標籤篩選</string>
|
||||
<string name="stores_itch_browse_failed">無法從 itch.io 載入遊戲</string>
|
||||
<string name="stores_itch_archive">不支援 %1$s 壓縮檔</string>
|
||||
<string name="stores_itch_download_failed">itch.io 回應 HTTP %1$d</string>
|
||||
<string name="stores_free">免費</string>
|
||||
@@ -2157,7 +2140,6 @@
|
||||
<string name="stores_login_close">關閉</string>
|
||||
<string name="stores_login_retry">再試一次</string>
|
||||
<string name="stores_login_finishing">正在完成登入…</string>
|
||||
<string name="stores_xbox_sign_in_again">Microsoft 拒絕了 Xbox 登入。請在遊戲商店中登出 Xbox,重新登入,然後繼續。</string>
|
||||
<string name="stores_login_error_network">無法載入登入頁面:%1$s</string>
|
||||
<string name="stores_login_error_idp_blocked">此提供者拒絕從內嵌頁面登入。請改用商店密碼登入。</string>
|
||||
<string name="stores_login_error_http">登入頁面回應錯誤(HTTP %1$d)。</string>
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="lan_title">Local multiplayer · Experimental</string>
|
||||
<string name="lan_setup_hint">LAN connections and shared-screen co-op with Steam Link</string>
|
||||
<string name="lan_experimental">Choose LAN play with a game on each device, or shared-screen co-op with one game running on the host. The game must support the chosen multiplayer mode. Device testing is still needed.</string>
|
||||
<string name="lan_wireless">Wireless LAN</string>
|
||||
<string name="lan_wireless_help">Host creates a password-protected local network without a router or internet. It may disconnect your current Wi-Fi. On the other device, join using Android Wi-Fi settings and choose to stay connected without internet. For separate-copy LAN games, select the LAN interface below on both devices; for Steam Link, select it on the host only. If cellular takes priority, turn mobile data off while playing.</string>
|
||||
<string name="lan_host">Host offline hotspot</string>
|
||||
<string name="lan_stop">Stop hotspot</string>
|
||||
<string name="lan_starting">Starting hotspot…</string>
|
||||
<string name="lan_notification">Offline hotspot requested. Tap to manage LAN.</string>
|
||||
<string name="lan_credentials">Network: %1$s\nPassword: %2$s</string>
|
||||
<string name="lan_failed">Android could not start a usable hotspot on this device.</string>
|
||||
<string name="lan_incompatible">Turn off any existing hotspot or Wi-Fi Direct connection, then try again.</string>
|
||||
<string name="lan_disallowed">Hotspots are disabled by this device’s policy.</string>
|
||||
<string name="lan_no_channel">No Wi-Fi channel is available. Check Wi-Fi and airplane mode, then retry.</string>
|
||||
<string name="lan_permission_needed">Hosting needs precise location permission for this app’s Android compatibility level. Enable it in App settings, then retry.</string>
|
||||
<string name="lan_location_needed">Turn on Android Location services, then retry hosting.</string>
|
||||
<string name="lan_app_settings">App settings</string>
|
||||
<string name="lan_wifi_settings">Join in Wi-Fi settings</string>
|
||||
<string name="lan_location_settings">Location settings</string>
|
||||
<string name="lan_wired">USB-C / Ethernet LAN</string>
|
||||
<string name="lan_wired_help">Connect a data-capable USB-C cable and enable USB tethering on one device in Android settings. This only works if the other device supports the USB network driver and host role. If no LAN interface appears, try reversing the cable’s host/device roles or use USB Ethernet adapters. Charging or file-transfer mode alone does not create a LAN. DroidDeck cannot enable USB tethering itself.</string>
|
||||
<string name="lan_network_settings">Android network settings</string>
|
||||
<string name="lan_interface">Host / game LAN interface</string>
|
||||
<string name="lan_interface_help">Select the interface whose IP belongs to your local connection. For separate-copy LAN games, do this on both devices. For Steam Link, only the DroidDeck host needs this selection. Set it before launching Steam or the game. This does not change Android routing. Selection lasts until the app process exits or you return to the default below.</string>
|
||||
<string name="lan_no_interfaces">No local IPv4 interfaces are visible yet. Connect the devices first.</string>
|
||||
<string name="lan_interface_lost">%1$s is unavailable. Reconnect or choose another interface.</string>
|
||||
<string name="lan_use">Use for games</string>
|
||||
<string name="lan_selected">Selected</string>
|
||||
<string name="lan_default">Android default network</string>
|
||||
<string name="lan_coop_title">Shared-screen co-op · Steam Link</string>
|
||||
<string name="lan_coop_overview">The host runs one copy of a game with local co-op or split-screen support. Both devices see the same picture and each can provide a controller. Steam Link handles the client’s video, audio, and input.</string>
|
||||
<string name="lan_coop_network">1. Connect both devices to the same Wi-Fi, or create an offline hotspot below and join it from the second device. Select the host’s LAN interface below before starting Steam.</string>
|
||||
<string name="lan_coop_host">2. On the host, start Steam in DroidDeck, then enable Settings → Remote Play → Enable Remote Play. Keep DroidDeck’s host controls enabled. Return to the host to approve the pairing PIN when Steam Link asks.</string>
|
||||
<string name="lan_coop_return_host">Return to host Steam</string>
|
||||
<string name="lan_coop_open_launcher">Back to DroidDeck to start Steam</string>
|
||||
<string name="lan_coop_host_address">Selected LAN address: %1$s\nIf discovery fails, add this host address in Steam Link on the second device.</string>
|
||||
<string name="lan_coop_find_host">If Steam Link cannot find the host, select the host’s LAN interface below to see its address.</string>
|
||||
<string name="lan_coop_client">3. On the second device, open Steam Link, pair with the host, and start streaming. Connect that player’s controller to the second device, or enable Steam Link’s touch controller. The second device does not need to run a DroidDeck Linux session.</string>
|
||||
<string name="lan_coop_open_client">Open Steam Link on this device</string>
|
||||
<string name="lan_coop_get_client">Get Steam Link for this device</string>
|
||||
<string name="lan_coop_controllers">4. Launch the game through the host’s Steam and join its local multiplayer mode. Keep the host’s controller and the Steam Link controller as separate gamepads. If both control the same player, check Steam’s controller order and the game’s controller settings. Keyboard and mouse input may be shared instead of creating another player.</string>
|
||||
<string name="lan_coop_offline">Install, sign in, and pair while online before travel. A local hotspot provides the network, but first-time pairing and fully offline Steam Link play still need testing on this setup. No ADB, Shizuku, or root setup is required by this integration.</string>
|
||||
<string name="lan_coop_client_unavailable">No Steam Link app, app store, or browser could be opened. Install Steam Link on the second device and retry.</string>
|
||||
</resources>
|
||||
@@ -2081,29 +2081,6 @@
|
||||
<string name="stores_itch_no_exe">No Windows game found in the download</string>
|
||||
<string name="stores_itch_extract_failed">Could not extract the download (exit %1$d)</string>
|
||||
<string name="stores_itch_no_catalog">itch.io did not answer</string>
|
||||
<string name="stores_itch_sort_popular">Popular</string>
|
||||
<string name="stores_itch_sort_new">Most recent</string>
|
||||
<string name="stores_itch_sort_new_popular">New & popular</string>
|
||||
<string name="stores_itch_price_paid">Paid</string>
|
||||
<string name="stores_itch_price_under_5">$5 or less</string>
|
||||
<string name="stores_itch_price_under_15">$15 or less</string>
|
||||
<string name="stores_itch_sort_top_rated">Top rated</string>
|
||||
<string name="stores_itch_sort_top_sellers">Top sellers</string>
|
||||
<string name="stores_itch_price_any">Any price</string>
|
||||
<string name="stores_itch_price_free">Free</string>
|
||||
<string name="stores_itch_price_sale">On sale</string>
|
||||
<string name="stores_itch_load_more">Load more</string>
|
||||
<string name="stores_itch_platform_any">Any platform</string>
|
||||
<string name="stores_itch_platform_mobile_web">Mobile web</string>
|
||||
<string name="stores_itch_tag_add">Add a tag</string>
|
||||
<string name="stores_itch_tag_title">Filter by tag</string>
|
||||
<string name="stores_itch_platform_windows" translatable="false">Windows</string>
|
||||
<string name="stores_itch_platform_macos" translatable="false">macOS</string>
|
||||
<string name="stores_itch_platform_linux" translatable="false">Linux</string>
|
||||
<string name="stores_itch_platform_android" translatable="false">Android</string>
|
||||
<string name="stores_itch_platform_ios" translatable="false">iOS</string>
|
||||
<string name="stores_itch_platform_web" translatable="false">Web</string>
|
||||
<string name="stores_itch_browse_failed">Could not load games from itch.io</string>
|
||||
<string name="stores_itch_archive">%1$s archives are not supported</string>
|
||||
<string name="stores_itch_download_failed">itch.io answered HTTP %1$d</string>
|
||||
<string name="stores_free">Free</string>
|
||||
@@ -2272,7 +2249,6 @@
|
||||
<string name="stores_login_close">Close</string>
|
||||
<string name="stores_login_retry">Try again</string>
|
||||
<string name="stores_login_finishing">Finishing sign-in…</string>
|
||||
<string name="stores_xbox_sign_in_again">Microsoft rejected the Xbox sign-in. Sign out of Xbox in Stores, sign in again, then resume.</string>
|
||||
<string name="stores_login_error_network">The sign-in page could not be loaded: %1$s</string>
|
||||
<string name="stores_login_error_idp_blocked">This provider refuses to sign in from an embedded page. Sign in with your store password instead.</string>
|
||||
<string name="stores_login_error_http">The sign-in page answered with an error (HTTP %1$d).</string>
|
||||
@@ -3088,4 +3064,7 @@
|
||||
<string name="spatial_saved_views_hint">Saved views can be recalculated. Start a new calibration to capture in the current tracking frame.</string>
|
||||
<string name="spatial_model_checksum_error">Hand model checksum mismatch</string>
|
||||
<string name="spatial_opencv_load_error">OpenCV could not load</string>
|
||||
<string name="stores_engine_downloading">Downloading %1$s support… %2$d%%</string>
|
||||
<string name="stores_engine_preparing">Preparing %1$s support…</string>
|
||||
<string name="stores_engine_failed">%1$s support could not be downloaded or loaded. Try again.</string>
|
||||
</resources>
|
||||
Generated
+16
@@ -182,6 +182,22 @@ dependencies = [
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "droiddeckamazon"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"flate2",
|
||||
"futures-util",
|
||||
"jni",
|
||||
"libc",
|
||||
"lzma-rs",
|
||||
"reqwest",
|
||||
"serde_json",
|
||||
"sha1",
|
||||
"sha2",
|
||||
"tokio",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "droiddeckstores"
|
||||
version = "0.1.0"
|
||||
|
||||
@@ -9,6 +9,13 @@ publish = false
|
||||
name = "droiddeckstores"
|
||||
crate-type = ["cdylib"]
|
||||
|
||||
[features]
|
||||
default = ["gog", "epic", "amazon"]
|
||||
gog = []
|
||||
epic = []
|
||||
amazon = []
|
||||
amazon-pack = ["amazon"]
|
||||
|
||||
[dependencies]
|
||||
jni = "0.21"
|
||||
libc = "0.2"
|
||||
@@ -25,3 +32,8 @@ sha2 = "0.10"
|
||||
codegen-units = 1
|
||||
lto = "thin"
|
||||
strip = "symbols"
|
||||
|
||||
[workspace]
|
||||
members = ["amazon"]
|
||||
default-members = ["."]
|
||||
resolver = "2"
|
||||
@@ -160,15 +160,13 @@ synchronous on the calling thread (network calls block: call them off the main t
|
||||
| `cloud.list` | `accessToken`, `accountId`, `appName` | `files[]` of `name`, `modified` (ms, -1 unknown), `hash`, `readLink` |
|
||||
| `cloud.writeLinks` | `accessToken`, `accountId`, `appName`, `names[]` | `links`: name → write link |
|
||||
| `launch.args` | `displayName`, `accountId`, `namespace`, `locale`, `appName`, `deploymentId`, `additional` | `args[]` |
|
||||
| `launch.split` | `command` | `args[]` |
|
||||
| `locale` | `language`, `region` | `key`, `tags[]`, `launchLocale` |
|
||||
|
||||
`nativeFetch` ops: `manifest.download` (`info`, optional `cdns`) → the manifest bytes;
|
||||
`cloud.read` (`url`) → the file. `null` = failed. `nativeSend` op: `cloud.write` (`url`) with the
|
||||
body → `{"ok": true}` or an error. `nativeInspect` parses manifest bytes: `{"op":"summary"}` →
|
||||
`buildVersion`, `launchExe`, `prereqName`, `prereqPath`, `prereqRead`, `files[]` (`path`, `size`,
|
||||
`tags`); `{"op":"select","tags":[…]}` → `indices[]` of the files an install with those tags gets;
|
||||
`{"op":"launch"}` → the manifest's `buildVersion`, its `command` line and the `args[]` split from it.
|
||||
`tags`); `{"op":"select","tags":[…]}` → `indices[]` of the files an install with those tags gets.
|
||||
|
||||
### `nativeInstall`
|
||||
|
||||
@@ -198,7 +196,7 @@ completes.
|
||||
|
||||
On-disk protocol: game files are staged in `<gameDir>/.droiddeck-epic-staging/*.stage` (owner
|
||||
marker `owner` = `DroidDeck Epic staging v1\n`) and renamed over their destination after size and
|
||||
SHA-1 checks; a paused run keeps each unfinished file there as `*.part` with its written parts in `*.part.list`; reusable chunks live, decompressed, as `<GUID>` (extra copies `<GUID>.<n>`, writes via
|
||||
SHA-1 checks; reusable chunks live, decompressed, as `<GUID>` (extra copies `<GUID>.<n>`, writes via
|
||||
`.part`) in `<gameDir>/.chunks` or the scratch directory.
|
||||
|
||||
## `com.droiddeck.launcher.stores.amazon.AmazonNative`
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
[package]
|
||||
name = "droiddeckamazon"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
license = "GPL-3.0-or-later"
|
||||
publish = false
|
||||
|
||||
[lib]
|
||||
name = "droiddeckamazon"
|
||||
crate-type = ["cdylib"]
|
||||
path = "../src/lib.rs"
|
||||
|
||||
[features]
|
||||
default = ["amazon-pack"]
|
||||
gog = []
|
||||
epic = []
|
||||
amazon = []
|
||||
amazon-pack = ["amazon"]
|
||||
|
||||
[dependencies]
|
||||
jni = "0.21"
|
||||
libc = "0.2"
|
||||
lzma-rs = { version = "0.3", default-features = false }
|
||||
flate2 = { version = "1", default-features = false, features = ["rust_backend"] }
|
||||
reqwest = { version = "0.12", default-features = false, features = ["rustls-tls", "gzip"] }
|
||||
tokio = { version = "1", default-features = false, features = ["rt", "net", "time", "sync"] }
|
||||
futures-util = { version = "0.3", default-features = false, features = ["std"] }
|
||||
serde_json = { version = "1", features = ["preserve_order"] }
|
||||
sha1 = "0.10"
|
||||
sha2 = "0.10"
|
||||
@@ -24,6 +24,14 @@ fn guarded<T>(fallback: T, f: impl FnOnce() -> T) -> T {
|
||||
catch_unwind(AssertUnwindSafe(f)).unwrap_or(fallback)
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "system" fn Java_com_droiddeck_launcher_stores_amazon_AmazonNative_nativeEngineAbi(
|
||||
_env: JNIEnv,
|
||||
_class: JClass,
|
||||
) -> jni::sys::jint {
|
||||
1
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "system" fn Java_com_droiddeck_launcher_stores_amazon_AmazonNative_nativeConfigure(
|
||||
mut env: JNIEnv,
|
||||
|
||||
@@ -5,7 +5,7 @@ pub mod space;
|
||||
pub mod staging;
|
||||
pub mod writer;
|
||||
|
||||
use std::collections::{HashMap, HashSet};
|
||||
use std::collections::HashMap;
|
||||
use std::fs;
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::sync::atomic::{AtomicBool, Ordering};
|
||||
@@ -140,17 +140,6 @@ pub fn fetch_manifest(info: &BuildInfo, log: &dyn Fn(&str)) -> Result<Manifest,
|
||||
})
|
||||
}
|
||||
|
||||
fn resume_from(stage: &Path, parts: &[PlanPart], size: u64) -> Option<HashSet<u64>> {
|
||||
let meta = fs::symlink_metadata(stage).ok()?;
|
||||
if !meta.is_file() || meta.len() > size {
|
||||
return None;
|
||||
}
|
||||
let list = fs::read_to_string(staging::list_path(stage)).ok()?;
|
||||
let kept: HashSet<u64> = list.lines().map(|l| l.parse().ok()).collect::<Option<_>>()?;
|
||||
let fits = |o: &u64| parts.iter().any(|p| p.file_offset == *o && p.file_offset + p.size as u64 <= meta.len());
|
||||
(!kept.is_empty() && kept.iter().all(fits)).then_some(kept)
|
||||
}
|
||||
|
||||
pub fn run(req: &Request, cancel: &AtomicBool, ev: &dyn Events) -> Result<Finished, Stop> {
|
||||
let failed = |m: String| Stop::Failed(m);
|
||||
ev.status("Downloading the manifest…");
|
||||
@@ -202,7 +191,6 @@ pub fn run(req: &Request, cancel: &AtomicBool, ev: &dyn Events) -> Result<Finish
|
||||
}
|
||||
let pending_bytes: u64 = pending.iter().map(|&(i, _)| manifest.files[i].size).sum();
|
||||
ev.sizes(pending_bytes, disk_bytes);
|
||||
let mut partials = staging::partials(&stage_dir);
|
||||
|
||||
let mut finished = Finished {
|
||||
build_version: manifest.build_version.clone(),
|
||||
@@ -223,9 +211,6 @@ pub fn run(req: &Request, cancel: &AtomicBool, ev: &dyn Events) -> Result<Finish
|
||||
staging::remove_if_idle(&stage_dir);
|
||||
};
|
||||
if pending.is_empty() {
|
||||
for stale in partials.values() {
|
||||
staging::remove_partial(stale);
|
||||
}
|
||||
ev.log("every selected file is already up to date");
|
||||
clean_caches();
|
||||
ev.installing(disk_bytes, disk_bytes, total_selected, total_selected);
|
||||
@@ -234,8 +219,6 @@ pub fn run(req: &Request, cancel: &AtomicBool, ev: &dyn Events) -> Result<Finish
|
||||
|
||||
let mut plan_files = Vec::with_capacity(pending.len());
|
||||
let mut engine_files = Vec::with_capacity(pending.len());
|
||||
let mut resumed_bytes = 0u64;
|
||||
let mut kept_sizes = Vec::with_capacity(pending.len());
|
||||
for &(i, old_size) in &pending {
|
||||
let f = &manifest.files[i];
|
||||
let mut parts = Vec::with_capacity(f.parts.len());
|
||||
@@ -251,22 +234,6 @@ pub fn run(req: &Request, cancel: &AtomicBool, ev: &dyn Events) -> Result<Finish
|
||||
parts.push(PlanPart { chunk: c as u32, chunk_offset: part.offset, size: part.size, file_offset: offset });
|
||||
offset += part.size as u64;
|
||||
}
|
||||
let mut resume = None;
|
||||
let mut kept_size = 0u64;
|
||||
if let Some(stage) = partials.remove(&staging::partial_name(&f.path, f.size, f.sha1)) {
|
||||
match resume_from(&stage, &parts, f.size).filter(|_| f.sha1.is_some()) {
|
||||
Some(kept) => {
|
||||
let bytes: u64 = parts.iter().filter(|p| kept.contains(&p.file_offset)).map(|p| p.size as u64).sum();
|
||||
ev.log(&format!("resuming {} with {bytes} of {} bytes written", f.path, f.size));
|
||||
resumed_bytes += bytes;
|
||||
kept_size = bytes;
|
||||
parts.retain(|p| !kept.contains(&p.file_offset));
|
||||
resume = Some(writer::Resume { stage, kept: kept.into_iter().collect() });
|
||||
}
|
||||
None => staging::remove_partial(&stage),
|
||||
}
|
||||
}
|
||||
kept_sizes.push(kept_size);
|
||||
plan_files.push(PlanFile { size: f.size, parts: parts.clone() });
|
||||
engine_files.push(writer::EngineFile {
|
||||
path: f.path.clone(),
|
||||
@@ -275,14 +242,8 @@ pub fn run(req: &Request, cancel: &AtomicBool, ev: &dyn Events) -> Result<Finish
|
||||
sha1: f.sha1,
|
||||
replacing: old_size > 0,
|
||||
parts,
|
||||
resume,
|
||||
});
|
||||
}
|
||||
for stale in partials.values() {
|
||||
staging::remove_partial(stale);
|
||||
}
|
||||
let fresh = pending.iter().all(|&(_, old_size)| old_size == 0);
|
||||
let progress_base = resumed_bytes + if fresh { disk_bytes - pending_bytes } else { 0 };
|
||||
|
||||
let scratch = req
|
||||
.scratch_dir
|
||||
@@ -291,8 +252,7 @@ pub fn run(req: &Request, cancel: &AtomicBool, ev: &dyn Events) -> Result<Finish
|
||||
.filter(|s| !space::same_volume(s, &req.game_dir));
|
||||
let sizes: Vec<space::PendingSize> = pending
|
||||
.iter()
|
||||
.zip(&kept_sizes)
|
||||
.map(|(&(i, old), kept)| space::PendingSize { new_size: manifest.files[i].size - kept, old_size: old })
|
||||
.map(|&(i, old)| space::PendingSize { new_size: manifest.files[i].size, old_size: old })
|
||||
.collect();
|
||||
let free_game = space::free_bytes(&req.game_dir);
|
||||
let scratch_space = scratch.as_ref().map(|s| space::Scratch { free: space::free_bytes(s) });
|
||||
@@ -348,8 +308,6 @@ cache_budget_mib={} overlap_mib={} free_game={free_game} workers={} process_work
|
||||
process_workers: req.process_workers,
|
||||
ca_bundle: req.ca_bundle.clone(),
|
||||
user_agent: net::user_agent(),
|
||||
progress_base,
|
||||
progress_total: progress_base + pending_bytes - resumed_bytes,
|
||||
};
|
||||
let stats = writer::run(&input, cancel, ev)?;
|
||||
finished.bytes_written = stats.bytes_written;
|
||||
|
||||
@@ -1,19 +1,12 @@
|
||||
use std::collections::HashMap;
|
||||
use std::fs;
|
||||
use std::io::Write;
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::sync::atomic::{AtomicU64, Ordering};
|
||||
|
||||
use sha1::{Digest, Sha1};
|
||||
|
||||
use crate::epic::manifest::Sha1 as Hash;
|
||||
|
||||
pub const DIR_NAME: &str = ".droiddeck-epic-staging";
|
||||
pub const OWNER_FILE: &str = "owner";
|
||||
pub const OWNER_MARKER: &[u8] = b"DroidDeck Epic staging v1\n";
|
||||
const SUFFIX: &str = ".stage";
|
||||
pub const PARTIAL_SUFFIX: &str = ".part";
|
||||
const LIST_SUFFIX: &str = ".part.list";
|
||||
|
||||
static SEQUENCE: AtomicU64 = AtomicU64::new(0);
|
||||
|
||||
@@ -22,37 +15,6 @@ pub fn conflicts(manifest_path: &str) -> bool {
|
||||
first.eq_ignore_ascii_case(DIR_NAME)
|
||||
}
|
||||
|
||||
fn hex(bytes: &[u8]) -> String {
|
||||
bytes.iter().map(|b| format!("{b:02x}")).collect()
|
||||
}
|
||||
|
||||
pub fn partial_name(path: &str, size: u64, sha1: Option<Hash>) -> String {
|
||||
let id: Hash = Sha1::digest(path.as_bytes()).into();
|
||||
let content = sha1.map(|h| hex(&h)).unwrap_or_else(|| "0".into());
|
||||
format!("{}-{content}-{size}{PARTIAL_SUFFIX}", hex(&id[..8]))
|
||||
}
|
||||
|
||||
pub fn list_path(partial: &Path) -> PathBuf {
|
||||
let mut name = partial.as_os_str().to_owned();
|
||||
name.push(".list");
|
||||
PathBuf::from(name)
|
||||
}
|
||||
|
||||
pub fn remove_partial(partial: &Path) {
|
||||
let _ = fs::remove_file(partial);
|
||||
let _ = fs::remove_file(list_path(partial));
|
||||
}
|
||||
|
||||
pub fn partials(dir: &Path) -> HashMap<String, PathBuf> {
|
||||
let Ok(entries) = fs::read_dir(dir) else { return HashMap::new() };
|
||||
entries
|
||||
.flatten()
|
||||
.map(|e| e.file_name().to_string_lossy().into_owned())
|
||||
.filter(|n| n.ends_with(PARTIAL_SUFFIX))
|
||||
.map(|n| (n.clone(), dir.join(n)))
|
||||
.collect()
|
||||
}
|
||||
|
||||
pub fn unique_name() -> String {
|
||||
let nanos = std::time::SystemTime::now()
|
||||
.duration_since(std::time::UNIX_EPOCH)
|
||||
@@ -120,8 +82,6 @@ pub fn recover(game_dir: &Path) -> Result<PathBuf, String> {
|
||||
} else if name.ends_with(SUFFIX) {
|
||||
stale.push(path);
|
||||
others += 1;
|
||||
} else if name.ends_with(PARTIAL_SUFFIX) || name.ends_with(LIST_SUFFIX) {
|
||||
others += 1;
|
||||
} else {
|
||||
return refuse("it holds an unexpected file");
|
||||
}
|
||||
@@ -170,13 +130,8 @@ mod tests {
|
||||
fs::write(dir.join("file-1.stage"), b"x").unwrap();
|
||||
fs::write(dir.join("stream-1-2-3.stage"), b"y").unwrap();
|
||||
fs::write(game.join("keep.stage"), b"z").unwrap();
|
||||
let partial = partial_name("Game/a.pak", 10, None);
|
||||
fs::write(dir.join(&partial), b"p").unwrap();
|
||||
fs::write(list_path(&dir.join(&partial)), b"0\n").unwrap();
|
||||
recover(&game).unwrap();
|
||||
assert_eq!(fs::read_dir(&dir).unwrap().count(), 3);
|
||||
assert_eq!(partials(&dir).into_keys().collect::<Vec<_>>(), vec![partial.clone()]);
|
||||
remove_partial(&dir.join(&partial));
|
||||
assert_eq!(fs::read_dir(&dir).unwrap().count(), 1);
|
||||
assert!(game.join("keep.stage").exists());
|
||||
remove_if_idle(&dir);
|
||||
assert!(!dir.exists());
|
||||
@@ -215,9 +170,5 @@ mod tests {
|
||||
let (a, b) = (unique_name(), unique_name());
|
||||
assert_ne!(a, b);
|
||||
assert!(a.ends_with(".stage"));
|
||||
let p = partial_name("Game/a.pak", 10, Some([0xab; 20]));
|
||||
assert!(p.ends_with(&format!("-{}-10.part", "ab".repeat(20))));
|
||||
assert_ne!(p, partial_name("Game/b.pak", 10, Some([0xab; 20])));
|
||||
assert_ne!(p, partial_name("Game/a.pak", 10, Some([0xac; 20])));
|
||||
}
|
||||
}
|
||||
@@ -59,7 +59,6 @@ struct Recorder {
|
||||
replaced: AtomicUsize,
|
||||
refuse: bool,
|
||||
last_progress: Mutex<(u64, u64)>,
|
||||
first_progress: Mutex<Option<(u64, u64)>>,
|
||||
sizes: Mutex<(u64, u64)>,
|
||||
}
|
||||
|
||||
@@ -73,7 +72,6 @@ impl Events for Recorder {
|
||||
*self.sizes.lock().unwrap() = (pending, disk);
|
||||
}
|
||||
fn progress(&self, written: u64, total: u64, _f: u32, _ft: u32) {
|
||||
self.first_progress.lock().unwrap().get_or_insert((written, total));
|
||||
let mut p = self.last_progress.lock().unwrap();
|
||||
if written >= p.0 {
|
||||
*p = (written, total);
|
||||
@@ -264,85 +262,6 @@ fn a_cancelled_run_reports_cancel() {
|
||||
let _ = fs::remove_dir_all(&game);
|
||||
}
|
||||
|
||||
fn place_partial(fx: &Fixture, game: &Path, data: &[u8], list: &str) -> PathBuf {
|
||||
let stage = staging::recover(game).unwrap();
|
||||
let a = &fx.expected[0].1;
|
||||
let partial = stage.join(staging::partial_name("a.bin", 4000, Some(Sha1::digest(a).into())));
|
||||
fs::write(&partial, data).unwrap();
|
||||
fs::write(staging::list_path(&partial), list).unwrap();
|
||||
partial
|
||||
}
|
||||
|
||||
fn place_done_c(fx: &Fixture, game: &Path) {
|
||||
fs::create_dir_all(game.join("b")).unwrap();
|
||||
fs::write(game.join("b/c.bin"), &fx.expected[1].1).unwrap();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn a_paused_install_resumes_from_its_written_parts() {
|
||||
let fx = fixture();
|
||||
let game = temp_game("resume");
|
||||
place_done_c(&fx, &game);
|
||||
place_partial(&fx, &game, &fx.expected[0].1[..3000], "0\n");
|
||||
let stage = game.join(staging::DIR_NAME);
|
||||
fs::write(stage.join(staging::partial_name("gone.bin", 9, None)), b"old").unwrap();
|
||||
|
||||
let events = Recorder::default();
|
||||
run(&request(&fx, &game), &AtomicBool::new(false), &events).unwrap();
|
||||
for (path, bytes) in &fx.expected {
|
||||
assert_eq!(&fs::read(game.join(path)).unwrap(), bytes, "{path}");
|
||||
}
|
||||
assert_eq!(fx.hits.load(Ordering::Relaxed), 2, "the manifest and the one chunk still missing");
|
||||
assert_eq!(*events.first_progress.lock().unwrap(), Some((2096 + 3000, 6196)));
|
||||
assert_eq!(*events.last_progress.lock().unwrap(), (6196, 6196));
|
||||
assert!(events.logs.lock().unwrap().iter().any(|l| l == "resuming a.bin with 3000 of 4000 bytes written"));
|
||||
assert!(!stage.exists());
|
||||
let _ = fs::remove_dir_all(&game);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn a_part_written_out_of_order_is_kept_too() {
|
||||
let fx = fixture();
|
||||
let game = temp_game("resume-tail");
|
||||
place_done_c(&fx, &game);
|
||||
let mut data = vec![0u8; 3000];
|
||||
data.extend_from_slice(&fx.expected[0].1[3000..]);
|
||||
place_partial(&fx, &game, &data, "3000\n");
|
||||
let events = Recorder::default();
|
||||
run(&request(&fx, &game), &AtomicBool::new(false), &events).unwrap();
|
||||
assert_eq!(fs::read(game.join("a.bin")).unwrap(), fx.expected[0].1);
|
||||
assert_eq!(*events.first_progress.lock().unwrap(), Some((2096 + 1000, 6196)));
|
||||
assert!(!game.join(staging::DIR_NAME).exists());
|
||||
let _ = fs::remove_dir_all(&game);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn a_partial_that_no_longer_matches_is_dropped() {
|
||||
let fx = fixture();
|
||||
let game = temp_game("badpartial");
|
||||
place_partial(&fx, &game, &fx.expected[0].1[..1234], "1234\n");
|
||||
let events = Recorder::default();
|
||||
run(&request(&fx, &game), &AtomicBool::new(false), &events).unwrap();
|
||||
assert_eq!(fs::read(game.join("a.bin")).unwrap(), fx.expected[0].1);
|
||||
assert_eq!(*events.first_progress.lock().unwrap(), Some((0, 6196)));
|
||||
assert!(!game.join(staging::DIR_NAME).exists());
|
||||
let _ = fs::remove_dir_all(&game);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn a_damaged_partial_fails_its_check_and_is_not_kept() {
|
||||
let fx = fixture();
|
||||
let game = temp_game("damagedpartial");
|
||||
place_partial(&fx, &game, &[0u8; 3000], "0\n");
|
||||
let err = run(&request(&fx, &game), &AtomicBool::new(false), &Recorder::default()).unwrap_err();
|
||||
assert_eq!(err, Stop::Failed("SHA-1 mismatch for a.bin".into()));
|
||||
assert!(staging::partials(&game.join(staging::DIR_NAME)).is_empty());
|
||||
let retry = Recorder::default();
|
||||
run(&request(&fx, &game), &AtomicBool::new(false), &retry).unwrap();
|
||||
assert_eq!(fs::read(game.join("a.bin")).unwrap(), fx.expected[0].1);
|
||||
let _ = fs::remove_dir_all(&game);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn guid_names_are_cache_names() {
|
||||
let c = chunk(5, 10);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use std::fs::{self, File, OpenOptions};
|
||||
use std::os::unix::fs::FileExt;
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::path::PathBuf;
|
||||
use std::sync::atomic::{AtomicBool, AtomicU64, AtomicUsize, Ordering};
|
||||
use std::sync::{Arc, Condvar, Mutex};
|
||||
use std::time::{Duration, Instant};
|
||||
@@ -25,12 +25,6 @@ pub struct EngineFile {
|
||||
pub sha1: Option<Hash>,
|
||||
pub replacing: bool,
|
||||
pub parts: Vec<PlanPart>,
|
||||
pub resume: Option<Resume>,
|
||||
}
|
||||
|
||||
pub struct Resume {
|
||||
pub stage: PathBuf,
|
||||
pub kept: Vec<u64>,
|
||||
}
|
||||
|
||||
pub struct EngineInput<'a> {
|
||||
@@ -46,8 +40,6 @@ pub struct EngineInput<'a> {
|
||||
pub process_workers: usize,
|
||||
pub ca_bundle: String,
|
||||
pub user_agent: String,
|
||||
pub progress_base: u64,
|
||||
pub progress_total: u64,
|
||||
}
|
||||
|
||||
#[derive(Debug, Default)]
|
||||
@@ -128,7 +120,7 @@ impl<'a> Engine<'a> {
|
||||
return;
|
||||
}
|
||||
self.events.progress(
|
||||
self.input.progress_base + self.written.load(Ordering::Relaxed),
|
||||
self.written.load(Ordering::Relaxed),
|
||||
self.total_bytes,
|
||||
self.files_done.load(Ordering::Relaxed) as u32,
|
||||
self.input.files.len() as u32,
|
||||
@@ -240,14 +232,10 @@ impl<'a> Engine<'a> {
|
||||
.sync_all()
|
||||
.map_err(|e| format!("Could not assemble or atomically replace {}: {e}", file.path))?;
|
||||
let len = handle.metadata().map(|m| m.len()).unwrap_or(u64::MAX);
|
||||
drop(handle);
|
||||
if len != file.size {
|
||||
return Err(format!("Size mismatch for {}", file.path));
|
||||
}
|
||||
let hash = match (hash, &file.resume) {
|
||||
(None, Some(_)) if file.sha1.is_some() => Some(hash_whole(&handle, file)?),
|
||||
(hash, _) => hash,
|
||||
};
|
||||
drop(handle);
|
||||
if let (Some(expected), Some(got)) = (file.sha1, hash) {
|
||||
if expected != got {
|
||||
return Err(format!("SHA-1 mismatch for {}", file.path));
|
||||
@@ -272,9 +260,6 @@ impl<'a> Engine<'a> {
|
||||
fs::rename(&stage, &file.dest)
|
||||
.map_err(|e| format!("Could not assemble or atomically replace {}: {e}", file.path))
|
||||
})();
|
||||
if file.resume.is_some() {
|
||||
let _ = fs::remove_file(staging::list_path(&stage));
|
||||
}
|
||||
if let Err(e) = result {
|
||||
let _ = fs::remove_file(&stage);
|
||||
return Err(e);
|
||||
@@ -293,16 +278,13 @@ impl<'a> Engine<'a> {
|
||||
}
|
||||
|
||||
fn open_stage(&self, f: usize) -> Result<(), String> {
|
||||
let file = &self.input.files[f];
|
||||
let (path, opened) = match &file.resume {
|
||||
Some(r) => (r.stage.clone(), OpenOptions::new().read(true).write(true).open(&r.stage)),
|
||||
None => {
|
||||
let path = self.input.stage_dir.join(staging::unique_name());
|
||||
let opened = OpenOptions::new().read(true).write(true).create_new(true).open(&path);
|
||||
(path, opened)
|
||||
}
|
||||
};
|
||||
let handle = opened.map_err(|e| format!("Could not stage {}: {e}", file.path))?;
|
||||
let path = self.input.stage_dir.join(staging::unique_name());
|
||||
let handle = OpenOptions::new()
|
||||
.read(true)
|
||||
.write(true)
|
||||
.create_new(true)
|
||||
.open(&path)
|
||||
.map_err(|e| format!("Could not stage {}: {e}", self.input.files[f].path))?;
|
||||
let mut slot = self.slots[f].lock().expect("slot lock");
|
||||
slot.file = Some(Arc::new(handle));
|
||||
slot.stage = Some(path);
|
||||
@@ -457,7 +439,7 @@ pub fn run(input: &EngineInput<'_>, stop: &AtomicBool, events: &dyn Events) -> R
|
||||
stage: None,
|
||||
written: vec![false; f.parts.len()],
|
||||
next_hash: 0,
|
||||
hasher: f.sha1.filter(|_| f.resume.is_none()).map(|_| Sha1::new()),
|
||||
hasher: f.sha1.map(|_| Sha1::new()),
|
||||
left: f.parts.len(),
|
||||
done: false,
|
||||
})
|
||||
@@ -484,7 +466,7 @@ pub fn run(input: &EngineInput<'_>, stop: &AtomicBool, events: &dyn Events) -> R
|
||||
started: Instant::now(),
|
||||
replace_ok: Mutex::new(None),
|
||||
events,
|
||||
total_bytes: input.progress_total,
|
||||
total_bytes: input.files.iter().map(|f| f.size).sum(),
|
||||
};
|
||||
for (i, p) in schedule.producers.iter().enumerate() {
|
||||
if p.preloaded && remaining[i] == 0 {
|
||||
@@ -521,7 +503,7 @@ pub fn run(input: &EngineInput<'_>, stop: &AtomicBool, events: &dyn Events) -> R
|
||||
stream: false,
|
||||
};
|
||||
|
||||
events.progress(input.progress_base, engine.total_bytes, 0, input.files.len() as u32);
|
||||
events.progress(0, engine.total_bytes, 0, input.files.len() as u32);
|
||||
let log = |line: &str| events.log(line);
|
||||
let gate = |i: usize| -> bool {
|
||||
engine.hint.fetch_max(i, Ordering::Relaxed);
|
||||
@@ -564,14 +546,12 @@ pub fn run(input: &EngineInput<'_>, stop: &AtomicBool, events: &dyn Events) -> R
|
||||
let complete = failure.is_none() && engine.files_done.load(Ordering::Relaxed) == input.files.len();
|
||||
|
||||
if !complete {
|
||||
for (file, slot) in input.files.iter().zip(&engine.slots) {
|
||||
for slot in &engine.slots {
|
||||
let mut s = slot.lock().expect("slot lock");
|
||||
if !s.done {
|
||||
s.file.take();
|
||||
if let Some(stage) = s.stage.take() {
|
||||
if failure.is_some() || !keep_partial(file, &s.written, &stage, &input.stage_dir) {
|
||||
let _ = fs::remove_file(stage);
|
||||
}
|
||||
let _ = fs::remove_file(stage);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -608,100 +588,6 @@ fetches={} refetches={} peak_cache_mib={} hosts={}",
|
||||
Err(Stop::Failed("The download ended before every file was written".into()))
|
||||
}
|
||||
|
||||
fn hash_whole(handle: &File, file: &EngineFile) -> Result<Hash, String> {
|
||||
let mut h = Sha1::new();
|
||||
let mut buf = vec![0u8; 1024 * 1024];
|
||||
let mut at = 0u64;
|
||||
while at < file.size {
|
||||
let n = buf.len().min((file.size - at) as usize);
|
||||
handle
|
||||
.read_exact_at(&mut buf[..n], at)
|
||||
.map_err(|e| format!("Could not read back {}: {e}", file.path))?;
|
||||
h.update(&buf[..n]);
|
||||
at += n as u64;
|
||||
}
|
||||
Ok(h.finalize().into())
|
||||
}
|
||||
|
||||
fn keep_partial(file: &EngineFile, written: &[bool], stage: &Path, dir: &Path) -> bool {
|
||||
let mut kept: Vec<u64> = file.resume.as_ref().map(|r| r.kept.clone()).unwrap_or_default();
|
||||
kept.extend(file.parts.iter().zip(written).filter(|(_, w)| **w).map(|(p, _)| p.file_offset));
|
||||
if kept.is_empty() || file.sha1.is_none() {
|
||||
return false;
|
||||
}
|
||||
kept.sort_unstable();
|
||||
let partial = dir.join(staging::partial_name(&file.path, file.size, file.sha1));
|
||||
let list: String = kept.iter().map(|o| format!("{o}\n")).collect();
|
||||
let synced = OpenOptions::new().write(true).open(stage).and_then(|h| h.sync_all());
|
||||
if synced.is_err() || fs::rename(stage, &partial).is_err() {
|
||||
return false;
|
||||
}
|
||||
let resumed = file.resume.as_ref().is_some_and(|r| r.stage == partial);
|
||||
let temp = dir.join(staging::unique_name());
|
||||
let listed = fs::write(&temp, list).and_then(|_| fs::rename(&temp, staging::list_path(&partial))).is_ok();
|
||||
if !listed {
|
||||
let _ = fs::remove_file(&temp);
|
||||
if !resumed {
|
||||
let _ = fs::remove_file(&partial);
|
||||
}
|
||||
}
|
||||
listed || resumed
|
||||
}
|
||||
|
||||
fn tidy_fetch_error(message: &str) -> String {
|
||||
message.strip_prefix("epic: ").unwrap_or(message).to_string()
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
fn part(file_offset: u64, size: u32) -> PlanPart {
|
||||
PlanPart { chunk: 0, chunk_offset: 0, size, file_offset }
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn a_pause_keeps_every_written_part_and_lists_them() {
|
||||
let dir = std::env::temp_dir().join(format!("dd-epic-keep-{}", std::process::id()));
|
||||
let _ = fs::remove_dir_all(&dir);
|
||||
fs::create_dir_all(&dir).unwrap();
|
||||
let file = EngineFile {
|
||||
path: "Game/a.pak".into(),
|
||||
dest: dir.join("a.pak"),
|
||||
size: 30,
|
||||
sha1: Some([1; 20]),
|
||||
replacing: false,
|
||||
parts: vec![part(0, 10), part(10, 10), part(20, 10)],
|
||||
resume: None,
|
||||
};
|
||||
let kept = dir.join(staging::partial_name("Game/a.pak", 30, Some([1; 20])));
|
||||
let stage = dir.join("x.stage");
|
||||
|
||||
fs::write(&stage, [7u8; 30]).unwrap();
|
||||
assert!(!keep_partial(&file, &[false, false, false], &stage, &dir));
|
||||
let unhashed = EngineFile {
|
||||
path: file.path.clone(),
|
||||
dest: file.dest.clone(),
|
||||
size: 30,
|
||||
sha1: None,
|
||||
replacing: false,
|
||||
parts: file.parts.clone(),
|
||||
resume: None,
|
||||
};
|
||||
assert!(!keep_partial(&unhashed, &[true, true, true], &stage, &dir));
|
||||
assert!(stage.exists());
|
||||
assert!(keep_partial(&file, &[false, true, true], &stage, &dir));
|
||||
assert_eq!(fs::read(&kept).unwrap(), [7u8; 30]);
|
||||
assert_eq!(fs::read_to_string(staging::list_path(&kept)).unwrap(), "10\n20\n");
|
||||
assert!(!stage.exists());
|
||||
|
||||
let resumed = EngineFile {
|
||||
parts: vec![part(0, 10)],
|
||||
resume: Some(Resume { stage: kept.clone(), kept: vec![20, 10] }),
|
||||
..file
|
||||
};
|
||||
assert!(keep_partial(&resumed, &[false], &kept, &dir));
|
||||
assert_eq!(fs::read_to_string(staging::list_path(&kept)).unwrap(), "10\n20\n");
|
||||
let _ = fs::remove_dir_all(&dir);
|
||||
}
|
||||
}
|
||||
@@ -39,72 +39,10 @@ pub fn arguments(d: &LaunchData) -> Vec<String> {
|
||||
args
|
||||
}
|
||||
|
||||
pub fn split_command(command: &str) -> Vec<String> {
|
||||
let mut args = Vec::new();
|
||||
let mut current = String::new();
|
||||
let mut quoted = false;
|
||||
let mut started = false;
|
||||
let mut slashes = 0usize;
|
||||
let mut chars = command.chars().map(|c| if c == '\t' { ' ' } else { c }).filter(|&c| c >= ' ' && c != '\u{7f}').peekable();
|
||||
while let Some(c) = chars.next() {
|
||||
if c == '\\' {
|
||||
slashes += 1;
|
||||
started = true;
|
||||
continue;
|
||||
}
|
||||
if c == '"' {
|
||||
current.extend(std::iter::repeat('\\').take(slashes / 2));
|
||||
if slashes % 2 == 1 {
|
||||
current.push('"');
|
||||
} else if quoted && chars.peek() == Some(&'"') {
|
||||
chars.next();
|
||||
current.push('"');
|
||||
} else {
|
||||
quoted = !quoted;
|
||||
}
|
||||
slashes = 0;
|
||||
started = true;
|
||||
continue;
|
||||
}
|
||||
current.extend(std::iter::repeat('\\').take(slashes));
|
||||
slashes = 0;
|
||||
if c == ' ' && !quoted {
|
||||
if started {
|
||||
args.push(std::mem::take(&mut current));
|
||||
started = false;
|
||||
}
|
||||
} else {
|
||||
current.push(c);
|
||||
started = true;
|
||||
}
|
||||
}
|
||||
current.extend(std::iter::repeat('\\').take(slashes));
|
||||
if started {
|
||||
args.push(current);
|
||||
}
|
||||
args.retain(|a| !a.is_empty());
|
||||
args
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn launch_command_splits_like_a_command_line() {
|
||||
assert_eq!(split_command("-PCStore=EGS"), vec!["-PCStore=EGS"]);
|
||||
assert_eq!(
|
||||
split_command(" -a\t-b=\"c d\" \"-e f\" \"\" -g\r\n"),
|
||||
vec!["-a", "-b=c d", "-e f", "-g"]
|
||||
);
|
||||
assert_eq!(
|
||||
split_command(r#"-name="a\" b" -dir=C:\Games\ "-q=\\" -r"#),
|
||||
vec![r#"-name=a" b"#, r"-dir=C:\Games\", r"-q=\", "-r"]
|
||||
);
|
||||
assert_eq!(split_command("-name=\"a\"\" b\" -s=\"\"\""), vec!["-name=a\" b", "-s=\""]);
|
||||
assert!(split_command(" ").is_empty());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn arguments_in_order() {
|
||||
let args = arguments(&LaunchData {
|
||||
|
||||
@@ -68,7 +68,6 @@ pub struct Manifest {
|
||||
pub version: i64,
|
||||
pub build_version: String,
|
||||
pub launch_exe: String,
|
||||
pub launch_command: String,
|
||||
pub prereq_name: String,
|
||||
pub prereq_path: String,
|
||||
pub prereq_read: bool,
|
||||
@@ -280,7 +279,6 @@ fn parse_binary(bytes: &[u8]) -> Result<Manifest, String> {
|
||||
version,
|
||||
build_version: meta.build_version,
|
||||
launch_exe: meta.launch_exe,
|
||||
launch_command: meta.launch_command,
|
||||
prereq_name: meta.prereq_name,
|
||||
prereq_path: meta.prereq_path,
|
||||
prereq_read: meta.complete,
|
||||
@@ -294,7 +292,6 @@ fn parse_binary(bytes: &[u8]) -> Result<Manifest, String> {
|
||||
struct Meta {
|
||||
build_version: String,
|
||||
launch_exe: String,
|
||||
launch_command: String,
|
||||
prereq_name: String,
|
||||
prereq_path: String,
|
||||
complete: bool,
|
||||
@@ -311,7 +308,7 @@ fn read_meta(data: &[u8]) -> Meta {
|
||||
r.fstring()?;
|
||||
meta.build_version = r.fstring()?;
|
||||
meta.launch_exe = normalise_path(&r.fstring()?);
|
||||
meta.launch_command = r.fstring()?;
|
||||
r.fstring()?;
|
||||
let ids = r.count(4)?;
|
||||
for _ in 0..ids {
|
||||
r.fstring()?;
|
||||
@@ -551,7 +548,6 @@ fn parse_json(bytes: &[u8]) -> Result<Manifest, String> {
|
||||
version,
|
||||
build_version: str_field("BuildVersionString"),
|
||||
launch_exe: normalise_path(launch),
|
||||
launch_command: str_field("LaunchCommand"),
|
||||
prereq_name: str_field("PrereqName"),
|
||||
prereq_path: normalise_path(&str_field("PrereqPath")),
|
||||
prereq_read: true,
|
||||
@@ -615,7 +611,7 @@ pub mod testing {
|
||||
fstring(&mut meta, "App");
|
||||
fstring(&mut meta, &m.build);
|
||||
fstring(&mut meta, &m.exe);
|
||||
fstring(&mut meta, "-PCStore=EGS \"-log=a b.txt\"");
|
||||
fstring(&mut meta, "");
|
||||
if let Some((name, path)) = &m.prereq {
|
||||
meta.extend_from_slice(&1i32.to_le_bytes());
|
||||
fstring(&mut meta, "prereq-id");
|
||||
@@ -767,7 +763,6 @@ mod tests {
|
||||
assert_eq!(m.chunk_folder(), "ChunksV4");
|
||||
assert_eq!(m.build_version, "1.2.3-CL-99");
|
||||
assert_eq!(m.launch_exe, "Binaries/Win64/Game.exe");
|
||||
assert_eq!(m.launch_command, "-PCStore=EGS \"-log=a b.txt\"");
|
||||
assert_eq!(m.prereq_name, "UE4 Prerequisites (x64)");
|
||||
assert_eq!(m.prereq_path, "Engine/Extras/UE4PrereqSetup_x64.exe");
|
||||
assert!(m.prereq_read);
|
||||
@@ -856,7 +851,6 @@ mod tests {
|
||||
let doc = r#"{
|
||||
"ManifestFileVersion": "013000000000",
|
||||
"LaunchExeString": "Bin\\Game.exe",
|
||||
"LaunchCommand": "-PCStore=EGS",
|
||||
"BuildVersionString": "++Game+Release-1.0",
|
||||
"PrereqName": "Redist", "PrereqPath": "Redist\\setup.exe",
|
||||
"ChunkHashList": {
|
||||
@@ -878,7 +872,6 @@ mod tests {
|
||||
assert_eq!(m.version, 13);
|
||||
assert_eq!(m.chunk_folder(), "ChunksV3");
|
||||
assert_eq!(m.launch_exe, "Bin/Game.exe");
|
||||
assert_eq!(m.launch_command, "-PCStore=EGS");
|
||||
assert!(m.prereq_read);
|
||||
assert_eq!(m.prereq_path, "Redist/setup.exe");
|
||||
assert_eq!(m.chunks.len(), 2);
|
||||
|
||||
@@ -113,7 +113,6 @@ fn dispatch(op: &str, req: &Value) -> Value {
|
||||
};
|
||||
json!({ "args": launch::arguments(&data) })
|
||||
}
|
||||
"launch.split" => json!({ "args": launch::split_command(str_of(req, "command")) }),
|
||||
"locale" => {
|
||||
let key = locale::language_key(str_of(req, "language"), str_of(req, "region"));
|
||||
json!({ "key": key, "tags": locale::tags_for_key(key), "launchLocale": locale::launch_locale(key) })
|
||||
@@ -161,11 +160,6 @@ pub fn inspect(bytes: &[u8], request: &str) -> String {
|
||||
.map(|a| a.iter().filter_map(|t| t.as_str()).map(str::to_string).collect());
|
||||
json!({ "indices": locale::select(&m.files, tags.as_deref()) })
|
||||
}
|
||||
"launch" => json!({
|
||||
"buildVersion": m.build_version,
|
||||
"command": m.launch_command,
|
||||
"args": launch::split_command(&m.launch_command),
|
||||
}),
|
||||
_ => json!({
|
||||
"buildVersion": m.build_version,
|
||||
"launchExe": m.launch_exe,
|
||||
@@ -193,8 +187,6 @@ mod tests {
|
||||
assert!(v["error"].is_string());
|
||||
let v: Value = serde_json::from_str(&call("launch.args", r#"{"namespace":"ns","appName":"A"}"#)).unwrap();
|
||||
assert_eq!(v["args"][0], "-EpicPortal");
|
||||
let v: Value = serde_json::from_str(&call("launch.split", r#"{"command":"-PCStore=EGS \"-log=a b.txt\""}"#)).unwrap();
|
||||
assert_eq!(v["args"], json!(["-PCStore=EGS", "-log=a b.txt"]));
|
||||
}
|
||||
|
||||
#[test]
|
||||
@@ -218,10 +210,6 @@ mod tests {
|
||||
assert_eq!(v["files"].as_array().unwrap().len(), 2);
|
||||
let v: Value = serde_json::from_str(&inspect(&bytes, r#"{"op":"select","tags":["English"]}"#)).unwrap();
|
||||
assert_eq!(v["indices"], json!([0]));
|
||||
let v: Value = serde_json::from_str(&inspect(&bytes, r#"{"op":"launch"}"#)).unwrap();
|
||||
assert_eq!(v["buildVersion"], "b");
|
||||
assert_eq!(v["command"], "-PCStore=EGS \"-log=a b.txt\"");
|
||||
assert_eq!(v["args"], json!(["-PCStore=EGS", "-log=a b.txt"]));
|
||||
let v: Value = serde_json::from_str(&inspect(b"nonsense", "{}")).unwrap();
|
||||
assert!(v["error"].is_string());
|
||||
}
|
||||
|
||||
@@ -2,10 +2,13 @@
|
||||
|
||||
#![allow(clippy::missing_safety_doc, clippy::result_large_err)]
|
||||
|
||||
#[cfg(feature = "amazon")]
|
||||
pub mod amazon;
|
||||
#[cfg(feature = "epic")]
|
||||
pub mod epic;
|
||||
pub mod fetch_core;
|
||||
pub mod fetch_tuning;
|
||||
#[cfg(feature = "gog")]
|
||||
pub mod gog;
|
||||
pub mod md5_small;
|
||||
pub mod priority;
|
||||
|
||||
@@ -6,6 +6,7 @@ use jni::JNIEnv;
|
||||
pub const VERSION: &str = env!("CARGO_PKG_VERSION");
|
||||
|
||||
#[no_mangle]
|
||||
#[cfg(not(feature = "amazon-pack"))]
|
||||
pub extern "system" fn Java_com_droiddeck_launcher_stores_StoresNative_nativeVersion(
|
||||
env: JNIEnv,
|
||||
_class: JClass,
|
||||
|
||||
Loaded 100 of 159 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user