From 480a57cf037a46f176128e6c94aa5616fcf704a3 Mon Sep 17 00:00:00 2001 From: SulfurNitride Date: Tue, 17 Feb 2026 23:59:40 -0600 Subject: Fix Wine prefix deployment, INI handling, and data directory paths MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Fix data directory path to use ~/.var/app/com.fluorine.manager consistently (was ~/.local/share/fluorine in committed code) - Fix VFS helper path in fuseconnector.cpp to use fluorineDataDir() - Fix localAppFolder() to resolve Wine prefix AppData/Local on Linux instead of returning XDG ~/.local/share - Add localAppName() virtual method for correct AppData folder mapping (Enderal→"enderal", Nehrim→"Oblivion") - Fix mergeTweak() to use direct INI parser instead of QSettings which corrupts backslashes and URL-encodes spaces in keys - Make resolveWineDataDirName() more robust with existence checks and fallback chain (documentsDirectory → gameShortName → gameName) - Add comprehensive debug logging throughout Wine prefix deployment - Fix INI case handling: copy instead of symlink for case-mismatched INIs, ensure both proper-case and lowercase aliases exist - Remove native build script (Flatpak only) Co-Authored-By: Claude Opus 4.6 --- flatpak/com.fluorine.manager.yml | 2 ++ flatpak/flatpak-install.sh | 4 ++-- flatpak/fluorine-manager-wrapper.sh | 10 +++++++--- 3 files changed, 11 insertions(+), 5 deletions(-) (limited to 'flatpak') diff --git a/flatpak/com.fluorine.manager.yml b/flatpak/com.fluorine.manager.yml index ec88dab..5ed65dc 100644 --- a/flatpak/com.fluorine.manager.yml +++ b/flatpak/com.fluorine.manager.yml @@ -269,6 +269,7 @@ modules: # VFS helper (standalone, runs on host for Flatpak FUSE support). # Statically linked against libfuse3 — no runtime deps beyond glibc. - test -f _build/src/src/mo2-vfs-helper && cp -f _build/src/src/mo2-vfs-helper /app/lib/fluorine/ || true + - test -f _build/src/src/mo2-process-helper && cp -f _build/src/src/mo2-process-helper /app/lib/fluorine/ || true # lootcli. - test -f _build/libs/lootcli/src/lootcli && cp -f _build/libs/lootcli/src/lootcli /app/lib/fluorine/ || true @@ -357,6 +358,7 @@ modules: - find /app/lib/fluorine/lib -name "*.so*" -exec strip --strip-unneeded {} \; 2>/dev/null || true - test -f /app/lib/fluorine/lootcli && strip --strip-unneeded /app/lib/fluorine/lootcli 2>/dev/null || true - test -f /app/lib/fluorine/mo2-vfs-helper && strip --strip-unneeded /app/lib/fluorine/mo2-vfs-helper 2>/dev/null || true + - test -f /app/lib/fluorine/mo2-process-helper && strip --strip-unneeded /app/lib/fluorine/mo2-process-helper 2>/dev/null || true # Install wrapper script, desktop file, metainfo, and icon. - install -Dm755 flatpak/fluorine-manager-wrapper.sh /app/bin/fluorine-manager diff --git a/flatpak/flatpak-install.sh b/flatpak/flatpak-install.sh index 53c0645..984d12b 100755 --- a/flatpak/flatpak-install.sh +++ b/flatpak/flatpak-install.sh @@ -32,7 +32,7 @@ if [ "${MODE}" = "bundle" ]; then # ── Build a distributable .flatpak file ── echo "" echo "Building Flatpak bundle (this may take a while)..." - flatpak-builder --repo="${PROJECT_DIR}/flatpak-repo" --force-clean --ccache \ + flatpak-builder --disable-rofiles-fuse --repo="${PROJECT_DIR}/flatpak-repo" --force-clean --ccache \ "${BUILD_DIR}" "${MANIFEST}" flatpak build-bundle \ --runtime-repo=https://flathub.org/repo/flathub.flatpakrepo \ @@ -47,7 +47,7 @@ else # ── Build and install locally ── echo "" echo "Building and installing Flatpak locally (this may take a while)..." - flatpak-builder --install --user --force-clean --ccache \ + flatpak-builder --disable-rofiles-fuse --install --user --force-clean --ccache \ "${BUILD_DIR}" "${MANIFEST}" echo "" echo "=== Flatpak installed successfully ===" diff --git a/flatpak/fluorine-manager-wrapper.sh b/flatpak/fluorine-manager-wrapper.sh index 2e05fcb..eba2b77 100755 --- a/flatpak/fluorine-manager-wrapper.sh +++ b/flatpak/fluorine-manager-wrapper.sh @@ -28,7 +28,7 @@ if [ -n "$INSTANCE_DIR" ] && [ -d "$INSTANCE_DIR" ]; then else # Global instance: shared overlay at ~/.local/share/fluorine/ # Use $HOME directly to bypass Flatpak's XDG_DATA_HOME remapping. - USER_DIR="$HOME/.local/share/fluorine" + USER_DIR="$HOME/.var/app/com.fluorine.manager" fi # ── Create writable overlay with symlinks to bundled files ── @@ -79,12 +79,16 @@ setup_overlay() { # VFS helper must be a real binary copy (not a symlink to /app/) because # it runs on the host via flatpak-spawn --host, where /app/ doesn't exist. # libfuse3 is statically linked, so no extra .so files needed. - VFS_HELPER_DIR="$HOME/.local/share/fluorine/bin" + VFS_HELPER_DIR="$HOME/.var/app/com.fluorine.manager/bin" + mkdir -p "${VFS_HELPER_DIR}" if [ -e "${BUNDLED}/mo2-vfs-helper" ]; then - mkdir -p "${VFS_HELPER_DIR}" cp -f "${BUNDLED}/mo2-vfs-helper" "${VFS_HELPER_DIR}/mo2-vfs-helper" chmod +x "${VFS_HELPER_DIR}/mo2-vfs-helper" fi + if [ -e "${BUNDLED}/mo2-process-helper" ]; then + cp -f "${BUNDLED}/mo2-process-helper" "${VFS_HELPER_DIR}/mo2-process-helper" + chmod +x "${VFS_HELPER_DIR}/mo2-process-helper" + fi } setup_overlay -- cgit v1.3.1