diff --git a/launcher/include/utility.h b/launcher/include/utility.h index 7118283..7fd5716 100644 --- a/launcher/include/utility.h +++ b/launcher/include/utility.h @@ -8,7 +8,6 @@ namespace Utility { -QDir stateDirectory(); QString toWindowsPath(const QDir &dir); void printRequest(const QString &type, const QNetworkRequest &request); void createPathIfNeeded(const QDir &dir); diff --git a/launcher/src/gamerunner.cpp b/launcher/src/gamerunner.cpp index b2d674e..ac8e9c0 100644 --- a/launcher/src/gamerunner.cpp +++ b/launcher/src/gamerunner.cpp @@ -63,7 +63,6 @@ void GameRunner::beginDalamudGame(const QString &gameExecutablePath, Profile &pr const QDir dataDir = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation); const QDir configDir = QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation); - const QDir stateDir = Utility::stateDirectory(); const QDir dalamudDir = dataDir.absoluteFilePath(QStringLiteral("dalamud")); const QDir dalamudConfigDir = configDir.absoluteFilePath(QStringLiteral("dalamud")); @@ -76,7 +75,7 @@ void GameRunner::beginDalamudGame(const QString &gameExecutablePath, Profile &pr // so we need to match typical XIVQuickLauncher behavior here. Why? I have no clue. const QDir dalamudPluginDir = dalamudUserPluginDir.absoluteFilePath(QStringLiteral("installedPlugins")); - const QString logDir = stateDir.absoluteFilePath(QStringLiteral("log")); + const QString logDir = dataDir.absoluteFilePath(QStringLiteral("log")); Utility::createPathIfNeeded(logDir); const QDir dalamudRuntimeDir = dalamudDir.absoluteFilePath(QStringLiteral("runtime")); @@ -241,7 +240,8 @@ void GameRunner::launchExecutable(const Profile &profile, QProcess *process, con // env.insert(QStringLiteral("VK_LAYER_RENDERDOC_Capture"), QStringLiteral("VK_LAYER_RENDERDOC_Capture")); // env.insert(QStringLiteral("ENABLE_VULKAN_RENDERDOC_CAPTURE"), QString::number(1)); - const QString logDir = Utility::stateDirectory().absoluteFilePath(QStringLiteral("log")); + const QDir dataDir = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation); + const QString logDir = dataDir.absoluteFilePath(QStringLiteral("log")); env.insert(QStringLiteral("DXVK_LOG_PATH"), logDir); #endif diff --git a/launcher/src/logger.cpp b/launcher/src/logger.cpp index f52b726..df8afc0 100644 --- a/launcher/src/logger.cpp +++ b/launcher/src/logger.cpp @@ -36,7 +36,8 @@ public: void initialize() { - const QDir logDirectory = Utility::stateDirectory().absoluteFilePath(QStringLiteral("log")); + const QDir dataDir = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation); + const QDir logDirectory = dataDir.absoluteFilePath(QStringLiteral("log")); Utility::createPathIfNeeded(logDirectory); // Sort them from highest to lowest (4, 3, 2, 1, 0) diff --git a/launcher/src/main.cpp b/launcher/src/main.cpp index 4407625..f95be1c 100755 --- a/launcher/src/main.cpp +++ b/launcher/src/main.cpp @@ -23,9 +23,6 @@ using namespace Qt::StringLiterals; int main(int argc, char *argv[]) { - initializeLogging(); - setup_physis_logging(); - QtWebView::initialize(); QApplication app(argc, argv); @@ -67,6 +64,9 @@ int main(int argc, char *argv[]) KAboutData::setApplicationData(about); + initializeLogging(); + setup_physis_logging(); + QCommandLineParser parser; about.setupCommandLine(&parser); diff --git a/launcher/src/processlogger.cpp b/launcher/src/processlogger.cpp index 41e4f8d..7f50229 100644 --- a/launcher/src/processlogger.cpp +++ b/launcher/src/processlogger.cpp @@ -4,10 +4,12 @@ #include "processlogger.h" #include "astra_log.h" #include "utility.h" +#include ProcessLogger::ProcessLogger(QProcess *process) { - const QDir logDirectory = Utility::stateDirectory().absoluteFilePath(QStringLiteral("log")); + const QDir dataDir = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation); + const QDir logDirectory = dataDir.absoluteFilePath(QStringLiteral("log")); m_file.setFileName(logDirectory.absoluteFilePath(QStringLiteral("ffxiv.log"))); m_file.open(QIODevice::WriteOnly | QIODevice::Unbuffered); diff --git a/launcher/src/utility.cpp b/launcher/src/utility.cpp index 13e90d7..1daaa71 100644 --- a/launcher/src/utility.cpp +++ b/launcher/src/utility.cpp @@ -9,18 +9,6 @@ using namespace Qt::StringLiterals; -QDir Utility::stateDirectory() -{ - if (qEnvironmentVariableIsSet("XDG_STATE_HOME")) { - return qEnvironmentVariable("XDG_STATE_HOME"); - } - - const QDir homeDir = QStandardPaths::standardLocations(QStandardPaths::HomeLocation)[0]; - const QDir localDir = homeDir.absoluteFilePath(QStringLiteral(".local")); - const QDir stateDir = localDir.absoluteFilePath(QStringLiteral("state")); - return stateDir.absoluteFilePath(QStringLiteral("astra")); -} - QString Utility::toWindowsPath(const QDir &dir) { return QStringLiteral("Z:") + dir.absolutePath().replace('/'_L1, '\\'_L1); diff --git a/zone.xiv.astra.yml b/zone.xiv.astra.yml index 48a0bda..ce1cbbb 100644 --- a/zone.xiv.astra.yml +++ b/zone.xiv.astra.yml @@ -1,6 +1,6 @@ app-id: zone.xiv.astra runtime: org.kde.Platform -runtime-version: '6.6' +cruntime-version: '6.6-kf6preview' sdk: org.kde.Sdk sdk-extensions: - org.freedesktop.Sdk.Extension.rust-stable @@ -24,7 +24,7 @@ finish-args: - --device=all - --allow=devel modules: - - flatpak/kf6.json + #- flatpak/kf6.json - flatpak/kirigami-addons.json - name: unshield buildsystem: cmake-ninja @@ -33,7 +33,8 @@ modules: url: https://github.com/twogood/unshield.git branch: main - name: unshield - buildsystem: meson + cleanup: + - /bin config-opts: - -Dmanpage=false - -Dvapi=false @@ -49,6 +50,8 @@ modules: - name: libsecret - stable-only: true - name: qtkeychain + cleanup: + - /bin buildsystem: cmake-ninja config-opts: - -DBUILD_WITH_QT6=ON @@ -59,11 +62,6 @@ modules: - type: git url: https://github.com/frankosterfeld/qtkeychain.git branch: main - - name: quazip - buildsystem: cmake-ninja - sources: - - type: git - url: https://github.com/stachenov/quazip.git - name: steamwrap buildsystem: simple build-commands: @@ -80,20 +78,6 @@ modules: - type: file url: https://xiv.zone/distrib/steamwrap/libsteam_api.so sha256: b50b9d313eb554792216762f5cc0b972cfae14149f720440e0f0d6c4563c951f - - name: qcoro - buildsystem: cmake-ninja - config-optios: - - -DQCORO_BUILD_EXAMPLES=OFF - - -DBUILD_TESTING=OFF - sources: - - type: archive - url: https://github.com/danvratil/qcoro/archive/refs/tags/v0.7.0.tar.gz - sha256: 23ef0217926e67c8d2eb861cf91617da2f7d8d5a9ae6c62321b21448b1669210 - x-checker-data: - - type: anitya - project-id: 236236 - stable-only: true - url-template: https://github.com/danvratil/qcoro/archive/refs/tags/v$version.tar.gz - name: qt6-qtwebview buildsystem: cmake-ninja cleanup-platform: