mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Include build server OS as text in about dialog
This commit is contained in:
parent
ff505f587e
commit
41256e0b75
@ -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@"
|
@ -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() )
|
||||
{
|
||||
|
@ -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)
|
||||
|
||||
# ##############################################################################
|
||||
|
Loading…
Reference in New Issue
Block a user