aboutsummaryrefslogtreecommitdiff
path: root/libs/game_bethesda
diff options
context:
space:
mode:
authorSulfurNitride <SulfurNitride@users.noreply.github.com>2026-02-14 15:40:33 -0600
committerSulfurNitride <SulfurNitride@users.noreply.github.com>2026-02-14 15:40:33 -0600
commit6410929e17d642618f284d5c97d457f1ac653e6e (patch)
tree5c0ee09e04f38a2dd70f1734d25c74e0b8ae5d43 /libs/game_bethesda
parent817e8f5cd26739c69d930d21cd9dc4c0b6e4984e (diff)
Migrate data paths to ~/.local/share/fluorine/, add native build, fix %command% and system Proton scanning
- All data paths migrated from ~/.var/app/com.fluorine.manager/ to ~/.local/share/fluorine/ so native and Flatpak builds share the same instances, plugins, and configs - New fluorinepaths.h/.cpp with fluorineDataDir() helper and one-time migration from old path (writes MOVED.txt breadcrumb) - New libs/nak/src/paths.rs as Rust equivalent (data_dir()) - Strip %command% tokens from launch wrapper in protonlauncher.cpp - Always scan /usr/share/steam/compatibilitytools.d/ for system Proton packages (Arch installs Proton there); add Flatpak filesystem permission - Native build (build-native.sh) installs to ~/.local/share/fluorine/ with desktop entry and ~/.local/bin symlink instead of portable zip - build-flatpak.sh wrapper for Flatpak builds - Fix container locale (LANG=C.UTF-8) for AutoUic warnings - Fix prefixExists() to handle both compatdata and pfx directory layouts - Fix globalInstancesRootPath() to use fluorineDataDir() on Linux - Fix umu-run Flatpak lookup to use fluorineDataDir() - Update README with build instructions and Arch dependency list Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Diffstat (limited to 'libs/game_bethesda')
-rw-r--r--libs/game_bethesda/src/gamebryo/dummybsa.cpp6
-rw-r--r--libs/game_bethesda/src/gamebryo/gamebryosavegame.cpp3
-rw-r--r--libs/game_bethesda/src/gamebryo/gamegamebryo.cpp6
-rw-r--r--libs/game_bethesda/src/games/enderal/enderalsavegame.cpp3
-rw-r--r--libs/game_bethesda/src/games/enderalse/enderalsesavegame.cpp3
-rw-r--r--libs/game_bethesda/src/games/fallout4/fallout4savegame.cpp3
-rw-r--r--libs/game_bethesda/src/games/fallout4london/fo4londonsavegame.cpp3
-rw-r--r--libs/game_bethesda/src/games/fallout4vr/fallout4vrsavegame.cpp3
-rw-r--r--libs/game_bethesda/src/games/fallout76/fallout76savegame.cpp3
-rw-r--r--libs/game_bethesda/src/games/skyrim/skyrimsavegame.cpp3
-rw-r--r--libs/game_bethesda/src/games/skyrimse/skyrimsesavegame.cpp3
-rw-r--r--libs/game_bethesda/src/games/skyrimvr/skyrimvrsavegame.cpp3
-rw-r--r--libs/game_bethesda/src/games/starfield/starfieldsavegame.cpp3
13 files changed, 32 insertions, 13 deletions
diff --git a/libs/game_bethesda/src/gamebryo/dummybsa.cpp b/libs/game_bethesda/src/gamebryo/dummybsa.cpp
index 7b0f877..3fbd2ef 100644
--- a/libs/game_bethesda/src/gamebryo/dummybsa.cpp
+++ b/libs/game_bethesda/src/gamebryo/dummybsa.cpp
@@ -19,6 +19,7 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
#include "dummybsa.h"
#include <QFile>
+#include <stdexcept>
#ifdef _WIN32
#define WIN32_LEAN_AND_MEAN
#include <Windows.h>
@@ -184,7 +185,10 @@ void DummyBSA::writeFileRecordBlocks(QFile& file, const std::string& folderName)
void DummyBSA::write(const QString& fileName)
{
QFile file(fileName);
- file.open(QIODevice::WriteOnly);
+ if (!file.open(QIODevice::WriteOnly)) {
+ throw std::runtime_error(
+ QString("failed to open dummy BSA for writing: %1").arg(fileName).toStdString());
+ }
m_TotalFileNameLength = static_cast<unsigned long>(m_FileName.length() + 1);
diff --git a/libs/game_bethesda/src/gamebryo/gamebryosavegame.cpp b/libs/game_bethesda/src/gamebryo/gamebryosavegame.cpp
index 523df0d..7625af3 100644
--- a/libs/game_bethesda/src/gamebryo/gamebryosavegame.cpp
+++ b/libs/game_bethesda/src/gamebryo/gamebryosavegame.cpp
@@ -9,6 +9,7 @@
#include <QFileInfo>
#include <QScopedArrayPointer>
#include <QTime>
+#include <QTimeZone>
#ifdef _WIN32
#include <Windows.h>
@@ -90,7 +91,7 @@ void GamebryoSaveGame::setCreationTime(_SYSTEMTIME const& ctime)
QTime time;
time.setHMS(ctime.wHour, ctime.wMinute, ctime.wSecond, ctime.wMilliseconds);
- m_CreationTime = QDateTime(date, time, Qt::UTC);
+ m_CreationTime = QDateTime(date, time, QTimeZone::UTC);
}
GamebryoSaveGame::FileWrapper::FileWrapper(QString const& filepath,
diff --git a/libs/game_bethesda/src/gamebryo/gamegamebryo.cpp b/libs/game_bethesda/src/gamebryo/gamegamebryo.cpp
index caeeed0..1bcc2c0 100644
--- a/libs/game_bethesda/src/gamebryo/gamegamebryo.cpp
+++ b/libs/game_bethesda/src/gamebryo/gamegamebryo.cpp
@@ -495,7 +495,11 @@ void GameGamebryo::copyToProfile(QString const& sourcePath,
sourceFile = resolveFileCaseInsensitive(sourceFile);
if (!MOBase::shellCopy(sourceFile, filePath)) {
// if copy file fails, create the file empty
- QFile(filePath).open(QIODevice::WriteOnly);
+ QFile outputFile(filePath);
+ if (!outputFile.open(QIODevice::WriteOnly)) {
+ MOBase::log::warn("Failed to create fallback file '{}': {}", filePath,
+ outputFile.errorString());
+ }
}
}
}
diff --git a/libs/game_bethesda/src/games/enderal/enderalsavegame.cpp b/libs/game_bethesda/src/games/enderal/enderalsavegame.cpp
index cd9beb3..235bf1c 100644
--- a/libs/game_bethesda/src/games/enderal/enderalsavegame.cpp
+++ b/libs/game_bethesda/src/games/enderal/enderalsavegame.cpp
@@ -4,6 +4,7 @@
#include <Windows.h>
#else
#include <QDateTime>
+#include <QTimeZone>
using SYSTEMTIME = _SYSTEMTIME;
@@ -14,7 +15,7 @@ static void FileTimeToSystemTime(const FILETIME* ft, SYSTEMTIME* st)
const int64_t unixSecs = static_cast<int64_t>(ticks / 10000000ULL) - 11644473600LL;
const uint64_t remainderHns = ticks % 10000000ULL;
- const QDateTime dt = QDateTime::fromSecsSinceEpoch(unixSecs, Qt::UTC);
+ const QDateTime dt = QDateTime::fromSecsSinceEpoch(unixSecs, QTimeZone::UTC);
const QDate d = dt.date();
const QTime t = dt.time();
diff --git a/libs/game_bethesda/src/games/enderalse/enderalsesavegame.cpp b/libs/game_bethesda/src/games/enderalse/enderalsesavegame.cpp
index 2662505..365ca37 100644
--- a/libs/game_bethesda/src/games/enderalse/enderalsesavegame.cpp
+++ b/libs/game_bethesda/src/games/enderalse/enderalsesavegame.cpp
@@ -4,6 +4,7 @@
#include <Windows.h>
#else
#include <QDateTime>
+#include <QTimeZone>
union _ULARGE_INTEGER {
struct {
@@ -22,7 +23,7 @@ static void FileTimeToSystemTime(const FILETIME* ft, SYSTEMTIME* st)
const int64_t unixSecs = static_cast<int64_t>(ticks / 10000000ULL) - 11644473600LL;
const uint64_t remainderHns = ticks % 10000000ULL;
- const QDateTime dt = QDateTime::fromSecsSinceEpoch(unixSecs, Qt::UTC);
+ const QDateTime dt = QDateTime::fromSecsSinceEpoch(unixSecs, QTimeZone::UTC);
const QDate d = dt.date();
const QTime t = dt.time();
diff --git a/libs/game_bethesda/src/games/fallout4/fallout4savegame.cpp b/libs/game_bethesda/src/games/fallout4/fallout4savegame.cpp
index 2f88d1b..17863ad 100644
--- a/libs/game_bethesda/src/games/fallout4/fallout4savegame.cpp
+++ b/libs/game_bethesda/src/games/fallout4/fallout4savegame.cpp
@@ -4,6 +4,7 @@
#include <Windows.h>
#else
#include <QDateTime>
+#include <QTimeZone>
using SYSTEMTIME = _SYSTEMTIME;
@@ -14,7 +15,7 @@ static void FileTimeToSystemTime(const FILETIME* ft, SYSTEMTIME* st)
const int64_t unixSecs = static_cast<int64_t>(ticks / 10000000ULL) - 11644473600LL;
const uint64_t remainderHns = ticks % 10000000ULL;
- const QDateTime dt = QDateTime::fromSecsSinceEpoch(unixSecs, Qt::UTC);
+ const QDateTime dt = QDateTime::fromSecsSinceEpoch(unixSecs, QTimeZone::UTC);
const QDate d = dt.date();
const QTime t = dt.time();
diff --git a/libs/game_bethesda/src/games/fallout4london/fo4londonsavegame.cpp b/libs/game_bethesda/src/games/fallout4london/fo4londonsavegame.cpp
index ead2d1a..c87d107 100644
--- a/libs/game_bethesda/src/games/fallout4london/fo4londonsavegame.cpp
+++ b/libs/game_bethesda/src/games/fallout4london/fo4londonsavegame.cpp
@@ -4,6 +4,7 @@
#include <Windows.h>
#else
#include <QDateTime>
+#include <QTimeZone>
using SYSTEMTIME = _SYSTEMTIME;
@@ -14,7 +15,7 @@ static void FileTimeToSystemTime(const FILETIME* ft, SYSTEMTIME* st)
const int64_t unixSecs = static_cast<int64_t>(ticks / 10000000ULL) - 11644473600LL;
const uint64_t remainderHns = ticks % 10000000ULL;
- const QDateTime dt = QDateTime::fromSecsSinceEpoch(unixSecs, Qt::UTC);
+ const QDateTime dt = QDateTime::fromSecsSinceEpoch(unixSecs, QTimeZone::UTC);
const QDate d = dt.date();
const QTime t = dt.time();
diff --git a/libs/game_bethesda/src/games/fallout4vr/fallout4vrsavegame.cpp b/libs/game_bethesda/src/games/fallout4vr/fallout4vrsavegame.cpp
index cf29aae..d29c4fa 100644
--- a/libs/game_bethesda/src/games/fallout4vr/fallout4vrsavegame.cpp
+++ b/libs/game_bethesda/src/games/fallout4vr/fallout4vrsavegame.cpp
@@ -4,6 +4,7 @@
#include <Windows.h>
#else
#include <QDateTime>
+#include <QTimeZone>
using SYSTEMTIME = _SYSTEMTIME;
@@ -14,7 +15,7 @@ static void FileTimeToSystemTime(const FILETIME* ft, SYSTEMTIME* st)
const int64_t unixSecs = static_cast<int64_t>(ticks / 10000000ULL) - 11644473600LL;
const uint64_t remainderHns = ticks % 10000000ULL;
- const QDateTime dt = QDateTime::fromSecsSinceEpoch(unixSecs, Qt::UTC);
+ const QDateTime dt = QDateTime::fromSecsSinceEpoch(unixSecs, QTimeZone::UTC);
const QDate d = dt.date();
const QTime t = dt.time();
diff --git a/libs/game_bethesda/src/games/fallout76/fallout76savegame.cpp b/libs/game_bethesda/src/games/fallout76/fallout76savegame.cpp
index 66e8a00..c070429 100644
--- a/libs/game_bethesda/src/games/fallout76/fallout76savegame.cpp
+++ b/libs/game_bethesda/src/games/fallout76/fallout76savegame.cpp
@@ -4,6 +4,7 @@
#include <Windows.h>
#else
#include <QDateTime>
+#include <QTimeZone>
using SYSTEMTIME = _SYSTEMTIME;
@@ -14,7 +15,7 @@ static void FileTimeToSystemTime(const FILETIME* ft, SYSTEMTIME* st)
const int64_t unixSecs = static_cast<int64_t>(ticks / 10000000ULL) - 11644473600LL;
const uint64_t remainderHns = ticks % 10000000ULL;
- const QDateTime dt = QDateTime::fromSecsSinceEpoch(unixSecs, Qt::UTC);
+ const QDateTime dt = QDateTime::fromSecsSinceEpoch(unixSecs, QTimeZone::UTC);
const QDate d = dt.date();
const QTime t = dt.time();
diff --git a/libs/game_bethesda/src/games/skyrim/skyrimsavegame.cpp b/libs/game_bethesda/src/games/skyrim/skyrimsavegame.cpp
index bd16036..621692e 100644
--- a/libs/game_bethesda/src/games/skyrim/skyrimsavegame.cpp
+++ b/libs/game_bethesda/src/games/skyrim/skyrimsavegame.cpp
@@ -4,6 +4,7 @@
#include <Windows.h>
#else
#include <QDateTime>
+#include <QTimeZone>
// SYSTEMTIME is _SYSTEMTIME (defined in gamebryosavegame.h for Linux)
using SYSTEMTIME = _SYSTEMTIME;
@@ -16,7 +17,7 @@ static void FileTimeToSystemTime(const FILETIME* ft, SYSTEMTIME* st)
const int64_t unixSecs = static_cast<int64_t>(ticks / 10000000ULL) - 11644473600LL;
const uint64_t remainderHns = ticks % 10000000ULL; // leftover 100ns units
- const QDateTime dt = QDateTime::fromSecsSinceEpoch(unixSecs, Qt::UTC);
+ const QDateTime dt = QDateTime::fromSecsSinceEpoch(unixSecs, QTimeZone::UTC);
const QDate d = dt.date();
const QTime t = dt.time();
diff --git a/libs/game_bethesda/src/games/skyrimse/skyrimsesavegame.cpp b/libs/game_bethesda/src/games/skyrimse/skyrimsesavegame.cpp
index d68ba19..59b9b6e 100644
--- a/libs/game_bethesda/src/games/skyrimse/skyrimsesavegame.cpp
+++ b/libs/game_bethesda/src/games/skyrimse/skyrimsesavegame.cpp
@@ -4,6 +4,7 @@
#include <Windows.h>
#else
#include <QDateTime>
+#include <QTimeZone>
// Windows ULARGE_INTEGER union for 64-bit FILETIME math
union _ULARGE_INTEGER {
@@ -29,7 +30,7 @@ static void FileTimeToSystemTime(const FILETIME* ft, SYSTEMTIME* st)
int64_t unixSecs = static_cast<int64_t>(ull.QuadPart / 10000000ULL) - 11644473600LL;
uint64_t remainderHns = ull.QuadPart % 10000000ULL; // leftover 100ns units
- QDateTime dt = QDateTime::fromSecsSinceEpoch(unixSecs, Qt::UTC);
+ QDateTime dt = QDateTime::fromSecsSinceEpoch(unixSecs, QTimeZone::UTC);
QDate d = dt.date();
QTime t = dt.time();
diff --git a/libs/game_bethesda/src/games/skyrimvr/skyrimvrsavegame.cpp b/libs/game_bethesda/src/games/skyrimvr/skyrimvrsavegame.cpp
index 1670dc8..75b3683 100644
--- a/libs/game_bethesda/src/games/skyrimvr/skyrimvrsavegame.cpp
+++ b/libs/game_bethesda/src/games/skyrimvr/skyrimvrsavegame.cpp
@@ -4,6 +4,7 @@
#include <Windows.h>
#else
#include <QDateTime>
+#include <QTimeZone>
// Windows ULARGE_INTEGER union for 64-bit FILETIME math
union _ULARGE_INTEGER {
@@ -25,7 +26,7 @@ static void FileTimeToSystemTime(const FILETIME* ft, SYSTEMTIME* st)
const int64_t unixSecs = static_cast<int64_t>(ticks / 10000000ULL) - 11644473600LL;
const uint64_t remainderHns = ticks % 10000000ULL; // leftover 100ns units
- const QDateTime dt = QDateTime::fromSecsSinceEpoch(unixSecs, Qt::UTC);
+ const QDateTime dt = QDateTime::fromSecsSinceEpoch(unixSecs, QTimeZone::UTC);
const QDate d = dt.date();
const QTime t = dt.time();
diff --git a/libs/game_bethesda/src/games/starfield/starfieldsavegame.cpp b/libs/game_bethesda/src/games/starfield/starfieldsavegame.cpp
index 49653cb..9640b75 100644
--- a/libs/game_bethesda/src/games/starfield/starfieldsavegame.cpp
+++ b/libs/game_bethesda/src/games/starfield/starfieldsavegame.cpp
@@ -4,6 +4,7 @@
#include <Windows.h>
#else
#include <QDateTime>
+#include <QTimeZone>
using SYSTEMTIME = _SYSTEMTIME;
@@ -14,7 +15,7 @@ static void FileTimeToSystemTime(const FILETIME* ft, SYSTEMTIME* st)
const int64_t unixSecs = static_cast<int64_t>(ticks / 10000000ULL) - 11644473600LL;
const uint64_t remainderHns = ticks % 10000000ULL;
- const QDateTime dt = QDateTime::fromSecsSinceEpoch(unixSecs, Qt::UTC);
+ const QDateTime dt = QDateTime::fromSecsSinceEpoch(unixSecs, QTimeZone::UTC);
const QDate d = dt.date();
const QTime t = dt.time();