diff --git a/CMakeLists.txt b/CMakeLists.txt index 61a4933..ab13db2 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -58,17 +58,15 @@ if (BUILD_TESTING) add_subdirectory(autotests) endif() -if (NOT WIN32) - install(FILES zone.xiv.umbra.desktop DESTINATION ${KDE_INSTALL_APPDIR}) - install(FILES zone.xiv.umbra.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR}) - install(FILES zone.xiv.umbra.svg DESTINATION ${KDE_INSTALL_FULL_ICONDIR}/hicolor/scalable/apps) - - ecm_qt_install_logging_categories( - EXPORT UMBRA - FILE umbra.categories - SORT DESTINATION ${KDE_INSTALL_LOGGINGCATEGORIESDIR} - ) -endif() +install(FILES zone.xiv.umbra.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR}) +install(FILES zone.xiv.umbra.svg DESTINATION ${KDE_INSTALL_FULL_ICONDIR}/hicolor/scalable/apps) +install(FILES zone.xiv.umbra.desktop DESTINATION ${KDE_INSTALL_APPDIR}) + +ecm_qt_install_logging_categories( + EXPORT UMBRA + FILE umbra.categories + SORT DESTINATION ${KDE_INSTALL_LOGGINGCATEGORIESDIR} +) feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES) diff --git a/launcher/CMakeLists.txt b/launcher/CMakeLists.txt index 8a1b5b3..772778e 100644 --- a/launcher/CMakeLists.txt +++ b/launcher/CMakeLists.txt @@ -121,22 +121,13 @@ qt_target_qml_sources(umbra_static ui/Settings/ProfileSettings.qml ui/Settings/ProfilesPage.qml ui/Settings/SettingsPage.qml + ui/Settings/TroubleshootingPage.qml ui/Setup/AccountSetup.qml ui/Setup/AddSquareEnix.qml ui/Setup/SetupPage.qml ui/Main.qml ) -set_source_files_properties(../zone.xiv.umbra.svg PROPERTIES - QT_RESOURCE_ALIAS /zone.xiv.umbra.svg -) - -qt_target_qml_sources(umbra_static - PREFIX / - RESOURCES - ../zone.xiv.umbra.svg -) - target_link_libraries(umbra PRIVATE umbra_static umbra_staticplugin diff --git a/launcher/config.kcfg b/launcher/config.kcfg index 6a59627..33a8fe2 100644 --- a/launcher/config.kcfg +++ b/launcher/config.kcfg @@ -19,6 +19,9 @@ SPDX-License-Identifier: CC0-1.0 + + false + diff --git a/launcher/src/gamepatcher.cpp b/launcher/src/gamepatcher.cpp index 1fdfe39..b5c02ae 100644 --- a/launcher/src/gamepatcher.cpp +++ b/launcher/src/gamepatcher.cpp @@ -7,6 +7,7 @@ #include "accountconfig.h" #include "profile.h" #include "profileconfig.h" +#include "umbra_log.h" #include #include @@ -22,14 +23,14 @@ QString patchGameExecutable(const Profile &profile) if (!QFile::exists(backupExePath)) { if (!QFile::copy(originalGameExecutable, backupExePath)) { - qWarning() << "Failed to copy original game EXE for patching!"; + qCWarning(UMBRA_LOG) << "Failed to copy original game EXE for patching!"; return i18n("Failed to copy original game EXE for patching!"); } } QFile originalExe(backupExePath); if (!originalExe.open(QIODevice::ReadOnly)) { - qWarning() << "Failed to patch:" << originalExe.errorString(); + qCWarning(UMBRA_LOG) << "Failed to patch:" << originalExe.errorString(); return i18n("Failed to patch: %1").arg(originalExe.errorString()); } @@ -53,7 +54,7 @@ QString patchGameExecutable(const Profile &profile) QFile newExe(originalGameExecutable); if (!newExe.open(QIODevice::WriteOnly)) { - qWarning() << "Failed to patch:" << newExe.errorString(); + qCWarning(UMBRA_LOG) << "Failed to patch:" << newExe.errorString(); return i18n("Failed to patch: %1").arg(newExe.errorString()); } newExe.write(exeData); diff --git a/launcher/src/launchercore.cpp b/launcher/src/launchercore.cpp index 353be6a..a5ceacb 100755 --- a/launcher/src/launchercore.cpp +++ b/launcher/src/launchercore.cpp @@ -30,6 +30,10 @@ LauncherCore::LauncherCore() : QObject() { m_config = new Config(KSharedConfig::openConfig(QStringLiteral("umbrarc"), KConfig::SimpleConfig, QStandardPaths::AppConfigLocation), this); + if (config()->verboseLogging()) { + QLoggingCategory::setFilterRules(QStringLiteral("zone.xiv.umbra*=true")); + } + m_mgr = new QNetworkAccessManager(this); m_squareEnixLogin = new SquareEnixLogin(*this, this); m_profileManager = new ProfileManager(this); diff --git a/launcher/src/main.cpp b/launcher/src/main.cpp index fa8864e..0fcb9c0 100755 --- a/launcher/src/main.cpp +++ b/launcher/src/main.cpp @@ -7,8 +7,11 @@ #include #include #include // NOTE: do not remove this, if your IDE suggests to do so +#include #include #include +#include +#include #include #ifdef Q_OS_WINDOWS @@ -16,13 +19,12 @@ #define WIN32_LEAN_AND_MEAN #include - -#include "umbra_log.h" #endif -#include "umbra-version.h" #include "launchercore.h" #include "logger.h" +#include "umbra-version.h" +#include "umbra_log.h" #include "utility.h" using namespace Qt::StringLiterals; @@ -57,6 +59,7 @@ int main(int argc, char *argv[]) const KDSingleApplication singleApplication; if (!singleApplication.isPrimaryInstance()) { + qCWarning(UMBRA_LOG) << "Umbra is already running"; return 0; } @@ -66,13 +69,16 @@ int main(int argc, char *argv[]) } KLocalizedString::setApplicationDomain("umbra"); + // This needs to be set before fromAppStreamForApplication can be used, so don't remove this! + QGuiApplication::setDesktopFileName(u"zone.xiv.umbra"_s); - KAboutData about(QStringLiteral("umbra"), - i18n("Umbra"), - QStringLiteral(UMBRA_VERSION_STRING), - i18n("FFXIV 1.x Launcher"), - KAboutLicense::GPL_V3, - i18n("© 2026 Joshua Goins")); + auto about = KAboutData::fromAppStreamForApplication(); + about.setVersion(QByteArrayLiteral(UMBRA_VERSION_STRING)); + // Works around bug fixed with https://invent.kde.org/frameworks/kcoreaddons/-/merge_requests/582 +#if KCOREADDONS_VERSION < QT_VERSION_CHECK(6, 28, 0) + about.setComponentName(QStringLiteral("umbra")); +#endif + about.setCopyrightStatement(i18n("© 2026 Joshua Goins")); about.setOtherText( i18n("FINAL FANTASY, FINAL FANTASY XIV, FFXIV, SQUARE ENIX, and the SQUARE ENIX logo are registered trademarks or " "trademarks of Square Enix Holdings Co., Ltd.")); @@ -81,19 +87,24 @@ int main(int argc, char *argv[]) QStringLiteral("josh@redstrate.com"), QStringLiteral("https://redstrate.com/"), QUrl(QStringLiteral("https://redstrate.com/rss-image.png"))); - about.setHomepage(QStringLiteral("https://xiv.zone/umbra")); + about.addComponent(QStringLiteral("physis"), + i18n("Library for reading and writing FFXIV data."), + QString::fromLatin1(physis_get_physis_version()), + QStringLiteral("https://xiv.zone/physis"), + KAboutLicense::GPL_V3); + about.addComponent(QStringLiteral("libphysis"), + i18n("C/C++ bindings for Physis."), + QString::fromLatin1(physis_get_libphysis_version()), + QStringLiteral("https://github.com/redstrate/libphysis"), + KAboutLicense::GPL_V3); about.addComponent(QStringLiteral("KDSingleApplication"), i18n("Helper class for single-instance policy applications."), - QStringLiteral("1.1.1"), + QString::fromLatin1(KDSINGLEAPPLICATION_VERSION_STRING), QStringLiteral("https://github.com/KDAB/KDSingleApplication"), KAboutLicense::MIT); - about.setDesktopFileName(QStringLiteral("zone.xiv.umbra")); - about.setBugAddress(QByteArrayLiteral("https://github.com/redstrate/umbra/issues")); - about.setComponentName(QStringLiteral("umbra")); - about.setProgramLogo(QStringLiteral("zone.xiv.umbra")); - about.setOrganizationDomain(QByteArrayLiteral("xiv.zone")); KAboutData::setApplicationData(about); + QGuiApplication::setWindowIcon(QIcon::fromTheme(u"zone.xiv.umbra"_s)); initializeLogging(); @@ -121,6 +132,7 @@ int main(int argc, char *argv[]) engine.loadFromModule(QStringLiteral("zone.xiv.umbra"), QStringLiteral("Main")); if (engine.rootObjects().isEmpty()) { + qCWarning(UMBRA_LOG) << "Failed to start application due to QML failing to load!"; return -1; } diff --git a/launcher/ui/Settings/SettingsPage.qml b/launcher/ui/Settings/SettingsPage.qml index 3c8be62..f31fecc 100644 --- a/launcher/ui/Settings/SettingsPage.qml +++ b/launcher/ui/Settings/SettingsPage.qml @@ -42,6 +42,12 @@ KirigamiSettings.ConfigurationView { page: () => Qt.createComponent("zone.xiv.umbra", "DeveloperSettings") visible: LauncherCore.config.showDevTools }, + KirigamiSettings.ConfigurationModule { + moduleId: "troubleshooting" + text: i18n("Troubleshooting") + icon.name: "error-symbolic" + page: () => Qt.createComponent("zone.xiv.umbra", "TroubleshootingPage") + }, KirigamiSettings.ConfigurationModule { moduleId: "about" text: i18n("About Umbra") diff --git a/launcher/ui/Settings/TroubleshootingPage.qml b/launcher/ui/Settings/TroubleshootingPage.qml new file mode 100644 index 0000000..fff43f8 --- /dev/null +++ b/launcher/ui/Settings/TroubleshootingPage.qml @@ -0,0 +1,47 @@ +// SPDX-FileCopyrightText: 2026 Joshua Goins +// SPDX-License-Identifier: GPL-3.0-or-later + +import QtCore +import QtQuick +import QtQuick.Layouts + +import org.kde.kirigami as Kirigami +import org.kde.kirigamiaddons.formcard as FormCard + +import zone.xiv.umbra + +import "../Components" + +FormCard.FormCardPage { + id: page + + title: i18nc("@title:window", "Troubleshooting") + + FormCard.FormCard { + Layout.topMargin: Kirigami.Units.largeSpacing * 4 + + FormCard.FormCheckDelegate { + id: verboseLoggingDelegate + + text: i18n("Enable Verbose Logging") + description: i18n("Requires a restart of Umbra to take effect.") + checked: LauncherCore.config.verboseLogging + onCheckedChanged: { + LauncherCore.config.verboseLogging = checked; + LauncherCore.config.save(); + } + } + + FormCard.FormDelegateSeparator { + above: verboseLoggingDelegate + below: logsFolderDelegate + } + + FormCard.FormButtonDelegate { + id: logsFolderDelegate + + text: i18nc("@action:button", "Open Logs Folder") + onClicked: Qt.openUrlExternally(StandardPaths.writableLocation(StandardPaths.AppDataLocation) + "/log") + } + } +} diff --git a/launcher/ui/Setup/SetupPage.qml b/launcher/ui/Setup/SetupPage.qml index bea7f84..8bc6d61 100644 --- a/launcher/ui/Setup/SetupPage.qml +++ b/launcher/ui/Setup/SetupPage.qml @@ -34,12 +34,12 @@ FormCard.FormCardPage { } } - Image { - source: "qrc:/zone.xiv.umbra.svg" + Kirigami.Icon { + source: "zone.xiv.umbra" - fillMode: Image.PreserveAspectFit visible: !LauncherCore.profileManager.hasAnyExistingInstallations() - + Layout.preferredWidth: Math.round(Kirigami.Units.iconSizes.huge * 1.5) + Layout.preferredHeight: Math.round(Kirigami.Units.iconSizes.huge * 1.5) Layout.fillWidth: true Layout.fillHeight: true Layout.margins: Kirigami.Units.largeSpacing * 3 diff --git a/zone.xiv.umbra.appdata.xml b/zone.xiv.umbra.appdata.xml index fd68bbe..467164f 100644 --- a/zone.xiv.umbra.appdata.xml +++ b/zone.xiv.umbra.appdata.xml @@ -7,9 +7,9 @@ zone.xiv.umbra CC0-1.0 Umbra - Linux FFXIV Launcher + Unofficial FFXIV launcher for 1.x - A unofficial FFXIV launcher for 1.x clients. + Linux FFXIV launcher that supports profiles, multiple accounts! Game @@ -19,9 +19,8 @@ ffxiv ff14 - https://xiv.zone/umbra - https://github.com/redstrate/umbra/issues - https://xiv.zone/umbra/faq + https://xiv.zone/software/umbra + https://github.com/redstrate/umbra/issues/new https://redstrate.com/contact https://github.com/redstrate/umbra zone.xiv.umbra.desktop @@ -45,10 +44,27 @@ touch GPL-3.0 - redstrate + + redstrate + https://xiv.zone/umbra/main-screenshot.png + + #8d3535 + #8d3535 + + + intense + moderate + mild + mild + mild + mild + moderate + mild + moderate +
A unofficial FFXIV launcher for 1.x clients.
Linux FFXIV launcher that supports profiles, multiple accounts!