Compare commits
3 Commits
03e72a8263
..
master
| Author | SHA1 | Date | |
|---|---|---|---|
| db508a46cd | |||
| b617aa6ea6 | |||
| 362feb044f |
@@ -41,7 +41,7 @@ python3 .codex/skills/linux-game-manager-dev/scripts/audit_game_catalog.py
|
||||
|
||||
3. **Removal flow**
|
||||
- `game_removal` resolves launcher entry to real script.
|
||||
- It extracts the first `installPath`-containing line from launcher script to infer directory to remove.
|
||||
- It scans launcher script lines for a non-comment `${installPath}/...` path assignment and uses that to infer the directory to remove.
|
||||
- If no `installPath` reference is found, only launcher entry is removed.
|
||||
|
||||
4. **Update flow**
|
||||
@@ -73,7 +73,7 @@ python3 .codex/skills/linux-game-manager-dev/scripts/audit_game_catalog.py
|
||||
|
||||
- Mismatched `.install/<Game>.sh` vs `.launch/<Game>.game` names create orphaned or invisible entries.
|
||||
- Missing `installPath` reference in launcher prevents full uninstall.
|
||||
- `game_removal` parses the first `installPath` match in launcher text, so comments containing `installPath` can break removal path detection.
|
||||
- `game_removal` expects a concrete `${installPath}/...` path in the launcher; indirect path construction can prevent removal from finding the install directory.
|
||||
- Missing `run_update()` in `.update` scripts breaks update flow.
|
||||
- Bypassing shared download helpers risks cache and validation regressions.
|
||||
- Installers may change the working directory; repository-relative manager paths must therefore use the resolved script root rather than `${0%/*}`.
|
||||
|
||||
@@ -127,5 +127,4 @@ Use this pattern for Python games installed with `uv` when runtime speech suppor
|
||||
- Launch via `uv run ...` from the same directory used for `uv sync`.
|
||||
|
||||
3. Removal safety:
|
||||
- Ensure first `installPath` line in launcher points to a path that lets `game_removal` infer the game root correctly.
|
||||
- Do not put `installPath` in comments above that path line, because removal currently grabs the first matching line.
|
||||
- Ensure the launcher contains a concrete `${installPath}/...` path assignment so `game_removal` can infer the game root correctly.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# shellcheck shell=bash disable=SC2154 # installPath and cache are set by linux-game-manager.sh
|
||||
check_architecture x86_64
|
||||
get_installer "omega-reach-linux-x64.zip" "https://shiftbacktick.itch.io/the-omega-reach"
|
||||
get_installer "the-omega-reach-linux-x64.zip" "https://shiftbacktick.itch.io/the-omega-reach"
|
||||
mkdir -p "${installPath}/Omega Reach"
|
||||
unzip -d "${installPath}/Omega Reach" "${cache}/omega-reach-linux-x64.zip"
|
||||
chmod +x "${installPath}/Omega Reach/omega-reach"
|
||||
unzip -d "${installPath}/Omega Reach" "${cache}/the-omega-reach-linux-x64.zip"
|
||||
chmod +x "${installPath}/Omega Reach/the-omega-reach"
|
||||
chmod +x "${installPath}/Omega Reach/chrome-sandbox"
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
open_url "https://play.oriolgomez.com/"
|
||||
@@ -1,4 +1,4 @@
|
||||
# shellcheck shell=bash disable=SC2154 # installPath is set by linux-game-manager.sh
|
||||
gamePath="${installPath}/Omega Reach"
|
||||
pushd "${gamePath}" || return 1
|
||||
"${gamePath}/omega-reach"
|
||||
"${gamePath}/the-omega-reach"
|
||||
|
||||
@@ -790,9 +790,14 @@ game_removal() {
|
||||
gameFile="$(readlink -f "${scriptRoot}/.launch/${gameName}.sh")"
|
||||
# Get the actual installation path from the .game file
|
||||
local gameInstallPath
|
||||
gameInstallPath="$(grep -F "installPath" "$gameFile" | grep -v 'pushd' | head -n1)"
|
||||
gameInstallPath="${gameInstallPath#*/}"
|
||||
gameInstallPath="${installPath}/${gameInstallPath%/*}"
|
||||
while IFS= read -r line; do
|
||||
[[ "${line}" == \#* ]] && continue
|
||||
[[ "${line}" == *'pushd'* ]] && continue
|
||||
if [[ "${line}" =~ \$\{installPath\}/([^\"]+) ]]; then
|
||||
gameInstallPath="${installPath}/${BASH_REMATCH[1]}"
|
||||
break
|
||||
fi
|
||||
done < "${gameFile}"
|
||||
if [[ -z "$gameInstallPath" ]] || [[ "${gameInstallPath%%/}" == "$installPath" ]]; then
|
||||
# No install path found, just remove from list
|
||||
ui_yesno "Linux Game Manager" "Linux Game Manager" "This will remove the game from your game list, but will not remove any files. Do you want to continue?" || exit 0
|
||||
|
||||
Reference in New Issue
Block a user