Skip to content

Commit

Permalink
Include build server OS as text in about dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
magnesj authored Aug 27, 2024
1 parent ff505f5 commit 41256e0
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ApplicationLibCode/Adm/RiaVersionInfo.h.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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@"
Original file line number Diff line number Diff line change
Expand Up @@ -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() )
{
Expand Down
16 changes: 16 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)

# ##############################################################################
Expand Down

0 comments on commit 41256e0

Please sign in to comment.