Merge branch 'reduce-tester-build-cope' into 'master'

Make making TESTERS builds simpler

See merge request KartKrew/Kart!1535
This commit is contained in:
James R 2023-10-04 03:40:15 +00:00
commit 035b6cca8f
9 changed files with 12 additions and 28 deletions

View file

@ -76,6 +76,8 @@ option(SRB2_CONFIG_HWRENDER "Enable hardware render (OpenGL) support" ON)
option(SRB2_CONFIG_STATIC_OPENGL "Enable static linking GL (do not do this)" OFF)
option(SRB2_CONFIG_ERRORMODE "Compile C code with warnings treated as errors." OFF)
option(SRB2_CONFIG_DEBUGMODE "Compile with PARANOIA, ZDEBUG, RANGECHECK and PACKETDROP defined." OFF)
option(SRB2_CONFIG_DEV_BUILD "Compile a development build." OFF)
option(SRB2_CONFIG_TESTERS "Compile a build for testers." OFF)
option(SRB2_CONFIG_MOBJCONSISTANCY "Compile with MOBJCONSISTANCY defined." OFF)
option(SRB2_CONFIG_PACKETDROP "Compile with PACKETDROP defined." OFF)
option(SRB2_CONFIG_ZDEBUG "Compile with ZDEBUG defined." OFF)
@ -202,6 +204,10 @@ if("${SRB2_SDL2_EXE_NAME}" STREQUAL "")
if(NOT "${SRB2_GIT_REVISION}" STREQUAL "master")
list(APPEND EXE_NAME_PARTS ${SRB2_GIT_REVISION})
endif()
if (SRB2_CONFIG_TESTERS)
list(APPEND EXE_NAME_PARTS "TESTERS")
endif()
else()
list(APPEND EXE_NAME_PARTS ${SRB2_SDL2_EXE_NAME})
endif()

View file

@ -33,14 +33,6 @@
"SRB2_CONFIG_TESTERS": "ON"
}
},
{
"name": "host-testers",
"description": "Build to use when hosting, to let testers join",
"inherits": "default",
"cacheVariables": {
"SRB2_CONFIG_HOSTTESTERS": "ON"
}
},
{
"name": "release",
"description": "Build for game's release",

View file

@ -205,12 +205,6 @@ set(SRB2_CONFIG_USEASM OFF CACHE BOOL
"Enable NASM tmap implementation for software mode speedup.")
set(SRB2_CONFIG_YASM OFF CACHE BOOL
"Use YASM in place of NASM.")
set(SRB2_CONFIG_DEV_BUILD OFF CACHE BOOL
"Compile a development build of Dr Robotnik's Ring Racers.")
set(SRB2_CONFIG_TESTERS OFF CACHE BOOL
"Compile a build for testers.")
set(SRB2_CONFIG_HOSTTESTERS OFF CACHE BOOL
"Compile a build to host netgames for testers builds.")
add_subdirectory(blua)
@ -556,9 +550,6 @@ endif()
if(SRB2_CONFIG_TESTERS)
target_compile_definitions(SRB2SDL2 PRIVATE -DTESTERS)
endif()
if(SRB2_CONFIG_HOSTTESTERS)
target_compile_definitions(SRB2SDL2 PRIVATE -DHOSTTESTERS)
endif()
if(SRB2_CONFIG_MOBJCONSISTANCY)
target_compile_definitions(SRB2SDL2 PRIVATE -DMOBJCONSISTANCY)
endif()

View file

@ -6,7 +6,7 @@ passthru_opts+=\
NO_IPV6 NOHW NOMD5 NOPOSTPROCESSING\
MOBJCONSISTANCY PACKETDROP ZDEBUG\
HAVE_MINIUPNPC\
HAVE_DISCORDRPC TESTERS HOSTTESTERS DEVELOP
HAVE_DISCORDRPC TESTERS DEVELOP
# build with debugging information
ifdef DEBUGMODE

View file

@ -3688,7 +3688,7 @@ static void Command_Login_f(void)
boolean IsPlayerAdmin(INT32 playernum)
{
#if defined(DEVELOP) && !(defined(HOSTTESTERS) || defined(TESTERS))
#if 0 // defined(DEVELOP)
return playernum != serverplayer;
#else
INT32 i;
@ -4643,8 +4643,6 @@ static void Command_Version_f(void)
// DEVELOP build
#if defined(TESTERS)
CONS_Printf("\x88" "TESTERS " "\x80");
#elif defined(HOSTTESTERS)
CONS_Printf("\x82" "HOSTTESTERS " "\x80");
#elif defined(DEVELOP)
CONS_Printf("\x87" "DEVELOP " "\x80");
#endif

View file

@ -1565,9 +1565,6 @@ void F_VersionDrawer(void)
#if defined(TESTERS)
addtext(V_SKYMAP, "Tester client");
addtext(V_TRANSLUCENT, va("%s", compdate));
#elif defined(HOSTTESTERS)
addtext(V_REDMAP, "Netgame host for testers");
addtext(V_TRANSLUCENT, va("%s", compdate));
#elif defined(DEVELOP)
addtext(V_TRANSLUCENT, va("%s %s", comprevision, compnote));
addtext(V_TRANSLUCENT, D_GetFancyBranchName());
@ -1711,8 +1708,6 @@ void F_TitleScreenDrawer(void)
#ifdef DEVELOP
#if defined(TESTERS)
V_DrawCenteredString(BASEVIDWIDTH/2, 96, V_SKYMAP, "Tester EXE");
#elif defined(HOSTTESTERS)
V_DrawCenteredThinString(BASEVIDWIDTH/2, 96, V_REDMAP, "Tester netgame host EXE");
#else
V_DrawCenteredString(BASEVIDWIDTH/2, 96, 0, "Development EXE");
#endif

View file

@ -89,7 +89,7 @@ JoyType_t Joystick[MAXSPLITSCREENPLAYERS];
// SRB2kart
char gamedatafilename[64] =
#if defined (TESTERS) || defined (HOSTTESTERS)
#if defined (TESTERS)
"test"
#elif defined(DEVELOP)
"develop"

View file

@ -78,7 +78,7 @@ menuitem_t PLAY_MP_OptSelect[] =
{IT_STRING_CALL_NOTESTERS, "Host Game", "Start your own online game!",
NULL, {.routine = M_PreMPHostInit}, 0, 0},
{IT_STRING_CALL_NOTESTERS, "Server Browser", "Search for game servers to play in.",
{IT_STRING | IT_CALL, "Server Browser", "Search for game servers to play in.",
NULL, {.routine = M_PreMPRoomSelectInit}, 0, 0},
{IT_STRING | IT_CALL, "Join by IP", "Join an online game by its IP address.",

View file

@ -75,11 +75,13 @@ void M_MPRoomSelectInit(INT32 choice)
mpmenu.scrolln = 0;
mpmenu.slide = 0;
#ifndef TESTERS
if ((modifiedgame == true) || (M_SecretUnlocked(SECRET_ADDONS, true) == false))
{
M_ServersMenu(0);
return;
}
#endif // TESTERS
M_SetupNextMenu(&PLAY_MP_RoomSelectDef, false);
}