Files
Pixelplanet--Pixel-VR-Player/tools/package-release.sh
T
PixelplanetandCopilot 858293663b feat(install): one-command installer with automatic Steam library entry
Users can now install with a single command, either piped or from the
release tarball:

  curl -fsSL .../tools/install.sh | sh
  ./install.sh

Tools/install.sh downloads the latest (or a pinned) ARM64 release, verifies
the published checksum, installs to ~/PixelVRPlayer, and registers
"Pixel VR Player" as a Non-Steam Game by editing shortcuts.vdf through an
embedded binary-KeyValues helper (existing shortcuts are preserved, the file
is backed up, and unsupported files are left untouched). Options cover
--dir, --version, --no-steam, --restart-steam and --uninstall. Upgrades never
touch ~/.config/pixelvr or ~/.cache/pixelvr.

Also:
- package-release.sh ships install.sh and a VERSION file in the tarball.
- The release workflow publishes .sha256 checksums and syntax-checks the
  installer before building.
- Docs describe the one-command path for end users.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-10-17 10:16:06 +02:00

52 lines
1.7 KiB
Bash
Executable File

#!/usr/bin/env bash
# Assemble the Steam Frame release tarball for a finished ARM64 build.
#
# Contents (extracted to ~/PixelVRPlayer):
# PixelVRPlayer/pixelvr self-contained binary (static OpenXR loader)
# PixelVRPlayer/run.sh launcher (logs to ~/pixelvr-run.log)
# PixelVRPlayer/install.sh one-command installer / Steam registration
# PixelVRPlayer/shaders/*.spv SPIR-V shaders
# PixelVRPlayer/VERSION release tag (when given)
#
# ./tools/package-release.sh [build-dir] [out-tar] [version]
#
# Defaults: build -> pixelvr-linux-arm64.tar.gz
set -euo pipefail
cd "$(dirname "$0")/.."
BUILD_DIR="${1:-build}"
OUT_TAR="${2:-pixelvr-linux-arm64.tar.gz}"
VERSION="${3:-}"
bin="${BUILD_DIR}/bin/pixelvr"
if [[ ! -f "${bin}" ]]; then
echo "error: ${bin} not found. Build first: ./tools/build.sh" >&2
exit 1
fi
if [[ -z "$(find "${BUILD_DIR}/shaders" -maxdepth 1 -name '*.spv' -print -quit)" ]]; then
echo "error: no shaders in ${BUILD_DIR}/shaders" >&2
exit 1
fi
stage="$(mktemp -d)"
trap 'rm -rf "${stage}"' EXIT
mkdir -p "${stage}/PixelVRPlayer/shaders"
cp "${bin}" "${stage}/PixelVRPlayer/pixelvr"
cp "${BUILD_DIR}/shaders/"*.spv "${stage}/PixelVRPlayer/shaders/"
cp tools/run.sh "${stage}/PixelVRPlayer/run.sh"
cp tools/install.sh "${stage}/PixelVRPlayer/install.sh"
if [[ -n "${VERSION}" ]]; then
printf '%s\n' "${VERSION}" > "${stage}/PixelVRPlayer/VERSION"
fi
chmod +x "${stage}/PixelVRPlayer/pixelvr" \
"${stage}/PixelVRPlayer/run.sh" \
"${stage}/PixelVRPlayer/install.sh"
rm -f "${OUT_TAR}"
tar -C "${stage}" -czf "${OUT_TAR}" PixelVRPlayer
echo "Packaged ${OUT_TAR} ($(du -h "${OUT_TAR}" | cut -f1)):"
tar -tzf "${OUT_TAR}"