Players install from Steam Workshop instead of install.sh, which failed on Windows (bash) and a Manjaro box (hard-coded Mods globs). Adds Logo + logo.png the uploader ships, tools/steam_paths.py reading Steam's libraryfolders.vdf (Flatpak/Snap/second disk/Windows), and README install tiers plus in-game publishing steps. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014TkQMhvEyoFqKzeCC69N6o
46 lines
1.5 KiB
Bash
Executable File
46 lines
1.5 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# ABOUT ME
|
|
# Installs the Auto Radiator mod into Cosmoteer's user Mods folder.
|
|
#
|
|
# Why it exists: this is the author's dev loop. Cosmoteer loads user mods from
|
|
# the profile directory, which on a Proton install lives deep inside the Steam
|
|
# compatdata prefix. This script locates it, validates the mod against the
|
|
# installed game data first, and copies only the files the game needs -- the
|
|
# exact set that "Upload to Steam Workshop" later ships. Players install from
|
|
# the Workshop instead; see README.md.
|
|
#
|
|
# Usage: ./install.sh install (validates first)
|
|
# ./install.sh --uninstall remove the installed copy
|
|
|
|
set -euo pipefail
|
|
|
|
MOD_ID="auto_radiator"
|
|
SOURCE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
|
|
# Discovery reads Steam's own library list, so a second disk, Flatpak, Snap
|
|
# or the Debian package all work. See tools/steam_paths.py.
|
|
if ! MODS_DIR="$(python3 "$SOURCE_DIR/tools/steam_paths.py" --mods)"; then
|
|
echo "Set COSMOTEER_MODS_DIR to the Mods folder and run again." >&2
|
|
exit 1
|
|
fi
|
|
|
|
TARGET="$MODS_DIR/$MOD_ID"
|
|
|
|
if [ "${1:-}" = "--uninstall" ]; then
|
|
rm -rf "$TARGET"
|
|
echo "Removed $TARGET"
|
|
exit 0
|
|
fi
|
|
|
|
echo "Validating against installed game data..."
|
|
python3 "$SOURCE_DIR/tests/test_mod.py"
|
|
|
|
echo
|
|
echo "Installing to $TARGET"
|
|
rm -rf "$TARGET"
|
|
mkdir -p "$TARGET"
|
|
cp "$SOURCE_DIR/mod.rules" "$SOURCE_DIR/logo.png" "$TARGET/"
|
|
cp -r "$SOURCE_DIR/components" "$TARGET/"
|
|
|
|
echo "Done. Enable \"Auto Radiator\" in the game's Mods menu."
|