From cb24aece06ccd44b4b2b8b2b5ac3eeb0d63d7670 Mon Sep 17 00:00:00 2001 From: Joshua Goins Date: Sun, 30 Jul 2023 10:33:07 -0400 Subject: [PATCH] Expose Astra, physis and libphysis version --- CMakeLists.txt | 5 +++++ launcher/CMakeLists.txt | 2 +- launcher/src/main.cpp | 11 +++++++++-- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8823387..8462c90 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -32,6 +32,11 @@ include(ECMPoQmTools) include(KDEGitCommitHooks) include(KDEClangFormat) +ecm_setup_version(${PROJECT_VERSION} + VARIABLE_PREFIX ASTRA + VERSION_HEADER ${CMAKE_CURRENT_BINARY_DIR}/astra-version.h +) + find_package(Qt5 ${QT_MIN_VERSION} NO_MODULE REQUIRED COMPONENTS Core Widgets diff --git a/launcher/CMakeLists.txt b/launcher/CMakeLists.txt index 256e17d..61e42da 100644 --- a/launcher/CMakeLists.txt +++ b/launcher/CMakeLists.txt @@ -32,7 +32,7 @@ target_sources(astra PRIVATE resources.qrc) kconfig_add_kcfg_files(astra GENERATE_MOC config.kcfgc accountconfig.kcfgc profileconfig.kcfgc) -target_include_directories(astra PRIVATE include) +target_include_directories(astra PRIVATE include ${CMAKE_BINARY_DIR}) target_link_libraries(astra PRIVATE physis cotp diff --git a/launcher/src/main.cpp b/launcher/src/main.cpp index 5a6beb5..1585455 100755 --- a/launcher/src/main.cpp +++ b/launcher/src/main.cpp @@ -5,6 +5,7 @@ #include #include +#include "astra-version.h" #include "gameinstaller.h" #include "launchercore.h" #include "sapphirelauncher.h" @@ -22,10 +23,16 @@ int main(int argc, char *argv[]) KLocalizedString::setApplicationDomain("astra"); - KAboutData about(QStringLiteral("astra"), i18n("Astra"), "0.5.0", i18n("FFXIV Launcher"), KAboutLicense::GPL_V3, i18n("© 2023 Joshua Goins")); + KAboutData about(QStringLiteral("astra"), + i18n("Astra"), + QStringLiteral(ASTRA_VERSION_STRING), + i18n("FFXIV Launcher"), + KAboutLicense::GPL_V3, + i18n("© 2023 Joshua Goins")); about.addAuthor(i18n("Joshua Goins"), i18n("Maintainer"), QStringLiteral("josh@redstrate.com")); about.setHomepage("https://xiv.zone/astra"); - about.addComponent("physis"); + about.addComponent("physis", "Library to access FFXIV data", physis_get_physis_version(), "https://xiv.zone/physis", KAboutLicense::GPL_V3); + about.addComponent("libphysis", "C bindings for physis", physis_get_libphysis_version(), "", KAboutLicense::GPL_V3); about.setDesktopFileName("com.redstrate.astra"); about.setBugAddress("https://lists.sr.ht/~redstrate/public-inbox"); about.setComponentName("astra");