From 38743d7fc8863985243539a3a060f5a49e645d6e Mon Sep 17 00:00:00 2001 From: NadeemYaseen <70559777+NadeemYaseen@users.noreply.github.com> Date: Mon, 4 Mar 2024 20:41:20 +0500 Subject: [PATCH] Update to_be_raptor_linx to add default location of license file (#1558) * Update to_be_raptor_linx to add default location of license file * Update to_be_raptor_linx to dump license file having license file pointer * Update CMakeLists.txt to dump file * Update to_be_raptor_linx --- CMakeLists.txt | 5 +++++ src/to_be_raptor_linx | 1 + 2 files changed, 6 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index f2beb233..907a26d6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -115,6 +115,11 @@ if (PRODUCTION_BUILD) REALPATH BASE_DIR "${CMAKE_CURRENT_SOURCE_DIR}") add_subdirectory(${OPENLM_DIR} OPENLM_DIR) message(STATUS "OPENLM_DIR: " ${OPENLM_DIR}) + #dump openlm license file env variable default value + file(READ "${CMAKE_CURRENT_SOURCE_DIR}/etc/config.json" JSON_DATA) + string(JSON prefixPath GET ${JSON_DATA} general license-path) + file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/bin/default_lic_path" "default_path=${prefixPath}\n") + file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/bin/default_lic_path" "export LICENSE_LOCATION=$default_path\\;$LICENSE_LOCATION") endif() diff --git a/src/to_be_raptor_linx b/src/to_be_raptor_linx index 2d1c7a8b..b71a3bee 100755 --- a/src/to_be_raptor_linx +++ b/src/to_be_raptor_linx @@ -9,6 +9,7 @@ SCRIPT_PATH=`dirname $BASH_SOURCE` RAPTOR_PATH=`( cd "$SCRIPT_PATH" && pwd )` [ -f $RAPTOR_PATH/../.raptorenv_lin64.sh ] && source $RAPTOR_PATH/../.raptorenv_lin64.sh +[ -f $RAPTOR_PATH/default_lic_path ] && source $RAPTOR_PATH/default_lic_path if [[ "$RAPTOR_EXE_DEBUG" == "1" ]]; then $RAPTOR_PATH/bin/raptor.exe "$@"