mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-02 00:10:22 +02:00
Added "ENABLE_GOLDMASTER" switch
Intended for functionality that should be disabled or enabled in public releases. Largely replaces existing ENABLE_GITVERSION switch, which is now always disabled if GOLDMASTER is in use
This commit is contained in:
parent
428c88d8c1
commit
b3499c54ae
4
.github/workflows/github.yml
vendored
4
.github/workflows/github.yml
vendored
@ -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 }}
|
||||
|
||||
|
@ -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
|
||||
export VCMI_PACKAGE_GOLDMASTER
|
@ -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)
|
||||
|
@ -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"
|
||||
}
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user