1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-28 08:48:48 +02:00

Merge pull request #3829 from IvanSavenko/goldmaster

Tweaks for public release mode
This commit is contained in:
Ivan Savenko 2024-04-28 13:11:38 +03:00 committed by GitHub
commit 142bbe652a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 17 additions and 12 deletions

View File

@ -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 }}

View File

@ -27,7 +27,7 @@ fi
VCMI_PACKAGE_FILE_NAME="${TMP_JOBID}-vcmi"
VCMI_PACKAGE_NAME_SUFFIX=""
VCMI_PACKAGE_GITVERSION="ON"
VCMI_PACKAGE_GOLDMASTER="OFF"
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="ON"
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

View File

@ -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)

View File

@ -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"
}
},

View File

@ -37,8 +37,7 @@ SDL_Surface * screen = nullptr; //main screen surface
SDL_Surface * screen2 = nullptr; //and hlp surface (used to store not-active interfaces layer)
SDL_Surface * screenBuf = screen; //points to screen (if only advmapint is present) or screen2 (else) - should be used when updating controls which are not regularly redrawed
static const std::string NAME_AFFIX = "client";
static const std::string NAME = GameConstants::VCMI_VERSION + std::string(" (") + NAME_AFFIX + ')'; //application name
static const std::string NAME = GameConstants::VCMI_VERSION; //application name
std::tuple<int, int> ScreenHandler::getSupportedScalingRange() const
{

2
debian/rules vendored
View File

@ -9,7 +9,7 @@ override_dh_auto_configure:
-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=ON \
-DCMAKE_INSTALL_RPATH=/usr/lib/$(DEB_HOST_MULTIARCH)/vcmi \
-DCMAKE_BUILD_TYPE=Release \
-DENABLE_GITVERSION=OFF \
-DENABLE_GOLDMASTER=ON \
-DBIN_DIR=games \
-DFORCE_BUNDLED_FL=OFF \
-DENABLE_TEST=0

View File

@ -94,7 +94,7 @@ void CSettingsView::loadSettings()
ui->comboBoxEnemyPlayerAI->setCurrentText(QString::fromStdString(settings["server"]["playerAI"].String()));
ui->comboBoxAlliedPlayerAI->setCurrentText(QString::fromStdString(settings["server"]["alliedAI"].String()));
ui->spinBoxNetworkPort->setValue(settings["server"]["port"].Integer());
ui->spinBoxNetworkPort->setValue(settings["server"]["localPort"].Integer());
ui->comboBoxAutoCheck->setCurrentIndex(settings["launcher"]["autoCheckRepositories"].Bool());

View File

@ -3390,7 +3390,9 @@ void CGameHandler::handleTownEvents(CGTownInstance * town, NewTurn &n)
bool CGameHandler::complain(const std::string &problem)
{
#ifndef ENABLE_GOLDMASTER
playerMessages->broadcastSystemMessage("Server encountered a problem: " + problem);
#endif
logGlobal->error(problem);
return true;
}