diff --git a/.github/workflows/github.yml b/.github/workflows/github.yml index 450f6b7b5..5568b6e9c 100644 --- a/.github/workflows/github.yml +++ b/.github/workflows/github.yml @@ -195,7 +195,7 @@ jobs: fi echo VCMI_PACKAGE_FILE_NAME="$VCMI_PACKAGE_FILE_NAME" >> $GITHUB_ENV echo VCMI_PACKAGE_NAME_SUFFIX="$VCMI_PACKAGE_NAME_SUFFIX" >> $GITHUB_ENV - echo VCMI_PACKAGE_GITVERSION="$VCMI_PACKAGE_GITVERSION" >> $GITHUB_ENV + echo VCMI_PACKAGE_GOLDMASTER="$VCMI_PACKAGE_GOLDMASTER" >> $GITHUB_ENV env: PULL_REQUEST: ${{ github.event.pull_request.number }} @@ -351,7 +351,7 @@ jobs: fi echo VCMI_PACKAGE_FILE_NAME="$VCMI_PACKAGE_FILE_NAME" >> $GITHUB_ENV echo VCMI_PACKAGE_NAME_SUFFIX="$VCMI_PACKAGE_NAME_SUFFIX" >> $GITHUB_ENV - echo VCMI_PACKAGE_GITVERSION="$VCMI_PACKAGE_GITVERSION" >> $GITHUB_ENV + echo VCMI_PACKAGE_GOLDMASTER="$VCMI_PACKAGE_GOLDMASTER" >> $GITHUB_ENV env: PULL_REQUEST: ${{ github.event.pull_request.number }} diff --git a/CI/get_package_name.sh b/CI/get_package_name.sh index 235e39930..4f8504c4b 100644 --- a/CI/get_package_name.sh +++ b/CI/get_package_name.sh @@ -27,7 +27,7 @@ fi VCMI_PACKAGE_FILE_NAME="${TMP_JOBID}-vcmi" VCMI_PACKAGE_NAME_SUFFIX="" -VCMI_PACKAGE_GITVERSION="ON" +VCMI_PACKAGE_GOLDMASTER="ON" if [ -z "$TMP_PRID" ] || [ "$TMP_PRID" == "false" ]; then branch_name=$(echo "$TMP_BRANCH" | sed 's/[^[:alnum:]]\+/_/g') @@ -36,7 +36,7 @@ then then VCMI_PACKAGE_NAME_SUFFIX="branch ${branch_name}" else - VCMI_PACKAGE_GITVERSION="OFF" + VCMI_PACKAGE_GOLDMASTER="OFF" fi else VCMI_PACKAGE_FILE_NAME="${VCMI_PACKAGE_FILE_NAME}-PR-${TMP_PRID}-${TMP_COMMIT}" @@ -50,4 +50,4 @@ fi export VCMI_PACKAGE_FILE_NAME export VCMI_PACKAGE_NAME_SUFFIX -export VCMI_PACKAGE_GITVERSION \ No newline at end of file +export VCMI_PACKAGE_GOLDMASTER \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index 4fd2d0fa8..b84ebaf9c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -43,8 +43,8 @@ option(ENABLE_ERM "Enable compilation of ERM scripting module" OFF) option(ENABLE_LUA "Enable compilation of LUA scripting module" OFF) option(ENABLE_TRANSLATIONS "Enable generation of translations for launcher and editor" ON) option(ENABLE_NULLKILLER_AI "Enable compilation of Nullkiller AI library" ON) -option(ENABLE_GITVERSION "Enable Version.cpp with Git commit hash" ON) option(ENABLE_MINIMAL_LIB "Build only core parts of vcmi library that are required for game lobby" OFF) +option(ENABLE_GOLDMASTER "Build in public release mode in which some debug routines are disabled" OFF) # Compilation options @@ -90,6 +90,7 @@ endif() include(CMakeDependentOption) cmake_dependent_option(ENABLE_INNOEXTRACT "Enable innoextract for GOG file extraction in launcher" ON "ENABLE_LAUNCHER" OFF) +cmake_dependent_option(ENABLE_GITVERSION "Enable Version.cpp with Git commit hash" ON "NOT ENABLE_GOLDMASTER" OFF) ############################################ # Miscellaneous options # @@ -239,7 +240,6 @@ elseif(${CMAKE_CXX_BYTE_ORDER} EQUAL "BIG_ENDIAN") add_definitions(-DVCMI_ENDIAN_BIG) endif() - if(ENABLE_LAUNCHER) add_definitions(-DENABLE_LAUNCHER) endif() @@ -256,6 +256,10 @@ if(ENABLE_MINIMAL_LIB) add_definitions(-DENABLE_MINIMAL_LIB) endif() +if(ENABLE_GOLDMASTER) + add_definitions(-DENABLE_GOLDMASTER) +endif() + if(APPLE_IOS) set(CMAKE_MACOSX_RPATH 1) set(CMAKE_OSX_DEPLOYMENT_TARGET 12.0) diff --git a/CMakePresets.json b/CMakePresets.json index d35b24e74..41fd2fac4 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -25,7 +25,7 @@ "CMAKE_BUILD_TYPE": "RelWithDebInfo", "ENABLE_TEST": "OFF", "ENABLE_STRICT_COMPILATION": "ON", - "ENABLE_GITVERSION": "$env{VCMI_PACKAGE_GITVERSION}", + "ENABLE_GOLDMASTER": "$env{VCMI_PACKAGE_GOLDMASTER}", "ENABLE_PCH" : "OFF" } },