Compare commits

...

2 Commits

2 changed files with 40 additions and 3 deletions

View File

@@ -59,7 +59,7 @@ This bootstraps the development environment and starts the dev stack. On a fresh
SteamOS temporarily requires a writable root filesystem while native packages are installed. `run.sh` disables the read-only mode only around `pacman`, restores it afterward, and may ask for the user's sudo password. It also initializes and populates the SteamOS pacman keyring before installing packages, because a fresh or updated Steam Deck can otherwise reject valid packages with "unknown trust" / PGP signature errors. If that keyring repair is still insufficient and SteamOS provides `steamos-devmode`, `run.sh` uses it as a final SteamOS bootstrap fallback. Set `HEIMGEIST_STEAMOS_DEVMODE=0` to skip that fallback. SteamOS system updates can remove manually installed system packages; rerunning `./run.sh` restores any missing prerequisites.
Downloads and package installation are skipped when usable dependencies already exist. Node.js archives are verified with their published SHA-256 checksum. Use `HEIMGEIST_BOOTSTRAP_ONLY=1 ./run.sh` to install/check dependencies without launching Heimgeist, or `HEIMGEIST_SKIP_SYSTEM_DEPS=1 ./run.sh` when native Tauri dependencies are managed externally. `HEIMGEIST_NODE_MAJOR`, `HEIMGEIST_NODE_DIR`, `HEIMGEIST_TOOL_BIN_DIR`, `CARGO_HOME`, `RUSTUP_HOME`, `PYTHON_BIN`, and `HEIMGEIST_STEAMOS_DEVMODE` provide explicit runtime overrides.
Downloads and package installation are skipped when usable dependencies already exist. Node.js archives are verified with their published SHA-256 checksum. Use `HEIMGEIST_BOOTSTRAP_ONLY=1 ./run.sh` to install/check dependencies without launching Heimgeist, or `HEIMGEIST_SKIP_SYSTEM_DEPS=1 ./run.sh` when native Tauri dependencies are managed externally. If the package manager succeeds but the native dependency preflight still cannot verify a `pkg-config` module, `run.sh` prints a preflight report and continues so the real Tauri build can produce the authoritative compiler/linker error. Set `HEIMGEIST_STRICT_SYSTEM_DEPS=1` to make that preflight warning fatal. `HEIMGEIST_NODE_MAJOR`, `HEIMGEIST_NODE_DIR`, `HEIMGEIST_TOOL_BIN_DIR`, `CARGO_HOME`, `RUSTUP_HOME`, `PYTHON_BIN`, `HEIMGEIST_STEAMOS_DEVMODE`, and `HEIMGEIST_STRICT_SYSTEM_DEPS` provide explicit runtime overrides.
On Linux `x86_64`, `run.sh` now selects a PyTorch flavor before installing `openai-whisper`:

41
run.sh
View File

@@ -18,6 +18,7 @@ HEIMGEIST_NODE_MAJOR="${HEIMGEIST_NODE_MAJOR:-22}"
HEIMGEIST_NODE_DIR="${HEIMGEIST_NODE_DIR:-${XDG_CACHE_HOME:-$HOME/.cache}/heimgeist/node-v$HEIMGEIST_NODE_MAJOR}"
HEIMGEIST_TOOL_BIN_DIR="${HEIMGEIST_TOOL_BIN_DIR:-$HOME/.local/bin}"
HEIMGEIST_SKIP_SYSTEM_DEPS="${HEIMGEIST_SKIP_SYSTEM_DEPS:-0}"
HEIMGEIST_STRICT_SYSTEM_DEPS="${HEIMGEIST_STRICT_SYSTEM_DEPS:-0}"
HEIMGEIST_BOOTSTRAP_ONLY="${HEIMGEIST_BOOTSTRAP_ONLY:-0}"
HEIMGEIST_STEAMOS_DEVMODE="${HEIMGEIST_STEAMOS_DEVMODE:-auto}"
HEIMGEIST_TORCH_FLAVOR="${HEIMGEIST_TORCH_FLAVOR:-auto}"
@@ -58,6 +59,41 @@ linux_native_deps_usable() {
&& pkg-config --exists webkit2gtk-4.1 gtk+-3.0 openssl librsvg-2.0
}
print_native_dependency_report() {
echo "Native dependency preflight report:" >&2
for command_name in cc file pkg-config; do
if command -v "$command_name" >/dev/null 2>&1; then
echo " ok: command '$command_name' -> $(command -v "$command_name")" >&2
else
echo " missing: command '$command_name'" >&2
fi
done
if ! command -v pkg-config >/dev/null 2>&1; then
return
fi
for pkg_config_name in webkit2gtk-4.1 gtk+-3.0 openssl librsvg-2.0; do
if pkg-config --exists "$pkg_config_name"; then
pkg_config_version="$(pkg-config --modversion "$pkg_config_name" 2>/dev/null || true)"
echo " ok: pkg-config '$pkg_config_name' ${pkg_config_version}" >&2
else
echo " missing: pkg-config '$pkg_config_name'" >&2
fi
done
}
handle_incomplete_native_dependencies() {
echo "The native Tauri dependency preflight is still incomplete after package installation." >&2
print_native_dependency_report
if [ "$HEIMGEIST_STRICT_SYSTEM_DEPS" = "1" ]; then
exit 1
fi
echo "Continuing because the package manager reported success." >&2
echo "If the Tauri build still fails, rerun with HEIMGEIST_STRICT_SYSTEM_DEPS=1 for a hard preflight failure." >&2
}
STEAMOS_RESTORE_READONLY=0
restore_steamos_readonly() {
@@ -151,6 +187,8 @@ install_arch_native_deps() {
set -- \
webkit2gtk-4.1 \
base-devel \
pkgconf \
gtk3 \
curl \
wget \
file \
@@ -247,8 +285,7 @@ ensure_native_build_dependencies() {
exit 1
fi
if ! linux_native_deps_usable; then
echo "The native Tauri dependencies are still incomplete after package installation." >&2
exit 1
handle_incomplete_native_dependencies
fi
;;
esac