Give the store home its own name per engine
The desktop engine shares this store root, and both keyed their home by the store id alone — so installing both from the same publisher meant one config.json and one state.json between them, and the second install silently adopted the first one's state. Caught by installing the two side by side. The home is now `<id>-retroarch`. The installer moves an existing `<id>` home on its way past, so an install from yesterday keeps its state and its games; the uninstaller accepts either name. The launcher was already `<id>-retroarch-store`, so nothing the user types changes. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
+10
-1
@@ -57,9 +57,18 @@ print(sid, cfg.get("name") or sid)
|
||||
STORE_ID="${STORE_META%% *}"
|
||||
STORE_NAME="${STORE_META#* }"
|
||||
|
||||
STORE_HOME="$STORE_ROOT/$STORE_ID"
|
||||
# One home per engine: the desktop store shares this root, and a shared home
|
||||
# would mean a shared config.json and state.json.
|
||||
STORE_HOME="$STORE_ROOT/$STORE_ID-retroarch"
|
||||
LAUNCHER="$BIN_DIR/$STORE_ID-retroarch-store"
|
||||
|
||||
# Installs from before the rename kept the home under the bare store id.
|
||||
LEGACY_HOME="$STORE_ROOT/$STORE_ID"
|
||||
if [ -d "$LEGACY_HOME" ] && [ -f "$LEGACY_HOME/retroarch_store.py" ] && [ ! -d "$STORE_HOME" ]; then
|
||||
say "moving $LEGACY_HOME -> $STORE_HOME (one home per engine)"
|
||||
mv "$LEGACY_HOME" "$STORE_HOME"
|
||||
fi
|
||||
|
||||
mkdir -p "$STORE_HOME" "$BIN_DIR"
|
||||
|
||||
install_file() { # install_file <name> <raw base> [local override]
|
||||
|
||||
Reference in New Issue
Block a user