From 46831f4c86a1679d48f63273b92cd755522e42f9 Mon Sep 17 00:00:00 2001 From: Adrian Insaurralde Avalos Date: Mon, 11 Nov 2024 10:27:29 -0300 Subject: [PATCH] Gui: extend version info to specify flatpak and conda builds --- src/Gui/CMakeLists.txt | 8 ++++++++ src/Gui/Splashscreen.cpp | 14 +++++++++++--- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/src/Gui/CMakeLists.txt b/src/Gui/CMakeLists.txt index 17539bf28f..642f58568f 100644 --- a/src/Gui/CMakeLists.txt +++ b/src/Gui/CMakeLists.txt @@ -3,6 +3,14 @@ add_subdirectory(Stylesheets) add_subdirectory(PreferencePacks) add_subdirectory(PreferencePackTemplates) +if(BUILD_WITH_CONDA) + add_definitions(-DFC_CONDA) +endif(BUILD_WITH_CONDA) + +if(FC_FLATPAK) + add_definitions(-DFC_FLATPAK) +endif(FC_FLATPAK) + if(WIN32) add_definitions(-DFCGui -DQSINT_MAKEDLL -DOVR_OS_WIN32 -DQUARTER_INTERNAL -DQUARTER_MAKE_DLL -DCOIN_DLL) endif(WIN32) diff --git a/src/Gui/Splashscreen.cpp b/src/Gui/Splashscreen.cpp index bb6458b0ca..85e21dcbd0 100644 --- a/src/Gui/Splashscreen.cpp +++ b/src/Gui/Splashscreen.cpp @@ -678,12 +678,20 @@ void AboutDialog::copyToClipboard() str << "Architecture: " << QSysInfo::buildCpuArchitecture() << "(running on: " << QSysInfo::currentCpuArchitecture() << ")\n"; } str << "Version: " << major << "." << minor << "." << point << suffix << "." << build; - char *appimage = getenv("APPIMAGE"); - if (appimage) +#ifdef FC_CONDA + str << " Conda"; +#endif +#ifdef FC_FLATPAK + str << " Flatpak"; +#endif + char* appimage = getenv("APPIMAGE"); + if (appimage) { str << " AppImage"; + } char* snap = getenv("SNAP_REVISION"); - if (snap) + if (snap) { str << " Snap " << snap; + } str << '\n'; #if defined(_DEBUG) || defined(DEBUG)