Include build server OS as text in about dialog

This commit is contained in:
Magne Sjaastad 2024-08-27 07:38:53 +02:00 committed by GitHub
parent ff505f587e
commit 41256e0b75
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 21 additions and 1 deletions

View File

@ -35,4 +35,6 @@
#define RESINSIGHT_PYTHON_VERSION "@Python3_VERSION@"
#define RESINSIGHT_GIT_HASH "@RESINSIGHT_GIT_HASH@"
#define RESINSIGHT_GIT_HASH "@RESINSIGHT_GIT_HASH@"
#define RESINSIGHT_BUILD_SYSTEM_ID "@RESINSIGHT_BUILD_SYSTEM_ID@"

View File

@ -148,6 +148,8 @@ void RicHelpAboutFeature::onActionTriggered( bool isChecked )
dlg.addVersionEntry( " ", QString( " " ) + vendor + " : " + render );
}
dlg.addVersionEntry( " ", QString( " Build Server : " ) + RESINSIGHT_BUILD_SYSTEM_ID );
QString compiledUsingPythonVersion = RESINSIGHT_PYTHON_VERSION;
if ( !compiledUsingPythonVersion.isEmpty() )
{

View File

@ -169,6 +169,22 @@ endif()
# ##############################################################################
# Version number
# ##############################################################################
if(UNIX AND NOT APPLE)
if(EXISTS "/etc/os-release")
# Read the contents of /etc/os-release
file(READ "/etc/os-release" OS_RELEASE_CONTENT)
# Extract ID
string(REGEX MATCH "PRETTY_NAME=\"?([^\n\"]+)\"?" _ ${OS_RELEASE_CONTENT})
set(RESINSIGHT_BUILD_SYSTEM_ID ${CMAKE_MATCH_1})
# Display the extracted values
message(STATUS "Operating System ID: ${RESINSIGHT_BUILD_SYSTEM_ID}")
else()
message(WARNING "/etc/os-release not found. Cannot determine OS details.")
endif()
endif()
include(ResInsightVersion.cmake)
# ##############################################################################