AppRun 700 B

12345678910111213141516
  1. #!/usr/bin/env bash
  2. # Sculpt Engine / Project Cold Water AppImage launcher.
  3. # The AppImage mount is read-only, so mods/, audio_patches.json, etc. live in a per-user data dir.
  4. HERE="$(dirname "$(readlink -f "${0}")")"
  5. DATA_DIR="${SCULPT_ENGINE_HOME:-${XDG_DATA_HOME:-$HOME/.local/share}/sculpt-engine}"
  6. mkdir -p "$DATA_DIR"
  7. # Seed starter mods on first run without overwriting the user's own files.
  8. if [ -d "$HERE/usr/share/sculpt-engine/mods" ]; then
  9. mkdir -p "$DATA_DIR/mods"
  10. cp -rn "$HERE/usr/share/sculpt-engine/mods/." "$DATA_DIR/mods/" 2>/dev/null || true
  11. fi
  12. export LD_LIBRARY_PATH="$HERE/usr/lib:${LD_LIBRARY_PATH:-}"
  13. cd "$DATA_DIR" || exit 1
  14. exec "$HERE/usr/bin/project_cold_water" "$@"