From 7ee008e150bc5bcf76082d726f719ee0fdfda982 Mon Sep 17 00:00:00 2001 From: SulfurNitride Date: Wed, 11 Feb 2026 02:37:39 -0600 Subject: 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 --- libs/game_bethesda/src/games/nehrim/gamenehrim.cpp | 205 +++++++++++++++++++++ 1 file changed, 205 insertions(+) create mode 100644 libs/game_bethesda/src/games/nehrim/gamenehrim.cpp (limited to 'libs/game_bethesda/src/games/nehrim/gamenehrim.cpp') diff --git a/libs/game_bethesda/src/games/nehrim/gamenehrim.cpp b/libs/game_bethesda/src/games/nehrim/gamenehrim.cpp new file mode 100644 index 0000000..2e3c8c5 --- /dev/null +++ b/libs/game_bethesda/src/games/nehrim/gamenehrim.cpp @@ -0,0 +1,205 @@ +#include "gamenehrim.h" + +#include "nehrimbsainvalidation.h" +#include "nehrimdataarchives.h" +#include "nehrimmoddatachecker.h" +#include "nehrimmoddatacontent.h" +#include "nehrimsavegame.h" +#include "nehrimscriptextender.h" + +#include "executableinfo.h" +#include "pluginsetting.h" +#include +#include +#include +#include + +#include +#include +#include + +#include + +using namespace MOBase; + +GameNehrim::GameNehrim() {} + +bool GameNehrim::init(IOrganizer* moInfo) +{ + if (!GameGamebryo::init(moInfo)) { + return false; + } + + auto dataArchives = std::make_shared(this); + registerFeature(std::make_shared(this)); + registerFeature(dataArchives); + registerFeature(std::make_shared(dataArchives.get(), this)); + registerFeature(std::make_shared(this)); + registerFeature(std::make_shared(this, "oblivion.ini")); + registerFeature(std::make_shared(this)); + registerFeature(std::make_shared(m_Organizer->gameFeatures())); + registerFeature(std::make_shared(moInfo)); + registerFeature(std::make_shared(this)); + return true; +} + +QString GameNehrim::gameName() const +{ + return "Nehrim"; +} + +QList GameNehrim::executables() const +{ + return QList() + << ExecutableInfo("Nehrim", findInGameFolder("Oblivion.exe")) + << ExecutableInfo("Nehrim Launcher", findInGameFolder("NehrimLauncher.exe")) + << ExecutableInfo("Oblivion Mod Manager", + findInGameFolder("OblivionModManager.exe")) + << ExecutableInfo("BOSS", findInGameFolder("BOSS/BOSS.exe")) + << ExecutableInfo("LOOT", QFileInfo(getLootPath())) + .withArgument("--game=\"Nehrim\"") + << ExecutableInfo("Construction Set", + findInGameFolder("TESConstructionSet.exe")); +} + +QList GameNehrim::executableForcedLoads() const +{ + // TODO Search game directory for OBSE DLLs + return QList() + << ExecutableForcedLoadSetting("Oblivion.exe", "obse_1_2_416.dll") + .withForced() + .withEnabled() + << ExecutableForcedLoadSetting("TESConstructionSet.exe", "obse_editor_1_2.dll") + .withForced() + .withEnabled(); +} + +QString GameNehrim::name() const +{ + return "Nehrim Support Plugin"; +} + +QString GameNehrim::localizedName() const +{ + return tr("Nehrim Support Plugin"); +} + +QString GameNehrim::author() const +{ + return "Tannin & MO2 Team"; +} + +QString GameNehrim::description() const +{ + return tr("Adds support for the game Nehrim"); +} + +MOBase::VersionInfo GameNehrim::version() const +{ + return VersionInfo(1, 1, 1, VersionInfo::RELEASE_FINAL); +} + +QList GameNehrim::settings() const +{ + return QList(); +} + +void GameNehrim::initializeProfile(const QDir& path, ProfileSettings settings) const +{ + if (settings.testFlag(IPluginGame::MODS)) { + copyToProfile(localAppFolder() + "/Oblivion", path, "plugins.txt"); + } + + if (settings.testFlag(IPluginGame::CONFIGURATION)) { + if (settings.testFlag(IPluginGame::PREFER_DEFAULTS) || + !QFileInfo(myGamesPath() + "/oblivion.ini").exists()) { + copyToProfile(gameDirectory().absolutePath(), path, "oblivion_default.ini", + "oblivion.ini"); + } else { + copyToProfile(myGamesPath(), path, "oblivion.ini"); + } + + copyToProfile(myGamesPath(), path, "oblivionprefs.ini"); + } +} + +QString GameNehrim::savegameExtension() const +{ + return "ess"; +} + +QString GameNehrim::savegameSEExtension() const +{ + return "obse"; +} + +std::shared_ptr GameNehrim::makeSaveGame(QString filePath) const +{ + return std::make_shared(filePath, this); +} + +QString GameNehrim::steamAPPId() const +{ + return "22330"; +} + +QStringList GameNehrim::primaryPlugins() const +{ + return {"Nehrim.esm", "Translation.esp"}; +} + +QString GameNehrim::gameShortName() const +{ + return "Nehrim"; +} + +QString GameNehrim::gameNexusName() const +{ + return "Nehrim"; +} + +QStringList GameNehrim::iniFiles() const +{ + return {"oblivion.ini", "oblivionprefs.ini"}; +} + +QStringList GameNehrim::DLCPlugins() const +{ + return {}; +} + +int GameNehrim::nexusModOrganizerID() const +{ + return -1; +} + +int GameNehrim::nexusGameID() const +{ + return 3312; +} + +QStringList GameNehrim::primarySources() const +{ + return {"Oblivion"}; +} + +QStringList GameNehrim::validShortNames() const +{ + return {"Oblivion"}; +} + +QString GameNehrim::identifyGamePath() const +{ +#ifdef _WIN32 + QString path = "Software\\Bethesda Softworks\\Oblivion"; + return findInRegistry(HKEY_LOCAL_MACHINE, path.toStdWString().c_str(), + L"Installed Path"); +#else + return GameGamebryo::identifyGamePath(); +#endif +} + +QString GameNehrim::binaryName() const +{ + return "NehrimLauncher.exe"; +} -- cgit v1.3.1