aboutsummaryrefslogtreecommitdiff
path: root/libs/game_bethesda/src/games/fallout4/fallout4bsainvalidation.cpp
diff options
context:
space:
mode:
authorSulfurNitride <SulfurNitride@users.noreply.github.com>2026-02-11 02:37:39 -0600
committerSulfurNitride <SulfurNitride@users.noreply.github.com>2026-02-11 02:37:39 -0600
commit7ee008e150bc5bcf76082d726f719ee0fdfda982 (patch)
tree27fb39be241fdb5ac2734c574de678977d1856d0 /libs/game_bethesda/src/games/fallout4/fallout4bsainvalidation.cpp
Fluorine Manager: full Linux port of Mod Organizer 2
Complete native Linux port with FUSE-based virtual filesystem, Proton/umu-run integration, and Flatpak packaging. Key features: - FUSE VFS replacing Windows USVFS (in-process + standalone helper for Flatpak) - Proton/GE-Proton/umu-run launcher with env var forwarding - Flatpak support (sandbox-aware VFS, NXM handler, umu-run) - Wine prefix management UI - Case-insensitive path resolution for Linux filesystems - QSettings-safe INI handling (avoids Bethesda INI corruption) - Portable instance support with auto-generated launcher scripts Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Diffstat (limited to 'libs/game_bethesda/src/games/fallout4/fallout4bsainvalidation.cpp')
-rw-r--r--libs/game_bethesda/src/games/fallout4/fallout4bsainvalidation.cpp68
1 files changed, 68 insertions, 0 deletions
diff --git a/libs/game_bethesda/src/games/fallout4/fallout4bsainvalidation.cpp b/libs/game_bethesda/src/games/fallout4/fallout4bsainvalidation.cpp
new file mode 100644
index 0000000..7711522
--- /dev/null
+++ b/libs/game_bethesda/src/games/fallout4/fallout4bsainvalidation.cpp
@@ -0,0 +1,68 @@
+#include "fallout4bsainvalidation.h"
+
+#include "dummybsa.h"
+#include "iplugingame.h"
+#include "iprofile.h"
+#include "registry.h"
+#include <imoinfo.h>
+#include <utility.h>
+
+#include "gamegamebryo.h"
+
+Fallout4BSAInvalidation::Fallout4BSAInvalidation(MOBase::DataArchives* dataArchives,
+ MOBase::IPluginGame const* game)
+ : GamebryoBSAInvalidation(dataArchives, "Fallout4Custom.ini", game)
+{
+ m_IniFileName = "Fallout4Custom.ini";
+ m_Game = game;
+}
+
+bool Fallout4BSAInvalidation::isInvalidationBSA(const QString& bsaName)
+{
+ return false;
+}
+
+QString Fallout4BSAInvalidation::invalidationBSAName() const
+{
+ return "";
+}
+
+unsigned long Fallout4BSAInvalidation::bsaVersion() const
+{
+ return 0x68;
+}
+
+bool Fallout4BSAInvalidation::prepareProfile(MOBase::IProfile* profile)
+{
+ bool dirty = false;
+ QString basePath = profile->localSettingsEnabled()
+ ? profile->absolutePath()
+ : m_Game->documentsDirectory().absolutePath();
+ QString iniFilePath = basePath + "/" + m_IniFileName;
+
+ if (profile->invalidationActive(nullptr)) {
+ // write bInvalidateOlderFiles = 1, if needed
+ QString bInvalidateOlderFiles = GameGamebryo::readIniValue(
+ iniFilePath, "Archive", "bInvalidateOlderFiles", "0");
+ if (bInvalidateOlderFiles.toLong() != 1) {
+ dirty = true;
+ if (!MOBase::WriteRegistryValue("Archive", "bInvalidateOlderFiles", "1",
+ iniFilePath)) {
+ qWarning("failed to override data directory in \"%s\"",
+ qUtf8Printable(m_IniFileName));
+ }
+ }
+ QString sResourceDataDirsFinal = GameGamebryo::readIniValue(
+ iniFilePath, "Archive", "sResourceDataDirsFinal", "STRINGS\\");
+ if (sResourceDataDirsFinal != "") {
+ dirty = true;
+ if (!MOBase::WriteRegistryValue("Archive", "sResourceDataDirsFinal", "",
+ iniFilePath)) {
+ qWarning("failed to override data directory in \"%s\"",
+ qUtf8Printable(m_IniFileName));
+ }
+ }
+ }
+
+ return dirty;
+}