chore: remove steam scripts

This commit is contained in:
edde746
2026-03-28 20:16:48 +01:00
parent 684196aa36
commit 6a7644935f
4 changed files with 0 additions and 209 deletions
-20
View File
@@ -1,20 +0,0 @@
#!/usr/bin/env bash
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd -W 2>/dev/null || pwd)"
PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd -W 2>/dev/null || pwd)"
echo "==> Building plezy for Steam (Docker)..."
MSYS_NO_PATHCONV=1 docker build \
--platform linux/amd64 \
-f "$PROJECT_ROOT/scripts/steam.Dockerfile" \
-t plezy-steam-build \
"$PROJECT_ROOT"
echo "==> Extracting tarball..."
MSYS_NO_PATHCONV=1 docker create --name plezy-steam-extract plezy-steam-build true 2>/dev/null \
|| { docker rm plezy-steam-extract 2>/dev/null; MSYS_NO_PATHCONV=1 docker create --name plezy-steam-extract plezy-steam-build true; }
MSYS_NO_PATHCONV=1 docker cp plezy-steam-extract:/app/plezy-steam-linux-x64.tar.gz "$PROJECT_ROOT/"
docker rm plezy-steam-extract
echo "==> Output: plezy-steam-linux-x64.tar.gz"
-72
View File
@@ -1,72 +0,0 @@
#!/usr/bin/env bash
set -euo pipefail
echo "==> Assembling Steam bundle..."
BUNDLE=build/linux/x64/release/bundle
BUNDLE_LIB="$BUNDLE/lib"
# Copy libmpv + shaderc into bundle
LIBMPV_DIR=$(dirname "$(find /build/libmpv-prefix -name libmpv.so | head -1)")
cp -a "$LIBMPV_DIR"/libmpv.so* "$BUNDLE_LIB/"
cp -a /build/libmpv-prefix/lib/libshaderc_shared.so* "$BUNDLE_LIB/"
# Bundle runtime deps that the Steam Runtime doesn't ship.
# /steam-rt-libs.txt was snapshot before we built anything (see Dockerfile).
# Iteratively resolve the main binary + all bundled .so files until no new deps appear.
echo ""
echo "==> Bundling runtime dependencies..."
RT_LIBS="/steam-rt-libs.txt"
while true; do
new_count=0
while read dep; do
dep_name=$(basename "$dep")
if ! grep -qF "$dep_name" "$RT_LIBS"; then
if [ ! -f "$BUNDLE_LIB/$dep_name" ]; then
echo " Bundling $dep_name"
cp -a "$dep" "$BUNDLE_LIB/"
dep_dir=$(dirname "$dep")
dep_base=$(echo "$dep_name" | sed 's/\.so.*//')
cp -a "$dep_dir"/${dep_base}.so* "$BUNDLE_LIB/" 2>/dev/null || true
new_count=$((new_count + 1))
fi
fi
done < <({ ldd "$BUNDLE/plezy" 2>/dev/null; find "$BUNDLE_LIB" -name '*.so*' -type f -exec ldd {} \; 2>/dev/null; } | grep "=> /" | awk '{print $3}' | sort -u)
if [ "$new_count" -eq 0 ]; then
break
fi
echo " Bundled $new_count new libraries, re-scanning..."
done
# Verify all deps resolve
echo ""
echo "==> Checking dependencies..."
MISSING=$({ LD_LIBRARY_PATH="$BUNDLE_LIB" ldd "$BUNDLE/plezy" 2>&1; find "$BUNDLE_LIB" -name '*.so*' -type f -exec env LD_LIBRARY_PATH="$BUNDLE_LIB" ldd {} \; 2>&1; } | grep "not found" | sort -u || true)
if [[ -n "$MISSING" ]]; then
echo "WARNING: Unresolved dependencies (will need Steam runtime):"
echo "$MISSING"
else
echo "All dependencies resolved."
fi
# Create launcher script that sets LD_LIBRARY_PATH for bundled libs
echo ""
echo "==> Creating launcher script..."
mv "$BUNDLE/plezy" "$BUNDLE/plezy.bin"
cat > "$BUNDLE/plezy" <<'LAUNCHER'
#!/usr/bin/env bash
SCRIPT_PATH="$(readlink -f "$0")"
INSTALL_DIR="$(dirname "$SCRIPT_PATH")"
export LD_LIBRARY_PATH="$INSTALL_DIR/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
exec "$INSTALL_DIR/plezy.bin" "$@"
LAUNCHER
chmod +x "$BUNDLE/plezy"
echo ""
echo "==> Creating tarball..."
cd "$BUNDLE"
tar -czf /app/plezy-steam-linux-x64.tar.gz *
echo ""
echo "==> Done! Output: plezy-steam-linux-x64.tar.gz"
-41
View File
@@ -1,41 +0,0 @@
# Snapshot libs from the runtime (not SDK) — this is what's actually on the Steam Deck.
FROM registry.gitlab.steamos.cloud/steamrt/sniper/platform:latest AS runtime-snapshot
RUN find /lib /usr/lib -name '*.so*' -type f -o -type l 2>/dev/null | xargs -r basename -a | sort -u > /steam-rt-libs.txt
FROM registry.gitlab.steamos.cloud/steamrt/sniper/sdk:latest
COPY --from=runtime-snapshot /steam-rt-libs.txt /steam-rt-libs.txt
# ─── Layer 1: apt deps (cached unless this block changes) ─────────────────────
RUN apt-get update -qq && apt-get install -y -qq \
clang cmake meson ninja-build pkg-config nasm git curl unzip xz-utils \
libgtk-3-dev libevdev-dev liblzma-dev \
libasound2-dev libass-dev libfreetype-dev libfontconfig-dev libfribidi-dev libharfbuzz-dev \
libepoxy-dev libegl-dev libgl-dev libgnutls28-dev \
libpipewire-0.3-dev libva-dev libvdpau-dev \
libx11-dev libxext-dev libxrandr-dev libxcursor-dev libxi-dev libxss-dev libxpresent-dev \
libxkbcommon-dev libpulse-dev libdbus-1-dev libdrm-dev libgbm-dev \
libwayland-dev wayland-protocols liblcms2-dev python3-pip \
&& pip3 install meson --upgrade \
&& rm -rf /var/lib/apt/lists/*
# ─── Layer 2: libmpv (cached unless build-libmpv.sh changes) ──────────────────
WORKDIR /build
COPY linux/packaging/build-libmpv.sh linux/packaging/
RUN bash linux/packaging/build-libmpv.sh
# ─── Layer 3: Flutter SDK (cached unless Flutter channel changes) ──────────────
RUN git clone --depth 1 --branch stable https://github.com/flutter/flutter.git /opt/flutter
ENV PATH="/opt/flutter/bin:$PATH"
RUN flutter --disable-analytics \
&& flutter config --no-cli-animations \
&& flutter precache --linux
# ─── Layer 4: App build (runs on every source change) ─────────────────────────
COPY . /app
WORKDIR /app
ENV PKG_CONFIG_PATH="/build/libmpv-prefix/lib/pkgconfig:/build/libmpv-prefix/lib/x86_64-linux-gnu/pkgconfig"
RUN flutter pub get \
&& flutter build linux --release
# ─── Layer 5: Bundle assembly + dep bundling ──────────────────────────────────
RUN bash scripts/bundle_steam.sh
-76
View File
@@ -1,76 +0,0 @@
#!/usr/bin/env bash
set -euo pipefail
APP_ID=4435320
DEPOT_WIN=4435321
DEPOT_LINUX=4435322
REPO="edde746/plezy"
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
WORK="$SCRIPT_DIR/build"
# Get latest release tag
TAG=$(gh release view --repo "$REPO" --json tagName -q .tagName)
echo "Latest release: $TAG"
rm -rf "$WORK"
mkdir -p "$WORK"
# Download & extract
echo "Downloading Windows build..."
gh release download "$TAG" --repo "$REPO" -p "plezy-windows-x64-portable.7z" -D "$WORK"
if [[ "$OSTYPE" == "darwin"* ]]; then
unar -o "$WORK" "$WORK/plezy-windows-x64-portable.7z"
else
7z x "$WORK/plezy-windows-x64-portable.7z" -o"$WORK" -y
fi
mv "$WORK"/plezy-windows-x64-portable "$WORK/windows"
echo "Extracting Linux Steam build..."
STEAM_TARBALL="$SCRIPT_DIR/../plezy-steam-linux-x64.tar.gz"
if [[ ! -f "$STEAM_TARBALL" ]]; then
echo "Error: $STEAM_TARBALL not found. Run build_steam.sh first." >&2
exit 1
fi
mkdir -p "$WORK/linux"
tar xzf "$STEAM_TARBALL" -C "$WORK/linux"
# Generate VDF files
cat > "$WORK/app_build.vdf" <<EOF
"appbuild"
{
"appid" "$APP_ID"
"desc" "$TAG"
"buildoutput" "$WORK/output"
"contentroot" "$WORK"
"setlive" "public"
"depots"
{
"$DEPOT_WIN"
{
"FileMapping"
{
"LocalPath" "windows/*"
"DepotPath" "."
"recursive" "1"
}
}
"$DEPOT_LINUX"
{
"FileMapping"
{
"LocalPath" "linux/*"
"DepotPath" "."
"recursive" "1"
}
}
}
}
EOF
mkdir -p "$WORK/output"
echo "Uploading to Steam..."
steamcmd +login "$STEAM_USER" +run_app_build "$WORK/app_build.vdf" +quit
echo "Done! Uploaded $TAG to Steam."