mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-21 22:05:59 +00:00
Rename the app SteamDeck → DroidDeck
App name, app ID and code package: DroidDeck, com.droiddeck.launcher (sources moved to com/droiddeck/launcher, the 68 JNI functions renamed with them). The new app ID installs beside SteamDeck rather than over it. Everywhere the name was the app's own: the sidebar title, the session report, share zips, the shell title, wake-lock and log tags, User-Agents, the Compose theme, the Download folder and switch files (droiddeck-env, -osc, -driver, -tu-debug, -no-pad, -pad-log, -no-hud, -wlr-renderer; the old names are not read), and inside the runtime (droiddeck-desktop, Firefox's droiddeck.js, the shortcuts tag, the rumble socket, debug and cache paths). Build scripts, CI artifact (droiddeck-apk), CMake project, README and the progress log follow. Kept on purpose: Valve's Steam Deck (the -steamdeck flag, steamdeck_publicbeta/stable, 'Steam Deck mode', the steamos.cloud package URLs) and names inside the hosted desktop package (steamdeck.png, steamdeck-steam, steamdeck-bigpicture). 'Desktop installed' now tests for labwc instead of the launcher the app stages itself. A committed __pycache__ .pyc is removed.
This commit is contained in:
1 parent
a19dfb88a0
commit
d160f464b6
118 files changed
+498
-487
No files matched your search
@@ -1,8 +1,8 @@
|
||||
/* The handful of build-time facts PulseAudio 13's headers read, for compiling one module against
|
||||
* the upstream source tree without running its configure. The daemon and libraries the app ships
|
||||
* were built for the same target (Android arm64, bionic), so these match them. */
|
||||
#ifndef STEAMDECK_PA_CONFIG_H
|
||||
#define STEAMDECK_PA_CONFIG_H
|
||||
#ifndef DROIDDECK_PA_CONFIG_H
|
||||
#define DROIDDECK_PA_CONFIG_H
|
||||
#define PACKAGE "pulseaudio"
|
||||
#define PACKAGE_NAME "pulseaudio"
|
||||
#define PACKAGE_VERSION "13.0"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* pulsecore/module.h keeps a libltdl handle in pa_module; the module never touches it, so the
|
||||
* handle type is all that is needed here. */
|
||||
#ifndef STEAMDECK_LTDL_STUB_H
|
||||
#define STEAMDECK_LTDL_STUB_H
|
||||
#ifndef DROIDDECK_LTDL_STUB_H
|
||||
#define DROIDDECK_LTDL_STUB_H
|
||||
typedef void *lt_dlhandle;
|
||||
#endif
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* module-aaudio-sink: a PulseAudio 13 sink on Android's AAudio, for the SteamDeck app.
|
||||
* module-aaudio-sink: a PulseAudio 13 sink on Android's AAudio, for the DroidDeck app.
|
||||
*
|
||||
* The daemon's IO thread pulls rendered audio from the sink one burst at a time and hands it to
|
||||
* a blocking AAudio output stream; the stream's own buffer paces the thread, and the latency the
|
||||
|
||||
+10
-10
@@ -4,7 +4,7 @@ set -euo pipefail
|
||||
repo_root=$(CDPATH= cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." && pwd)
|
||||
sdk_dir=${ANDROID_HOME:-${ANDROID_SDK_ROOT:-"${HOME}/Library/Android/sdk"}}
|
||||
java_dir=${JAVA_HOME:-"/opt/homebrew/opt/openjdk@17/libexec/openjdk.jdk/Contents/Home"}
|
||||
image_name=${STEAMDECK_BUILD_IMAGE:-steamdeck-local-cross:24.04-v2}
|
||||
image_name=${DROIDDECK_BUILD_IMAGE:-droiddeck-local-cross:24.04-v2}
|
||||
|
||||
if [[ ! -x "${sdk_dir}/platform-tools/adb" ]]; then
|
||||
echo "Android SDK not found at ${sdk_dir}; set ANDROID_HOME or ANDROID_SDK_ROOT." >&2
|
||||
@@ -40,12 +40,12 @@ docker run --rm --platform linux/amd64 \
|
||||
for script in tools/linuxfs/overlay/usr/local/bin/bannerlator-*; do
|
||||
install -Dm644 "$script" "$d/usr/local/bin/$(basename "$script")"
|
||||
done
|
||||
install -Dm644 tools/linuxfs/desktop/steamdeck-desktop "$d/usr/local/bin/steamdeck-desktop"
|
||||
install -Dm644 tools/linuxfs/desktop/droiddeck-desktop "$d/usr/local/bin/droiddeck-desktop"
|
||||
install -Dm644 tools/linuxfs/desktop/autostart "$d/etc/xdg/labwc/autostart"
|
||||
install -Dm644 tools/linuxfs/desktop/rc.xml "$d/etc/xdg/labwc/rc.xml"
|
||||
install -Dm644 tools/linuxfs/desktop/panel.conf "$d/etc/xdg/lxqt/panel.conf"
|
||||
install -Dm644 tools/linuxfs/desktop/firefox-steamdeck.js \
|
||||
"$d/usr/lib/firefox/defaults/pref/steamdeck.js"
|
||||
install -Dm644 tools/linuxfs/desktop/firefox-droiddeck.js \
|
||||
"$d/usr/lib/firefox/defaults/pref/droiddeck.js"
|
||||
|
||||
need=$(aarch64-linux-gnu-readelf -d "$d/libfakeinput.so" | sed -n "s/.*NEEDED.*\\[\\(.*\\)\\]/\\1/p")
|
||||
for bad in libstdc++.so.6 libgcc_s.so.1; do
|
||||
@@ -76,13 +76,13 @@ docker run --rm --platform linux/amd64 \
|
||||
export ANDROID_HOME="${sdk_dir}"
|
||||
export ANDROID_SDK_ROOT="${sdk_dir}"
|
||||
export JAVA_HOME="${java_dir}"
|
||||
ndk_version=${STEAMDECK_NDK_VERSION:-}
|
||||
ndk_version=${DROIDDECK_NDK_VERSION:-}
|
||||
if [[ -z "${ndk_version}" ]]; then
|
||||
ndk_path=$(find "${sdk_dir}/ndk" -mindepth 1 -maxdepth 1 -type d -print | sort -V | tail -1)
|
||||
ndk_version=${ndk_path##*/}
|
||||
fi
|
||||
if [[ -z "${ndk_version}" || ! -d "${sdk_dir}/ndk/${ndk_version}" ]]; then
|
||||
echo "No Android NDK found under ${sdk_dir}/ndk; set STEAMDECK_NDK_VERSION." >&2
|
||||
echo "No Android NDK found under ${sdk_dir}/ndk; set DROIDDECK_NDK_VERSION." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -93,7 +93,7 @@ for tool in curl tar zstd; do
|
||||
fi
|
||||
done
|
||||
|
||||
staging_dir=$(mktemp -d "${TMPDIR:-/tmp}/steamdeck-build.XXXXXX")
|
||||
staging_dir=$(mktemp -d "${TMPDIR:-/tmp}/droiddeck-build.XXXXXX")
|
||||
bundle_asset="${repo_root}/app/src/main/assets/pulseaudio.tzst"
|
||||
bundle_backup="${staging_dir}/pulseaudio.original.tzst"
|
||||
bundle_replaced=0
|
||||
@@ -110,8 +110,8 @@ trap cleanup EXIT
|
||||
trap 'exit 130' INT
|
||||
trap 'exit 143' TERM
|
||||
|
||||
pa_source=${STEAMDECK_PA13_SOURCE_DIR:-"${staging_dir}/pulseaudio-13.0"}
|
||||
if [[ -z "${STEAMDECK_PA13_SOURCE_DIR:-}" ]]; then
|
||||
pa_source=${DROIDDECK_PA13_SOURCE_DIR:-"${staging_dir}/pulseaudio-13.0"}
|
||||
if [[ -z "${DROIDDECK_PA13_SOURCE_DIR:-}" ]]; then
|
||||
curl -fsSL -o "${staging_dir}/pulseaudio-13.0.tar.gz" \
|
||||
https://github.com/pulseaudio/pulseaudio/archive/refs/tags/v13.0.tar.gz
|
||||
mkdir -p "${pa_source}"
|
||||
@@ -119,7 +119,7 @@ if [[ -z "${STEAMDECK_PA13_SOURCE_DIR:-}" ]]; then
|
||||
-C "${pa_source}" --strip-components=1
|
||||
fi
|
||||
if [[ ! -f "${pa_source}/src/pulse/version.h.in" ]]; then
|
||||
echo "PulseAudio 13.0 source not found at ${pa_source}; set STEAMDECK_PA13_SOURCE_DIR." >&2
|
||||
echo "PulseAudio 13.0 source not found at ${pa_source}; set DROIDDECK_PA13_SOURCE_DIR." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
@@ -33,5 +33,5 @@ else
|
||||
fi
|
||||
|
||||
"${adb_bin}" -s "${serial}" install -r --no-incremental "${apk}"
|
||||
installed_path=$("${adb_bin}" -s "${serial}" shell pm path com.steamdeck.launcher | tr -d '\r')
|
||||
installed_path=$("${adb_bin}" -s "${serial}" shell pm path com.droiddeck.launcher | tr -d '\r')
|
||||
printf 'Installed on %s: %s\n' "${serial}" "${installed_path}"
|
||||
@@ -36,7 +36,7 @@ PATCHES=\$(ls *.patch | sort)
|
||||
{ echo; echo 'source+=('; for p in \$PATCHES; do echo \" \$p\"; done; echo ')'; for p in \$PATCHES; do echo \"sha256sums+=('SKIP')\"; done; } >> PKGBUILD
|
||||
cat >> PKGBUILD <<'PREP'
|
||||
|
||||
_steamdeck_prepare() {
|
||||
_droiddeck_prepare() {
|
||||
# Arch's own prepare() leaves the shell inside the checkout; start from a known place.
|
||||
cd \"\$srcdir/gamescope\"
|
||||
for p in \$(ls \"\$srcdir\"/*.patch | sort); do
|
||||
@@ -46,9 +46,9 @@ _steamdeck_prepare() {
|
||||
}
|
||||
if declare -f prepare >/dev/null; then
|
||||
eval \"\$(declare -f prepare | sed 's/^prepare ()/_arch_prepare ()/')\"
|
||||
prepare() { _arch_prepare; _steamdeck_prepare; }
|
||||
prepare() { _arch_prepare; _droiddeck_prepare; }
|
||||
else
|
||||
prepare() { _steamdeck_prepare; }
|
||||
prepare() { _droiddeck_prepare; }
|
||||
fi
|
||||
PREP
|
||||
makepkg -A -s --noconfirm --skipchecksums --skippgpcheck # -A: the PKGBUILD lists x86_64 only; Arch Linux ARM builds the same file
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
# What the desktop is made of, started once labwc is up. Everything logs into the session log.
|
||||
# With ~/.steamdeck-desktop-debug present, the panel and the file manager also log what they
|
||||
# With ~/.droiddeck-desktop-debug present, the panel and the file manager also log what they
|
||||
# say to the compositor about their windows (shell, layer, output), capped so it stays readable.
|
||||
run() {
|
||||
local tag=$1; shift
|
||||
if [ -f "$HOME/.steamdeck-desktop-debug" ]; then
|
||||
# Everything it says goes to ~/.cache/steamdeck/<tag>.log; the window-related protocol
|
||||
if [ -f "$HOME/.droiddeck-desktop-debug" ]; then
|
||||
# Everything it says goes to ~/.cache/droiddeck/<tag>.log; the window-related protocol
|
||||
# traffic also goes into the session log, capped.
|
||||
mkdir -p "$HOME/.cache/steamdeck"
|
||||
WAYLAND_DEBUG=1 "$@" 2>&1 | tee "$HOME/.cache/steamdeck/$tag.log" | awk -v t="[$tag]" '!/^\[[0-9:.]+\] +\{/ || (c<120 && /layer_s|xdg_toplevel|fullscreen|wl_output|xdg_output|configure\(/) {print t, $0; c++; fflush()}' &
|
||||
mkdir -p "$HOME/.cache/droiddeck"
|
||||
WAYLAND_DEBUG=1 "$@" 2>&1 | tee "$HOME/.cache/droiddeck/$tag.log" | awk -v t="[$tag]" '!/^\[[0-9:.]+\] +\{/ || (c<120 && /layer_s|xdg_toplevel|fullscreen|wl_output|xdg_output|configure\(/) {print t, $0; c++; fflush()}' &
|
||||
else
|
||||
"$@" 2>&1 | sed "s/^/[$tag] /" &
|
||||
fi
|
||||
@@ -16,7 +16,7 @@ run() {
|
||||
[ -n "${BL_WIDTH:-}" ] && wlr-randr --output WL-1 --custom-mode "${BL_WIDTH}x${BL_HEIGHT}" 2>&1 | sed 's/^/[wlr-randr] /'
|
||||
# In debug runs, ground truth on the network from inside the session: name lookup, then a
|
||||
# fetch over IPv4 and over IPv6, so a browser's "no internet" can be placed.
|
||||
if [ -f "$HOME/.steamdeck-desktop-debug" ]; then
|
||||
if [ -f "$HOME/.droiddeck-desktop-debug" ]; then
|
||||
(
|
||||
echo "[net] getent: $(getent hosts example.com 2>&1 | head -2 | tr '\n' ' ')"
|
||||
for f in 4 6; do
|
||||
@@ -26,10 +26,10 @@ if [ -f "$HOME/.steamdeck-desktop-debug" ]; then
|
||||
fi
|
||||
# In debug runs Firefox (started from the panel or the menu, so it inherits this) writes its
|
||||
# own network log: name lookups, connects, HTTP transactions, the link/offline decisions.
|
||||
if [ -f "$HOME/.steamdeck-desktop-debug" ]; then
|
||||
mkdir -p "$HOME/.cache/steamdeck"
|
||||
if [ -f "$HOME/.droiddeck-desktop-debug" ]; then
|
||||
mkdir -p "$HOME/.cache/droiddeck"
|
||||
export MOZ_LOG="nsHttp:3,nsSocketTransport:3,nsHostResolver:4,NetworkLinkService:5,NetworkConnectivityService:5,nsIOService:5"
|
||||
export MOZ_LOG_FILE="$HOME/.cache/steamdeck/firefox-net.log"
|
||||
export MOZ_LOG_FILE="$HOME/.cache/droiddeck/firefox-net.log"
|
||||
fi
|
||||
swaybg -m fill -i /usr/share/backgrounds/steamdeck.png &
|
||||
# Desktop icons (pcmanfm-qt manages the desktop surface) and the panel with the app menu.
|
||||
|
||||
@@ -22,7 +22,7 @@ export WLR_RENDERER=${BL_WLR_RENDERER:-pixman}
|
||||
if [ -n "${BL_DEBUG_DIR:-}" ]; then
|
||||
mkdir -p "$BL_DEBUG_DIR" 2>/dev/null || true
|
||||
exec >>"$BL_DEBUG_DIR/desktop.log" 2>&1
|
||||
echo "== steamdeck-desktop $(date -u '+%Y-%m-%d %H:%M:%S UTC') renderer=$WLR_RENDERER"
|
||||
echo "== droiddeck-desktop $(date -u '+%Y-%m-%d %H:%M:%S UTC') renderer=$WLR_RENDERER"
|
||||
fi
|
||||
export WLR_BACKENDS=wayland
|
||||
mkdir -p "$HOME/.config/labwc" "$HOME/.config/lxqt"
|
||||
@@ -75,8 +75,8 @@ if [ ! -f /etc/fonts/local.conf ]; then
|
||||
echo "== fontconfig: wrote local.conf (DejaVu as the default family)"
|
||||
fi
|
||||
# The cache in the image was built before those rules existed; rebuild it once, and only once.
|
||||
if [ ! -f /var/cache/fontconfig/.steamdeck-built ] && command -v fc-cache >/dev/null 2>&1; then
|
||||
fc-cache -f >/dev/null 2>&1 && touch /var/cache/fontconfig/.steamdeck-built
|
||||
if [ ! -f /var/cache/fontconfig/.droiddeck-built ] && command -v fc-cache >/dev/null 2>&1; then
|
||||
fc-cache -f >/dev/null 2>&1 && touch /var/cache/fontconfig/.droiddeck-built
|
||||
echo "== fontconfig: cache rebuilt, default sans is $(fc-match sans-serif 2>/dev/null)"
|
||||
fi
|
||||
# The menu's "Steam" / "Steam Big Picture" entries and one entry per installed game: all of them
|
||||
@@ -86,9 +86,9 @@ ln -sf /usr/local/bin/bannerlator-steam-launch /usr/local/bin/steamdeck-steam 2>
|
||||
ln -sf /usr/local/bin/bannerlator-steam-shim /usr/local/bin/steam 2>/dev/null
|
||||
python3 /usr/local/bin/bannerlator-desktop-games 2>&1 | sed 's/^/[games] /'
|
||||
|
||||
echo "== steamdeck-desktop: labwc ($WLR_RENDERER) on $WAYLAND_DISPLAY"
|
||||
# ~/.steamdeck-desktop-debug: labwc's own debug log (views and layer surfaces mapping) too.
|
||||
DEBUG=; [ -f "$HOME/.steamdeck-desktop-debug" ] && DEBUG=-d
|
||||
echo "== droiddeck-desktop: labwc ($WLR_RENDERER) on $WAYLAND_DISPLAY"
|
||||
# ~/.droiddeck-desktop-debug: labwc's own debug log (views and layer surfaces mapping) too.
|
||||
DEBUG=; [ -f "$HOME/.droiddeck-desktop-debug" ] && DEBUG=-d
|
||||
# A session bus: the panel's menus, the file manager and the portal all expect one.
|
||||
if command -v dbus-run-session >/dev/null 2>&1; then
|
||||
exec dbus-run-session -- labwc $DEBUG -C "$HOME/.config/labwc"
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Firefox defaults for the SteamDeck desktop, staged by the app into
|
||||
// Firefox defaults for the DroidDeck desktop, staged by the app into
|
||||
// /usr/lib/firefox/defaults/pref/. A user's own prefs.js still wins.
|
||||
|
||||
// Firefox judges "online" by dumping the routing table over netlink, which Android denies to
|
||||
BIN
Binary file not shown.
@@ -15,7 +15,7 @@ LIBRARIES = ((STEAM_ROOT, "Steam Games"), ("/mnt/bannerlator-sd", "SD Games"))
|
||||
# The client's own tools and runtimes live in steamapps beside the games; they are not titles.
|
||||
NOT_GAMES = {228980, 1493710, 3127680, 4183110, 4427310, 4185400}
|
||||
APPS_DIR = os.path.join(HOME, ".local/share/applications")
|
||||
PREFIX = "steamdeck-game-"
|
||||
PREFIX = "droiddeck-game-"
|
||||
NAME = re.compile(r'^\s*"name"\s*"([^"]*)"', re.M)
|
||||
STATE = re.compile(r'^\s*"StateFlags"\s*"(\d+)"', re.M)
|
||||
|
||||
@@ -91,7 +91,7 @@ def write_entries():
|
||||
body = (
|
||||
"[Desktop Entry]\nType=Application\nName=%s\nComment=Steam game %d - opens in Steam under gamescope\n"
|
||||
"Exec=/usr/local/bin/bannerlator-steam-launch desktop %d\nIcon=%s\nTerminal=false\n"
|
||||
"Categories=Game;\nX-SteamDeck-AppId=%d\n" % (safe, appid, appid, icon_for(appid), appid)
|
||||
"Categories=Game;\nX-DroidDeck-AppId=%d\n" % (safe, appid, appid, icon_for(appid), appid)
|
||||
)
|
||||
path = os.path.join(APPS_DIR, "%s%d.desktop" % (PREFIX, appid))
|
||||
try:
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
# bannerlator-session desktop the file manager
|
||||
# bannerlator-session run <path> a Linux program (AppImage, script or ELF)
|
||||
# bannerlator-session steam [steam-url] the native Steam client
|
||||
# bannerlator-session lxqt the LXQt/labwc desktop (SteamDeck's desktop package)
|
||||
# bannerlator-session lxqt the LXQt/labwc desktop (DroidDeck's desktop package)
|
||||
# BL_WIDTH / BL_HEIGHT size the output, BL_FPS limits it, BL_LOG collects everything said here.
|
||||
set -u
|
||||
export HOME=${HOME:-/root}
|
||||
@@ -86,12 +86,12 @@ if [ -z "${BL_INSIDE:-}" ]; then
|
||||
wayland-info >/dev/null 2>&1 && break
|
||||
sleep 0.1
|
||||
done
|
||||
# The desktop (SteamDeck's hosted package) is its own nested compositor, labwc, drawing straight
|
||||
# The desktop (DroidDeck's hosted package) is its own nested compositor, labwc, drawing straight
|
||||
# into the app's: no gamescope in between.
|
||||
if [ "$mode" = lxqt ]; then
|
||||
step "starting the desktop"
|
||||
[ -x /usr/local/bin/steamdeck-desktop ] || { echo "== the desktop package is not installed"; exit 66; }
|
||||
exec /usr/local/bin/steamdeck-desktop
|
||||
[ -x /usr/local/bin/droiddeck-desktop ] || { echo "== the desktop package is not installed"; exit 66; }
|
||||
exec /usr/local/bin/droiddeck-desktop
|
||||
fi
|
||||
width=${BL_WIDTH:-1280}
|
||||
height=${BL_HEIGHT:-720}
|
||||
|
||||
@@ -20,7 +20,7 @@ case $target in
|
||||
esac
|
||||
dir=${BL_LAUNCH_DIR:-}
|
||||
if [ -z "$dir" ] || [ ! -d "$dir" ]; then
|
||||
echo "bannerlator-steam-launch: not inside a SteamDeck session (BL_LAUNCH_DIR unset)" >&2
|
||||
echo "bannerlator-steam-launch: not inside a DroidDeck session (BL_LAUNCH_DIR unset)" >&2
|
||||
exit 69
|
||||
fi
|
||||
# Written whole, then renamed: the app reads it on close, never half-written.
|
||||
|
||||
@@ -7,7 +7,7 @@ library as non-Steam shortcuts, each mapped to the ARM64 Proton, before the clie
|
||||
The JSON is a list the app writes each session: {"name", "exe", "dir", "appid"} with guest paths.
|
||||
The client keeps non-Steam games in userdata/<account>/config/shortcuts.vdf, a binary VDF it
|
||||
reads at start-up and rewrites at exit, so this runs while it is down. Entries the app wrote
|
||||
carry the tag "steamdeck-app" and are replaced wholesale; anything the user added inside the
|
||||
carry the tag "droiddeck-app" and are replaced wholesale; anything the user added inside the
|
||||
client is kept as it is. The appid is the one the client itself derives (crc32 of exe+name with
|
||||
the top bit set), so the launch URL the app uses matches what the client shows.
|
||||
"""
|
||||
@@ -20,7 +20,7 @@ import shutil
|
||||
import struct
|
||||
import sys
|
||||
|
||||
TAG = "steamdeck-app"
|
||||
TAG = "droiddeck-app"
|
||||
|
||||
|
||||
def account_dir(steam_root):
|
||||
@@ -128,7 +128,7 @@ def shortcut(game):
|
||||
}
|
||||
|
||||
|
||||
ART_MANIFEST = ".steamdeck-art.json"
|
||||
ART_MANIFEST = ".droiddeck-art.json"
|
||||
# listing key -> the client's grid file suffix: <appid>p = portrait capsule, <appid> = header,
|
||||
# <appid>_hero, <appid>_logo.
|
||||
ART_SLOTS = (("p", "p"), ("header", ""), ("hero", "_hero"), ("logo", "_logo"))
|
||||
|
||||
Reference in new issue
Block a user