Updated the removal for The Omega Reach so it actually works now.
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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