From 884e8a547b3bb1d680c96a8779914ee4954f5b8e Mon Sep 17 00:00:00 2001 From: Hanicef Date: Tue, 23 Jan 2024 22:16:04 +0100 Subject: [PATCH 01/83] Add -noipv4 flag --- src/netcode/http-mserv.c | 104 ++++++++++++++++++++++++++------------- src/netcode/i_tcp.c | 77 ++++++++++++++++------------- 2 files changed, 111 insertions(+), 70 deletions(-) diff --git a/src/netcode/http-mserv.c b/src/netcode/http-mserv.c index 2b52380cf..cd3e353dc 100644 --- a/src/netcode/http-mserv.c +++ b/src/netcode/http-mserv.c @@ -63,7 +63,9 @@ consvar_t cv_masterserver_token = CVAR_INIT static int hms_started; +static boolean hms_args_checked; static boolean hms_allow_ipv6; +static boolean hms_allow_ipv4; static char *hms_api; #ifdef HAVE_THREADS @@ -134,6 +136,16 @@ HMS_on_read (char *s, size_t _1, size_t n, void *userdata) return n; } +static void HMS_check_args_once(void) +{ + if (hms_args_checked) + return; + + hms_allow_ipv6 = !M_CheckParm("-noipv6"); + hms_allow_ipv4 = !M_CheckParm("-noipv4"); + hms_args_checked = true; +} + static struct HMS_buffer * HMS_connect (int proto, const char *format, ...) { @@ -152,7 +164,6 @@ HMS_connect (int proto, const char *format, ...) if (! hms_started) { - hms_allow_ipv6 = !M_CheckParm("-noipv6"); if (curl_global_init(CURL_GLOBAL_ALL) != 0) { Contact_error(); @@ -234,9 +245,9 @@ HMS_connect (int proto, const char *format, ...) curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L); #ifndef NO_IPV6 - if (proto == PROTO_V6) + if (proto == PROTO_V6 || (proto == PROTO_ANY && !hms_allow_ipv4)) curl_easy_setopt(curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V6); - if (proto == PROTO_V4) + if (proto == PROTO_V4 || (proto == PROTO_ANY && !hms_allow_ipv6)) #endif curl_easy_setopt(curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4); @@ -326,6 +337,8 @@ HMS_fetch_rooms (int joining, int query_id) (void)query_id; + HMS_check_args_once(); + hms = HMS_connect(PROTO_ANY, "rooms"); if (! hms) @@ -420,18 +433,15 @@ int HMS_register (void) { struct HMS_buffer *hms; - int ok; + int ok = 0; char post[256]; char *title; - hms = HMS_connect(PROTO_V4, "rooms/%d/register", ms_RoomId); + HMS_check_args_once(); - if (! hms) - return 0; - - title = curl_easy_escape(hms->curl, cv_servername.string, 0); + title = curl_easy_escape(NULL, cv_servername.string, 0); snprintf(post, sizeof post, "port=%d&" @@ -447,16 +457,24 @@ HMS_register (void) curl_free(title); - curl_easy_setopt(hms->curl, CURLOPT_POSTFIELDS, post); - - ok = HMS_do(hms); - - if (ok) + if (hms_allow_ipv4) { - hms_server_token = strdup(strtok(hms->buffer, "\n")); - } + hms = HMS_connect(PROTO_V4, "rooms/%d/register", ms_RoomId); - HMS_end(hms); + if (! hms) + return 0; + + curl_easy_setopt(hms->curl, CURLOPT_POSTFIELDS, post); + + ok = HMS_do(hms); + + if (ok) + { + hms_server_token = strdup(strtok(hms->buffer, "\n")); + } + + HMS_end(hms); + } #ifndef NO_IPV6 if (!hms_allow_ipv6) @@ -486,20 +504,25 @@ int HMS_unlist (void) { struct HMS_buffer *hms; - int ok; + int ok = 0; - hms = HMS_connect(PROTO_V4, "servers/%s/unlist", hms_server_token); + HMS_check_args_once(); - if (! hms) - return 0; + if (hms_server_token && hms_allow_ipv4) + { + hms = HMS_connect(PROTO_V4, "servers/%s/unlist", hms_server_token); - curl_easy_setopt(hms->curl, CURLOPT_POST, 1); - curl_easy_setopt(hms->curl, CURLOPT_POSTFIELDSIZE, 0); + if (! hms) + return 0; - ok = HMS_do(hms); - HMS_end(hms); + curl_easy_setopt(hms->curl, CURLOPT_POST, 1); + curl_easy_setopt(hms->curl, CURLOPT_POSTFIELDSIZE, 0); - free(hms_server_token); + ok = HMS_do(hms); + HMS_end(hms); + + free(hms_server_token); + } #ifndef NO_IPV6 if (hms_server_token_ipv6 && hms_allow_ipv6) @@ -526,18 +549,15 @@ int HMS_update (void) { struct HMS_buffer *hms; - int ok; + int ok = 0; char post[256]; char *title; - hms = HMS_connect(PROTO_V4, "servers/%s/update", hms_server_token); + HMS_check_args_once(); - if (! hms) - return 0; - - title = curl_easy_escape(hms->curl, cv_servername.string, 0); + title = curl_easy_escape(NULL, cv_servername.string, 0); snprintf(post, sizeof post, "title=%s", @@ -546,10 +566,18 @@ HMS_update (void) curl_free(title); - curl_easy_setopt(hms->curl, CURLOPT_POSTFIELDS, post); + if (hms_server_token && hms_allow_ipv4) + { + hms = HMS_connect(PROTO_V4, "servers/%s/update", hms_server_token); - ok = HMS_do(hms); - HMS_end(hms); + if (! hms) + return 0; + + curl_easy_setopt(hms->curl, CURLOPT_POSTFIELDS, post); + + ok = HMS_do(hms); + HMS_end(hms); + } #ifndef NO_IPV6 if (hms_server_token_ipv6 && hms_allow_ipv6) @@ -577,6 +605,8 @@ HMS_list_servers (void) char *list; char *p; + HMS_check_args_once(); + hms = HMS_connect(PROTO_ANY, "servers"); if (! hms) @@ -622,6 +652,8 @@ HMS_fetch_servers (msg_server_t *list, int room_number, int query_id) int i; + HMS_check_args_once(); + (void)query_id; if (room_number > 0) @@ -733,6 +765,8 @@ HMS_compare_mod_version (char *buffer, size_t buffer_size) char *version; char *version_name; + HMS_check_args_once(); + hms = HMS_connect(PROTO_ANY, "versions/%d", MODID); if (! hms) diff --git a/src/netcode/i_tcp.c b/src/netcode/i_tcp.c index 6d9a2725a..86cf83d02 100644 --- a/src/netcode/i_tcp.c +++ b/src/netcode/i_tcp.c @@ -908,6 +908,7 @@ static boolean UDP_Socket(void) #ifdef HAVE_IPV6 const INT32 b_ipv6 = !M_CheckParm("-noipv6"); #endif + const INT32 b_ipv4 = !M_CheckParm("-noipv4"); const char *serv; @@ -929,11 +930,34 @@ static boolean UDP_Socket(void) else serv = clientport_name; - if (M_CheckParm("-bindaddr")) + if (b_ipv4) { - while (M_IsNextParm()) + if (M_CheckParm("-bindaddr")) { - gaie = I_getaddrinfo(M_GetNextParm(), serv, &hints, &ai); + while (M_IsNextParm()) + { + gaie = I_getaddrinfo(M_GetNextParm(), serv, &hints, &ai); + if (gaie == 0) + { + runp = ai; + while (runp != NULL && s < MAXNETNODES+1) + { + mysockets[s] = UDP_Bind(runp->ai_family, runp->ai_addr, (socklen_t)runp->ai_addrlen); + if (mysockets[s] != (SOCKET_TYPE)ERRSOCKET) + { + FD_SET(mysockets[s], &masterset); + myfamily[s] = hints.ai_family; + s++; + } + runp = runp->ai_next; + } + I_freeaddrinfo(ai); + } + } + } + else + { + gaie = I_getaddrinfo("0.0.0.0", serv, &hints, &ai); if (gaie == 0) { runp = ai; @@ -945,6 +969,13 @@ static boolean UDP_Socket(void) FD_SET(mysockets[s], &masterset); myfamily[s] = hints.ai_family; s++; +#ifdef HAVE_MINIUPNPC + if (UPNP_support) + { + I_UPnP_rem(serverport_name, "UDP"); + I_UPnP_add(NULL, serverport_name, "UDP"); + } +#endif } runp = runp->ai_next; } @@ -952,33 +983,6 @@ static boolean UDP_Socket(void) } } } - else - { - gaie = I_getaddrinfo("0.0.0.0", serv, &hints, &ai); - if (gaie == 0) - { - runp = ai; - while (runp != NULL && s < MAXNETNODES+1) - { - mysockets[s] = UDP_Bind(runp->ai_family, runp->ai_addr, (socklen_t)runp->ai_addrlen); - if (mysockets[s] != (SOCKET_TYPE)ERRSOCKET) - { - FD_SET(mysockets[s], &masterset); - myfamily[s] = hints.ai_family; - s++; -#ifdef HAVE_MINIUPNPC - if (UPNP_support) - { - I_UPnP_rem(serverport_name, "UDP"); - I_UPnP_add(NULL, serverport_name, "UDP"); - } -#endif - } - runp = runp->ai_next; - } - I_freeaddrinfo(ai); - } - } #ifdef HAVE_IPV6 if (b_ipv6) { @@ -1045,11 +1049,14 @@ static boolean UDP_Socket(void) s = 0; - // setup broadcast adress to BROADCASTADDR entry - broadcastaddress[s].any.sa_family = AF_INET; - broadcastaddress[s].ip4.sin_port = htons(atoi(DEFAULTPORT)); - broadcastaddress[s].ip4.sin_addr.s_addr = htonl(INADDR_BROADCAST); - s++; + if (b_ipv4) + { + // setup broadcast adress to BROADCASTADDR entry + broadcastaddress[s].any.sa_family = AF_INET; + broadcastaddress[s].ip4.sin_port = htons(atoi(DEFAULTPORT)); + broadcastaddress[s].ip4.sin_addr.s_addr = htonl(INADDR_BROADCAST); + s++; + } #ifdef HAVE_IPV6 if (b_ipv6) From 3341c193aa57096996e15041a980b844a16132ae Mon Sep 17 00:00:00 2001 From: LJ Sonic Date: Tue, 26 Mar 2024 18:50:08 +0100 Subject: [PATCH 02/83] Expose debug library to Lua --- src/blua/CMakeLists.txt | 1 + src/blua/Sourcefile | 1 + src/blua/ldblib.c | 310 +++++++++++++++++++++++++++ src/blua/linit.c | 1 + src/blua/lualib.h | 3 + src/sdl/Srb2SDL-vc10.vcxproj | 3 +- src/sdl/Srb2SDL-vc10.vcxproj.filters | 5 +- 7 files changed, 322 insertions(+), 2 deletions(-) create mode 100644 src/blua/ldblib.c diff --git a/src/blua/CMakeLists.txt b/src/blua/CMakeLists.txt index 892bf534a..21278f2bb 100644 --- a/src/blua/CMakeLists.txt +++ b/src/blua/CMakeLists.txt @@ -1,6 +1,7 @@ target_sources(SRB2SDL2 PRIVATE lapi.c lbaselib.c + ldblib.c ldo.c lfunc.c linit.c diff --git a/src/blua/Sourcefile b/src/blua/Sourcefile index dae943109..2b6b96366 100644 --- a/src/blua/Sourcefile +++ b/src/blua/Sourcefile @@ -1,6 +1,7 @@ lapi.c lbaselib.c ldo.c +ldblib.c lfunc.c linit.c liolib.c diff --git a/src/blua/ldblib.c b/src/blua/ldblib.c new file mode 100644 index 000000000..2eacef929 --- /dev/null +++ b/src/blua/ldblib.c @@ -0,0 +1,310 @@ +/* +** $Id: ldblib.c,v 1.104.1.4 2009/08/04 18:50:18 roberto Exp $ +** Interface from Lua to its debug API +** See Copyright Notice in lua.h +*/ + + +#include +#include +#include + +#define ldblib_c +#define LUA_LIB + +#include "lua.h" + +#include "lauxlib.h" +#include "lualib.h" + + + +static void settabss (lua_State *L, const char *i, const char *v) { + lua_pushstring(L, v); + lua_setfield(L, -2, i); +} + + +static void settabsi (lua_State *L, const char *i, int v) { + lua_pushinteger(L, v); + lua_setfield(L, -2, i); +} + + +static lua_State *getthread (lua_State *L, int *arg) { + if (lua_isthread(L, 1)) { + *arg = 1; + return lua_tothread(L, 1); + } + else { + *arg = 0; + return L; + } +} + + +static void treatstackoption (lua_State *L, lua_State *L1, const char *fname) { + if (L == L1) { + lua_pushvalue(L, -2); + lua_remove(L, -3); + } + else + lua_xmove(L1, L, 1); + lua_setfield(L, -2, fname); +} + + +static int db_getinfo (lua_State *L) { + lua_Debug ar; + int arg; + lua_State *L1 = getthread(L, &arg); + const char *options = luaL_optstring(L, arg+2, "flnSu"); + if (lua_isnumber(L, arg+1)) { + if (!lua_getstack(L1, (int)lua_tointeger(L, arg+1), &ar)) { + lua_pushnil(L); /* level out of range */ + return 1; + } + } + else if (lua_isfunction(L, arg+1)) { + lua_pushfstring(L, ">%s", options); + options = lua_tostring(L, -1); + lua_pushvalue(L, arg+1); + lua_xmove(L, L1, 1); + } + else + return luaL_argerror(L, arg+1, "function or level expected"); + if (!lua_getinfo(L1, options, &ar)) + return luaL_argerror(L, arg+2, "invalid option"); + lua_createtable(L, 0, 2); + if (strchr(options, 'S')) { + settabss(L, "source", ar.source); + settabss(L, "short_src", ar.short_src); + settabsi(L, "linedefined", ar.linedefined); + settabsi(L, "lastlinedefined", ar.lastlinedefined); + settabss(L, "what", ar.what); + } + if (strchr(options, 'l')) + settabsi(L, "currentline", ar.currentline); + if (strchr(options, 'u')) + settabsi(L, "nups", ar.nups); + if (strchr(options, 'n')) { + settabss(L, "name", ar.name); + settabss(L, "namewhat", ar.namewhat); + } + if (strchr(options, 'L')) + treatstackoption(L, L1, "activelines"); + if (strchr(options, 'f')) + treatstackoption(L, L1, "func"); + return 1; /* return table */ +} + + +static int db_getlocal (lua_State *L) { + int arg; + lua_State *L1 = getthread(L, &arg); + lua_Debug ar; + const char *name; + if (!lua_getstack(L1, luaL_checkint(L, arg+1), &ar)) /* out of range? */ + return luaL_argerror(L, arg+1, "level out of range"); + name = lua_getlocal(L1, &ar, luaL_checkint(L, arg+2)); + if (name) { + lua_xmove(L1, L, 1); + lua_pushstring(L, name); + lua_pushvalue(L, -2); + return 2; + } + else { + lua_pushnil(L); + return 1; + } +} + + +static int auxupvalue (lua_State *L, int get) { + const char *name; + int n = luaL_checkint(L, 2); + luaL_checktype(L, 1, LUA_TFUNCTION); + if (lua_iscfunction(L, 1)) return 0; /* cannot touch C upvalues from Lua */ + name = get ? lua_getupvalue(L, 1, n) : lua_setupvalue(L, 1, n); + if (name == NULL) return 0; + lua_pushstring(L, name); + lua_insert(L, -(get+1)); + return get + 1; +} + + +static int db_getupvalue (lua_State *L) { + return auxupvalue(L, 1); +} + + + +static char KEY_HOOK = 'h'; + + +static void hookf (lua_State *L, lua_Debug *ar) { + static const char *const hooknames[] = + {"call", "return", "line", "count", "tail return"}; + lua_pushlightuserdata(L, (void *)&KEY_HOOK); + lua_rawget(L, LUA_REGISTRYINDEX); + lua_pushlightuserdata(L, L); + lua_rawget(L, -2); + if (lua_isfunction(L, -1)) { + lua_pushstring(L, hooknames[(int)ar->event]); + if (ar->currentline >= 0) + lua_pushinteger(L, ar->currentline); + else lua_pushnil(L); + lua_assert(lua_getinfo(L, "lS", ar)); + lua_call(L, 2, 0); + } +} + + +static int makemask (const char *smask, int count) { + int mask = 0; + if (strchr(smask, 'c')) mask |= LUA_MASKCALL; + if (strchr(smask, 'r')) mask |= LUA_MASKRET; + if (strchr(smask, 'l')) mask |= LUA_MASKLINE; + if (count > 0) mask |= LUA_MASKCOUNT; + return mask; +} + + +static char *unmakemask (int mask, char *smask) { + int i = 0; + if (mask & LUA_MASKCALL) smask[i++] = 'c'; + if (mask & LUA_MASKRET) smask[i++] = 'r'; + if (mask & LUA_MASKLINE) smask[i++] = 'l'; + smask[i] = '\0'; + return smask; +} + + +static void gethooktable (lua_State *L) { + lua_pushlightuserdata(L, (void *)&KEY_HOOK); + lua_rawget(L, LUA_REGISTRYINDEX); + if (!lua_istable(L, -1)) { + lua_pop(L, 1); + lua_createtable(L, 0, 1); + lua_pushlightuserdata(L, (void *)&KEY_HOOK); + lua_pushvalue(L, -2); + lua_rawset(L, LUA_REGISTRYINDEX); + } +} + + +static int db_sethook (lua_State *L) { + int arg, mask, count; + lua_Hook func; + lua_State *L1 = getthread(L, &arg); + if (lua_isnoneornil(L, arg+1)) { + lua_settop(L, arg+1); + func = NULL; mask = 0; count = 0; /* turn off hooks */ + } + else { + const char *smask = luaL_checkstring(L, arg+2); + luaL_checktype(L, arg+1, LUA_TFUNCTION); + count = luaL_optint(L, arg+3, 0); + func = hookf; mask = makemask(smask, count); + } + gethooktable(L); + lua_pushlightuserdata(L, L1); + lua_pushvalue(L, arg+1); + lua_rawset(L, -3); /* set new hook */ + lua_pop(L, 1); /* remove hook table */ + lua_sethook(L1, func, mask, count); /* set hooks */ + return 0; +} + + +static int db_gethook (lua_State *L) { + int arg; + lua_State *L1 = getthread(L, &arg); + char buff[5]; + int mask = lua_gethookmask(L1); + lua_Hook hook = lua_gethook(L1); + if (hook != NULL && hook != hookf) /* external hook? */ + lua_pushliteral(L, "external hook"); + else { + gethooktable(L); + lua_pushlightuserdata(L, L1); + lua_rawget(L, -2); /* get hook */ + lua_remove(L, -2); /* remove hook table */ + } + lua_pushstring(L, unmakemask(mask, buff)); + lua_pushinteger(L, lua_gethookcount(L1)); + return 3; +} + + +#define LEVELS1 12 /* size of the first part of the stack */ +#define LEVELS2 10 /* size of the second part of the stack */ + +static int db_errorfb (lua_State *L) { + int level; + int firstpart = 1; /* still before eventual `...' */ + int arg; + lua_State *L1 = getthread(L, &arg); + lua_Debug ar; + if (lua_isnumber(L, arg+2)) { + level = (int)lua_tointeger(L, arg+2); + lua_pop(L, 1); + } + else + level = (L == L1) ? 1 : 0; /* level 0 may be this own function */ + if (lua_gettop(L) == arg) + lua_pushliteral(L, ""); + else if (!lua_isstring(L, arg+1)) return 1; /* message is not a string */ + else lua_pushliteral(L, "\n"); + lua_pushliteral(L, "stack traceback:"); + while (lua_getstack(L1, level++, &ar)) { + if (level > LEVELS1 && firstpart) { + /* no more than `LEVELS2' more levels? */ + if (!lua_getstack(L1, level+LEVELS2, &ar)) + level--; /* keep going */ + else { + lua_pushliteral(L, "\n\t..."); /* too many levels */ + while (lua_getstack(L1, level+LEVELS2, &ar)) /* find last levels */ + level++; + } + firstpart = 0; + continue; + } + lua_pushliteral(L, "\n\t"); + lua_getinfo(L1, "Snl", &ar); + lua_pushfstring(L, "%s:", ar.short_src); + if (ar.currentline > 0) + lua_pushfstring(L, "%d:", ar.currentline); + if (*ar.namewhat != '\0') /* is there a name? */ + lua_pushfstring(L, " in function " LUA_QS, ar.name); + else { + if (*ar.what == 'm') /* main? */ + lua_pushfstring(L, " in main chunk"); + else if (*ar.what == 'C' || *ar.what == 't') + lua_pushliteral(L, " ?"); /* C function or tail call */ + else + lua_pushfstring(L, " in function <%s:%d>", + ar.short_src, ar.linedefined); + } + lua_concat(L, lua_gettop(L) - arg); + } + lua_concat(L, lua_gettop(L) - arg); + return 1; +} + + +static const luaL_Reg dblib[] = { + {"gethook", db_gethook}, + {"getinfo", db_getinfo}, + {"getlocal", db_getlocal}, + {"getupvalue", db_getupvalue}, + {"sethook", db_sethook}, + {"traceback", db_errorfb}, + {NULL, NULL} +}; + + +LUALIB_API int luaopen_debug (lua_State *L) { + luaL_register(L, LUA_DBLIBNAME, dblib); + return 1; +} diff --git a/src/blua/linit.c b/src/blua/linit.c index dcf05d9f2..392d45dce 100644 --- a/src/blua/linit.c +++ b/src/blua/linit.c @@ -20,6 +20,7 @@ static const luaL_Reg lualibs[] = { {LUA_IOLIBNAME, luaopen_io}, {LUA_OSLIBNAME, luaopen_os}, {LUA_STRLIBNAME, luaopen_string}, + {LUA_DBLIBNAME, luaopen_debug}, {NULL, NULL} }; diff --git a/src/blua/lualib.h b/src/blua/lualib.h index 7127e4d77..70facb70c 100644 --- a/src/blua/lualib.h +++ b/src/blua/lualib.h @@ -30,6 +30,9 @@ LUALIB_API int (luaopen_os) (lua_State *L); #define LUA_STRLIBNAME "string" LUALIB_API int (luaopen_string) (lua_State *L); +#define LUA_DBLIBNAME "debug" +LUALIB_API int (luaopen_debug) (lua_State *L); + /* open all previous libraries */ LUALIB_API void (luaL_openlibs) (lua_State *L); diff --git a/src/sdl/Srb2SDL-vc10.vcxproj b/src/sdl/Srb2SDL-vc10.vcxproj index 86ffa7082..8026cd3ac 100644 --- a/src/sdl/Srb2SDL-vc10.vcxproj +++ b/src/sdl/Srb2SDL-vc10.vcxproj @@ -447,6 +447,7 @@ + @@ -641,4 +642,4 @@ - \ No newline at end of file + diff --git a/src/sdl/Srb2SDL-vc10.vcxproj.filters b/src/sdl/Srb2SDL-vc10.vcxproj.filters index d2f9d018f..bbfca04d4 100644 --- a/src/sdl/Srb2SDL-vc10.vcxproj.filters +++ b/src/sdl/Srb2SDL-vc10.vcxproj.filters @@ -604,6 +604,9 @@ BLUA + + BLUA + BLUA @@ -1125,4 +1128,4 @@ SDLApp - \ No newline at end of file + From f836f9e145f20186e95290f442f72979ab0c78ee Mon Sep 17 00:00:00 2001 From: MIDIMan Date: Wed, 11 Dec 2024 14:34:52 -0500 Subject: [PATCH 03/83] Add thing argument to P_BlockThingsIterator and P_DoBlockThingsIterate --- src/p_enemy.c | 6 +-- src/p_map.c | 6 +-- src/p_maputl.c | 139 +++++++++++++++++++++++++++++++++++++------------ src/p_maputl.h | 4 +- src/p_mobj.c | 2 +- src/p_user.c | 2 +- 6 files changed, 116 insertions(+), 43 deletions(-) diff --git a/src/p_enemy.c b/src/p_enemy.c index 59ca95409..46c1cf50d 100644 --- a/src/p_enemy.c +++ b/src/p_enemy.c @@ -5582,7 +5582,7 @@ void A_MinusDigging(mobj_t *actor) minus = actor; - P_DoBlockThingsIterate(xl, yl, xh, yh, PIT_MinusCarry); + P_DoBlockThingsIterate(xl, yl, xh, yh, PIT_MinusCarry, minus); } else { @@ -13726,7 +13726,7 @@ void A_DustDevilThink(mobj_t *actor) dustdevil = actor; - P_DoBlockThingsIterate(xl, yl, xh, yh, PIT_DustDevilLaunch); + P_DoBlockThingsIterate(xl, yl, xh, yh, PIT_DustDevilLaunch, dustdevil); //Whirlwind sound effect. if (leveltime % 70 == 0) @@ -13842,7 +13842,7 @@ void A_TNTExplode(mobj_t *actor) barrel = actor; - P_DoBlockThingsIterate(xl, yl, xh, yh, PIT_TNTExplode); + P_DoBlockThingsIterate(xl, yl, xh, yh, PIT_TNTExplode, barrel); // cause a quake -- P_StartQuake does not exist yet epicenter.x = actor->x; diff --git a/src/p_map.c b/src/p_map.c index 1116ae06a..126dd5b5f 100644 --- a/src/p_map.c +++ b/src/p_map.c @@ -2264,7 +2264,7 @@ boolean P_CheckPosition(mobj_t *thing, fixed_t x, fixed_t y) for (bx = xl; bx <= xh; bx++) for (by = yl; by <= yh; by++) { - if (!P_BlockThingsIterator(bx, by, PIT_CheckThing)) + if (!P_BlockThingsIterator(bx, by, PIT_CheckThing, tmthing)) blockval = false; else tmhitthing = tmfloorthing; @@ -2883,7 +2883,7 @@ boolean P_TryMove(mobj_t *thing, fixed_t x, fixed_t y, boolean allowdropoff) standx = x; standy = y; - P_DoBlockThingsIterate(xl, yl, xh, yh, PIT_PushableMoved); + P_DoBlockThingsIterate(xl, yl, xh, yh, PIT_PushableMoved, stand); } // Link the thing into its new position @@ -4229,7 +4229,7 @@ void P_RadiusAttack(mobj_t *spot, mobj_t *source, fixed_t damagedist, UINT8 dama bombdamagetype = damagetype; bombsightcheck = sightcheck; - P_DoBlockThingsIterate(xl, yl, xh, yh, PIT_RadiusAttack); + P_DoBlockThingsIterate(xl, yl, xh, yh, PIT_RadiusAttack, bombspot); } // diff --git a/src/p_maputl.c b/src/p_maputl.c index f10a396a3..e23872276 100644 --- a/src/p_maputl.c +++ b/src/p_maputl.c @@ -1050,10 +1050,14 @@ boolean P_BlockLinesIterator(INT32 x, INT32 y, boolean (*func)(line_t *)) // // P_BlockThingsIterator // -boolean P_BlockThingsIterator(INT32 x, INT32 y, boolean (*func)(mobj_t *)) +boolean P_BlockThingsIterator(INT32 x, INT32 y, boolean (*func)(mobj_t *), mobj_t *thing) { mobj_t *bnext = NULL; blocknode_t *block, *next = NULL; + + boolean checkthing = false; + if (thing) + checkthing = true; if (x < 0 || y < 0 || x >= bmapwidth || y >= bmapheight) return true; @@ -1071,7 +1075,7 @@ boolean P_BlockThingsIterator(INT32 x, INT32 y, boolean (*func)(mobj_t *)) return false; } - if (P_MobjWasRemoved(tmthing) // func just popped our tmthing, cannot continue. + if ((checkthing && P_MobjWasRemoved(thing)) // func just popped our tmthing, cannot continue. || (bnext && P_MobjWasRemoved(bnext))) // func just broke blockmap chain, cannot continue. { P_SetTarget(&bnext, NULL); @@ -1084,13 +1088,13 @@ boolean P_BlockThingsIterator(INT32 x, INT32 y, boolean (*func)(mobj_t *)) return true; } -boolean P_DoBlockThingsIterate(int x1, int y1, int x2, int y2, boolean (*func)(mobj_t *)) +boolean P_DoBlockThingsIterate(int x1, int y1, int x2, int y2, boolean (*func)(mobj_t *), mobj_t *thing) { boolean status = true; for (INT32 bx = x1; bx <= x2; bx++) for (INT32 by = y1; by <= y2; by++) - if (!P_BlockThingsIterator(bx, by, func)) + if (!P_BlockThingsIterator(bx, by, func, thing)) status = false; return status; @@ -1463,7 +1467,7 @@ boolean P_PathTraverse(fixed_t px1, fixed_t py1, fixed_t px2, fixed_t py2, INT32 flags, traverser_t trav) { fixed_t xt1, yt1, xt2, yt2; - fixed_t xstep, ystep, partial, xintercept, yintercept; + fixed_t xstep, ystep, partialx, partialy, xintercept, yintercept; INT32 mapx, mapy, mapxstep, mapystep, count; earlyout = flags & PT_EARLYOUT; @@ -1481,57 +1485,83 @@ boolean P_PathTraverse(fixed_t px1, fixed_t py1, fixed_t px2, fixed_t py2, trace.y = py1; trace.dx = px2 - px1; trace.dy = py2 - py1; - - px1 -= bmaporgx; - py1 -= bmaporgy; - xt1 = (unsigned)px1>>MAPBLOCKSHIFT; - yt1 = (unsigned)py1>>MAPBLOCKSHIFT; - - px2 -= bmaporgx; - py2 -= bmaporgy; - xt2 = (unsigned)px2>>MAPBLOCKSHIFT; - yt2 = (unsigned)py2>>MAPBLOCKSHIFT; + + xt1 = px1>>MAPBLOCKSHIFT; + yt1 = py2>>MAPBLOCKSHIFT; + px1 = (unsigned)(px1 - bmaporgx); + py1 = (unsigned)(py1 - bmaporgy); + + xt2 = px2>>MAPBLOCKSHIFT; + yt2 = py2>>MAPBLOCKSHIFT; + px2 = (unsigned)(px2 - bmaporgx); + py2 = (unsigned)(py2 - bmaporgy); if (xt2 > xt1) { mapxstep = 1; - partial = FRACUNIT - ((px1>>MAPBTOFRAC) & FRACMASK); + partialx = FRACUNIT - (((unsigned)px1>>MAPBTOFRAC) & FRACMASK); ystep = FixedDiv(py2 - py1, abs(px2 - px1)); } else if (xt2 < xt1) { mapxstep = -1; - partial = (px1>>MAPBTOFRAC) & FRACMASK; + partialx = ((unsigned)px1>>MAPBTOFRAC) & FRACMASK; ystep = FixedDiv(py2 - py1, abs(px2 - px1)); } else { mapxstep = 0; - partial = FRACUNIT; + partialx = FRACUNIT; ystep = 256*FRACUNIT; } - yintercept = (py1>>MAPBTOFRAC) + FixedMul(partial, ystep); + yintercept = ((unsigned)py1>>MAPBTOFRAC) + FixedMul(partialx, ystep); if (yt2 > yt1) { mapystep = 1; - partial = FRACUNIT - ((py1>>MAPBTOFRAC) & FRACMASK); + partialy = FRACUNIT - (((unsigned)py1>>MAPBTOFRAC) & FRACMASK); xstep = FixedDiv(px2 - px1, abs(py2 - py1)); } else if (yt2 < yt1) { mapystep = -1; - partial = (py1>>MAPBTOFRAC) & FRACMASK; + partialy = ((unsigned)py1>>MAPBTOFRAC) & FRACMASK; xstep = FixedDiv(px2 - px1, abs(py2 - py1)); } else { mapystep = 0; - partial = FRACUNIT; + partialy = FRACUNIT; xstep = 256*FRACUNIT; } - xintercept = (px1>>MAPBTOFRAC) + FixedMul(partial, xstep); + xintercept = ((unsigned)px1>>MAPBTOFRAC) + FixedMul(partialy, xstep); + + // [RH] Fix for traces that pass only through blockmap corners. In that case, + // xintercept and yintercept can both be set ahead of mapx and mapy, so the + // for loop would never advance anywhere. + + if (abs(xstep) == 1 && abs(ystep) == 1) + { + if (ystep < 0) + { + partialx = FRACUNIT - partialx; + } + if (xstep < 0) + { + partialy = FRACUNIT - partialy; + } + if (partialx == partialy) + { + xintercept = xt1; + yintercept = yt1; + } + } + + xt1 = (unsigned)px1>>MAPBLOCKSHIFT; + yt1 = (unsigned)py1>>MAPBLOCKSHIFT; + xt2 = (unsigned)px2>>MAPBLOCKSHIFT; + yt2 = (unsigned)py2>>MAPBLOCKSHIFT; // Step through map blocks. // Count is present to prevent a round off error @@ -1546,21 +1576,64 @@ boolean P_PathTraverse(fixed_t px1, fixed_t py1, fixed_t px2, fixed_t py2, return false; // early out if (flags & PT_ADDTHINGS) - if (!P_BlockThingsIterator(mapx, mapy, PIT_AddThingIntercepts)) + if (!P_BlockThingsIterator(mapx, mapy, PIT_AddThingIntercepts, NULL)) return false; // early out - if (mapx == xt2 && mapy == yt2) + // both coordinates reached the end, so end the traversing. + if ((mapxstep | mapystep) == 0) break; - if ((yintercept >> FRACBITS) == mapy) + // [RH] Handle corner cases properly instead of pretending they don't exist. + switch ((((yintercept >> FRACBITS) == mapy) << 1) | ((xintercept >> FRACBITS) == mapx)) { - yintercept += ystep; - mapx += mapxstep; - } - else if ((xintercept >> FRACBITS) == mapx) - { - xintercept += xstep; - mapy += mapystep; + case 0: // neither xintercept nor yintercept match! + count = 64; // Stop traversing, because somebody screwed up. + break; + + case 1: // xintercept matches + xintercept += xstep; + mapy += mapystep; + if (mapy == yt2) + mapystep = 0; + break; + + case 2: // yintercept matches + yintercept += ystep; + mapx += mapxstep; + if (mapx == xt2) + mapxstep = 0; + break; + + case 3: // xintercept and yintercept both match + // The trace is exiting a block through its corner. Not only does the block + // being entered need to be checked (which will happen when this loop + // continues), but the other two blocks adjacent to the corner also need to + // be checked. + if (flags & PT_ADDLINES) + { + if (!P_BlockLinesIterator(mapx + mapxstep, mapy, PIT_AddLineIntercepts)) + return false; // early out + if (!P_BlockLinesIterator(mapx, mapy + mapystep, PIT_AddLineIntercepts)) + return false; // early out + } + + if (flags & PT_ADDTHINGS) + { + if (!P_BlockThingsIterator(mapx + mapxstep, mapy, PIT_AddThingIntercepts, NULL)) + return false; // early out + if (!P_BlockThingsIterator(mapx, mapy + mapystep, PIT_AddThingIntercepts, NULL)) + return false; // early out + } + + xintercept += xstep; + yintercept += ystep; + mapx += mapxstep; + mapy += mapystep; + if (mapx == xt2) + mapxstep = 0; + if (mapy == yt2) + mapystep = 0; + break; } } // Go through the sorted list diff --git a/src/p_maputl.h b/src/p_maputl.h index 67f7fd086..11cc90c59 100644 --- a/src/p_maputl.h +++ b/src/p_maputl.h @@ -61,7 +61,7 @@ extern ffloor_t *openfloorrover, *openceilingrover; void P_LineOpening(line_t *plinedef, mobj_t *mobj); boolean P_BlockLinesIterator(INT32 x, INT32 y, boolean(*func)(line_t *)); -boolean P_BlockThingsIterator(INT32 x, INT32 y, boolean(*func)(mobj_t *)); +boolean P_BlockThingsIterator(INT32 x, INT32 y, boolean(*func)(mobj_t *), mobj_t *thing); void P_ClearBlockNodes(void); @@ -94,7 +94,7 @@ typedef struct bthingit_s bthingit_t *P_NewBlockThingsIterator(int x1, int y1, int x2, int y2); mobj_t *P_BlockThingsIteratorNext(bthingit_t *it, boolean centeronly); void P_FreeBlockThingsIterator(bthingit_t *it); -boolean P_DoBlockThingsIterate(int x1, int y1, int x2, int y2, boolean (*func)(mobj_t *)); +boolean P_DoBlockThingsIterate(int x1, int y1, int x2, int y2, boolean (*func)(mobj_t *), mobj_t *thing); #define PT_ADDLINES 1 #define PT_ADDTHINGS 2 diff --git a/src/p_mobj.c b/src/p_mobj.c index fb9e7d78e..014ae4fab 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -9342,7 +9342,7 @@ static void P_PointPushThink(mobj_t *mobj) yl = (unsigned)(mobj->y - radius - bmaporgy - MAXRADIUS)>>MAPBLOCKSHIFT; yh = (unsigned)(mobj->y + radius - bmaporgy + MAXRADIUS)>>MAPBLOCKSHIFT; - P_DoBlockThingsIterate(xl, yl, xh, yh, PIT_PushThing); + P_DoBlockThingsIterate(xl, yl, xh, yh, PIT_PushThing, pushmobj); } static boolean P_MobjRegularThink(mobj_t *mobj) diff --git a/src/p_user.c b/src/p_user.c index a2bae228b..080ff6dbf 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -4126,7 +4126,7 @@ static void P_DoTeeter(player_t *player) teeteryl = teeteryh = player->mo->y; couldteeter = false; solidteeter = teeter; - if (!P_DoBlockThingsIterate(xl, yl, xh, yh, PIT_CheckSolidsTeeter)) + if (!P_DoBlockThingsIterate(xl, yl, xh, yh, PIT_CheckSolidsTeeter, tmthing)) goto teeterdone; // we've found something that stops us teetering at all teeterdone: teeter = solidteeter; From 14d5e3f75d1b26a3ebb248df69819855fff3c208 Mon Sep 17 00:00:00 2001 From: MIDIMan Date: Tue, 17 Dec 2024 16:26:53 -0500 Subject: [PATCH 04/83] Replace tmthing in P_BlockThingsIterator with thing --- src/p_maputl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/p_maputl.c b/src/p_maputl.c index 313af9514..3e30c5d6e 100644 --- a/src/p_maputl.c +++ b/src/p_maputl.c @@ -1069,7 +1069,7 @@ boolean P_BlockThingsIterator(INT32 x, INT32 y, boolean (*func)(mobj_t *), mobj_ if (!func(block->mobj)) return false; - if (checkthing && P_MobjWasRemoved(tmthing)) // func just popped our tmthing, cannot continue. + if (checkthing && P_MobjWasRemoved(thing)) // func just popped our tmthing, cannot continue. return true; } From 1152c8c41e1d736961cdf218a13be8d53004310a Mon Sep 17 00:00:00 2001 From: Lach Date: Tue, 31 Dec 2024 17:53:28 +1100 Subject: [PATCH 05/83] Fix wall transfer cap for slopes with angles beyond the first quadrant --- src/p_slopes.c | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/src/p_slopes.c b/src/p_slopes.c index 7f070e2a1..63671605b 100644 --- a/src/p_slopes.c +++ b/src/p_slopes.c @@ -1046,15 +1046,37 @@ fixed_t P_GetWallTransferMomZ(mobj_t *mo, pslope_t *slope) { vector3_t slopemom, axis; angle_t ang; + angle_t advanceAng = ANG15; + const boolean upwards = (slope->zangle < ANGLE_180); if (slope->flags & SL_NOPHYSICS) return 0; // If there's physics, time for launching. // Doesn't kill the vertical momentum as much as P_SlopeLaunch does. - ang = slope->zangle + ANG15*((slope->zangle > 0) ? 1 : -1); - if (ang > ANGLE_90 && ang < ANGLE_180) - ang = ((slope->zangle > 0) ? ANGLE_90 : InvAngle(ANGLE_90)); // hard cap of directly upwards + ang = slope->zangle; + + // for the time being, let's pretend the slope inclines upwards only + if (!upwards) + { + ang += ANGLE_180; + } + + // angles past 90 degrees need to shrink to get closer to 90 degrees + if (ang > ANGLE_90) + { + advanceAng = InvAngle(advanceAng); + } + + // now we set the actual final angle + if ((ang > ANGLE_90) != (ang + advanceAng > ANGLE_90)) // does advancing the angle push it past directly upwards? + { + ang = (upwards ? ANGLE_90 : InvAngle(ANGLE_90)); // hard cap of directly upwards + } + else + { + ang = slope->zangle + advanceAng; + } slopemom.x = mo->momx; slopemom.y = mo->momy; From 33ebe47816e0d828deed54125b89970cc99e9ba9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustaf=20Alh=C3=A4ll?= Date: Mon, 6 Jan 2025 13:42:22 +0100 Subject: [PATCH 06/83] Use software's BSP node traversal in OpenGL --- src/hardware/hw_main.c | 50 +++++++++++++++--------------------------- 1 file changed, 18 insertions(+), 32 deletions(-) diff --git a/src/hardware/hw_main.c b/src/hardware/hw_main.c index da8965454..e9fb599d3 100644 --- a/src/hardware/hw_main.c +++ b/src/hardware/hw_main.c @@ -2669,47 +2669,33 @@ static void HWR_Subsector(size_t num) // BP: big hack for a test in lighning ref : 1249753487AB fixed_t *hwbbox; -static void HWR_RenderBSPNode(INT32 bspnum) +void HWR_RenderBSPNode(INT32 bspnum) { - node_t *bsp = &nodes[bspnum]; - - // Decide which side the view point is on + node_t *bsp; INT32 side; ps_numbspcalls.value.i++; - // Found a subsector? - if (bspnum & NF_SUBSECTOR) + while (!(bspnum & NF_SUBSECTOR)) // Found a subsector? { - if (bspnum == -1) - { - //*(gl_drawsubsector_p++) = 0; - HWR_Subsector(0); - } - else - { - //*(gl_drawsubsector_p++) = bspnum&(~NF_SUBSECTOR); - HWR_Subsector(bspnum&(~NF_SUBSECTOR)); - } - return; - } + bsp = &nodes[bspnum]; - // Decide which side the view point is on. - side = R_PointOnSide(viewx, viewy, bsp); - - // BP: big hack for a test in lighning ref : 1249753487AB - hwbbox = bsp->bbox[side]; - - // Recursively divide front space. - HWR_RenderBSPNode(bsp->children[side]); - - // Possibly divide back space. - if (HWR_CheckBBox(bsp->bbox[side^1])) - { + // Decide which side the view point is on. + side = R_PointOnSide(viewx, viewy, bsp); // BP: big hack for a test in lighning ref : 1249753487AB - hwbbox = bsp->bbox[side^1]; - HWR_RenderBSPNode(bsp->children[side^1]); + hwbbox = bsp->bbox[side]; + // Recursively divide front space. + HWR_RenderBSPNode(bsp->children[side]); + + // Possibly divide back space. + + if (!HWR_CheckBBox(bsp->bbox[side^1])) + return; + + bspnum = bsp->children[side^1]; } + + HWR_Subsector(bspnum == -1 ? 0 : bspnum & ~NF_SUBSECTOR); } // ========================================================================== From 3097b8c0d92c487c927fbc8edc02f0c3ac9f0fe3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustaf=20Alh=C3=A4ll?= Date: Mon, 6 Jan 2025 14:06:31 +0100 Subject: [PATCH 07/83] Mark as static --- src/hardware/hw_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hardware/hw_main.c b/src/hardware/hw_main.c index e9fb599d3..c00767e3b 100644 --- a/src/hardware/hw_main.c +++ b/src/hardware/hw_main.c @@ -2669,7 +2669,7 @@ static void HWR_Subsector(size_t num) // BP: big hack for a test in lighning ref : 1249753487AB fixed_t *hwbbox; -void HWR_RenderBSPNode(INT32 bspnum) +static void HWR_RenderBSPNode(INT32 bspnum) { node_t *bsp; INT32 side; From 369c327e7cf699069dbc50b799012a30309eb6ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustaf=20Alh=C3=A4ll?= Date: Tue, 14 Jan 2025 18:56:35 +0100 Subject: [PATCH 08/83] Clean up d_net.c and push back missed acks to acktosend --- src/netcode/d_net.c | 60 ++++++++++----------------------------------- src/netcode/d_net.h | 1 - 2 files changed, 13 insertions(+), 48 deletions(-) diff --git a/src/netcode/d_net.c b/src/netcode/d_net.c index 4860d8688..9718c40b3 100644 --- a/src/netcode/d_net.c +++ b/src/netcode/d_net.c @@ -200,10 +200,9 @@ FUNCMATH static INT32 cmpack(UINT8 a, UINT8 b) /** Sets freeack to a free acknum and copies the netbuffer in the ackpak table * * \param freeack The address to store the free acknum at - * \param lowtimer ??? * \return True if a free acknum was found */ -static boolean GetFreeAcknum(UINT8 *freeack, boolean lowtimer) +static boolean GetFreeAcknum(UINT8 *freeack) { node_t *node = &nodes[doomcom->remotenode]; INT32 numfreeslot = 0; @@ -232,17 +231,8 @@ static boolean GetFreeAcknum(UINT8 *freeack, boolean lowtimer) node->nextacknum++; ackpak[i].destinationnode = (UINT8)(node - nodes); ackpak[i].length = doomcom->datalength; - if (lowtimer) - { - // Lowtime means can't be sent now so try it as soon as possible - ackpak[i].senttime = 0; - ackpak[i].resentnum = 1; - } - else - { - ackpak[i].senttime = I_GetTime(); - ackpak[i].resentnum = 0; - } + ackpak[i].senttime = I_GetTime(); + ackpak[i].resentnum = 0; M_Memcpy(ackpak[i].pak.raw, netbuffer, ackpak[i].length); *freeack = ackpak[i].acknum; @@ -259,38 +249,6 @@ static boolean GetFreeAcknum(UINT8 *freeack, boolean lowtimer) return false; } -/** Counts how many acks are free - * - * \param urgent True if the type of the packet meant to - * use an ack is lower than PT_CANFAIL - * If for some reason you don't want use it - * for any packet type in particular, - * just set to false - * \return The number of free acks - * - */ -INT32 Net_GetFreeAcks(boolean urgent) -{ - INT32 numfreeslot = 0; - INT32 n = 0; // Number of free acks found - - for (INT32 i = 0; i < MAXACKPACKETS; i++) - if (!ackpak[i].acknum) - { - // For low priority packets, make sure to let freeslots so urgent packets can be sent - if (!urgent) - { - numfreeslot++; - if (numfreeslot <= URGENTFREESLOTNUM) - continue; - } - - n++; - } - - return n; -} - // Get a ack to send in the queue of this node static UINT8 GetAcktosend(INT32 node) { @@ -319,7 +277,7 @@ static int Processackpak(void) node->remotefirstack = netbuffer->ackreturn; // Search the ackbuffer and free it for (INT32 i = 0; i < MAXACKPACKETS; i++) - if (ackpak[i].acknum && ackpak[i].destinationnode == node - nodes + if (ackpak[i].acknum && ackpak[i].destinationnode == doomcom->remotenode && cmpack(ackpak[i].acknum, netbuffer->ackreturn) <= 0) { RemoveAck(i); @@ -333,7 +291,15 @@ static int Processackpak(void) getackpacket++; if (cmpack(ack, node->firstacktosend) <= 0) { + UINT8 newhead = (UINT8)((node->acktosend_head+1) % MAXACKTOSEND); DEBFILE(va("Discard(1) ack %d (duplicated)\n", ack)); + if (newhead != node->acktosend_tail) + { + // push the ack back onto the acktosend list to make sure it's responded to + node->acktosend[node->acktosend_head] = ack; + node->acktosend_head = newhead; + } + duppacket++; goodpacket = 1; // Discard packet (duplicate) } @@ -991,7 +957,7 @@ boolean HSendPacket(INT32 node, boolean reliable, UINT8 acknum, size_t packetlen netbuffer->ackreturn = 0; if (reliable) { - if (!GetFreeAcknum(&netbuffer->ack, false)) + if (!GetFreeAcknum(&netbuffer->ack)) return false; } else diff --git a/src/netcode/d_net.h b/src/netcode/d_net.h index 2f83939f8..6b3ee5e67 100644 --- a/src/netcode/d_net.h +++ b/src/netcode/d_net.h @@ -60,7 +60,6 @@ extern netnode_t netnodes[MAXNETNODES]; extern boolean serverrunning; -INT32 Net_GetFreeAcks(boolean urgent); void Net_AckTicker(void); // If reliable return true if packet sent, 0 else From 14020edacf2da5278797cfc66b674d1a3b59505a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustaf=20Alh=C3=A4ll?= Date: Wed, 15 Jan 2025 20:50:40 +0100 Subject: [PATCH 09/83] Clear acktosend when initializing node --- src/netcode/d_net.c | 32 ++++++++------------------------ 1 file changed, 8 insertions(+), 24 deletions(-) diff --git a/src/netcode/d_net.c b/src/netcode/d_net.c index 9718c40b3..4d3144008 100644 --- a/src/netcode/d_net.c +++ b/src/netcode/d_net.c @@ -266,9 +266,9 @@ static void RemoveAck(INT32 i) } // We have got a packet, proceed the ack request and ack return -static int Processackpak(void) +static boolean Processackpak(void) { - int goodpacket = 0; + boolean goodpacket = true; node_t *node = &nodes[doomcom->remotenode]; // Received an ack return, so remove the ack in the list @@ -291,17 +291,9 @@ static int Processackpak(void) getackpacket++; if (cmpack(ack, node->firstacktosend) <= 0) { - UINT8 newhead = (UINT8)((node->acktosend_head+1) % MAXACKTOSEND); DEBFILE(va("Discard(1) ack %d (duplicated)\n", ack)); - if (newhead != node->acktosend_tail) - { - // push the ack back onto the acktosend list to make sure it's responded to - node->acktosend[node->acktosend_head] = ack; - node->acktosend_head = newhead; - } - duppacket++; - goodpacket = 1; // Discard packet (duplicate) + goodpacket = false; // Discard packet (duplicate) } else { @@ -311,10 +303,10 @@ static int Processackpak(void) { DEBFILE(va("Discard(2) ack %d (duplicated)\n", ack)); duppacket++; - goodpacket = 1; // Discard packet (duplicate) + goodpacket = false; // Discard packet (duplicate) break; } - if (goodpacket == 0) + if (goodpacket) { // Is a good packet so increment the acknowledge number, // Then search for a "hole" in the queue @@ -375,13 +367,12 @@ static int Processackpak(void) else // Buffer full discard packet, sender will resend it { // We can admit the packet but we will not detect the duplication after :( DEBFILE("no more freeackret\n"); - goodpacket = 2; + goodpacket = false; } } } } } - // return values: 0 = ok, 1 = duplicate, 2 = out of order return goodpacket; } @@ -559,6 +550,7 @@ void Net_WaitAllAckReceived(UINT32 timeout) static void InitNode(node_t *node) { node->acktosend_head = node->acktosend_tail = 0; + memset(node->acktosend, 0, sizeof(node->acktosend)); node->firstacktosend = 0; node->nextacknum = 1; node->remotefirstack = 0; @@ -1023,7 +1015,6 @@ boolean HGetPacket(void) while(true) { //nodejustjoined = I_NetGet(); - int goodpacket; I_NetGet(); if (doomcom->remotenode == -1) // No packet received @@ -1069,15 +1060,8 @@ boolean HGetPacket(void) }*/ // Proceed the ack and ackreturn field - goodpacket = Processackpak(); - if (goodpacket != 0) - { - // resend the ACK in case the previous ACK didn't reach the client. - // prevents the client's netbuffer from locking up. - if (goodpacket == 1) - Net_SendAcks(doomcom->remotenode); + if (!Processackpak()) continue; // discarded (duplicated) - } // A packet with just ackreturn if (netbuffer->packettype == PT_NOTHING) From 07738b61d2ac4d882f65f70271989f1655a25c03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustaf=20Alh=C3=A4ll?= Date: Thu, 16 Jan 2025 00:17:57 +0100 Subject: [PATCH 10/83] Remove acktosend --- src/netcode/d_net.c | 170 +++++--------------------------------------- 1 file changed, 18 insertions(+), 152 deletions(-) diff --git a/src/netcode/d_net.c b/src/netcode/d_net.c index 4d3144008..4a76a3136 100644 --- a/src/netcode/d_net.c +++ b/src/netcode/d_net.c @@ -163,12 +163,6 @@ typedef struct // ack return to send (like sliding window protocol) UINT8 firstacktosend; - // when no consecutive packets are received we keep in mind what packets - // we already received in a queue - UINT8 acktosend_head; - UINT8 acktosend_tail; - UINT8 acktosend[MAXACKTOSEND]; - // automatically send keep alive packet when not enough trafic tic_t lasttimeacktosend_sent; // detect connection lost @@ -297,114 +291,28 @@ static boolean Processackpak(void) } else { - // Check if it is not already in the queue - for (INT32 i = node->acktosend_tail; i != node->acktosend_head; i = (i+1) % MAXACKTOSEND) - if (node->acktosend[i] == ack) - { - DEBFILE(va("Discard(2) ack %d (duplicated)\n", ack)); - duppacket++; - goodpacket = false; // Discard packet (duplicate) - break; - } - if (goodpacket) + // Is a good packet so increment the acknowledge number, + // Then search for a "hole" in the queue + UINT8 nextfirstack = (UINT8)(node->firstacktosend + 1); + if (!nextfirstack) + nextfirstack = 1; + + if (ack == nextfirstack) { - // Is a good packet so increment the acknowledge number, - // Then search for a "hole" in the queue - UINT8 nextfirstack = (UINT8)(node->firstacktosend + 1); - if (!nextfirstack) - nextfirstack = 1; - - if (ack == nextfirstack) - { - UINT8 hm1; // head - 1 - boolean change = true; - - node->firstacktosend = nextfirstack++; - if (!nextfirstack) - nextfirstack = 1; - hm1 = (UINT8)((node->acktosend_head-1+MAXACKTOSEND) % MAXACKTOSEND); - while (change) - { - change = false; - for (INT32 i = node->acktosend_tail; i != node->acktosend_head; - i = (i+1) % MAXACKTOSEND) - { - if (cmpack(node->acktosend[i], nextfirstack) <= 0) - { - if (node->acktosend[i] == nextfirstack) - { - node->firstacktosend = nextfirstack++; - if (!nextfirstack) - nextfirstack = 1; - change = true; - } - if (i == node->acktosend_tail) - { - node->acktosend[node->acktosend_tail] = 0; - node->acktosend_tail = (UINT8)((i+1) % MAXACKTOSEND); - } - else if (i == hm1) - { - node->acktosend[hm1] = 0; - node->acktosend_head = hm1; - hm1 = (UINT8)((hm1-1+MAXACKTOSEND) % MAXACKTOSEND); - } - } - } - } - } - else // Out of order packet - { - // Don't increment firsacktosend, put it in asktosend queue - // Will be incremented when the nextfirstack comes (code above) - UINT8 newhead = (UINT8)((node->acktosend_head+1) % MAXACKTOSEND); - DEBFILE(va("out of order packet (%d expected)\n", nextfirstack)); - if (newhead != node->acktosend_tail) - { - node->acktosend[node->acktosend_head] = ack; - node->acktosend_head = newhead; - } - else // Buffer full discard packet, sender will resend it - { // We can admit the packet but we will not detect the duplication after :( - DEBFILE("no more freeackret\n"); - goodpacket = false; - } - } + node->firstacktosend = nextfirstack; + } + else // Out of order packet + { + // Don't increment firsacktosend, put it in asktosend queue + // Will be incremented when the nextfirstack comes (code above) + DEBFILE(va("out of order packet (%d expected)\n", nextfirstack)); + goodpacket = false; } } } return goodpacket; } -// send special packet with only ack on it -void Net_SendAcks(INT32 node) -{ - netbuffer->packettype = PT_NOTHING; - M_Memcpy(netbuffer->u.textcmd, nodes[node].acktosend, MAXACKTOSEND); - HSendPacket(node, false, 0, MAXACKTOSEND); -} - -static void GotAcks(void) -{ - for (INT32 j = 0; j < MAXACKTOSEND; j++) - if (netbuffer->u.textcmd[j]) - for (INT32 i = 0; i < MAXACKPACKETS; i++) - if (ackpak[i].acknum && ackpak[i].destinationnode == doomcom->remotenode) - { - if (ackpak[i].acknum == netbuffer->u.textcmd[j]) - RemoveAck(i); - // nextacknum is first equal to acknum, then when receiving bigger ack - // there is big chance the packet is lost - // When resent, nextacknum = nodes[node].nextacknum - // will redo the same but with different value - else if (cmpack(ackpak[i].nextacknum, netbuffer->u.textcmd[j]) <= 0 - && ackpak[i].senttime > 0) - { - ackpak[i].senttime--; // hurry up - } - } -} - void Net_ConnectionTimeout(INT32 node) { // Don't timeout several times @@ -458,11 +366,6 @@ void Net_AckTicker(void) // This is something like node open flag if (nodes[i].firstacktosend) { - // We haven't sent a packet for a long time - // Acknowledge packet if needed - if (nodes[i].lasttimeacktosend_sent + ACKTOSENDTIMEOUT < I_GetTime()) - Net_SendAcks(i); - if (!(nodes[i].flags & NF_CLOSE) && nodes[i].lasttimepacketreceived + connectiontimeout < I_GetTime()) { @@ -476,37 +379,12 @@ void Net_AckTicker(void) // (the higher layer doesn't have room, or something else ....) void Net_UnAcknowledgePacket(INT32 node) { - INT32 hm1 = (nodes[node].acktosend_head-1+MAXACKTOSEND) % MAXACKTOSEND; DEBFILE(va("UnAcknowledge node %d\n", node)); if (!node) return; - if (nodes[node].acktosend[hm1] == netbuffer->ack) - { - nodes[node].acktosend[hm1] = 0; - nodes[node].acktosend_head = (UINT8)hm1; - } - else if (nodes[node].firstacktosend == netbuffer->ack) - { - nodes[node].firstacktosend--; - if (!nodes[node].firstacktosend) - nodes[node].firstacktosend = UINT8_MAX; - } - else - { - while (nodes[node].firstacktosend != netbuffer->ack) - { - nodes[node].acktosend_tail = (UINT8) - ((nodes[node].acktosend_tail-1+MAXACKTOSEND) % MAXACKTOSEND); - nodes[node].acktosend[nodes[node].acktosend_tail] = nodes[node].firstacktosend; - - nodes[node].firstacktosend--; - if (!nodes[node].firstacktosend) - nodes[node].firstacktosend = UINT8_MAX; - } - nodes[node].firstacktosend++; - if (!nodes[node].firstacktosend) - nodes[node].firstacktosend = 1; - } + nodes[node].firstacktosend--; + if (!nodes[node].firstacktosend) + nodes[node].firstacktosend = UINT8_MAX; } /** Checks if all acks have been received @@ -549,8 +427,6 @@ void Net_WaitAllAckReceived(UINT32 timeout) static void InitNode(node_t *node) { - node->acktosend_head = node->acktosend_tail = 0; - memset(node->acktosend, 0, sizeof(node->acktosend)); node->firstacktosend = 0; node->nextacknum = 1; node->remotefirstack = 0; @@ -609,13 +485,6 @@ void Net_CloseConnection(INT32 node) nodes[node].flags |= NF_CLOSE; - // try to Send ack back (two army problem) - if (GetAcktosend(node)) - { - Net_SendAcks(node); - Net_SendAcks(node); - } - // check if we are waiting for an ack from this node for (INT32 i = 0; i < MAXACKPACKETS; i++) if (ackpak[i].acknum && ackpak[i].destinationnode == node) @@ -1065,10 +934,7 @@ boolean HGetPacket(void) // A packet with just ackreturn if (netbuffer->packettype == PT_NOTHING) - { - GotAcks(); continue; - } break; } From 3578f17373012cee5f6af024b0c63406a6741e9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustaf=20Alh=C3=A4ll?= Date: Thu, 16 Jan 2025 18:18:27 +0100 Subject: [PATCH 11/83] Fix short freeze when disconnecting from a server --- src/netcode/d_net.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/netcode/d_net.c b/src/netcode/d_net.c index 4a76a3136..a28d45bb0 100644 --- a/src/netcode/d_net.c +++ b/src/netcode/d_net.c @@ -485,6 +485,13 @@ void Net_CloseConnection(INT32 node) nodes[node].flags |= NF_CLOSE; + if (server) + { + // send a PT_NOTHING back to acknowledge the packet + netbuffer->packettype = PT_NOTHING; + HSendPacket(node, false, 0, 0); + } + // check if we are waiting for an ack from this node for (INT32 i = 0; i < MAXACKPACKETS; i++) if (ackpak[i].acknum && ackpak[i].destinationnode == node) From 094dfe9fba1d5c7a664b568bd8275096e6651111 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustaf=20Alh=C3=A4ll?= Date: Sat, 18 Jan 2025 10:18:32 +0100 Subject: [PATCH 12/83] Fix crash when listing servers in the MS --- src/netcode/d_net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/netcode/d_net.c b/src/netcode/d_net.c index a28d45bb0..a3a47b950 100644 --- a/src/netcode/d_net.c +++ b/src/netcode/d_net.c @@ -485,7 +485,7 @@ void Net_CloseConnection(INT32 node) nodes[node].flags |= NF_CLOSE; - if (server) + if (nodes[node].firstacktosend) { // send a PT_NOTHING back to acknowledge the packet netbuffer->packettype = PT_NOTHING; From 8cbcbf8cf9b412947568c229c8ddb99d894a2b6e Mon Sep 17 00:00:00 2001 From: Hanicef Date: Sun, 26 Jan 2025 12:16:01 +0100 Subject: [PATCH 13/83] Fix address resolution failure in certain circumstances --- src/netcode/i_tcp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/netcode/i_tcp.c b/src/netcode/i_tcp.c index 256d9992e..00e50186e 100644 --- a/src/netcode/i_tcp.c +++ b/src/netcode/i_tcp.c @@ -1129,7 +1129,7 @@ static SINT8 SOCK_NetMakeNodewPort(const char *address, const char *port) DEBFILE(va("Creating new node: %s@%s\n", address, port)); memset (&hints, 0x00, sizeof (hints)); - hints.ai_flags = 0; + hints.ai_flags = AI_ADDRCONFIG; hints.ai_family = AF_UNSPEC; hints.ai_socktype = SOCK_DGRAM; hints.ai_protocol = IPPROTO_UDP; @@ -1159,7 +1159,7 @@ static SINT8 SOCK_NetMakeNodewPort(const char *address, const char *port) } } - if (i < mysocketses) + if (i >= mysocketses) runp = runp->ai_next; else break; From bfadb0333320d7c88007282e1cddc921260827e5 Mon Sep 17 00:00:00 2001 From: Lactozilla Date: Mon, 27 Jan 2025 16:27:16 -0300 Subject: [PATCH 14/83] Fix ripple effect in scaled planes --- src/r_plane.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/r_plane.c b/src/r_plane.c index a0de048ea..053cfe921 100644 --- a/src/r_plane.c +++ b/src/r_plane.c @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2024 by Sonic Team Junior. +// Copyright (C) 1999-2025 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. @@ -182,8 +182,8 @@ static void R_MapPlane(INT32 y, INT32 x1, INT32 x2) R_CalculatePlaneRipple(currentplane->viewangle + currentplane->plangle); - ds_xfrac += planeripple.xfrac; - ds_yfrac += planeripple.yfrac; + ds_xfrac += FixedMul(planeripple.xfrac, currentplane->xscale); + ds_yfrac += FixedMul(planeripple.yfrac, currentplane->yscale); ds_bgofs >>= FRACBITS; if ((y + ds_bgofs) >= viewheight) From 37ce0043f1590e2babe9c94cc470917a1abe7336 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Mon, 27 Jan 2025 23:10:30 +0000 Subject: [PATCH 15/83] GitLabCI: install g++ --- .gitlab/ci/jobs/batocera-arm64-makefile.yml | 2 +- .gitlab/ci/jobs/batocera-arm64.yml | 2 +- .gitlab/ci/jobs/debian-oldstable-amd64-makefile.yml | 2 +- .gitlab/ci/jobs/debian-oldstable-amd64.yml | 2 +- .gitlab/ci/jobs/debian-oldstable-arm64-makefile.yml | 2 +- .gitlab/ci/jobs/debian-oldstable-arm64.yml | 2 +- .gitlab/ci/jobs/debian-stable-amd64-makefile.yml | 3 ++- .gitlab/ci/jobs/debian-stable-amd64.yml | 3 ++- .gitlab/ci/jobs/debian-stable-arm64-makefile.yml | 3 ++- .gitlab/ci/jobs/debian-stable-arm64.yml | 3 ++- .gitlab/ci/jobs/debian-stable-i386-makefile.yml | 3 ++- .gitlab/ci/jobs/debian-stable-i386.yml | 3 ++- .gitlab/ci/jobs/debian-testing-gcc-amd64-makefile.yml | 3 ++- .gitlab/ci/jobs/debian-testing-gcc-amd64.yml | 3 ++- .gitlab/ci/jobs/windows-x64-makefile.yml | 2 +- .gitlab/ci/jobs/windows-x64.yml | 2 +- .gitlab/ci/jobs/windows-x86.yml | 2 +- 17 files changed, 25 insertions(+), 17 deletions(-) diff --git a/.gitlab/ci/jobs/batocera-arm64-makefile.yml b/.gitlab/ci/jobs/batocera-arm64-makefile.yml index 9a590807d..c38f46b7d 100644 --- a/.gitlab/ci/jobs/batocera-arm64-makefile.yml +++ b/.gitlab/ci/jobs/batocera-arm64-makefile.yml @@ -16,7 +16,7 @@ batocera:arm64 Makefile: - - | # apt_toolchain echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - - apt-get install gcc-aarch64-linux-gnu || apt-get install gcc + - apt-get install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu || apt-get install gcc g++ - | # apt_toolchain echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" diff --git a/.gitlab/ci/jobs/batocera-arm64.yml b/.gitlab/ci/jobs/batocera-arm64.yml index c83a5badb..bae3afa44 100644 --- a/.gitlab/ci/jobs/batocera-arm64.yml +++ b/.gitlab/ci/jobs/batocera-arm64.yml @@ -16,7 +16,7 @@ batocera:arm64: - - | # apt_toolchain echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - - apt-get install gcc-aarch64-linux-gnu || apt-get install gcc + - apt-get install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu || apt-get install gcc g++ - | # apt_toolchain echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" diff --git a/.gitlab/ci/jobs/debian-oldstable-amd64-makefile.yml b/.gitlab/ci/jobs/debian-oldstable-amd64-makefile.yml index ba2e745bd..cdd67c1c1 100644 --- a/.gitlab/ci/jobs/debian-oldstable-amd64-makefile.yml +++ b/.gitlab/ci/jobs/debian-oldstable-amd64-makefile.yml @@ -18,7 +18,7 @@ Debian oldstable:amd64 Makefile: - - | # apt_toolchain echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - - apt-get install gcc-x86-64-linux-gnu || apt-get install gcc + - apt-get install gcc-x86-64-linux-gnu g++-x86-64-linux-gnu || apt-get install gcc g++ - | # apt_toolchain echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" diff --git a/.gitlab/ci/jobs/debian-oldstable-amd64.yml b/.gitlab/ci/jobs/debian-oldstable-amd64.yml index 32c7f3e40..8a9669228 100644 --- a/.gitlab/ci/jobs/debian-oldstable-amd64.yml +++ b/.gitlab/ci/jobs/debian-oldstable-amd64.yml @@ -18,7 +18,7 @@ Debian oldstable:amd64: - - | # apt_toolchain echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - - apt-get install gcc-x86-64-linux-gnu || apt-get install gcc + - apt-get install gcc-x86-64-linux-gnu g++-x86-64-linux-gnu || apt-get install gcc g++ - | # apt_toolchain echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" diff --git a/.gitlab/ci/jobs/debian-oldstable-arm64-makefile.yml b/.gitlab/ci/jobs/debian-oldstable-arm64-makefile.yml index 79e282bc6..f33f91da6 100644 --- a/.gitlab/ci/jobs/debian-oldstable-arm64-makefile.yml +++ b/.gitlab/ci/jobs/debian-oldstable-arm64-makefile.yml @@ -18,7 +18,7 @@ Debian oldstable:arm64 Makefile: - - | # apt_toolchain echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - - apt-get install gcc-aarch64-linux-gnu || apt-get install gcc + - apt-get install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu || apt-get install g++ - | # apt_toolchain echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" diff --git a/.gitlab/ci/jobs/debian-oldstable-arm64.yml b/.gitlab/ci/jobs/debian-oldstable-arm64.yml index 4bf324e3b..579de0f37 100644 --- a/.gitlab/ci/jobs/debian-oldstable-arm64.yml +++ b/.gitlab/ci/jobs/debian-oldstable-arm64.yml @@ -18,7 +18,7 @@ Debian oldstable:arm64: - - | # apt_toolchain echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - - apt-get install gcc-aarch64-linux-gnu || apt-get install gcc + - apt-get install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu || apt-get install gcc g++ - | # apt_toolchain echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" diff --git a/.gitlab/ci/jobs/debian-stable-amd64-makefile.yml b/.gitlab/ci/jobs/debian-stable-amd64-makefile.yml index 6dfe176cd..f68d796e6 100644 --- a/.gitlab/ci/jobs/debian-stable-amd64-makefile.yml +++ b/.gitlab/ci/jobs/debian-stable-amd64-makefile.yml @@ -12,6 +12,7 @@ Debian stable:amd64 Makefile: variables: CC: x86_64-linux-gnu-gcc + CXX: x86_64-linux-gnu-g++ LDFLAGS: -Wl,-fuse-ld=gold OBJCOPY: x86_64-linux-gnu-objcopy OBJDUMP: x86_64-linux-gnu-objdump @@ -23,7 +24,7 @@ Debian stable:amd64 Makefile: - - | # apt_toolchain echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - - apt-get install gcc-x86-64-linux-gnu || apt-get install gcc + - apt-get install gcc-x86-64-linux-gnu g++-x86-64-linux-gnu || apt-get install gcc g++ - | # apt_toolchain echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" diff --git a/.gitlab/ci/jobs/debian-stable-amd64.yml b/.gitlab/ci/jobs/debian-stable-amd64.yml index 533a3151d..a14832d13 100644 --- a/.gitlab/ci/jobs/debian-stable-amd64.yml +++ b/.gitlab/ci/jobs/debian-stable-amd64.yml @@ -12,6 +12,7 @@ Debian stable:amd64: variables: CC: x86_64-linux-gnu-gcc + CXX: x86_64-linux-gnu-g++ LDFLAGS: -Wl,-fuse-ld=gold OBJCOPY: x86_64-linux-gnu-objcopy OBJDUMP: x86_64-linux-gnu-objdump @@ -23,7 +24,7 @@ Debian stable:amd64: - - | # apt_toolchain echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - - apt-get install gcc-x86-64-linux-gnu || apt-get install gcc + - apt-get install gcc-x86-64-linux-gnu g++-x86-64-linux-gnu || apt-get install gcc g++ - | # apt_toolchain echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" diff --git a/.gitlab/ci/jobs/debian-stable-arm64-makefile.yml b/.gitlab/ci/jobs/debian-stable-arm64-makefile.yml index d932e9f42..b4aadb6d9 100644 --- a/.gitlab/ci/jobs/debian-stable-arm64-makefile.yml +++ b/.gitlab/ci/jobs/debian-stable-arm64-makefile.yml @@ -14,6 +14,7 @@ Debian stable:arm64 Makefile: variables: CC: aarch64-linux-gnu-gcc + CXX: aarch64-linux-gnu-g++ LDFLAGS: -Wl,-fuse-ld=gold OBJCOPY: aarch64-linux-gnu-objcopy OBJDUMP: aarch64-linux-gnu-objdump @@ -24,7 +25,7 @@ Debian stable:arm64 Makefile: - - | # apt_toolchain echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - - apt-get install gcc-aarch64-linux-gnu || apt-get install gcc + - apt-get install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu || apt-get install gcc g++ - | # apt_toolchain echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" diff --git a/.gitlab/ci/jobs/debian-stable-arm64.yml b/.gitlab/ci/jobs/debian-stable-arm64.yml index db82ee38a..fd3d86c1c 100644 --- a/.gitlab/ci/jobs/debian-stable-arm64.yml +++ b/.gitlab/ci/jobs/debian-stable-arm64.yml @@ -14,6 +14,7 @@ Debian stable:arm64: variables: CC: aarch64-linux-gnu-gcc + CXX: aarch64-linux-gnu-g++ LDFLAGS: -Wl,-fuse-ld=gold OBJCOPY: aarch64-linux-gnu-objcopy OBJDUMP: aarch64-linux-gnu-objdump @@ -24,7 +25,7 @@ Debian stable:arm64: - - | # apt_toolchain echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - - apt-get install gcc-aarch64-linux-gnu || apt-get install gcc + - apt-get install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu || apt-get install gcc g++ - | # apt_toolchain echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" diff --git a/.gitlab/ci/jobs/debian-stable-i386-makefile.yml b/.gitlab/ci/jobs/debian-stable-i386-makefile.yml index bbabee4a6..5c7f11c5b 100644 --- a/.gitlab/ci/jobs/debian-stable-i386-makefile.yml +++ b/.gitlab/ci/jobs/debian-stable-i386-makefile.yml @@ -14,6 +14,7 @@ Debian stable:i386 Makefile: variables: CC: i686-linux-gnu-gcc + CXX: i686-linux-gnu-g++ OBJCOPY: i686-linux-gnu-objcopy OBJDUMP: i686-linux-gnu-objdump LD: i686-linux-gnu-ld @@ -23,7 +24,7 @@ Debian stable:i386 Makefile: - - | # apt_toolchain echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - - apt-get install gcc-i686-linux-gnu || apt-get install gcc + - apt-get install gcc-i686-linux-gnu g++-i686-linux-gnu || apt-get install gcc g++ - | # apt_toolchain echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" diff --git a/.gitlab/ci/jobs/debian-stable-i386.yml b/.gitlab/ci/jobs/debian-stable-i386.yml index 8d9ea4964..282f3a04e 100644 --- a/.gitlab/ci/jobs/debian-stable-i386.yml +++ b/.gitlab/ci/jobs/debian-stable-i386.yml @@ -14,6 +14,7 @@ Debian stable:i386: variables: CC: i686-linux-gnu-gcc + CXX: i686-linux-gnu-g++ OBJCOPY: i686-linux-gnu-objcopy OBJDUMP: i686-linux-gnu-objdump LD: i686-linux-gnu-ld @@ -23,7 +24,7 @@ Debian stable:i386: - - | # apt_toolchain echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - - apt-get install gcc-i686-linux-gnu || apt-get install gcc + - apt-get install gcc-i686-linux-gnu g++-i686-linux-gnu || apt-get install gcc g++ - | # apt_toolchain echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" diff --git a/.gitlab/ci/jobs/debian-testing-gcc-amd64-makefile.yml b/.gitlab/ci/jobs/debian-testing-gcc-amd64-makefile.yml index 5edaddf33..30970b49f 100644 --- a/.gitlab/ci/jobs/debian-testing-gcc-amd64-makefile.yml +++ b/.gitlab/ci/jobs/debian-testing-gcc-amd64-makefile.yml @@ -18,13 +18,14 @@ Debian testing GCC Makefile: variables: CC: gcc + CXX: g++ LDFLAGS: -Wl,-fuse-ld=gold script: - - | # apt_toolchain echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - - apt-get install gcc + - apt-get install gcc g++ - | # apt_toolchain echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" diff --git a/.gitlab/ci/jobs/debian-testing-gcc-amd64.yml b/.gitlab/ci/jobs/debian-testing-gcc-amd64.yml index 458c6d1ef..66ce5152f 100644 --- a/.gitlab/ci/jobs/debian-testing-gcc-amd64.yml +++ b/.gitlab/ci/jobs/debian-testing-gcc-amd64.yml @@ -18,13 +18,14 @@ Debian testing GCC: variables: CC: gcc + CXX: g++ LDFLAGS: -Wl,-fuse-ld=gold script: - - | # apt_toolchain echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - - apt-get install gcc + - apt-get install gcc g++ - | # apt_toolchain echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" diff --git a/.gitlab/ci/jobs/windows-x64-makefile.yml b/.gitlab/ci/jobs/windows-x64-makefile.yml index f28fa219c..23d7177ef 100644 --- a/.gitlab/ci/jobs/windows-x64-makefile.yml +++ b/.gitlab/ci/jobs/windows-x64-makefile.yml @@ -21,7 +21,7 @@ Windows x64 Makefile: - - | # apt_toolchain echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - - apt-get install gcc-mingw-w64-x86-64-win32 + - apt-get install gcc-mingw-w64-x86-64-win32 g++-mingw-w64-x86-64-win32 - | # apt_toolchain echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" diff --git a/.gitlab/ci/jobs/windows-x64.yml b/.gitlab/ci/jobs/windows-x64.yml index 180fa773c..1c8f9c09c 100644 --- a/.gitlab/ci/jobs/windows-x64.yml +++ b/.gitlab/ci/jobs/windows-x64.yml @@ -21,7 +21,7 @@ Windows x64: - - | # apt_toolchain echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - - apt-get install gcc-mingw-w64-x86-64-win32 + - apt-get install gcc-mingw-w64-x86-64-win32 g++-mingw-w64-x86-64-win32 - | # apt_toolchain echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" diff --git a/.gitlab/ci/jobs/windows-x86.yml b/.gitlab/ci/jobs/windows-x86.yml index 2d8855085..5c0b8d6bc 100644 --- a/.gitlab/ci/jobs/windows-x86.yml +++ b/.gitlab/ci/jobs/windows-x86.yml @@ -68,7 +68,7 @@ Windows x86: - - | # apt_toolchain echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - - apt-get install gcc-mingw-w64-i686-win32 + - apt-get install gcc-mingw-w64-i686-win32 g++-mingw-w64-i686-win32 - | # apt_toolchain echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" From 2da8aea8992b40d3fa831929c1e7a1ff0b194a71 Mon Sep 17 00:00:00 2001 From: Lactozilla Date: Tue, 28 Jan 2025 16:07:29 -0300 Subject: [PATCH 16/83] Fix #1394 --- src/d_player.h | 4 ++-- src/r_skins.c | 15 ++++++++++++--- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/d_player.h b/src/d_player.h index cdb547d3b..c096ecd9f 100644 --- a/src/d_player.h +++ b/src/d_player.h @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2024 by Sonic Team Junior. +// Copyright (C) 1999-2025 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. @@ -49,7 +49,7 @@ typedef enum SF_FASTEDGE = 1<<13, // Faster edge teeter? SF_MULTIABILITY = 1<<14, // Revenge of Final Demo. SF_NONIGHTSROTATION = 1<<15, // Disable sprite rotation for NiGHTS - SF_NONIGHTSSUPER = 1<<16, // Disable super colors for NiGHTS (if you have SF_SUPER) + SF_NONIGHTSSUPER = 1<<16, // Disable super sprites and colors for NiGHTS SF_NOSUPERSPRITES = 1<<17, // Don't use super sprites while super SF_NOSUPERJUMPBOOST = 1<<18, // Disable the jump boost given while super (i.e. Knuckles) SF_CANBUSTWALLS = 1<<19, // Can naturally bust walls on contact? (i.e. Knuckles) diff --git a/src/r_skins.c b/src/r_skins.c index f364273e8..842350d26 100644 --- a/src/r_skins.c +++ b/src/r_skins.c @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2024 by Sonic Team Junior. +// Copyright (C) 1999-2025 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. @@ -80,10 +80,19 @@ UINT16 P_ApplySuperFlagToSprite2(UINT16 spr2, mobj_t *mobj) { if (mobj->player) { - if (mobj->player->charflags & SF_NOSUPERSPRITES || (mobj->player->powers[pw_carry] == CR_NIGHTSMODE && (mobj->player->charflags & SF_NONIGHTSSUPER))) + boolean is_nights = mobj->player->powers[pw_carry] == CR_NIGHTSMODE; + + if (mobj->player->charflags & SF_NOSUPERSPRITES || (is_nights && (mobj->player->charflags & SF_NONIGHTSSUPER))) spr2 &= ~SPR2F_SUPER; - else if (mobj->player->powers[pw_super] || (mobj->player->powers[pw_carry] == CR_NIGHTSMODE && (mobj->player->charflags & SF_SUPER))) + else if (mobj->player->powers[pw_super] || (is_nights && (mobj->player->charflags & SF_SUPER))) spr2 |= SPR2F_SUPER; + + // Special case for transforming when you are NiGHTS. + // Do NOT apply the super sprites in this situation, even if they exist. + if (is_nights && mobj->state >= &states[S_PLAY_NIGHTS_TRANS1] && mobj->state <= &states[S_PLAY_NIGHTS_TRANS6]) + { + spr2 &= ~SPR2F_SUPER; + } } if (spr2 & SPR2F_SUPER) From 68588a4a46ec46c235c45928a5111ec6dde25453 Mon Sep 17 00:00:00 2001 From: Lactozilla Date: Tue, 28 Jan 2025 16:53:30 -0300 Subject: [PATCH 17/83] Fix #1393 --- src/lua_baselib.c | 5 ++++- src/p_setup.c | 6 +++--- src/p_spec.c | 14 +++++++------ src/r_textures.c | 52 ++++++++++++++++------------------------------- src/r_textures.h | 6 ++---- 5 files changed, 34 insertions(+), 49 deletions(-) diff --git a/src/lua_baselib.c b/src/lua_baselib.c index ecd1ee55e..1ffa3968b 100644 --- a/src/lua_baselib.c +++ b/src/lua_baselib.c @@ -3166,7 +3166,10 @@ static int lib_rCheckTextureNumForName(lua_State *L) { const char *name = luaL_checkstring(L, 1); //HUDSAFE - lua_pushinteger(L, R_CheckTextureNumForName(name)); + INT32 num = R_CheckTextureNumForName(name, TEXTURETYPE_TEXTURE); + if (num == -1) + num = R_CheckTextureNumForName(name, TEXTURETYPE_FLAT); + lua_pushinteger(L, num); return 1; } diff --git a/src/p_setup.c b/src/p_setup.c index c2b8f2db2..247587e11 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -609,15 +609,15 @@ Ploadflat (levelflat_t *levelflat, const char *flatname, boolean resize) levelflat->type = LEVELFLAT_TEXTURE; // Look for a flat - int texturenum = R_CheckFlatNumForName(levelflat->name); + int texturenum = R_CheckTextureNumForName(levelflat->name, TEXTURETYPE_FLAT); if (texturenum < 0) { // If we can't find a flat, try looking for a texture! - texturenum = R_CheckTextureNumForName(levelflat->name); + texturenum = R_CheckTextureNumForName(levelflat->name, TEXTURETYPE_TEXTURE); if (texturenum < 0) { // Use "not found" texture - texturenum = R_CheckTextureNumForName("REDWALL"); + texturenum = R_CheckTextureNumForName("REDWALL", TEXTURETYPE_TEXTURE); // Give up? if (texturenum < 0) diff --git a/src/p_spec.c b/src/p_spec.c index 93809cbb4..649f63518 100644 --- a/src/p_spec.c +++ b/src/p_spec.c @@ -135,22 +135,24 @@ void P_ParseAnimationDefintion(SINT8 istexture); static boolean P_FindTextureForAnimation(anim_t *anim, animdef_t *animdef) { - if (R_CheckTextureNumForName(animdef->startname) == -1) + INT32 start = R_CheckTextureNumForName(animdef->startname, TEXTURETYPE_TEXTURE); + if (start == -1) return false; - anim->picnum = R_TextureNumForName(animdef->endname); - anim->basepic = R_TextureNumForName(animdef->startname); + anim->basepic = start; + anim->picnum = R_CheckTextureNumForName(animdef->endname, TEXTURETYPE_TEXTURE); return true; } static boolean P_FindFlatForAnimation(anim_t *anim, animdef_t *animdef) { - if (R_CheckFlatNumForName(animdef->startname) == -1) + INT32 start = R_CheckTextureNumForName(animdef->startname, TEXTURETYPE_FLAT); + if (start == -1) return false; - anim->picnum = R_CheckFlatNumForName(animdef->endname); - anim->basepic = R_CheckFlatNumForName(animdef->startname); + anim->basepic = start; + anim->picnum = R_CheckTextureNumForName(animdef->endname, TEXTURETYPE_FLAT); return true; } diff --git a/src/r_textures.c b/src/r_textures.c index 4c52f75eb..4dc6bbae4 100644 --- a/src/r_textures.c +++ b/src/r_textures.c @@ -925,7 +925,7 @@ Rloadtextures (INT32 i, INT32 w) // printf("\"%s\" (wad: %u, lump: %u) is a single patch, dimensions %d x %d\n",W_CheckNameForNumPwad(wadnum,lumpnum),wadnum,lumpnum,width,height); - R_AddSinglePatchTexture(i, wadnum, lumpnum, width, height, TEXTURETYPE_SINGLEPATCH); + R_AddSinglePatchTexture(i, wadnum, lumpnum, width, height, TEXTURETYPE_TEXTURE); i++; } @@ -1494,7 +1494,7 @@ static texture_t *R_ParseTexture(boolean actuallyLoadTexture) resultTexture->hash = quickncasehash(newTextureName, 8); resultTexture->width = newTextureWidth; resultTexture->height = newTextureHeight; - resultTexture->type = TEXTURETYPE_COMPOSITE; + resultTexture->type = TEXTURETYPE_TEXTURE; } Z_Free(texturesToken); texturesToken = M_GetToken(NULL); @@ -1680,7 +1680,7 @@ static void AddTextureToCache(const char *name, UINT32 hash, INT32 id, UINT8 typ // // Check whether texture is available. Filter out NoTexture indicator. // -INT32 R_CheckTextureNumForName(const char *name) +INT32 R_CheckTextureNumForName(const char *name, UINT8 type) { INT32 i; UINT32 hash; @@ -1692,14 +1692,14 @@ INT32 R_CheckTextureNumForName(const char *name) hash = quickncasehash(name, 8); for (i = 0; i < tidcachelen; i++) - if (tidcache[i].hash == hash && !strncasecmp(tidcache[i].name, name, 8)) + if (tidcache[i].type == type && tidcache[i].hash == hash && !strncasecmp(tidcache[i].name, name, 8)) return tidcache[i].id; // Need to parse the list backwards, so textures loaded more recently are used in lieu of ones loaded earlier for (i = numtextures - 1; i >= 0; i--) - if (textures[i]->hash == hash && !strncasecmp(textures[i]->name, name, 8)) + if (textures[i]->type == type && textures[i]->hash == hash && !strncasecmp(textures[i]->name, name, 8)) { - AddTextureToCache(name, hash, i, textures[i]->type); + AddTextureToCache(name, hash, i, type); return i; } @@ -1738,47 +1738,29 @@ const char *R_TextureNameForNum(INT32 num) // // R_TextureNumForName // -// Calls R_CheckTextureNumForName, aborts with error message. +// Calls R_CheckTextureNumForName. Returns REDWALL if not found. // INT32 R_TextureNumForName(const char *name) { - const INT32 i = R_CheckTextureNumForName(name); + INT32 i = R_CheckTextureNumForName(name, TEXTURETYPE_TEXTURE); + // Didn't find it, so look for a flat + if (i == -1) + { + i = R_CheckTextureNumForName(name, TEXTURETYPE_FLAT); + } + + // Still didn't find it, so return REDWALL if (i == -1) { static INT32 redwall = -2; CONS_Debug(DBG_SETUP, "WARNING: R_TextureNumForName: %.8s not found\n", name); if (redwall == -2) - redwall = R_CheckTextureNumForName("REDWALL"); + redwall = R_CheckTextureNumForName("REDWALL", TEXTURETYPE_TEXTURE); if (redwall != -1) return redwall; return 1; } + return i; } - -// Like R_CheckTextureNumForName, but only looks in the flat namespace specifically. -INT32 R_CheckFlatNumForName(const char *name) -{ - INT32 i; - UINT32 hash; - - // "NoTexture" marker. - if (name[0] == '-') - return 0; - - hash = quickncasehash(name, 8); - - for (i = 0; i < tidcachelen; i++) - if (tidcache[i].type == TEXTURETYPE_FLAT && tidcache[i].hash == hash && !strncasecmp(tidcache[i].name, name, 8)) - return tidcache[i].id; - - for (i = numtextures - 1; i >= 0; i--) - if (textures[i]->hash == hash && !strncasecmp(textures[i]->name, name, 8) && textures[i]->type == TEXTURETYPE_FLAT) - { - AddTextureToCache(name, hash, i, TEXTURETYPE_FLAT); - return i; - } - - return -1; -} diff --git a/src/r_textures.h b/src/r_textures.h index 35db40d42..e6985556b 100644 --- a/src/r_textures.h +++ b/src/r_textures.h @@ -40,8 +40,7 @@ typedef struct enum { TEXTURETYPE_UNKNOWN, - TEXTURETYPE_SINGLEPATCH, - TEXTURETYPE_COMPOSITE, + TEXTURETYPE_TEXTURE, TEXTURETYPE_FLAT }; @@ -100,8 +99,7 @@ void R_SetFlatVars(size_t length); // Returns the texture number for the texture name. INT32 R_TextureNumForName(const char *name); -INT32 R_CheckTextureNumForName(const char *name); -INT32 R_CheckFlatNumForName(const char *name); +INT32 R_CheckTextureNumForName(const char *name, UINT8 type); // Returns the texture name for the texture number (in case you ever needed it) const char *R_CheckTextureNameForNum(INT32 num); From aee50849ad5983ec4ce66ad42a390b186a173bed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustaf=20Alh=C3=A4ll?= Date: Wed, 29 Jan 2025 18:51:53 +0100 Subject: [PATCH 18/83] Fix port collision on IPv6 connections --- src/netcode/i_tcp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/netcode/i_tcp.c b/src/netcode/i_tcp.c index 256d9992e..fbe7ec4d2 100644 --- a/src/netcode/i_tcp.c +++ b/src/netcode/i_tcp.c @@ -456,6 +456,8 @@ static boolean SOCK_cmpipv6(mysockaddr_t *a, mysockaddr_t *b, UINT8 mask) { UINT8 bitmask; I_Assert(mask <= 128); + if (mask == 0) + mask = 128; if (memcmp(&a->ip6.sin6_addr.s6_addr, &b->ip6.sin6_addr.s6_addr, mask / 8) != 0) return false; if (mask % 8 == 0) From a172297cfb455c7663812aa367e8616948e112c3 Mon Sep 17 00:00:00 2001 From: Lactozilla Date: Thu, 30 Jan 2025 22:47:26 -0300 Subject: [PATCH 19/83] Fix IT sign always displaying for the tagger in splitscreen --- src/p_user.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/p_user.c b/src/p_user.c index 7cc9c02ae..173bb9731 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -3310,6 +3310,7 @@ static void P_DoPlayerHeadSigns(player_t *player) sign->frame = 2|FF_FULLBRIGHT; } } + } if (!P_MobjWasRemoved(sign) && splitscreen) // Hide the sign from yourself in splitscreen - In single-screen, it wouldn't get spawned if it shouldn't be visible { @@ -3347,7 +3348,6 @@ static void P_DoPlayerHeadSigns(player_t *player) } #endif } - } } // From 571f77e334b200e6606e2458a9a6f614adc308eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustaf=20Alh=C3=A4ll?= Date: Fri, 31 Jan 2025 18:23:36 +0100 Subject: [PATCH 20/83] Fix server never sending TOOLARGE to clients --- src/netcode/d_netfil.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/netcode/d_netfil.c b/src/netcode/d_netfil.c index bfb67838f..252909907 100644 --- a/src/netcode/d_netfil.c +++ b/src/netcode/d_netfil.c @@ -208,8 +208,8 @@ UINT8 *PutFileNeeded(UINT16 firstfile) filestatus += (WILLSEND_NO << 4); // Won't send else if (wadfiles[i]->filesize <= (UINT32)cv_maxsend.value * 1024) filestatus += (WILLSEND_YES << 4); // Will send if requested - // else - // filestatus += (0 << 4); -- Won't send, too big + else + filestatus += (WILLSEND_TOOLARGE << 4); // Won't send, too big } WRITEUINT8(p, filestatus); From 4b281821b1e7bc8bf3dc8379640873991e1e059f Mon Sep 17 00:00:00 2001 From: pastel Date: Fri, 31 Jan 2025 14:57:11 -0600 Subject: [PATCH 21/83] Use state function argument for SF_FASTWAIT code instead of checking mobj->state-states --- src/p_mobj.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/p_mobj.c b/src/p_mobj.c index ec107ff71..9257177cd 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -324,7 +324,7 @@ static boolean P_SetPlayerMobjState(mobj_t *mobj, statenum_t state) mobj->tics = st->tics; // Adjust the player's animation speed - if (mobj->state-states == S_PLAY_WAIT && (player->charflags & SF_FASTWAIT)) + if (state == S_PLAY_WAIT && (player->charflags & SF_FASTWAIT)) mobj->tics = 5; else if (player->panim == PA_EDGE && (player->charflags & SF_FASTEDGE)) mobj->tics = 2; From 666b9b7df437fd9d95f32c5c6701d8af53df7600 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sat, 1 Feb 2025 11:15:38 -0500 Subject: [PATCH 22/83] GitLibCI: installing g++ also installs gcc, one less manually install package --- .gitlab/ci/jobs/alpine-3-gcc-dedicated-makefile.yml | 2 +- .gitlab/ci/jobs/alpine-3-gcc-makefile.yml | 2 +- .gitlab/ci/jobs/alpine-3-gcc.yml | 2 +- .gitlab/ci/jobs/batocera-arm64-makefile.yml | 2 +- .gitlab/ci/jobs/batocera-arm64.yml | 2 +- .gitlab/ci/jobs/debian-oldstable-amd64-makefile.yml | 2 +- .gitlab/ci/jobs/debian-oldstable-amd64.yml | 2 +- .gitlab/ci/jobs/debian-oldstable-arm64-makefile.yml | 2 +- .gitlab/ci/jobs/debian-oldstable-arm64.yml | 2 +- .gitlab/ci/jobs/debian-stable-amd64-makefile.yml | 2 +- .gitlab/ci/jobs/debian-stable-amd64.yml | 2 +- .gitlab/ci/jobs/debian-stable-arm64-makefile.yml | 2 +- .gitlab/ci/jobs/debian-stable-arm64.yml | 2 +- .gitlab/ci/jobs/debian-stable-i386-makefile.yml | 2 +- .gitlab/ci/jobs/debian-stable-i386.yml | 2 +- .gitlab/ci/jobs/debian-testing-gcc-amd64-makefile.yml | 2 +- .gitlab/ci/jobs/debian-testing-gcc-amd64.yml | 2 +- .gitlab/ci/jobs/windows-x64-makefile.yml | 2 +- .gitlab/ci/jobs/windows-x64.yml | 2 +- .gitlab/ci/jobs/windows-x86-makefile.yml | 2 +- .gitlab/ci/jobs/windows-x86.yml | 2 +- 21 files changed, 21 insertions(+), 21 deletions(-) diff --git a/.gitlab/ci/jobs/alpine-3-gcc-dedicated-makefile.yml b/.gitlab/ci/jobs/alpine-3-gcc-dedicated-makefile.yml index fe63e09c8..5d875d865 100644 --- a/.gitlab/ci/jobs/alpine-3-gcc-dedicated-makefile.yml +++ b/.gitlab/ci/jobs/alpine-3-gcc-dedicated-makefile.yml @@ -12,7 +12,7 @@ Alpine 3 GCC Dedicated Makefile: - - | # apk_toolchain echo -e "\e[0Ksection_start:`date +%s`:apk_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - - apk add gcc g++ + - apk add g++ - | # apk_toolchain echo -e "\e[0Ksection_end:`date +%s`:apk_toolchain\r\e[0K" diff --git a/.gitlab/ci/jobs/alpine-3-gcc-makefile.yml b/.gitlab/ci/jobs/alpine-3-gcc-makefile.yml index 2cc656ca7..6b0b6a06f 100644 --- a/.gitlab/ci/jobs/alpine-3-gcc-makefile.yml +++ b/.gitlab/ci/jobs/alpine-3-gcc-makefile.yml @@ -95,7 +95,7 @@ Alpine 3 GCC Makefile: - - | # apk_toolchain echo -e "\e[0Ksection_start:`date +%s`:apk_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - - apk add gcc g++ + - apk add g++ - | # apk_toolchain echo -e "\e[0Ksection_end:`date +%s`:apk_toolchain\r\e[0K" diff --git a/.gitlab/ci/jobs/alpine-3-gcc.yml b/.gitlab/ci/jobs/alpine-3-gcc.yml index 1881bf3c2..522b88ae3 100644 --- a/.gitlab/ci/jobs/alpine-3-gcc.yml +++ b/.gitlab/ci/jobs/alpine-3-gcc.yml @@ -95,7 +95,7 @@ Alpine 3 GCC: - - | # apk_toolchain echo -e "\e[0Ksection_start:`date +%s`:apk_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - - apk add gcc g++ + - apk add g++ - | # apk_toolchain echo -e "\e[0Ksection_end:`date +%s`:apk_toolchain\r\e[0K" diff --git a/.gitlab/ci/jobs/batocera-arm64-makefile.yml b/.gitlab/ci/jobs/batocera-arm64-makefile.yml index c38f46b7d..e02497d40 100644 --- a/.gitlab/ci/jobs/batocera-arm64-makefile.yml +++ b/.gitlab/ci/jobs/batocera-arm64-makefile.yml @@ -16,7 +16,7 @@ batocera:arm64 Makefile: - - | # apt_toolchain echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - - apt-get install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu || apt-get install gcc g++ + - apt-get install g++-aarch64-linux-gnu || apt-get install g++ - | # apt_toolchain echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" diff --git a/.gitlab/ci/jobs/batocera-arm64.yml b/.gitlab/ci/jobs/batocera-arm64.yml index bae3afa44..c3b586584 100644 --- a/.gitlab/ci/jobs/batocera-arm64.yml +++ b/.gitlab/ci/jobs/batocera-arm64.yml @@ -16,7 +16,7 @@ batocera:arm64: - - | # apt_toolchain echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - - apt-get install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu || apt-get install gcc g++ + - apt-get install g++-aarch64-linux-gnu || apt-get install g++ - | # apt_toolchain echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" diff --git a/.gitlab/ci/jobs/debian-oldstable-amd64-makefile.yml b/.gitlab/ci/jobs/debian-oldstable-amd64-makefile.yml index cdd67c1c1..bd4a92741 100644 --- a/.gitlab/ci/jobs/debian-oldstable-amd64-makefile.yml +++ b/.gitlab/ci/jobs/debian-oldstable-amd64-makefile.yml @@ -18,7 +18,7 @@ Debian oldstable:amd64 Makefile: - - | # apt_toolchain echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - - apt-get install gcc-x86-64-linux-gnu g++-x86-64-linux-gnu || apt-get install gcc g++ + - apt-get install g++-x86-64-linux-gnu || apt-get install g++ - | # apt_toolchain echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" diff --git a/.gitlab/ci/jobs/debian-oldstable-amd64.yml b/.gitlab/ci/jobs/debian-oldstable-amd64.yml index 8a9669228..ad69dc8dd 100644 --- a/.gitlab/ci/jobs/debian-oldstable-amd64.yml +++ b/.gitlab/ci/jobs/debian-oldstable-amd64.yml @@ -18,7 +18,7 @@ Debian oldstable:amd64: - - | # apt_toolchain echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - - apt-get install gcc-x86-64-linux-gnu g++-x86-64-linux-gnu || apt-get install gcc g++ + - apt-get install ++-x86-64-linux-gnu || apt-get install g++ - | # apt_toolchain echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" diff --git a/.gitlab/ci/jobs/debian-oldstable-arm64-makefile.yml b/.gitlab/ci/jobs/debian-oldstable-arm64-makefile.yml index f33f91da6..426934bf9 100644 --- a/.gitlab/ci/jobs/debian-oldstable-arm64-makefile.yml +++ b/.gitlab/ci/jobs/debian-oldstable-arm64-makefile.yml @@ -18,7 +18,7 @@ Debian oldstable:arm64 Makefile: - - | # apt_toolchain echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - - apt-get install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu || apt-get install g++ + - apt-get install g++-aarch64-linux-gnu || apt-get install g++ - | # apt_toolchain echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" diff --git a/.gitlab/ci/jobs/debian-oldstable-arm64.yml b/.gitlab/ci/jobs/debian-oldstable-arm64.yml index 579de0f37..24db9c807 100644 --- a/.gitlab/ci/jobs/debian-oldstable-arm64.yml +++ b/.gitlab/ci/jobs/debian-oldstable-arm64.yml @@ -18,7 +18,7 @@ Debian oldstable:arm64: - - | # apt_toolchain echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - - apt-get install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu || apt-get install gcc g++ + - apt-get install g++-aarch64-linux-gnu || apt-get install g++ - | # apt_toolchain echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" diff --git a/.gitlab/ci/jobs/debian-stable-amd64-makefile.yml b/.gitlab/ci/jobs/debian-stable-amd64-makefile.yml index f68d796e6..a6aebfac3 100644 --- a/.gitlab/ci/jobs/debian-stable-amd64-makefile.yml +++ b/.gitlab/ci/jobs/debian-stable-amd64-makefile.yml @@ -24,7 +24,7 @@ Debian stable:amd64 Makefile: - - | # apt_toolchain echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - - apt-get install gcc-x86-64-linux-gnu g++-x86-64-linux-gnu || apt-get install gcc g++ + - apt-get install g++-x86-64-linux-gnu || apt-get install g++ - | # apt_toolchain echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" diff --git a/.gitlab/ci/jobs/debian-stable-amd64.yml b/.gitlab/ci/jobs/debian-stable-amd64.yml index a14832d13..a39344db8 100644 --- a/.gitlab/ci/jobs/debian-stable-amd64.yml +++ b/.gitlab/ci/jobs/debian-stable-amd64.yml @@ -24,7 +24,7 @@ Debian stable:amd64: - - | # apt_toolchain echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - - apt-get install gcc-x86-64-linux-gnu g++-x86-64-linux-gnu || apt-get install gcc g++ + - apt-get install g++-x86-64-linux-gnu || apt-get install g++ - | # apt_toolchain echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" diff --git a/.gitlab/ci/jobs/debian-stable-arm64-makefile.yml b/.gitlab/ci/jobs/debian-stable-arm64-makefile.yml index b4aadb6d9..53625138a 100644 --- a/.gitlab/ci/jobs/debian-stable-arm64-makefile.yml +++ b/.gitlab/ci/jobs/debian-stable-arm64-makefile.yml @@ -25,7 +25,7 @@ Debian stable:arm64 Makefile: - - | # apt_toolchain echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - - apt-get install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu || apt-get install gcc g++ + - apt-get install gg++-aarch64-linux-gnu || apt-get install g++ - | # apt_toolchain echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" diff --git a/.gitlab/ci/jobs/debian-stable-arm64.yml b/.gitlab/ci/jobs/debian-stable-arm64.yml index fd3d86c1c..52e6e8603 100644 --- a/.gitlab/ci/jobs/debian-stable-arm64.yml +++ b/.gitlab/ci/jobs/debian-stable-arm64.yml @@ -25,7 +25,7 @@ Debian stable:arm64: - - | # apt_toolchain echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - - apt-get install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu || apt-get install gcc g++ + - apt-get install g++-aarch64-linux-gnu || apt-get install g++ - | # apt_toolchain echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" diff --git a/.gitlab/ci/jobs/debian-stable-i386-makefile.yml b/.gitlab/ci/jobs/debian-stable-i386-makefile.yml index 5c7f11c5b..dd572ec38 100644 --- a/.gitlab/ci/jobs/debian-stable-i386-makefile.yml +++ b/.gitlab/ci/jobs/debian-stable-i386-makefile.yml @@ -24,7 +24,7 @@ Debian stable:i386 Makefile: - - | # apt_toolchain echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - - apt-get install gcc-i686-linux-gnu g++-i686-linux-gnu || apt-get install gcc g++ + - apt-get install g++-i686-linux-gnu || apt-get install g++ - | # apt_toolchain echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" diff --git a/.gitlab/ci/jobs/debian-stable-i386.yml b/.gitlab/ci/jobs/debian-stable-i386.yml index 282f3a04e..ad4dcbb4f 100644 --- a/.gitlab/ci/jobs/debian-stable-i386.yml +++ b/.gitlab/ci/jobs/debian-stable-i386.yml @@ -24,7 +24,7 @@ Debian stable:i386: - - | # apt_toolchain echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - - apt-get install gcc-i686-linux-gnu g++-i686-linux-gnu || apt-get install gcc g++ + - apt-get install g++-i686-linux-gnu || apt-get install g++ - | # apt_toolchain echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" diff --git a/.gitlab/ci/jobs/debian-testing-gcc-amd64-makefile.yml b/.gitlab/ci/jobs/debian-testing-gcc-amd64-makefile.yml index 30970b49f..70d71b537 100644 --- a/.gitlab/ci/jobs/debian-testing-gcc-amd64-makefile.yml +++ b/.gitlab/ci/jobs/debian-testing-gcc-amd64-makefile.yml @@ -25,7 +25,7 @@ Debian testing GCC Makefile: - - | # apt_toolchain echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - - apt-get install gcc g++ + - apt-get install g++ - | # apt_toolchain echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" diff --git a/.gitlab/ci/jobs/debian-testing-gcc-amd64.yml b/.gitlab/ci/jobs/debian-testing-gcc-amd64.yml index 66ce5152f..7efb6c62d 100644 --- a/.gitlab/ci/jobs/debian-testing-gcc-amd64.yml +++ b/.gitlab/ci/jobs/debian-testing-gcc-amd64.yml @@ -25,7 +25,7 @@ Debian testing GCC: - - | # apt_toolchain echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - - apt-get install gcc g++ + - apt-get install g++ - | # apt_toolchain echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" diff --git a/.gitlab/ci/jobs/windows-x64-makefile.yml b/.gitlab/ci/jobs/windows-x64-makefile.yml index 23d7177ef..8da30d2b9 100644 --- a/.gitlab/ci/jobs/windows-x64-makefile.yml +++ b/.gitlab/ci/jobs/windows-x64-makefile.yml @@ -21,7 +21,7 @@ Windows x64 Makefile: - - | # apt_toolchain echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - - apt-get install gcc-mingw-w64-x86-64-win32 g++-mingw-w64-x86-64-win32 + - apt-get install g++-mingw-w64-x86-64-win32 - | # apt_toolchain echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" diff --git a/.gitlab/ci/jobs/windows-x64.yml b/.gitlab/ci/jobs/windows-x64.yml index 1c8f9c09c..e5accf926 100644 --- a/.gitlab/ci/jobs/windows-x64.yml +++ b/.gitlab/ci/jobs/windows-x64.yml @@ -21,7 +21,7 @@ Windows x64: - - | # apt_toolchain echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - - apt-get install gcc-mingw-w64-x86-64-win32 g++-mingw-w64-x86-64-win32 + - apt-get install g++-mingw-w64-x86-64-win32 - | # apt_toolchain echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" diff --git a/.gitlab/ci/jobs/windows-x86-makefile.yml b/.gitlab/ci/jobs/windows-x86-makefile.yml index 9601cd6e6..213342cda 100644 --- a/.gitlab/ci/jobs/windows-x86-makefile.yml +++ b/.gitlab/ci/jobs/windows-x86-makefile.yml @@ -21,7 +21,7 @@ Windows x86 Makefile: - - | # apt_toolchain echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - - apt-get install gcc-mingw-w64-i686-win32 + - apt-get install g++-mingw-w64-i686-win32 - | # apt_toolchain echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" diff --git a/.gitlab/ci/jobs/windows-x86.yml b/.gitlab/ci/jobs/windows-x86.yml index 5c0b8d6bc..f983c8287 100644 --- a/.gitlab/ci/jobs/windows-x86.yml +++ b/.gitlab/ci/jobs/windows-x86.yml @@ -68,7 +68,7 @@ Windows x86: - - | # apt_toolchain echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - - apt-get install gcc-mingw-w64-i686-win32 g++-mingw-w64-i686-win32 + - apt-get install g++-mingw-w64-i686-win32 - | # apt_toolchain echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" From a203f4e5536e3ec4b4e3c7748897398ba614949c Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sat, 1 Feb 2025 11:00:02 -0500 Subject: [PATCH 23/83] Update i_tcp.c Add checks for return code for ioctl(), setsockopt(), getsockopt() and getsockname() Also show errno and strerror for failed calls --- src/netcode/i_tcp.c | 89 +++++++++++++++++++++++++++++++++++---------- 1 file changed, 70 insertions(+), 19 deletions(-) diff --git a/src/netcode/i_tcp.c b/src/netcode/i_tcp.c index 256d9992e..89cee2a6c 100644 --- a/src/netcode/i_tcp.c +++ b/src/netcode/i_tcp.c @@ -1,7 +1,7 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2024 by Sonic Team Junior. +// Copyright (C) 1999-2025 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. @@ -695,7 +695,7 @@ static void SOCK_Send(void) { int e = errno; // save error code so it can't be modified later if (!ALLOWEDERROR(e)) - I_Error("SOCK_Send, error sending to node %d (%s) #%u: %s", doomcom->remotenode, + I_Error("SOCK_Send, error sending to node %d (%s) #%u, %s", doomcom->remotenode, SOCK_GetNodeAddress(doomcom->remotenode), e, strerror(e)); } } @@ -726,6 +726,8 @@ static SOCKET_TYPE UDP_Bind(int family, struct sockaddr *addr, socklen_t addrlen { SOCKET_TYPE s = socket(family, SOCK_DGRAM, IPPROTO_UDP); int opt; + int rc; + int e = 0; // save error code so it can't be modified later code socklen_t opts; #ifdef FIONBIO unsigned long trueval = true; @@ -740,12 +742,17 @@ static SOCKET_TYPE UDP_Bind(int family, struct sockaddr *addr, socklen_t addrlen #ifdef USE_WINSOCK2 DWORD dwBytesReturned = 0; BOOL bfalse = FALSE; - WSAIoctl(s, SIO_UDP_CONNRESET, &bfalse, sizeof(bfalse), + rc = WSAIoctl(s, SIO_UDP_CONNRESET, &bfalse, sizeof(bfalse), NULL, 0, &dwBytesReturned, NULL, NULL); #else unsigned long falseval = false; - ioctl(s, SIO_UDP_CONNRESET, &falseval); + rc = ioctl(s, SIO_UDP_CONNRESET, &falseval); #endif + if (rc == -1) + { + e = errno; + I_OutputMsg("SIO_UDP_CONNRESET failed: #%u, %s\n", e, strerror(e)); + } } #endif @@ -758,14 +765,22 @@ static SOCKET_TYPE UDP_Bind(int family, struct sockaddr *addr, socklen_t addrlen { opt = true; opts = (socklen_t)sizeof(opt); - setsockopt(s, SOL_SOCKET, SO_REUSEADDR, (char *)&opt, opts); + rc = setsockopt(s, SOL_SOCKET, SO_REUSEADDR, (char *)&opt, opts); + if (rc <= -1) + { + e = errno; + I_OutputMsg("setting SO_REUSEADDR failed: #%u, %s\n", e, strerror(e)); + } } // make it broadcastable opt = true; opts = (socklen_t)sizeof(opt); - if (setsockopt(s, SOL_SOCKET, SO_BROADCAST, (char *)&opt, opts)) + rc = setsockopt(s, SOL_SOCKET, SO_BROADCAST, (char *)&opt, opts); + if (rc <= -1) { + e = errno; CONS_Alert(CONS_WARNING, M_GetText("Could not get broadcast rights\n")); // I do not care anymore + I_OutputMsg("setting SO_BROADCAST failed: #%u, %s\n", e, strerror(e)); } } #ifdef HAVE_IPV6 @@ -775,24 +790,34 @@ static SOCKET_TYPE UDP_Bind(int family, struct sockaddr *addr, socklen_t addrlen { opt = true; opts = (socklen_t)sizeof(opt); - setsockopt(s, SOL_SOCKET, SO_REUSEADDR, (char *)&opt, opts); + rc = setsockopt(s, SOL_SOCKET, SO_REUSEADDR, (char *)&opt, opts); + if (rc <= -1) + { + e = errno; + I_OutputMsg("setting SO_REUSEADDR failed: #%u, %s\n", e, strerror(e)); + } } #ifdef IPV6_V6ONLY // make it IPv6 ony opt = true; opts = (socklen_t)sizeof(opt); - if (setsockopt(s, IPPROTO_IPV6, IPV6_V6ONLY, (char *)&opt, opts)) + rc = setsockopt(s, IPPROTO_IPV6, IPV6_V6ONLY, (char *)&opt, opts); + if (rc <= -1) { + e = errno; CONS_Alert(CONS_WARNING, M_GetText("Could not limit IPv6 bind\n")); // I do not care anymore + I_OutputMsg("setting IPV6_V6ONLY failed: #%u, %s\n", e, strerror(e)); } #endif } #endif - if (bind(s, addr, addrlen) == ERRSOCKET) + rc = bind(s, addr, addrlen); + if (rc == ERRSOCKET) { + e = errno; close(s); - I_OutputMsg("Binding failed\n"); + I_OutputMsg("Binding failed: #%u, %s\n", e, strerror(e)); return (SOCKET_TYPE)ERRSOCKET; } @@ -806,9 +831,12 @@ static SOCKET_TYPE UDP_Bind(int family, struct sockaddr *addr, socklen_t addrlen inet_pton(AF_INET6, IPV6_MULTICAST_ADDRESS, &maddr.ipv6mr_multiaddr); maddr.ipv6mr_interface = 0; - if (setsockopt(s, IPPROTO_IPV6, IPV6_JOIN_GROUP, (const char *)&maddr, sizeof(maddr)) != 0) + rc = setsockopt(s, IPPROTO_IPV6, IPV6_JOIN_GROUP, (const char *)&maddr, sizeof(maddr)); + if (rc <= -1) { + e = errno; CONS_Alert(CONS_WARNING, M_GetText("Could not register multicast address\n")); + I_OutputMsg("setting IPV6_JOIN_GROUP failed: #%u, %s \n", e, strerror(e)); } } } @@ -816,33 +844,56 @@ static SOCKET_TYPE UDP_Bind(int family, struct sockaddr *addr, socklen_t addrlen #ifdef FIONBIO // make it non blocking - opt = true; - if (ioctl(s, FIONBIO, &trueval) != 0) + rc = ioctl(s, FIONBIO, &trueval); + if (rc == -1) { + e = errno; close(s); - I_OutputMsg("Seting FIOBIO on failed\n"); + I_OutputMsg("FIOBIO failed: #%u, %s\n", e, strerror(e)); return (SOCKET_TYPE)ERRSOCKET; } #endif + opt = 0; opts = (socklen_t)sizeof(opt); - getsockopt(s, SOL_SOCKET, SO_RCVBUF, (char *)&opt, &opts); + rc = getsockopt(s, SOL_SOCKET, SO_RCVBUF, (char *)&opt, &opts); + if (rc <= -1) + { + e = errno; + I_OutputMsg("getting SO_RCVBUF failed: #%u, %s\n", e, strerror(e)); + } CONS_Printf(M_GetText("Network system buffer: %dKb\n"), opt>>10); if (opt < 64<<10) // 64k { opt = 64<<10; opts = (socklen_t)sizeof(opt); - setsockopt(s, SOL_SOCKET, SO_RCVBUF, (char *)&opt, opts); - getsockopt(s, SOL_SOCKET, SO_RCVBUF, (char *)&opt, &opts); - if (opt < 64<<10) + rc = setsockopt(s, SOL_SOCKET, SO_RCVBUF, (char *)&opt, opts); + if (rc <= -1) + { + e = errno; + I_OutputMsg("setting SO_RCVBUF failed: #%u, %s\n", e, strerror(e)); + } + opt = 0; + rc = getsockopt(s, SOL_SOCKET, SO_RCVBUF, (char *)&opt, &opts); + if (rc <= -1) + { + e = errno; + I_OutputMsg("getting SO_RCVBUF failed: #%u, %s\n", e, strerror(e)); + } + if (opt <= 64<<10) CONS_Alert(CONS_WARNING, M_GetText("Can't set buffer length to 64k, file transfer will be bad\n")); else CONS_Printf(M_GetText("Network system buffer set to: %dKb\n"), opt>>10); } - if (getsockname(s, &straddr.any, &len) == -1) + rc = getsockname(s, &straddr.any, &len); + if (rc != 0) + { + e = errno; CONS_Alert(CONS_WARNING, M_GetText("Failed to get port number\n")); + I_OutputMsg("getsockname failed: #%u, %s\n", e, strerror(e)); + } else { if (family == AF_INET) From 4596f20b71b10d330cc26cc657741b1b3607f274 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sat, 1 Feb 2025 11:00:44 -0500 Subject: [PATCH 24/83] Check for ENODEV for hosts with IPv6 disabled while running in IPv6 mode --- src/netcode/i_tcp.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/netcode/i_tcp.c b/src/netcode/i_tcp.c index 89cee2a6c..282b2ce94 100644 --- a/src/netcode/i_tcp.c +++ b/src/netcode/i_tcp.c @@ -836,6 +836,12 @@ static SOCKET_TYPE UDP_Bind(int family, struct sockaddr *addr, socklen_t addrlen { e = errno; CONS_Alert(CONS_WARNING, M_GetText("Could not register multicast address\n")); + if (e == ENODEV) + { + close(s); + I_OutputMsg("Binding failed: no IPv6 device\n"); + return (SOCKET_TYPE)ERRSOCKET; + } I_OutputMsg("setting IPV6_JOIN_GROUP failed: #%u, %s \n", e, strerror(e)); } } From 4bb8183e6f915bb0155f647c0c77e8a60277404a Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sun, 2 Feb 2025 12:43:05 -0500 Subject: [PATCH 25/83] Show in log if IPv6 support is disabled fixup --- src/netcode/i_tcp.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/netcode/i_tcp.c b/src/netcode/i_tcp.c index 282b2ce94..c0a606ba1 100644 --- a/src/netcode/i_tcp.c +++ b/src/netcode/i_tcp.c @@ -936,6 +936,13 @@ static boolean UDP_Socket(void) hints.ai_socktype = SOCK_DGRAM; hints.ai_protocol = IPPROTO_UDP; +#ifdef HAVE_IPV6 + if (!b_ipv6) + I_OutputMsg("Disabling IPv6 support at runtime\n"); +#else + I_OutputMsg("Compiled without IPv6 support\n"); +#endif + if (serverrunning) serv = serverport_name; else From 1ebac1ed40da053fe6bf8e077cbab1b8d135e7d1 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sun, 2 Feb 2025 12:44:35 -0500 Subject: [PATCH 26/83] Avoid calling WSAGetLastError() (via errno/h_error) more then once with Winsock2 --- src/netcode/i_tcp.c | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/src/netcode/i_tcp.c b/src/netcode/i_tcp.c index c0a606ba1..58fb921d6 100644 --- a/src/netcode/i_tcp.c +++ b/src/netcode/i_tcp.c @@ -386,6 +386,7 @@ static const char *SOCK_AddrToStr(mysockaddr_t *sk) int v6 = 0; #endif void *addr; + int e = 0; // save error code so it can't be modified later code and avoid calling WSAGetLastError() more then once if(sk->any.sa_family == AF_INET) addr = &sk->ip4.sin_addr; @@ -399,7 +400,10 @@ static const char *SOCK_AddrToStr(mysockaddr_t *sk) if(addr == NULL) sprintf(s, "No address"); else if(inet_ntop(sk->any.sa_family, addr, &s[v6], sizeof (s) - v6) == NULL) - sprintf(s, "Unknown family type, error #%u", errno); + { + e = errno; + sprintf(s, "Unknown family type, error #%u: %s", e, strerror(e)); + } #ifdef HAVE_IPV6 else if(sk->any.sa_family == AF_INET6) { @@ -655,6 +659,7 @@ static inline ssize_t SOCK_SendToAddr(SOCKET_TYPE socket, mysockaddr_t *sockaddr static void SOCK_Send(void) { ssize_t c = ERRSOCKET; + int e = 0; // save error code so it can't be modified later code and avoid calling WSAGetLastError() more then once if (!nodeconnected[doomcom->remotenode]) return; @@ -668,8 +673,12 @@ static void SOCK_Send(void) if (myfamily[i] == broadcastaddress[j].any.sa_family) { c = SOCK_SendToAddr(mysockets[i], &broadcastaddress[j]); - if (c == ERRSOCKET && !ALLOWEDERROR(errno)) - break; + if (c == ERRSOCKET) + { + e = errno; + if (!ALLOWEDERROR(e)) + break; + } } } } @@ -681,8 +690,12 @@ static void SOCK_Send(void) if (myfamily[i] == clientaddress[doomcom->remotenode].any.sa_family) { c = SOCK_SendToAddr(mysockets[i], &clientaddress[doomcom->remotenode]); - if (c == ERRSOCKET && !ALLOWEDERROR(errno)) - break; + if (c == ERRSOCKET) + { + e = errno; + if (!ALLOWEDERROR(e)) + break; + } } } } @@ -693,7 +706,6 @@ static void SOCK_Send(void) if (c == ERRSOCKET) { - int e = errno; // save error code so it can't be modified later if (!ALLOWEDERROR(e)) I_Error("SOCK_Send, error sending to node %d (%s) #%u, %s", doomcom->remotenode, SOCK_GetNodeAddress(doomcom->remotenode), e, strerror(e)); @@ -727,7 +739,7 @@ static SOCKET_TYPE UDP_Bind(int family, struct sockaddr *addr, socklen_t addrlen SOCKET_TYPE s = socket(family, SOCK_DGRAM, IPPROTO_UDP); int opt; int rc; - int e = 0; // save error code so it can't be modified later code + int e = 0; // save error code so it can't be modified later code and avoid calling WSAGetLastError() more then once socklen_t opts; #ifdef FIONBIO unsigned long trueval = true; From 1278bc5727073dab26238ce9ab354ac4702bba4e Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Mon, 3 Feb 2025 01:02:57 +0000 Subject: [PATCH 27/83] Update i_tcp.c Do not error out if we don't have a socket for an address family we have disabled --- src/netcode/i_tcp.c | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/src/netcode/i_tcp.c b/src/netcode/i_tcp.c index 18c90582e..63d232f0c 100644 --- a/src/netcode/i_tcp.c +++ b/src/netcode/i_tcp.c @@ -655,6 +655,7 @@ static inline ssize_t SOCK_SendToAddr(SOCKET_TYPE socket, mysockaddr_t *sockaddr static void SOCK_Send(void) { ssize_t c = ERRSOCKET; + int e = -1; // save error code so it can't be modified later code and avoid calling WSAGetLastError() more then once if (!nodeconnected[doomcom->remotenode]) return; @@ -668,8 +669,12 @@ static void SOCK_Send(void) if (myfamily[i] == broadcastaddress[j].any.sa_family) { c = SOCK_SendToAddr(mysockets[i], &broadcastaddress[j]); - if (c == ERRSOCKET && !ALLOWEDERROR(errno)) - break; + if (c == ERRSOCKET) + { + e = errno; + if (!ALLOWEDERROR(e)) + break; + } } } } @@ -681,19 +686,26 @@ static void SOCK_Send(void) if (myfamily[i] == clientaddress[doomcom->remotenode].any.sa_family) { c = SOCK_SendToAddr(mysockets[i], &clientaddress[doomcom->remotenode]); - if (c == ERRSOCKET && !ALLOWEDERROR(errno)) - break; + if (c == ERRSOCKET) + { + e = errno; + if (!ALLOWEDERROR(e)) + break; + } } } } else { c = SOCK_SendToAddr(nodesocket[doomcom->remotenode], &clientaddress[doomcom->remotenode]); + if (c == ERRSOCKET) + { + e = errno; + } } - if (c == ERRSOCKET) + if (c == ERRSOCKET && e != -1) // -1 means no socket for the address family was found { - int e = errno; // save error code so it can't be modified later if (!ALLOWEDERROR(e)) I_Error("SOCK_Send, error sending to node %d (%s) #%u: %s", doomcom->remotenode, SOCK_GetNodeAddress(doomcom->remotenode), e, strerror(e)); From 0fe8c7a57afa84fba92772b22cf42025ddd18b07 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sun, 2 Feb 2025 22:29:23 -0500 Subject: [PATCH 28/83] Update m_menu.c Add check netgame check if someone use both -noipv4 and -noipv6 --- src/m_menu.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/m_menu.c b/src/m_menu.c index 37d191a0d..be1b421f7 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -3892,6 +3892,9 @@ void M_Ticker(void) M_SetupScreenshotMenu(); #if defined (MASTERSERVER) && defined (HAVE_THREADS) + if (!netgame) + return; + I_lock_mutex(&ms_ServerList_mutex); { if (ms_ServerList) From 598307f33851d5c1bcc148118686838d0e1c909e Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sun, 2 Feb 2025 22:50:17 -0500 Subject: [PATCH 29/83] Only check for -noipv6 on IPv6 builds in HTTP code --- src/netcode/http-mserv.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/netcode/http-mserv.c b/src/netcode/http-mserv.c index 5f3490cac..0c96561ef 100644 --- a/src/netcode/http-mserv.c +++ b/src/netcode/http-mserv.c @@ -64,7 +64,9 @@ consvar_t cv_masterserver_token = CVAR_INIT static int hms_started; static boolean hms_args_checked; +#ifndef NO_IPV6 static boolean hms_allow_ipv6; +#endif static boolean hms_allow_ipv4; static char *hms_api; @@ -141,7 +143,9 @@ static void HMS_check_args_once(void) if (hms_args_checked) return; +#ifndef NO_IPV6 hms_allow_ipv6 = !M_CheckParm("-noipv6"); +#endif hms_allow_ipv4 = !M_CheckParm("-noipv4"); hms_args_checked = true; } From ebfea6de0cfc6d98b1a69b7a2b72cd818b1e82fa Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sun, 2 Feb 2025 22:50:59 -0500 Subject: [PATCH 30/83] use -bindaddr6 for mserv PROTO_V6 calls --- src/netcode/http-mserv.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/netcode/http-mserv.c b/src/netcode/http-mserv.c index 0c96561ef..0fe1e9934 100644 --- a/src/netcode/http-mserv.c +++ b/src/netcode/http-mserv.c @@ -240,20 +240,27 @@ HMS_connect (int proto, const char *format, ...) curl_easy_setopt(curl, CURLOPT_STDERR, logstream); } - if (M_CheckParm("-bindaddr") && M_IsNextParm()) - { - curl_easy_setopt(curl, CURLOPT_INTERFACE, M_GetNextParm()); - } - curl_easy_setopt(curl, CURLOPT_URL, url); curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L); #ifndef NO_IPV6 if (proto == PROTO_V6 || (proto == PROTO_ANY && !hms_allow_ipv4)) + { curl_easy_setopt(curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V6); + if (M_CheckParm("-bindaddr6") && M_IsNextParm()) + { + curl_easy_setopt(curl, CURLOPT_INTERFACE, M_GetNextParm()); + } + } if (proto == PROTO_V4 || (proto == PROTO_ANY && !hms_allow_ipv6)) #endif + { curl_easy_setopt(curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4); + if (M_CheckParm("-bindaddr") && M_IsNextParm()) + { + curl_easy_setopt(curl, CURLOPT_INTERFACE, M_GetNextParm()); + } + } curl_easy_setopt(curl, CURLOPT_TIMEOUT, cv_masterserver_timeout.value); curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, HMS_on_read); From 10bb905ebda6a1bc5cae049bfc5ce33f0c86a774 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Tue, 4 Feb 2025 23:09:57 -0500 Subject: [PATCH 31/83] GitlabCI: use cmake --build to compile and not call directly Makefile files --- .gitlab/ci/jobs/alpine-3-gcc.yml | 8 ++++---- .gitlab/ci/jobs/batocera-arm64.yml | 4 ++-- .gitlab/ci/jobs/debian-oldstable-amd64.yml | 4 ++-- .gitlab/ci/jobs/debian-oldstable-arm64.yml | 4 ++-- .gitlab/ci/jobs/debian-stable-amd64.yml | 4 ++-- .gitlab/ci/jobs/debian-stable-arm64.yml | 4 ++-- .gitlab/ci/jobs/debian-stable-clang-amd64.yml | 8 ++++---- .gitlab/ci/jobs/debian-stable-i386.yml | 4 ++-- .gitlab/ci/jobs/debian-testing-gcc-amd64.yml | 4 ++-- .gitlab/ci/jobs/macos-arm64.yml | 8 ++++---- .gitlab/ci/jobs/macos-x86_64.yml | 8 ++++---- .gitlab/ci/jobs/windows-x64.yml | 6 ++++-- .gitlab/ci/jobs/windows-x86.yml | 10 ++++------ 13 files changed, 38 insertions(+), 38 deletions(-) diff --git a/.gitlab/ci/jobs/alpine-3-gcc.yml b/.gitlab/ci/jobs/alpine-3-gcc.yml index 522b88ae3..72994d405 100644 --- a/.gitlab/ci/jobs/alpine-3-gcc.yml +++ b/.gitlab/ci/jobs/alpine-3-gcc.yml @@ -15,8 +15,8 @@ Alpine 3 GCC: artifacts: paths: - - "build.alpine3/bin/" - - "build.alpine3/src/config.h" + - "build.cmake/bin/" + - "build.cmake/src/config.h" expose_as: "Apline-3" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Apline-3" @@ -111,7 +111,7 @@ Alpine 3 GCC: - - | # cmake echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles" - - cmake -B build.alpine3 -DSRB2_USE_CCACHE=YES -DSRB2_CONFIG_ERRORMODE=ON -DSRB2_CONFIG_EXECINFO=NO -G "Unix Makefiles" + - cmake -B build.cmake -DSRB2_USE_CCACHE=YES -DSRB2_CONFIG_ERRORMODE=ON -DSRB2_CONFIG_EXECINFO=NO -DSRB2_CONFIG_USE_GME:BOOL=ON - | # cmake echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K" @@ -119,7 +119,7 @@ Alpine 3 GCC: - - | # make echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - - make --directory=build.alpine3 --keep-going || make --directory=build.alpine3 --keep-going + - cmake --build build.cmake --parallel 1 --verbose - | # make echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" diff --git a/.gitlab/ci/jobs/batocera-arm64.yml b/.gitlab/ci/jobs/batocera-arm64.yml index c3b586584..3dcd73a0e 100644 --- a/.gitlab/ci/jobs/batocera-arm64.yml +++ b/.gitlab/ci/jobs/batocera-arm64.yml @@ -32,7 +32,7 @@ batocera:arm64: - - | # cmake echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles" - - cmake -B build.cmake -DSRB2_USE_CCACHE=YES -DSRB2_CONFIG_ERRORMODE=ON -DSRB2_CONFIG_FORCE_NO_MS_BITFIELDS=ON -DSRB2_CONFIG_USE_GME=OFF -G "Unix Makefiles" + - cmake -B build.cmake -DSRB2_USE_CCACHE=YES -DSRB2_CONFIG_ERRORMODE=ON -DSRB2_CONFIG_FORCE_NO_MS_BITFIELDS=ON -DSRB2_CONFIG_USE_GME:BOOL=OFF - | # cmake echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K" @@ -40,7 +40,7 @@ batocera:arm64: - - | # make echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - - make --directory=build.cmake --keep-going || make --directory=build.cmake --keep-going + - cmake --build build.cmake --parallel 1 --verbose - | # make echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" diff --git a/.gitlab/ci/jobs/debian-oldstable-amd64.yml b/.gitlab/ci/jobs/debian-oldstable-amd64.yml index ad69dc8dd..231e8485d 100644 --- a/.gitlab/ci/jobs/debian-oldstable-amd64.yml +++ b/.gitlab/ci/jobs/debian-oldstable-amd64.yml @@ -34,7 +34,7 @@ Debian oldstable:amd64: - - | # cmake echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles" - - cmake -B build.cmake -DSRB2_USE_CCACHE=YES -DSRB2_CONFIG_ERRORMODE=ON -DSRB2_CONFIG_USE_GME=OFF -G "Unix Makefiles" + - cmake -B build.cmake -DSRB2_USE_CCACHE=YES -DSRB2_CONFIG_ERRORMODE=ON -DSRB2_CONFIG_USE_GME:BOOL=ON - | # cmake echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K" @@ -42,7 +42,7 @@ Debian oldstable:amd64: - - | # make echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - - make --directory=build.cmake --keep-going || make --directory=build.cmake --keep-going + - cmake --build build.cmake --parallel 1 --verbose - | # make echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" diff --git a/.gitlab/ci/jobs/debian-oldstable-arm64.yml b/.gitlab/ci/jobs/debian-oldstable-arm64.yml index 24db9c807..76d401309 100644 --- a/.gitlab/ci/jobs/debian-oldstable-arm64.yml +++ b/.gitlab/ci/jobs/debian-oldstable-arm64.yml @@ -34,7 +34,7 @@ Debian oldstable:arm64: - - | # cmake echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles" - - cmake -B build.cmake -DSRB2_USE_CCACHE=YES -DSRB2_CONFIG_ERRORMODE=ON -DSRB2_CONFIG_FORCE_NO_MS_BITFIELDS=ON -DSRB2_CONFIG_USE_GME=OFF -G "Unix Makefiles" + - cmake -B build.cmake -DSRB2_USE_CCACHE=YES -DSRB2_CONFIG_ERRORMODE=ON -DSRB2_CONFIG_FORCE_NO_MS_BITFIELDS=ON -DSRB2_CONFIG_USE_GME:BOOL=ON - | # cmake echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K" @@ -42,7 +42,7 @@ Debian oldstable:arm64: - - | # make echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - - make --directory=build.cmake --keep-going || make --directory=build.cmake --keep-going + - cmake --build build.cmake --parallel 1 --verbose - | # make echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" diff --git a/.gitlab/ci/jobs/debian-stable-amd64.yml b/.gitlab/ci/jobs/debian-stable-amd64.yml index a39344db8..ed1f5ce23 100644 --- a/.gitlab/ci/jobs/debian-stable-amd64.yml +++ b/.gitlab/ci/jobs/debian-stable-amd64.yml @@ -40,7 +40,7 @@ Debian stable:amd64: - - | # cmake echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles" - - cmake -B build.cmake -DSRB2_USE_CCACHE=YES -DSRB2_CONFIG_ERRORMODE=ON -G "Unix Makefiles" + - cmake -B build.cmake -DSRB2_USE_CCACHE=YES -DSRB2_CONFIG_ERRORMODE=ON -DSRB2_CONFIG_USE_GME:BOOL=ON - | # cmake echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K" @@ -48,7 +48,7 @@ Debian stable:amd64: - - | # make echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - - make --directory=build.cmake --keep-going || make --directory=build.cmake --keep-going + - cmake --build build.cmake --parallel 1 --verbose - | # make echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" diff --git a/.gitlab/ci/jobs/debian-stable-arm64.yml b/.gitlab/ci/jobs/debian-stable-arm64.yml index 52e6e8603..b0f02dd39 100644 --- a/.gitlab/ci/jobs/debian-stable-arm64.yml +++ b/.gitlab/ci/jobs/debian-stable-arm64.yml @@ -41,7 +41,7 @@ Debian stable:arm64: - - | # cmake echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles" - - cmake -B build.cmake -DSRB2_USE_CCACHE=YES -DSRB2_CONFIG_ERRORMODE=ON -DSRB2_CONFIG_FORCE_NO_MS_BITFIELDS=ON -G "Unix Makefiles" + - cmake -B build.cmake -DSRB2_USE_CCACHE=YES -DSRB2_CONFIG_ERRORMODE=ON -DSRB2_CONFIG_FORCE_NO_MS_BITFIELDS=ON -DSRB2_CONFIG_USE_GME:BOOL=ON - | # cmake echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K" @@ -49,7 +49,7 @@ Debian stable:arm64: - - | # make echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - - make --directory=build.cmake --keep-going || make --directory=build.cmake --keep-going + - cmake --build build.cmake --parallel 1 --verbose - | # make echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" diff --git a/.gitlab/ci/jobs/debian-stable-clang-amd64.yml b/.gitlab/ci/jobs/debian-stable-clang-amd64.yml index 4686c1849..c40998e17 100644 --- a/.gitlab/ci/jobs/debian-stable-clang-amd64.yml +++ b/.gitlab/ci/jobs/debian-stable-clang-amd64.yml @@ -9,8 +9,8 @@ Debian stable Clang: artifacts: paths: - - "build.clang/bin/" - - "build.clang/src/config.h" + - "build.cmake/bin/" + - "build.cmake/src/config.h" expose_as: "clang" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-clang" @@ -41,7 +41,7 @@ Debian stable Clang: - - | # cmake echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles" - - cmake -B build.clang -DCPM_USE_LOCAL_PACKAGES:BOOL=ON -DSRB2_CONFIG_ENABLE_TESTS:BOOL=OFF -DSRB2_CONFIG_SYSTEM_LIBRARIES:BOOL=ON -DSRB2_USE_LIBGME:BOOL=OFF -G "Unix Makefiles" + - cmake -B build.cmake -DCPM_USE_LOCAL_PACKAGES:BOOL=ON -DSRB2_CONFIG_ENABLE_TESTS:BOOL=OFF -DSRB2_CONFIG_SYSTEM_LIBRARIES:BOOL=ON -DSRB2_USE_LIBGME:BOOL=OFF -DSRB2_CONFIG_USE_GME:BOOL=ON - | # cmake echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K" @@ -49,7 +49,7 @@ Debian stable Clang: - - | # make echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - - make --directory=build.clang --keep-going || make --directory=build.clang --keep-going + - cmake --build build.cmake --parallel 1 --verbose - | # make echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" diff --git a/.gitlab/ci/jobs/debian-stable-i386.yml b/.gitlab/ci/jobs/debian-stable-i386.yml index ad4dcbb4f..970b92a69 100644 --- a/.gitlab/ci/jobs/debian-stable-i386.yml +++ b/.gitlab/ci/jobs/debian-stable-i386.yml @@ -40,7 +40,7 @@ Debian stable:i386: - - | # cmake echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles" - - cmake -B build.cmake -DSRB2_USE_CCACHE=YES -DSRB2_CONFIG_ERRORMODE=ON -G "Unix Makefiles" + - cmake -B build.cmake -DSRB2_USE_CCACHE=YES -DSRB2_CONFIG_ERRORMODE=ON -DSRB2_CONFIG_USE_GME:BOOL=ON - | # cmake echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K" @@ -48,7 +48,7 @@ Debian stable:i386: - - | # make echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - - make --directory=build.cmake --keep-going || make --directory=build.cmake --keep-going + - cmake --build build.cmake --parallel 1 --verbose - | # make echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" diff --git a/.gitlab/ci/jobs/debian-testing-gcc-amd64.yml b/.gitlab/ci/jobs/debian-testing-gcc-amd64.yml index 7efb6c62d..72bfdc3e3 100644 --- a/.gitlab/ci/jobs/debian-testing-gcc-amd64.yml +++ b/.gitlab/ci/jobs/debian-testing-gcc-amd64.yml @@ -41,7 +41,7 @@ Debian testing GCC: - - | # cmake echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles" - - cmake -B build.cmake -DSRB2_USE_CCACHE=YES -DSRB2_CONFIG_ERRORMODE=ON -G "Unix Makefiles" + - cmake -B build.cmake -DSRB2_USE_CCACHE=YES -DSRB2_CONFIG_ERRORMODE=ON -DSRB2_CONFIG_USE_GME:BOOL=ON - | # cmake echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K" @@ -49,7 +49,7 @@ Debian testing GCC: - - | # make echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - - make --directory=build.cmake --keep-going || make --directory=build.cmake --keep-going + - cmake --build build.cmake --parallel 1 --verbose - | # make echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" diff --git a/.gitlab/ci/jobs/macos-arm64.yml b/.gitlab/ci/jobs/macos-arm64.yml index a9e31773e..415d1f382 100644 --- a/.gitlab/ci/jobs/macos-arm64.yml +++ b/.gitlab/ci/jobs/macos-arm64.yml @@ -9,8 +9,8 @@ osxcross arm64: artifacts: paths: - - "build.osxcross/bin/" - - "build.osxcross/src/config.h" + - "build.cmake/bin/" + - "build.cmake/src/config.h" expose_as: "Mac arm64" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-clang" @@ -30,7 +30,7 @@ osxcross arm64: - - | # cmake echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles" - - cmake -B build.osxcross --toolchain /osxcross/toolchain.cmake -DCPM_USE_LOCAL_PACKAGES:BOOL=ON -DOPENMPT_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/include" -DSDL2_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/lib" -DSRB2_CONFIG_ENABLE_TESTS:BOOL=OFF -DSRB2_CONFIG_SYSTEM_LIBRARIES:BOOL=ON -DSRB2_CONFIG_FORCE_NO_MS_BITFIELDS:BOOL=ON -DSRB2_CONFIG_USE_GME:BOOL=OFF -G "Unix Makefiles" + - cmake -B build.cmake --toolchain /osxcross/toolchain.cmake -DCPM_USE_LOCAL_PACKAGES:BOOL=ON -DOPENMPT_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/include" -DSDL2_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/lib" -DSRB2_CONFIG_ENABLE_TESTS:BOOL=OFF -DSRB2_CONFIG_SYSTEM_LIBRARIES:BOOL=ON -DSRB2_CONFIG_FORCE_NO_MS_BITFIELDS:BOOL=ON -DSRB2_CONFIG_USE_GME:BOOL=OFF - | # make echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" @@ -38,7 +38,7 @@ osxcross arm64: - - | # make echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - - make --directory=build.osxcross --keep-going || make --directory=build.osxcross --keep-going + - cmake --build build.cmake --parallel 1 --verbose - | # make echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" diff --git a/.gitlab/ci/jobs/macos-x86_64.yml b/.gitlab/ci/jobs/macos-x86_64.yml index 525a919c8..4905c2e09 100644 --- a/.gitlab/ci/jobs/macos-x86_64.yml +++ b/.gitlab/ci/jobs/macos-x86_64.yml @@ -29,8 +29,8 @@ osxcross x86_64: artifacts: paths: - - "build.osxcross/bin/" - - "build.osxcross/src/config.h" + - "build.cmake/bin/" + - "build.cmake/src/config.h" expose_as: "Mac x86_64" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-clang" @@ -71,7 +71,7 @@ osxcross x86_64: - - | # cmake echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles" - - cmake -B build.osxcross --toolchain /osxcross/toolchain.cmake -DCPM_USE_LOCAL_PACKAGES:BOOL=ON -DOPENMPT_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/include" -DSDL2_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/lib" -DSRB2_CONFIG_ENABLE_TESTS:BOOL=OFF -DSRB2_CONFIG_SYSTEM_LIBRARIES:BOOL=ON -DSRB2_CONFIG_USE_GME:BOOL=OFF -G "Unix Makefiles" + - cmake -B build.cmake --toolchain /osxcross/toolchain.cmake -DCPM_USE_LOCAL_PACKAGES:BOOL=ON -DOPENMPT_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/include" -DSDL2_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/lib" -DSRB2_CONFIG_ENABLE_TESTS:BOOL=OFF -DSRB2_CONFIG_SYSTEM_LIBRARIES:BOOL=ON -DSRB2_CONFIG_USE_GME:BOOL=OFF - | # make echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" @@ -79,7 +79,7 @@ osxcross x86_64: - - | # make echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - - make --directory=build.osxcross --keep-going || make --directory=build.osxcross --keep-going + - cmake --build build.cmake --parallel 1 --verbose - | # make echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" diff --git a/.gitlab/ci/jobs/windows-x64.yml b/.gitlab/ci/jobs/windows-x64.yml index e5accf926..ca7f4ae08 100644 --- a/.gitlab/ci/jobs/windows-x64.yml +++ b/.gitlab/ci/jobs/windows-x64.yml @@ -16,6 +16,8 @@ Windows x64: variables: PREFIX: x86_64-w64-mingw32 + CC: /usr/lib/ccache/x86_64-w64-mingw32-gcc + CXX: /usr/lib/ccache/x86_64-w64-mingw32-g++ script: - - | @@ -37,7 +39,7 @@ Windows x64: - - | # cmake echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles" - - cmake -B build.cmake -DSRB2_USE_CCACHE=YES -DSRB2_CONFIG_ERRORMODE=ON -DCMAKE_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-mingw-static -DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/toolchains/mingw.cmake + - cmake -B build.cmake -DSRB2_USE_CCACHE=NO -DSRB2_CONFIG_ERRORMODE=ON -DCMAKE_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-mingw-static -DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/toolchains/mingw.cmake - | # cmake echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K" @@ -45,7 +47,7 @@ Windows x64: - - | # make echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - - make --directory=build.cmake --keep-going || make --directory=build.cmake --keep-going + - cmake --build build.cmake --parallel 1 --verbose - | # make echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" diff --git a/.gitlab/ci/jobs/windows-x86.yml b/.gitlab/ci/jobs/windows-x86.yml index f983c8287..c8293eb7d 100644 --- a/.gitlab/ci/jobs/windows-x86.yml +++ b/.gitlab/ci/jobs/windows-x86.yml @@ -40,8 +40,8 @@ Windows x86: variables: PREFIX: i686-w64-mingw32 - CC: /usr/bin/i686-w64-mingw32-gcc-posix - CXX: /usr/bin/i686-w64-mingw32-g++-posix + CC: /usr/lib/ccache/i686-w64-mingw32-gcc + CXX: /usr/lib/ccache/i686-w64-mingw32-g++ script: - | @@ -84,9 +84,7 @@ Windows x86: - - | # cmake echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles" - # cmake - echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles" - - cmake --preset ninja-x86_mingw_static_vcpkg-debug -G "Unix Makefiles" -DSRB2_USE_CCACHE=YES -DSRB2_CONFIG_ERRORMODE=ON -DCMAKE_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake + - cmake -B build.cmake --preset ninja-x86_mingw_static_vcpkg-debug -DSRB2_USE_CCACHE=NO -DSRB2_CONFIG_ERRORMODE=ON - | # cmake echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K" @@ -94,7 +92,7 @@ Windows x86: - - | # make echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - - cmake --build --preset ninja-x86_mingw_static_vcpkg-debug --parallel 1 -- --keep-going || cmake --build --preset ninja-x86_mingw_static_vcpkg-debug --parallel 1 -- --keep-going + - cmake -build build.cmake --parallel 1 --verbose --preset ninja-x86_mingw_static_vcpkg-debug - | # make echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" From ec3edcc6c9b014da4ba5e0cfa331163647c83fc9 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Thu, 6 Feb 2025 12:25:27 -0500 Subject: [PATCH 32/83] GitlabCI: install static version of curl, libopenmpt,libsdl2-mixer,libpng and libxmp for macs --- .gitlab/ci/jobs/macos-arm64.yml | 3 ++- .gitlab/ci/jobs/macos-x86_64.yml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitlab/ci/jobs/macos-arm64.yml b/.gitlab/ci/jobs/macos-arm64.yml index 415d1f382..45a865992 100644 --- a/.gitlab/ci/jobs/macos-arm64.yml +++ b/.gitlab/ci/jobs/macos-arm64.yml @@ -22,7 +22,8 @@ osxcross arm64: - - | # apt_development echo -e "\e[0Ksection_start:`date +%s`:macports_development[collapsed=true]\r\e[0KInstalling development packages" - - osxcross-macports install --arm64 curl libopenmpt libsdl2_mixer + - osxcross-macports install --arm64 libxmp wavpack libopenmpt opusfile + - osxcross-macports install --static --arm64 curl libsdl2_mixer libpng - | # apt_development echo -e "\e[0Ksection_end:`date +%s`:macports_development\r\e[0K" diff --git a/.gitlab/ci/jobs/macos-x86_64.yml b/.gitlab/ci/jobs/macos-x86_64.yml index 4905c2e09..a015f41d8 100644 --- a/.gitlab/ci/jobs/macos-x86_64.yml +++ b/.gitlab/ci/jobs/macos-x86_64.yml @@ -63,7 +63,8 @@ osxcross x86_64: - - | # apt_development echo -e "\e[0Ksection_start:`date +%s`:macports_development[collapsed=true]\r\e[0KInstalling development packages" - - osxcross-macports install curl libopenmpt libsdl2_mixer + - osxcross-macports install libxmp wavpack libopenmpt opusfile + - osxcross-macports install --static curl libsdl2_mixer libpng - | # apt_development echo -e "\e[0Ksection_end:`date +%s`:macports_development\r\e[0K" From 1e47cb2061bb57b19920221faf05e34ddd995bad Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Thu, 6 Feb 2025 18:51:49 -0500 Subject: [PATCH 33/83] GitlabCI: checks if osxcross arm64 build fails --- .gitlab/ci/jobs/macos-arm64.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.gitlab/ci/jobs/macos-arm64.yml b/.gitlab/ci/jobs/macos-arm64.yml index 45a865992..218865526 100644 --- a/.gitlab/ci/jobs/macos-arm64.yml +++ b/.gitlab/ci/jobs/macos-arm64.yml @@ -3,10 +3,6 @@ osxcross arm64: stage: build - when: manual - - allow_failure: true - artifacts: paths: - "build.cmake/bin/" From 620bb5054f10d49d9ed8f834561826b5f43f34a0 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Thu, 6 Feb 2025 22:12:22 -0500 Subject: [PATCH 34/83] GitlabCI: use lipo to create universal darwin binary --- .gitlab-ci.yml | 1 + .gitlab/ci/jobs/macos-arm64.yml | 24 ++++++--- .gitlab/ci/jobs/macos-x86_64.yml | 25 ++++++--- .gitlab/ci/jobs/osxccross-universal.yml | 67 +++++++++++++++++++++++++ 4 files changed, 103 insertions(+), 14 deletions(-) create mode 100644 .gitlab/ci/jobs/osxccross-universal.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 29f5ef5ff..14c36213e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -12,6 +12,7 @@ variables: stages: - build + - osxcross default: interruptible: true diff --git a/.gitlab/ci/jobs/macos-arm64.yml b/.gitlab/ci/jobs/macos-arm64.yml index 218865526..1c89000c2 100644 --- a/.gitlab/ci/jobs/macos-arm64.yml +++ b/.gitlab/ci/jobs/macos-arm64.yml @@ -5,10 +5,11 @@ osxcross arm64: artifacts: paths: - - "build.cmake/bin/" - - "build.cmake/src/config.h" + - "build.arm64/bin/" + - "build.arm64/dist/arm64.h" + - "build.arm64/src/config.h" expose_as: "Mac arm64" - name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-clang" + name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-arm64-apple-darwin21.4" variables: OSXCROSS_HOST: arm64-apple-darwin21.4 @@ -18,8 +19,8 @@ osxcross arm64: - - | # apt_development echo -e "\e[0Ksection_start:`date +%s`:macports_development[collapsed=true]\r\e[0KInstalling development packages" - - osxcross-macports install --arm64 libxmp wavpack libopenmpt opusfile - - osxcross-macports install --static --arm64 curl libsdl2_mixer libpng + - osxcross-macports install --arm64 libxmp wavpack libopenmpt opusfile || osxcross-macports install --arm64 libxmp wavpack libopenmpt opusfile + - osxcross-macports install --static --arm64 curl libsdl2_mixer libpng || osxcross-macports install --static --arm64 curl libsdl2_mixer libpng - | # apt_development echo -e "\e[0Ksection_end:`date +%s`:macports_development\r\e[0K" @@ -27,7 +28,7 @@ osxcross arm64: - - | # cmake echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles" - - cmake -B build.cmake --toolchain /osxcross/toolchain.cmake -DCPM_USE_LOCAL_PACKAGES:BOOL=ON -DOPENMPT_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/include" -DSDL2_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/lib" -DSRB2_CONFIG_ENABLE_TESTS:BOOL=OFF -DSRB2_CONFIG_SYSTEM_LIBRARIES:BOOL=ON -DSRB2_CONFIG_FORCE_NO_MS_BITFIELDS:BOOL=ON -DSRB2_CONFIG_USE_GME:BOOL=OFF + - cmake -B build.arm64 --toolchain /osxcross/toolchain.cmake -DCPM_USE_LOCAL_PACKAGES:BOOL=ON -DOPENMPT_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/include" -DSDL2_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/lib" -DSRB2_CONFIG_ENABLE_TESTS:BOOL=OFF -DSRB2_CONFIG_SYSTEM_LIBRARIES:BOOL=ON -DSRB2_CONFIG_FORCE_NO_MS_BITFIELDS:BOOL=ON -DSRB2_CONFIG_USE_GME:BOOL=OFF -DSRB2_SDL2_EXE_NAME=srb2_$CI_PIPELINE_ID - | # make echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" @@ -35,7 +36,16 @@ osxcross arm64: - - | # make echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - - cmake --build build.cmake --parallel 1 --verbose + - cmake --build build.arm64 --parallel 1 --verbose - | # make echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" + + - - | + # copy config.h + echo -e "\e[0Ksection_start:`date +%s`:copy[collapsed=false]\r\e[0KCopying config.h" + - mkdir --parents --verbose build.arm64/dist + - cp --reflink=auto --sparse=always --verbose build.arm64/src/config.h build.arm64/dist/arm64.h + - | + # make + echo -e "\e[0Ksection_end:`date +%s`:copy\r\e[0K" diff --git a/.gitlab/ci/jobs/macos-x86_64.yml b/.gitlab/ci/jobs/macos-x86_64.yml index a015f41d8..d40ae65f6 100644 --- a/.gitlab/ci/jobs/macos-x86_64.yml +++ b/.gitlab/ci/jobs/macos-x86_64.yml @@ -29,10 +29,11 @@ osxcross x86_64: artifacts: paths: - - "build.cmake/bin/" - - "build.cmake/src/config.h" + - "build.x86_64/bin/" + - "build.x86_64/dist/x86_64.h" + - "build.x86_64/src/config.h" expose_as: "Mac x86_64" - name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-clang" + name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-x86_64-apple-darwin21.4" variables: OSXCROSS_HOST: x86_64-apple-darwin21.4 @@ -63,8 +64,8 @@ osxcross x86_64: - - | # apt_development echo -e "\e[0Ksection_start:`date +%s`:macports_development[collapsed=true]\r\e[0KInstalling development packages" - - osxcross-macports install libxmp wavpack libopenmpt opusfile - - osxcross-macports install --static curl libsdl2_mixer libpng + - osxcross-macports install libxmp wavpack libopenmpt opusfile || osxcross-macports install libxmp wavpack libopenmpt opusfile + - osxcross-macports install --static curl libsdl2_mixer libpng || osxcross-macports install --static curl libsdl2_mixer libpng - | # apt_development echo -e "\e[0Ksection_end:`date +%s`:macports_development\r\e[0K" @@ -72,7 +73,7 @@ osxcross x86_64: - - | # cmake echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles" - - cmake -B build.cmake --toolchain /osxcross/toolchain.cmake -DCPM_USE_LOCAL_PACKAGES:BOOL=ON -DOPENMPT_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/include" -DSDL2_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/lib" -DSRB2_CONFIG_ENABLE_TESTS:BOOL=OFF -DSRB2_CONFIG_SYSTEM_LIBRARIES:BOOL=ON -DSRB2_CONFIG_USE_GME:BOOL=OFF + - cmake -B build.x86_64 --toolchain /osxcross/toolchain.cmake -DCPM_USE_LOCAL_PACKAGES:BOOL=ON -DOPENMPT_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/include" -DSDL2_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/lib" -DSRB2_CONFIG_ENABLE_TESTS:BOOL=OFF -DSRB2_CONFIG_SYSTEM_LIBRARIES:BOOL=ON -DSRB2_CONFIG_USE_GME:BOOL=OFF -DSRB2_SDL2_EXE_NAME=srb2_$CI_PIPELINE_ID - | # make echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" @@ -80,11 +81,21 @@ osxcross x86_64: - - | # make echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - - cmake --build build.cmake --parallel 1 --verbose + - cmake --build build.x86_64 --parallel 1 --verbose - | # make echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" + - - | + # copy config.h + echo -e "\e[0Ksection_start:`date +%s`:copy[collapsed=false]\r\e[0KCopying config.h" + - mkdir --parents --verbose build.x86_64/dist + - cp --reflink=auto --sparse=always --verbose build.x86_64/src/config.h build.x86_64/dist/x86_64.h + - | + # make + echo -e "\e[0Ksection_end:`date +%s`:copy\r\e[0K" + + after_script: - - | # apt_clean diff --git a/.gitlab/ci/jobs/osxccross-universal.yml b/.gitlab/ci/jobs/osxccross-universal.yml new file mode 100644 index 000000000..841151f60 --- /dev/null +++ b/.gitlab/ci/jobs/osxccross-universal.yml @@ -0,0 +1,67 @@ +osxcross universal: + image: git.do.srb2.org:5050/stjr/srb2ci/srb2ci:stable + + dependencies: + - osxcross arm64 + - osxcross x86_64 + needs: + - job: osxcross arm64 + - job: osxcross x86_64 + + stage: osxcross + + artifacts: + paths: + - "dist/bin" + - "dist/src" + expose_as: "Mac Universal" + name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-lipo-apple-darwin21.4" + + script: + - - | + # mkdir + echo -e "\e[0Ksection_start:`date +%s`:mkdir[collapsed=true]\r\e[0KMaking dist folder" + mkdir --parents --verbose dist/src dist/bin + - | + # mkdir + echo -e "\e[0Ksection_end:`date +%s`:mkdir\r\e[0K" + + - - | + # copy-config + echo -e "\e[0Ksection_start:`date +%s`:x86_64-config[collapsed=true]\r\e[0KCopying x86_64 config" + - cp --reflink=auto --sparse=always --verbose --target-directory=dist/src/ build.*/dist/*.h + - | + # x86_64-config + echo -e "\e[0Ksection_end:`date +%s`:x86_64-config\r\e[0K" + + - - | + # copy-build + echo -e "\e[0Ksection_start:`date +%s`:copy-build[collapsed=true]\r\e[0KCopying ALL build" + - cp --reflink=auto --sparse=always --recursive --verbose --target-directory=dist/ build.*/bin/ + - | + # copy-build + echo -e "\e[0Ksection_end:`date +%s`:copy-build\r\e[0K" + + - - | + # link-build + echo -e "\e[0Ksection_start:`date +%s`:link-build[collapsed=true]\r\e[0KLinking universal build" + - lipo -create -output dist/bin/srb2_$CI_PIPELINE_ID.app/Contents/MacOS/srb2_$CI_PIPELINE_ID build.*/bin/srb2_$CI_PIPELINE_ID.app/Contents/MacOS/srb2_$CI_PIPELINE_ID + - | + # universal-build + echo -e "\e[0Ksection_end:`date +%s`:link-build\r\e[0K" + + - - | + # arm64-verify + echo -e "\e[0Ksection_start:`date +%s`:arm64-verify[collapsed=true]\r\e[0KVerifying arm64" + - lipo dist/bin/srb2_$CI_PIPELINE_ID.app/Contents/MacOS/srb2_$CI_PIPELINE_ID -verify_arch arm64 + - | + # arm64-verify + echo -e "\e[0Ksection_end:`date +%s`:arm64-verify\r\e[0K" + + - - | + # x86_64-verify + echo -e "\e[0Ksection_start:`date +%s`:x86_64-verify[collapsed=true]\r\e[0KVerifying x86_64" + - lipo dist/bin/srb2_$CI_PIPELINE_ID.app/Contents/MacOS/srb2_$CI_PIPELINE_ID -verify_arch x86_64 + - | + # x86_64-verify + echo -e "\e[0Ksection_end:`date +%s`:x86_64-verify\r\e[0K" From e05eea01758cd7ecfcb9bcce74bfd171ebcaeda6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustaf=20Alh=C3=A4ll?= Date: Sat, 8 Feb 2025 22:08:07 +0100 Subject: [PATCH 35/83] Improve HUD rendering when drawing stretched patches --- src/hardware/hw_draw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hardware/hw_draw.c b/src/hardware/hw_draw.c index 369f59ac2..ab253d5c8 100644 --- a/src/hardware/hw_draw.c +++ b/src/hardware/hw_draw.c @@ -256,8 +256,8 @@ void HWR_DrawStretchyFixedPatch(patch_t *gpatch, fixed_t x, fixed_t y, fixed_t p } // positions of the cx, cy, are between 0 and vid.width/vid.height now, we need them to be between -1 and 1 - cx = -1 + (cx / (vid.width/2)); - cy = 1 - (cy / (vid.height/2)); + cx = -1.0f + (cx / (vid.width / 2.0f)); + cy = 1.0f - (cy / (vid.height / 2.0f)); // fwidth and fheight are similar fwidth /= vid.width / 2; From d5f970b31d867069c94936f96351b1879c495992 Mon Sep 17 00:00:00 2001 From: Lactozilla Date: Sun, 9 Feb 2025 00:06:59 -0300 Subject: [PATCH 36/83] Implement custom jet fume functionality --- src/d_player.h | 17 ++++----- src/deh_tables.c | 3 +- src/info.c | 4 +-- src/p_user.c | 94 ++++++++++++++++++++++++++++++++++++------------ src/r_skins.c | 4 ++- 5 files changed, 88 insertions(+), 34 deletions(-) diff --git a/src/d_player.h b/src/d_player.h index cdb547d3b..b4453c79b 100644 --- a/src/d_player.h +++ b/src/d_player.h @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2024 by Sonic Team Junior. +// Copyright (C) 1999-2025 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. @@ -47,13 +47,14 @@ typedef enum SF_DASHMODE = 1<<11, // Sonic Advance 2 style top speed increase? SF_FASTWAIT = 1<<12, // Faster wait animation? SF_FASTEDGE = 1<<13, // Faster edge teeter? - SF_MULTIABILITY = 1<<14, // Revenge of Final Demo. - SF_NONIGHTSROTATION = 1<<15, // Disable sprite rotation for NiGHTS - SF_NONIGHTSSUPER = 1<<16, // Disable super colors for NiGHTS (if you have SF_SUPER) - SF_NOSUPERSPRITES = 1<<17, // Don't use super sprites while super - SF_NOSUPERJUMPBOOST = 1<<18, // Disable the jump boost given while super (i.e. Knuckles) - SF_CANBUSTWALLS = 1<<19, // Can naturally bust walls on contact? (i.e. Knuckles) - SF_NOSHIELDABILITY = 1<<20, // Disable shield abilities + SF_JETFUME = 1<<14, // Follow item uses Metal Sonic's jet fume behavior + SF_MULTIABILITY = 1<<15, // Revenge of Final Demo. + SF_NONIGHTSROTATION = 1<<16, // Disable sprite rotation for NiGHTS + SF_NONIGHTSSUPER = 1<<17, // Disable super colors for NiGHTS (if you have SF_SUPER) + SF_NOSUPERSPRITES = 1<<18, // Don't use super sprites while super + SF_NOSUPERJUMPBOOST = 1<<19, // Disable the jump boost given while super (i.e. Knuckles) + SF_CANBUSTWALLS = 1<<20, // Can naturally bust walls on contact? (i.e. Knuckles) + SF_NOSHIELDABILITY = 1<<21, // Disable shield abilities // free up to and including 1<<31 } skinflags_t; diff --git a/src/deh_tables.c b/src/deh_tables.c index d71463253..a96adf8ae 100644 --- a/src/deh_tables.c +++ b/src/deh_tables.c @@ -1,7 +1,7 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2024 by Sonic Team Junior. +// Copyright (C) 1999-2025 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. @@ -5260,6 +5260,7 @@ struct int_const_s const INT_CONST[] = { {"SF_DASHMODE",SF_DASHMODE}, {"SF_FASTWAIT",SF_FASTWAIT}, {"SF_FASTEDGE",SF_FASTEDGE}, + {"SF_JETFUME",SF_JETFUME}, {"SF_MULTIABILITY",SF_MULTIABILITY}, {"SF_NONIGHTSROTATION",SF_NONIGHTSROTATION}, {"SF_NONIGHTSSUPER",SF_NONIGHTSSUPER}, diff --git a/src/info.c b/src/info.c index 4d3468e10..3998eb88d 100644 --- a/src/info.c +++ b/src/info.c @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2024 by Sonic Team Junior. +// Copyright (C) 1999-2025 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. @@ -4187,7 +4187,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = S_NULL, // painstate 0, // painchance sfx_None, // painsound - S_NULL, // meleestate + S_JETFUMEFLASH, // meleestate S_NULL, // missilestate S_NULL, // deathstate S_NULL, // xdeathstate diff --git a/src/p_user.c b/src/p_user.c index 7cc9c02ae..2b2334df7 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2024 by Sonic Team Junior. +// Copyright (C) 1999-2025 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. @@ -11515,6 +11515,17 @@ void P_DoTailsOverlay(player_t *player, mobj_t *tails) } // Metal Sonic's jet fume +// +// The follow object's state is set to its spawn state when deactivated. +// When the player is on a moving animation, the follow object goes to its see state. +// When dash mode is entered, the follow object switches to its melee state. +// +// If MF2_FRET is set, the jet fume flashes during dash mode. +// MF2_AMBUSH can be used to enable Metal Sonic's skidding animation. +// If the follow item is MT_METALJETFUME, the above two effects are automatically applied. +// +// MF2_STRONGBOX is internally used to track if the jet fume is in its deactivated state or not. +// MF2_BOSSNOTRAP is internally used to instantly reset the jet fume's scale to its intended scale. void P_DoMetalJetFume(player_t *player, mobj_t *fume) { static const UINT8 FUME_SKINCOLORS[] = @@ -11541,19 +11552,29 @@ void P_DoMetalJetFume(player_t *player, mobj_t *fume) fixed_t heightoffset = ((mo->eflags & MFE_VERTICALFLIP) ? mo->height - (P_GetPlayerHeight(player) >> 1) : (P_GetPlayerHeight(player) >> 1)); panim_t panim = player->panim; tic_t dashmode = min(player->dashmode, DASHMODE_MAX); + boolean ismetaljetfume = fume->type == MT_METALJETFUME; + boolean notmoving = panim != PA_WALK && panim != PA_RUN && panim != PA_DASH; boolean underwater = mo->eflags & MFE_UNDERWATER; statenum_t stat = fume->state-states; boolean resetinterp = false; - if (panim != PA_WALK && panim != PA_RUN && panim != PA_DASH) // turn invisible when not in a coherent movement state + if (notmoving) // deactivate when not in a coherent movement state { - if (stat != fume->info->spawnstate) + if ((fume->flags2 & MF2_STRONGBOX) == 0) + { P_SetMobjState(fume, fume->info->spawnstate); - return; + fume->flags2 |= MF2_STRONGBOX; + } + if (P_MobjWasRemoved(fume) || ismetaljetfume) + return; } - if (player->skidtime) // Rotate during metal sonic's new skid animation - angle += ANGLE_90; + // Rotate on skid animation if follow item is MT_METALJETFUME, or if MF2_AMBUSH is set + if (player->mo->sprite2 == SPR2_SKID) + { + if ((ismetaljetfume && (player->charflags & SF_JETFUME)) || (fume->flags2 & MF2_AMBUSH)) + angle += ANGLE_90; + } if (underwater) // No fume underwater; spawn bubbles instead! { @@ -11590,54 +11611,79 @@ void P_DoMetalJetFume(player_t *player, mobj_t *fume) if (panim == PA_WALK) { - if (stat != fume->info->spawnstate) + if ((fume->flags2 & MF2_STRONGBOX) == 0) { - fume->threshold = 0; P_SetMobjState(fume, fume->info->spawnstate); + fume->threshold = 0; + fume->flags2 &= ~MF2_STRONGBOX; } - return; + if (P_MobjWasRemoved(fume) || ismetaljetfume) + return; } } - if (stat == fume->info->spawnstate) // If currently inivisble, activate! + // If currently deactivated, activate! + if (!notmoving && !underwater && (fume->flags2 & MF2_STRONGBOX)) { P_SetMobjState(fume, (stat = fume->info->seestate)); + if (P_MobjWasRemoved(fume)) + return; P_SetScale(fume, mo->scale, false); + fume->flags2 &= ~MF2_STRONGBOX; resetinterp = true; } - if (dashmode > DASHMODE_THRESHOLD && stat != fume->info->seestate) // If in dashmode, grow really big and flash + // If in dash mode, grow really big + if (dashmode > DASHMODE_THRESHOLD && stat != fume->info->meleestate) { fume->destscale = mo->scale; - fume->flags2 ^= MF2_DONTDRAW; fume->flags2 |= mo->flags2 & MF2_DONTDRAW; + + // Flash if follow item is MT_METALJETFUME, or if MF2_FRET is set + if (ismetaljetfume || (fume->flags2 & MF2_FRET)) + fume->flags2 ^= MF2_DONTDRAW; } else // Otherwise, pick a size and color depending on speed and proximity to dashmode { - if (dashmode == DASHMODE_THRESHOLD && dashmode > (tic_t)fume->movecount) // If just about to enter dashmode, play the startup animation again + // If just about to enter dash mode, play the startup animation again + if (dashmode == DASHMODE_THRESHOLD && dashmode > (tic_t)fume->movecount) { - P_SetMobjState(fume, (stat = fume->info->seestate)); + P_SetMobjState(fume, fume->info->meleestate); + if (P_MobjWasRemoved(fume)) + return; P_SetScale(fume, 2*mo->scale, true); } + fume->flags2 = (fume->flags2 & ~MF2_DONTDRAW) | (mo->flags2 & MF2_DONTDRAW); fume->destscale = (mo->scale + FixedDiv(player->speed, player->normalspeed)) / (underwater ? 6 : 3); fume->color = FUME_SKINCOLORS[(dashmode * sizeof(FUME_SKINCOLORS)) / (DASHMODE_MAX + 1)]; if (underwater) { - fume->frame = (fume->frame & FF_FRAMEMASK) | FF_ANIMATE | (P_RandomRange(0, 9) * FF_TRANS10); + fume->frame = (fume->frame & ~FF_TRANSMASK) | (P_RandomRange(0, 9) << FF_TRANSSHIFT); fume->threshold = 1; } else if (fume->threshold) { - fume->frame = (fume->frame & FF_FRAMEMASK) | fume->state->frame; + fume->frame = (fume->frame & FF_FRAMEMASK) | (fume->state->frame & ~FF_FRAMEMASK); fume->threshold = 0; } } - fume->movecount = dashmode; // keeps track of previous dashmode value so we know whether Metal is entering or leaving it - fume->flags2 = (fume->flags2 & ~MF2_OBJECTFLIP) | (mo->flags2 & MF2_OBJECTFLIP); // Make sure to flip in reverse gravity! - fume->eflags = (fume->eflags & ~MFE_VERTICALFLIP) | (mo->eflags & MFE_VERTICALFLIP); // Make sure to flip in reverse gravity! + // keeps track of previous dash mode value so we know whether Metal is entering or leaving it + fume->movecount = dashmode; + + // Make sure to flip in reverse gravity! + fume->flags2 = (fume->flags2 & ~MF2_OBJECTFLIP) | (mo->flags2 & MF2_OBJECTFLIP); + fume->eflags = (fume->eflags & ~MFE_VERTICALFLIP) | (mo->eflags & MFE_VERTICALFLIP); + + // Set the appropriate scale at spawn + // This is... strange, but I had to choose a flag that a follow object would not ordinarily use. + if ((fume->flags2 & MF2_BOSSNOTRAP) == 0) + { + P_SetScale(fume, fume->destscale, true); + fume->flags2 |= MF2_BOSSNOTRAP; + } // Finally, set its position dist = -mo->radius - FixedMul(fume->info->radius, fume->destscale - mo->scale/3); @@ -11647,9 +11693,10 @@ void P_DoMetalJetFume(player_t *player, mobj_t *fume) fume->y = mo->y + P_ReturnThrustY(fume, angle, dist); fume->z = mo->z + heightoffset - (fume->height >> 1); P_SetThingPosition(fume); - if (resetinterp) R_ResetMobjInterpolationState(fume); + if (resetinterp) + R_ResetMobjInterpolationState(fume); - // If dashmode is high enough, spawn a trail + // If dash mode is high enough, spawn a trail if (player->normalspeed >= skins[player->skin]->normalspeed*2) { mobj_t *ghost = P_SpawnGhostMobj(fume); @@ -11663,6 +11710,8 @@ void P_DoFollowMobj(player_t *player, mobj_t *followmobj) { if (LUA_HookFollowMobj(player, followmobj) || P_MobjWasRemoved(followmobj)) {;} + else if (player->charflags & SF_JETFUME) + P_DoMetalJetFume(player, followmobj); else { switch (followmobj->type) @@ -13164,7 +13213,8 @@ void P_PlayerAfterThink(player_t *player) player->followmobj->colorized = true; break; default: - player->followmobj->flags2 |= MF2_LINKDRAW; + if ((player->charflags & SF_JETFUME) == 0) + player->followmobj->flags2 |= MF2_LINKDRAW; break; } } diff --git a/src/r_skins.c b/src/r_skins.c index f364273e8..d7df6756c 100644 --- a/src/r_skins.c +++ b/src/r_skins.c @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2024 by Sonic Team Junior. +// Copyright (C) 1999-2025 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. @@ -730,6 +730,8 @@ static boolean R_ProcessPatchableFields(skin_t *skin, char *stoken, char *value) GETFLAG(MACHINE) GETFLAG(DASHMODE) GETFLAG(FASTEDGE) + GETFLAG(FASTWAIT) + GETFLAG(JETFUME) GETFLAG(MULTIABILITY) GETFLAG(NONIGHTSROTATION) GETFLAG(NONIGHTSSUPER) From 0b84b3688ac4f6c3dd3c5b2227f80a1d8b492e2e Mon Sep 17 00:00:00 2001 From: Lactozilla Date: Sun, 9 Feb 2025 00:25:34 -0300 Subject: [PATCH 37/83] Implement color cycling toggle --- src/p_user.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/p_user.c b/src/p_user.c index 2b2334df7..51eefb314 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -11520,8 +11520,9 @@ void P_DoTailsOverlay(player_t *player, mobj_t *tails) // When the player is on a moving animation, the follow object goes to its see state. // When dash mode is entered, the follow object switches to its melee state. // -// If MF2_FRET is set, the jet fume flashes during dash mode. +// If MF2_FRET is set, the jet fume will flash during dash mode. // MF2_AMBUSH can be used to enable Metal Sonic's skidding animation. +// MF2_JUSTATTACKED will enable the color cycling. // If the follow item is MT_METALJETFUME, the above two effects are automatically applied. // // MF2_STRONGBOX is internally used to track if the jet fume is in its deactivated state or not. @@ -11656,7 +11657,10 @@ void P_DoMetalJetFume(player_t *player, mobj_t *fume) fume->flags2 = (fume->flags2 & ~MF2_DONTDRAW) | (mo->flags2 & MF2_DONTDRAW); fume->destscale = (mo->scale + FixedDiv(player->speed, player->normalspeed)) / (underwater ? 6 : 3); - fume->color = FUME_SKINCOLORS[(dashmode * sizeof(FUME_SKINCOLORS)) / (DASHMODE_MAX + 1)]; + + // Do color cycling if follow item is MT_METALJETFUME, or if MF2_JUSTATTACKED is set + if (ismetaljetfume || (fume->flags2 & MF2_JUSTATTACKED)) + fume->color = FUME_SKINCOLORS[(dashmode * sizeof(FUME_SKINCOLORS)) / (DASHMODE_MAX + 1)]; if (underwater) { From 5da79e3e4476eb54a5d064fdce5ba06c47a2629b Mon Sep 17 00:00:00 2001 From: LJ Sonic Date: Sun, 9 Feb 2025 19:18:20 +0100 Subject: [PATCH 38/83] Tweak cvar defaults --- src/command.c | 17 +++++++++++++++++ src/hardware/hw_main.c | 2 +- src/netcode/d_netcmd.c | 20 ++++++++++---------- src/p_mobj.c | 2 +- src/p_user.c | 4 ++-- 5 files changed, 31 insertions(+), 14 deletions(-) diff --git a/src/command.c b/src/command.c index ab6cfc08a..53d54dbdd 100644 --- a/src/command.c +++ b/src/command.c @@ -2482,6 +2482,23 @@ static boolean CV_FilterVarByVersion(consvar_t *v, const char *valstr) if (!CV_FilterJoyAxisVars(v, valstr)) return false; } + + if (GETMAJOREXECVERSION(cv_execversion.value) < 57) // 57 = 2.2.16 + { + if ( + (!stricmp(v->name, "movebob") && atoi(valstr) == FRACUNIT) || + (!stricmp(v->name, "playersforexit") && atoi(valstr) == 4) || // 4 = all + (!stricmp(v->name, "advancemap") && atoi(valstr) == 1) || // 1 = next + (!stricmp(v->name, "cam_speed") && !stricmp(valstr, "0.3")) || + (!stricmp(v->name, "cam_orbit") && atoi(valstr) == 0) || // 0 = off + (!stricmp(v->name, "cam2_speed") && !stricmp(valstr, "0.3")) || + (!stricmp(v->name, "cam2_orbit") && atoi(valstr) == 0) || // 0 = off + (!stricmp(v->name, "timerres") && atoi(valstr) == 0) || // 0 = classic + (!stricmp(v->name, "gr_modelinterpolation") && atoi(valstr) == 1) // 1 = sometimes + ) + return false; + } + return true; } diff --git a/src/hardware/hw_main.c b/src/hardware/hw_main.c index a5befe112..5e20d0f80 100644 --- a/src/hardware/hw_main.c +++ b/src/hardware/hw_main.c @@ -5704,7 +5704,7 @@ consvar_t cv_glcoronasize = CVAR_INIT ("gr_coronasize", "1", CV_SAVE|CV_FLOAT, 0 #endif consvar_t cv_glmodels = CVAR_INIT ("gr_models", "Off", CV_SAVE, CV_OnOff, NULL); -consvar_t cv_glmodelinterpolation = CVAR_INIT ("gr_modelinterpolation", "Sometimes", CV_SAVE, glmodelinterpolation_cons_t, NULL); +consvar_t cv_glmodelinterpolation = CVAR_INIT ("gr_modelinterpolation", "Off", CV_SAVE, glmodelinterpolation_cons_t, NULL); consvar_t cv_glmodellighting = CVAR_INIT ("gr_modellighting", "Off", CV_SAVE|CV_CALL, CV_OnOff, CV_glmodellighting_OnChange); consvar_t cv_glshearing = CVAR_INIT ("gr_shearing", "Off", CV_SAVE, glshearing_cons_t, NULL); diff --git a/src/netcode/d_netcmd.c b/src/netcode/d_netcmd.c index 94170fa0d..a62db3bb9 100644 --- a/src/netcode/d_netcmd.c +++ b/src/netcode/d_netcmd.c @@ -319,8 +319,8 @@ consvar_t cv_overtime = CVAR_INIT ("overtime", "Yes", CV_SAVE|CV_NETVAR|CV_ALLOW consvar_t cv_rollingdemos = CVAR_INIT ("rollingdemos", "On", CV_SAVE, CV_OnOff, NULL); -static CV_PossibleValue_t timetic_cons_t[] = {{0, "Classic"}, {1, "Centiseconds"}, {2, "Mania"}, {3, "Tics"}, {0, NULL}}; -consvar_t cv_timetic = CVAR_INIT ("timerres", "Classic", CV_SAVE, timetic_cons_t, NULL); +static CV_PossibleValue_t timetic_cons_t[] = {{0, "Classic"}, {1, "Centiseconds"}, {2, "Mania"}, {0, NULL}}; +consvar_t cv_timetic = CVAR_INIT ("timerres", "Mania", CV_SAVE, timetic_cons_t, NULL); static CV_PossibleValue_t powerupdisplay_cons_t[] = {{0, "Never"}, {1, "First-person only"}, {2, "Always"}, {0, NULL}}; consvar_t cv_powerupdisplay = CVAR_INIT ("powerupdisplay", "First-person only", CV_SAVE, powerupdisplay_cons_t, NULL); @@ -372,10 +372,10 @@ static CV_PossibleValue_t cooplives_cons_t[] = {{0, "Infinite"}, {1, "Per-player consvar_t cv_cooplives = CVAR_INIT ("cooplives", "Avoid Game Over", CV_SAVE|CV_NETVAR|CV_CALL|CV_CHEAT|CV_ALLOWLUA, cooplives_cons_t, CoopLives_OnChange); static CV_PossibleValue_t advancemap_cons_t[] = {{0, "Off"}, {1, "Next"}, {2, "Random"}, {0, NULL}}; -consvar_t cv_advancemap = CVAR_INIT ("advancemap", "Next", CV_SAVE|CV_NETVAR|CV_ALLOWLUA, advancemap_cons_t, NULL); +consvar_t cv_advancemap = CVAR_INIT ("advancemap", "Random", CV_SAVE|CV_NETVAR|CV_ALLOWLUA, advancemap_cons_t, NULL); static CV_PossibleValue_t playersforexit_cons_t[] = {{0, "One"}, {1, "1/4"}, {2, "Half"}, {3, "3/4"}, {4, "All"}, {0, NULL}}; -consvar_t cv_playersforexit = CVAR_INIT ("playersforexit", "All", CV_SAVE|CV_NETVAR|CV_ALLOWLUA, playersforexit_cons_t, NULL); +consvar_t cv_playersforexit = CVAR_INIT ("playersforexit", "3/4", CV_SAVE|CV_NETVAR|CV_ALLOWLUA, playersforexit_cons_t, NULL); consvar_t cv_exitmove = CVAR_INIT ("exitmove", "On", CV_SAVE|CV_NETVAR|CV_CALL|CV_ALLOWLUA, CV_OnOff, ExitMove_OnChange); @@ -4253,9 +4253,9 @@ void D_GameTypeChanged(INT32 lastgametype) case GT_TEAMMATCH: if (!cv_timelimit.changed && !cv_pointlimit.changed) // user hasn't changed limits { - // default settings for match: timelimit 10 mins, no pointlimit + // default settings for match: timelimit 7 mins, no pointlimit CV_SetValue(&cv_pointlimit, 0); - CV_SetValue(&cv_timelimit, 10); + CV_SetValue(&cv_timelimit, 7); } if (!cv_itemrespawntime.changed) CV_Set(&cv_itemrespawntime, cv_itemrespawntime.defaultvalue); // respawn normally @@ -4264,9 +4264,9 @@ void D_GameTypeChanged(INT32 lastgametype) case GT_HIDEANDSEEK: if (!cv_timelimit.changed && !cv_pointlimit.changed) // user hasn't changed limits { - // default settings for tag: 5 mins, no pointlimit + // default settings for tag: 7 mins, no pointlimit // Note that tag mode also uses an alternate timing mechanism in tandem with timelimit. - CV_SetValue(&cv_timelimit, 5); + CV_SetValue(&cv_timelimit, 7); CV_SetValue(&cv_pointlimit, 0); } if (!cv_itemrespawntime.changed) @@ -4275,8 +4275,8 @@ void D_GameTypeChanged(INT32 lastgametype) case GT_CTF: if (!cv_timelimit.changed && !cv_pointlimit.changed) // user hasn't changed limits { - // default settings for CTF: no timelimit, pointlimit 5 - CV_SetValue(&cv_timelimit, 0); + // default settings for CTF: 15 mins, pointlimit 5 + CV_SetValue(&cv_timelimit, 15); CV_SetValue(&cv_pointlimit, 5); } if (!cv_itemrespawntime.changed) diff --git a/src/p_mobj.c b/src/p_mobj.c index ec107ff71..0756ff18a 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -39,7 +39,7 @@ #include "netcode/net_command.h" static CV_PossibleValue_t CV_BobSpeed[] = {{0, "MIN"}, {4*FRACUNIT, "MAX"}, {0, NULL}}; -consvar_t cv_movebob = CVAR_INIT ("movebob", "1.0", CV_FLOAT|CV_SAVE, CV_BobSpeed, NULL); +consvar_t cv_movebob = CVAR_INIT ("movebob", "0.25", CV_FLOAT|CV_SAVE, CV_BobSpeed, NULL); actioncache_t actioncachehead; diff --git a/src/p_user.c b/src/p_user.c index 7cc9c02ae..2ef6e87d2 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -9833,7 +9833,7 @@ static CV_PossibleValue_t campos_cons_t[] = { {INT32_MIN, "MIN"}, {INT32_MAX, "M consvar_t cv_cam_dist = CVAR_INIT ("cam_curdist", "160", CV_FLOAT|CV_ALLOWLUA, campos_cons_t, NULL); consvar_t cv_cam_height = CVAR_INIT ("cam_curheight", "25", CV_FLOAT|CV_ALLOWLUA, campos_cons_t, NULL); consvar_t cv_cam_still = CVAR_INIT ("cam_still", "Off", CV_ALLOWLUA, CV_OnOff, NULL); -consvar_t cv_cam_speed = CVAR_INIT ("cam_speed", "0.3", CV_FLOAT|CV_SAVE|CV_ALLOWLUA, CV_CamSpeed, NULL); +consvar_t cv_cam_speed = CVAR_INIT ("cam_speed", "0.4", CV_FLOAT|CV_SAVE|CV_ALLOWLUA, CV_CamSpeed, NULL); consvar_t cv_cam_rotate = CVAR_INIT ("cam_rotate", "0", CV_CALL|CV_NOINIT|CV_ALLOWLUA, CV_CamRotate, CV_CamRotate_OnChange); consvar_t cv_cam_rotspeed = CVAR_INIT ("cam_rotspeed", "10", CV_SAVE|CV_ALLOWLUA, rotation_cons_t, NULL); consvar_t cv_cam_turnmultiplier = CVAR_INIT ("cam_turnmultiplier", "0.75", CV_FLOAT|CV_SAVE|CV_ALLOWLUA, multiplier_cons_t, NULL); @@ -9842,7 +9842,7 @@ consvar_t cv_cam_adjust = CVAR_INIT ("cam_adjust", "On", CV_SAVE|CV_ALLOWLUA, CV consvar_t cv_cam2_dist = CVAR_INIT ("cam2_curdist", "160", CV_FLOAT|CV_ALLOWLUA, campos_cons_t, NULL); consvar_t cv_cam2_height = CVAR_INIT ("cam2_curheight", "25", CV_FLOAT|CV_ALLOWLUA, campos_cons_t, NULL); consvar_t cv_cam2_still = CVAR_INIT ("cam2_still", "Off", CV_ALLOWLUA, CV_OnOff, NULL); -consvar_t cv_cam2_speed = CVAR_INIT ("cam2_speed", "0.3", CV_FLOAT|CV_SAVE|CV_ALLOWLUA, CV_CamSpeed, NULL); +consvar_t cv_cam2_speed = CVAR_INIT ("cam2_speed", "0.4", CV_FLOAT|CV_SAVE|CV_ALLOWLUA, CV_CamSpeed, NULL); consvar_t cv_cam2_rotate = CVAR_INIT ("cam2_rotate", "0", CV_CALL|CV_NOINIT|CV_ALLOWLUA, CV_CamRotate, CV_CamRotate2_OnChange); consvar_t cv_cam2_rotspeed = CVAR_INIT ("cam2_rotspeed", "10", CV_SAVE|CV_ALLOWLUA, rotation_cons_t, NULL); consvar_t cv_cam2_turnmultiplier = CVAR_INIT ("cam2_turnmultiplier", "0.75", CV_FLOAT|CV_SAVE|CV_ALLOWLUA, multiplier_cons_t, NULL); From ffdbde58afe61253c52ef1a4fdd088260d8ab681 Mon Sep 17 00:00:00 2001 From: LJ Sonic Date: Sun, 9 Feb 2025 19:26:15 +0100 Subject: [PATCH 39/83] Fix minor whoopsie --- src/command.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/command.c b/src/command.c index 53d54dbdd..3f5f28264 100644 --- a/src/command.c +++ b/src/command.c @@ -2490,9 +2490,7 @@ static boolean CV_FilterVarByVersion(consvar_t *v, const char *valstr) (!stricmp(v->name, "playersforexit") && atoi(valstr) == 4) || // 4 = all (!stricmp(v->name, "advancemap") && atoi(valstr) == 1) || // 1 = next (!stricmp(v->name, "cam_speed") && !stricmp(valstr, "0.3")) || - (!stricmp(v->name, "cam_orbit") && atoi(valstr) == 0) || // 0 = off (!stricmp(v->name, "cam2_speed") && !stricmp(valstr, "0.3")) || - (!stricmp(v->name, "cam2_orbit") && atoi(valstr) == 0) || // 0 = off (!stricmp(v->name, "timerres") && atoi(valstr) == 0) || // 0 = classic (!stricmp(v->name, "gr_modelinterpolation") && atoi(valstr) == 1) // 1 = sometimes ) From 771504fb354475e21880837f0cb249b35e9a56f1 Mon Sep 17 00:00:00 2001 From: LJ Sonic Date: Sun, 9 Feb 2025 19:55:32 +0100 Subject: [PATCH 40/83] Re-add "timerres tics" option --- src/netcode/d_netcmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/netcode/d_netcmd.c b/src/netcode/d_netcmd.c index a62db3bb9..35e28db36 100644 --- a/src/netcode/d_netcmd.c +++ b/src/netcode/d_netcmd.c @@ -319,7 +319,7 @@ consvar_t cv_overtime = CVAR_INIT ("overtime", "Yes", CV_SAVE|CV_NETVAR|CV_ALLOW consvar_t cv_rollingdemos = CVAR_INIT ("rollingdemos", "On", CV_SAVE, CV_OnOff, NULL); -static CV_PossibleValue_t timetic_cons_t[] = {{0, "Classic"}, {1, "Centiseconds"}, {2, "Mania"}, {0, NULL}}; +static CV_PossibleValue_t timetic_cons_t[] = {{0, "Classic"}, {1, "Centiseconds"}, {2, "Mania"}, {3, "Tics"}, {0, NULL}}; consvar_t cv_timetic = CVAR_INIT ("timerres", "Mania", CV_SAVE, timetic_cons_t, NULL); static CV_PossibleValue_t powerupdisplay_cons_t[] = {{0, "Never"}, {1, "First-person only"}, {2, "Always"}, {0, NULL}}; From 1f66341d598f49bf2515bc70cb1a4be712eed52f Mon Sep 17 00:00:00 2001 From: Logan Aerl Arias Date: Sun, 16 Feb 2025 12:41:29 +0000 Subject: [PATCH 41/83] fix issue with static mingw build on Windows --- src/CMakeLists.txt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 2cfb56f6e..fbc341733 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -464,8 +464,13 @@ else() endif() if(TARGET miniupnpc::miniupnpc) - target_compile_definitions(SRB2SDL2 PRIVATE -DHAVE_MINIUPNPC) - target_link_libraries(SRB2SDL2 PRIVATE miniupnpc::miniupnpc) + if("${VCPKG_TARGET_TRIPLET}" MATCHES "-mingw-static$") + target_compile_definitions(SRB2SDL2 PRIVATE -DHAVE_MINIUPNPC -DMINIUPNP_STATICLIB) + target_link_libraries(SRB2SDL2 PRIVATE miniupnpc::miniupnpc -liphlpapi) + else() + target_compile_definitions(SRB2SDL2 PRIVATE -DHAVE_MINIUPNPC) + target_link_libraries(SRB2SDL2 PRIVATE miniupnpc::miniupnpc) + endif() message(STATUS "miniupnpc Found") else() message(STATUS "No miniupnpc Found") From f7ae70201f5beb1598c6297071467b3eea1798d5 Mon Sep 17 00:00:00 2001 From: Logan Aerl Arias Date: Sun, 16 Feb 2025 13:59:38 +0000 Subject: [PATCH 42/83] use Unix Makefiles to build Win --- .gitlab/ci/jobs/windows-x64.yml | 77 ++++++++++++++++++++++++++++++++- .gitlab/ci/jobs/windows-x86.yml | 14 +++--- 2 files changed, 81 insertions(+), 10 deletions(-) diff --git a/.gitlab/ci/jobs/windows-x64.yml b/.gitlab/ci/jobs/windows-x64.yml index ca7f4ae08..73791e82a 100644 --- a/.gitlab/ci/jobs/windows-x64.yml +++ b/.gitlab/ci/jobs/windows-x64.yml @@ -7,6 +7,30 @@ Windows x64: allow_failure: true + cache: + - key: ccache-$CI_JOB_NAME_SLUG-$CI_COMMIT_REF_SLUG + fallback_keys: + - ccache-$CI_JOB_NAME_SLUG-$CI_DEFAULT_BRANCH + - ccache-$CI_JOB_NAME_SLUG-master + paths: + - build/ccache + - build/ccache_statslog + + - key: apt-$CI_JOB_IMAGE + paths: + - build/apt-cache + unprotect: true + + - key: vcpkg-root + paths: + - build/vcpkg-root + unprotect: true + + - key: vcpkg-binary-cache-x64-mingw-static + paths: + - build/vcpkg-binary-cache + unprotect: true + artifacts: paths: - "build.cmake/bin/" @@ -20,6 +44,27 @@ Windows x64: CXX: /usr/lib/ccache/x86_64-w64-mingw32-g++ script: + - | + # vcpkg + echo -e "\e[0Ksection_start:`date +%s`:vcpkg-root[collapsed=true]\r\e[0KUpdating vcpkg" + + if [ -d "build/vcpkg-root" ]; then + pushd build/vcpkg-root + git fetch https://github.com/Microsoft/vcpkg master + git reset --hard FETCH_HEAD + popd + else + mkdir -p build + git clone https://github.com/Microsoft/vcpkg build/vcpkg-root + fi + + export VCPKG_ROOT=$(pwd)/build/vcpkg-root + export VCPKG_BINARY_SOURCES="clear;files,/opt/vcpkg.bsources,read;files,$(pwd)/build/vcpkg-binary-cache,readwrite" + + mkdir -p "build/vcpkg-binary-cache" + + echo -e "\e[0Ksection_end:`date +%s`:vcpkg-root\r\e[0K" + - - | # apt_toolchain echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" @@ -39,7 +84,7 @@ Windows x64: - - | # cmake echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles" - - cmake -B build.cmake -DSRB2_USE_CCACHE=NO -DSRB2_CONFIG_ERRORMODE=ON -DCMAKE_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-mingw-static -DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/toolchains/mingw.cmake + - cmake -B build.cmake -DSRB2_USE_CCACHE=NO -DSRB2_CONFIG_ERRORMODE=ON -DCMAKE_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-mingw-static -DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/toolchains/mingw.cmake -G "Unix Makefiles" - | # cmake echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K" @@ -51,3 +96,33 @@ Windows x64: - | # make echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" + + after_script: + - - | + # apt_clean + echo -e "\e[0Ksection_start:`date +%s`:apt_clean[collapsed=true]\r\e[0KCleaning of unneeded APT packages" + - apt-get autoclean + - | + # apt_clean + echo -e "\e[0Ksection_end:`date +%s`:apt_clean\r\e[0K" + + - - | + # vcpkg_clean + echo -e "\e[0Ksection_start:`date +%s`:vcpkg_clean[collapsed=true]\r\e[0KCleaning vcpkg-root" + + if [ -d "build/vcpkg-root" ]; then + pushd "build/vcpkg-root" + git clean -f + popd + fi + + echo -e "\e[0Ksection_end:`date +%s`:vcpkg_clean\r\e[0K" + + - - | + # ccache_stats + echo -e "\e[0Ksection_start:`date +%s`:ccache_stats[collapsed=true]\r\e[0Kccache statistics:" + - ccache --show-stats + - ccache --show-log-stats || true + - | + # ccahe_stats + echo -e "\e[0Ksection_end:`date +%s`:ccache_stats\r\e[0K" diff --git a/.gitlab/ci/jobs/windows-x86.yml b/.gitlab/ci/jobs/windows-x86.yml index c8293eb7d..9a33364b2 100644 --- a/.gitlab/ci/jobs/windows-x86.yml +++ b/.gitlab/ci/jobs/windows-x86.yml @@ -3,10 +3,6 @@ Windows x86: stage: build - when: manual - - allow_failure: true - cache: - key: ccache-$CI_JOB_NAME_SLUG-$CI_COMMIT_REF_SLUG fallback_keys: @@ -33,8 +29,8 @@ Windows x86: artifacts: paths: - - "build/ninja-x86_mingw_static_vcpkg-debug/bin/" - - "build/ninja-x86_mingw_static_vcpkg-debug/src/config.h" + - "build.cmake/bin/" + - "build.cmake/src/config.h" expose_as: "Win32" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win32" @@ -59,7 +55,7 @@ Windows x86: fi export VCPKG_ROOT=$(pwd)/build/vcpkg-root - export VCPKG_BINARY_SOURCES="clear;files,$(pwd)/build/vcpkg-binary-cache,readwrite" + export VCPKG_BINARY_SOURCES="clear;files,/opt/vcpkg.bsources,read;files,$(pwd)/build/vcpkg-binary-cache,readwrite" mkdir -p "build/vcpkg-binary-cache" @@ -84,7 +80,7 @@ Windows x86: - - | # cmake echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles" - - cmake -B build.cmake --preset ninja-x86_mingw_static_vcpkg-debug -DSRB2_USE_CCACHE=NO -DSRB2_CONFIG_ERRORMODE=ON + - cmake -B build.cmake -DSRB2_USE_CCACHE=NO -DSRB2_CONFIG_ERRORMODE=ON -DCMAKE_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x86-mingw-static -DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/toolchains/mingw.cmake -G "Unix Makefiles" - | # cmake echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K" @@ -92,7 +88,7 @@ Windows x86: - - | # make echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - - cmake -build build.cmake --parallel 1 --verbose --preset ninja-x86_mingw_static_vcpkg-debug + - cmake --build build.cmake --parallel 1 --verbose - | # make echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" From 36d8d8a01ff11d7f109218dedb58c5d0f24f90a0 Mon Sep 17 00:00:00 2001 From: Logan Aerl Arias Date: Sun, 16 Feb 2025 14:10:42 -0500 Subject: [PATCH 43/83] remove gold linker everywhere remove gold linker everywhere --- .gitlab/ci/jobs/debian-stable-amd64-makefile.yml | 1 - .gitlab/ci/jobs/debian-stable-amd64.yml | 1 - .gitlab/ci/jobs/debian-stable-arm64-makefile.yml | 1 - .gitlab/ci/jobs/debian-stable-arm64.yml | 1 - .gitlab/ci/jobs/debian-testing-clang-amd64.yml | 1 - .gitlab/ci/jobs/debian-testing-gcc-amd64-makefile.yml | 1 - .gitlab/ci/jobs/debian-testing-gcc-amd64.yml | 1 - 7 files changed, 7 deletions(-) diff --git a/.gitlab/ci/jobs/debian-stable-amd64-makefile.yml b/.gitlab/ci/jobs/debian-stable-amd64-makefile.yml index a6aebfac3..fee52c5a7 100644 --- a/.gitlab/ci/jobs/debian-stable-amd64-makefile.yml +++ b/.gitlab/ci/jobs/debian-stable-amd64-makefile.yml @@ -13,7 +13,6 @@ Debian stable:amd64 Makefile: variables: CC: x86_64-linux-gnu-gcc CXX: x86_64-linux-gnu-g++ - LDFLAGS: -Wl,-fuse-ld=gold OBJCOPY: x86_64-linux-gnu-objcopy OBJDUMP: x86_64-linux-gnu-objdump PKG_CONFIG_PATH: /usr/lib/x86_64-linux-gnu/pkgconfig diff --git a/.gitlab/ci/jobs/debian-stable-amd64.yml b/.gitlab/ci/jobs/debian-stable-amd64.yml index ed1f5ce23..e58f5a112 100644 --- a/.gitlab/ci/jobs/debian-stable-amd64.yml +++ b/.gitlab/ci/jobs/debian-stable-amd64.yml @@ -13,7 +13,6 @@ Debian stable:amd64: variables: CC: x86_64-linux-gnu-gcc CXX: x86_64-linux-gnu-g++ - LDFLAGS: -Wl,-fuse-ld=gold OBJCOPY: x86_64-linux-gnu-objcopy OBJDUMP: x86_64-linux-gnu-objdump PKG_CONFIG_PATH: /usr/lib/x86_64-linux-gnu/pkgconfig diff --git a/.gitlab/ci/jobs/debian-stable-arm64-makefile.yml b/.gitlab/ci/jobs/debian-stable-arm64-makefile.yml index 53625138a..aa0ea3780 100644 --- a/.gitlab/ci/jobs/debian-stable-arm64-makefile.yml +++ b/.gitlab/ci/jobs/debian-stable-arm64-makefile.yml @@ -15,7 +15,6 @@ Debian stable:arm64 Makefile: variables: CC: aarch64-linux-gnu-gcc CXX: aarch64-linux-gnu-g++ - LDFLAGS: -Wl,-fuse-ld=gold OBJCOPY: aarch64-linux-gnu-objcopy OBJDUMP: aarch64-linux-gnu-objdump LD: aarch64-linux-gnu-ld diff --git a/.gitlab/ci/jobs/debian-stable-arm64.yml b/.gitlab/ci/jobs/debian-stable-arm64.yml index b0f02dd39..135d87aa5 100644 --- a/.gitlab/ci/jobs/debian-stable-arm64.yml +++ b/.gitlab/ci/jobs/debian-stable-arm64.yml @@ -15,7 +15,6 @@ Debian stable:arm64: variables: CC: aarch64-linux-gnu-gcc CXX: aarch64-linux-gnu-g++ - LDFLAGS: -Wl,-fuse-ld=gold OBJCOPY: aarch64-linux-gnu-objcopy OBJDUMP: aarch64-linux-gnu-objdump LD: aarch64-linux-gnu-ld diff --git a/.gitlab/ci/jobs/debian-testing-clang-amd64.yml b/.gitlab/ci/jobs/debian-testing-clang-amd64.yml index dc790b397..7349f2b92 100644 --- a/.gitlab/ci/jobs/debian-testing-clang-amd64.yml +++ b/.gitlab/ci/jobs/debian-testing-clang-amd64.yml @@ -19,4 +19,3 @@ Debian testing Clang: CXX: clang WFLAGS: -Wno-cast-align -Wno-implicit-const-int-float-conversion -Werror -Wno-deprecated-non-prototype -Wno-single-bit-bitfield-constant-conversion CFLAGS: -Wno-cast-align -Wno-implicit-const-int-float-conversion -Werror -Wno-deprecated-non-prototype -Wno-single-bit-bitfield-constant-conversion - LDFLAGS: -Wl,-fuse-ld=gold diff --git a/.gitlab/ci/jobs/debian-testing-gcc-amd64-makefile.yml b/.gitlab/ci/jobs/debian-testing-gcc-amd64-makefile.yml index 70d71b537..1165b1fea 100644 --- a/.gitlab/ci/jobs/debian-testing-gcc-amd64-makefile.yml +++ b/.gitlab/ci/jobs/debian-testing-gcc-amd64-makefile.yml @@ -19,7 +19,6 @@ Debian testing GCC Makefile: variables: CC: gcc CXX: g++ - LDFLAGS: -Wl,-fuse-ld=gold script: - - | diff --git a/.gitlab/ci/jobs/debian-testing-gcc-amd64.yml b/.gitlab/ci/jobs/debian-testing-gcc-amd64.yml index 72bfdc3e3..fc998ea47 100644 --- a/.gitlab/ci/jobs/debian-testing-gcc-amd64.yml +++ b/.gitlab/ci/jobs/debian-testing-gcc-amd64.yml @@ -19,7 +19,6 @@ Debian testing GCC: variables: CC: gcc CXX: g++ - LDFLAGS: -Wl,-fuse-ld=gold script: - - | From d2ad04a105805130b8e82a77acbc8e6e3d9aebe8 Mon Sep 17 00:00:00 2001 From: Craftyawesome Date: Wed, 5 Feb 2025 23:15:43 -0500 Subject: [PATCH 44/83] reset seenplayer on netgame exit --- src/netcode/d_clisrv.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/netcode/d_clisrv.c b/src/netcode/d_clisrv.c index 6702e2591..7a5fb06a6 100644 --- a/src/netcode/d_clisrv.c +++ b/src/netcode/d_clisrv.c @@ -673,6 +673,7 @@ void D_QuitNetGame(void) HSendPacket(servernode, true, 0, 0); } + seenplayer = NULL; D_CloseConnection(); ClearAdminPlayers(); From 56223c9e80157c48f216e2ee68b7435fb6543f25 Mon Sep 17 00:00:00 2001 From: Radicalicious <77638573+Radicalicious@users.noreply.github.com> Date: Tue, 18 Feb 2025 12:37:14 -0600 Subject: [PATCH 45/83] Update FOV to 100 --- src/r_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/r_main.c b/src/r_main.c index 46bac9dc7..3de5cb151 100644 --- a/src/r_main.c +++ b/src/r_main.c @@ -161,7 +161,7 @@ consvar_t cv_translucency = CVAR_INIT ("translucency", "On", CV_SAVE, CV_OnOff, consvar_t cv_drawdist = CVAR_INIT ("drawdist", "Infinite", CV_SAVE, drawdist_cons_t, NULL); consvar_t cv_drawdist_nights = CVAR_INIT ("drawdist_nights", "2048", CV_SAVE, drawdist_cons_t, NULL); consvar_t cv_drawdist_precip = CVAR_INIT ("drawdist_precip", "1024", CV_SAVE, drawdist_precip_cons_t, NULL); -consvar_t cv_fov = CVAR_INIT ("fov", "90", CV_SAVE|CV_FLOAT|CV_CALL, fov_cons_t, Fov_OnChange); +consvar_t cv_fov = CVAR_INIT ("fov", "100", CV_SAVE|CV_FLOAT|CV_CALL, fov_cons_t, Fov_OnChange); consvar_t cv_fovchange = CVAR_INIT ("fovchange", "Off", CV_SAVE, CV_OnOff, NULL); consvar_t cv_maxportals = CVAR_INIT ("maxportals", "2", CV_SAVE, maxportals_cons_t, NULL); From e26634e8d59725906e2ecdce920923be490fd85c Mon Sep 17 00:00:00 2001 From: Radicalicious <77638573+Radicalicious@users.noreply.github.com> Date: Tue, 18 Feb 2025 12:48:59 -0600 Subject: [PATCH 46/83] Fix model interpolation settings --- src/hardware/hw_main.c | 3 +-- src/hardware/hw_md2.c | 4 ---- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/hardware/hw_main.c b/src/hardware/hw_main.c index 5e20d0f80..830faef57 100644 --- a/src/hardware/hw_main.c +++ b/src/hardware/hw_main.c @@ -5675,7 +5675,6 @@ void HWR_LoadLevel(void) // ========================================================================== static CV_PossibleValue_t glshaders_cons_t[] = {{0, "Off"}, {1, "On"}, {2, "Ignore custom shaders"}, {0, NULL}}; -static CV_PossibleValue_t glmodelinterpolation_cons_t[] = {{0, "Off"}, {1, "Sometimes"}, {2, "Always"}, {0, NULL}}; static CV_PossibleValue_t glfakecontrast_cons_t[] = {{0, "Off"}, {1, "On"}, {2, "Smooth"}, {0, NULL}}; static CV_PossibleValue_t glshearing_cons_t[] = {{0, "Off"}, {1, "On"}, {2, "Third-person"}, {0, NULL}}; @@ -5704,7 +5703,7 @@ consvar_t cv_glcoronasize = CVAR_INIT ("gr_coronasize", "1", CV_SAVE|CV_FLOAT, 0 #endif consvar_t cv_glmodels = CVAR_INIT ("gr_models", "Off", CV_SAVE, CV_OnOff, NULL); -consvar_t cv_glmodelinterpolation = CVAR_INIT ("gr_modelinterpolation", "Off", CV_SAVE, glmodelinterpolation_cons_t, NULL); +consvar_t cv_glmodelinterpolation = CVAR_INIT ("gr_modelinterpolation", "On", CV_SAVE, CV_OnOff, NULL); consvar_t cv_glmodellighting = CVAR_INIT ("gr_modellighting", "Off", CV_SAVE|CV_CALL, CV_OnOff, CV_glmodellighting_OnChange); consvar_t cv_glshearing = CVAR_INIT ("gr_shearing", "Off", CV_SAVE, glshearing_cons_t, NULL); diff --git a/src/hardware/hw_md2.c b/src/hardware/hw_md2.c index 931867142..ce2c2c346 100644 --- a/src/hardware/hw_md2.c +++ b/src/hardware/hw_md2.c @@ -1062,15 +1062,11 @@ static boolean HWR_AllowModel(mobj_t *mobj) static boolean HWR_CanInterpolateModel(mobj_t *mobj, model_t *model) { - if (cv_glmodelinterpolation.value == 2) // Always interpolate - return true; return model->interpolate[(mobj->frame & FF_FRAMEMASK)]; } static boolean HWR_CanInterpolateSprite2(modelspr2frames_t *spr2frame) { - if (cv_glmodelinterpolation.value == 2) // Always interpolate - return true; return spr2frame->interpolate; } From a187b79f3402d536eb47910a11ccd48b548643a8 Mon Sep 17 00:00:00 2001 From: Radicalicious <77638573+Radicalicious@users.noreply.github.com> Date: Tue, 18 Feb 2025 14:09:41 -0600 Subject: [PATCH 47/83] Fix missing fov conversion --- src/command.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/command.c b/src/command.c index 3f5f28264..87c3c5bbb 100644 --- a/src/command.c +++ b/src/command.c @@ -2492,7 +2492,8 @@ static boolean CV_FilterVarByVersion(consvar_t *v, const char *valstr) (!stricmp(v->name, "cam_speed") && !stricmp(valstr, "0.3")) || (!stricmp(v->name, "cam2_speed") && !stricmp(valstr, "0.3")) || (!stricmp(v->name, "timerres") && atoi(valstr) == 0) || // 0 = classic - (!stricmp(v->name, "gr_modelinterpolation") && atoi(valstr) == 1) // 1 = sometimes + (!stricmp(v->name, "gr_modelinterpolation") && atoi(valstr) == 1) || // 1 = sometimes + (!stricmp(v->name, "fov") && atoi(valstr) == 90) ) return false; } From f5ceb2db26a3c6ef1ffcc3a5852cadf944c12fa3 Mon Sep 17 00:00:00 2001 From: Radicalicious <77638573+Radicalicious@users.noreply.github.com> Date: Tue, 18 Feb 2025 14:37:01 -0600 Subject: [PATCH 48/83] Force model interpolation setting reset --- src/command.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/command.c b/src/command.c index 87c3c5bbb..bc24d5e05 100644 --- a/src/command.c +++ b/src/command.c @@ -2492,7 +2492,7 @@ static boolean CV_FilterVarByVersion(consvar_t *v, const char *valstr) (!stricmp(v->name, "cam_speed") && !stricmp(valstr, "0.3")) || (!stricmp(v->name, "cam2_speed") && !stricmp(valstr, "0.3")) || (!stricmp(v->name, "timerres") && atoi(valstr) == 0) || // 0 = classic - (!stricmp(v->name, "gr_modelinterpolation") && atoi(valstr) == 1) || // 1 = sometimes + (!stricmp(v->name, "gr_modelinterpolation")) || // Force reset (!stricmp(v->name, "fov") && atoi(valstr) == 90) ) return false; From 646929d83dc8c4441d6eb1e3644d3f08420c284f Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sun, 23 Feb 2025 12:21:37 -0500 Subject: [PATCH 49/83] netcode: fix runtime issues with -noipv4 --- src/netcode/i_tcp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/netcode/i_tcp.c b/src/netcode/i_tcp.c index 9a261fb4e..38d4bbbaa 100644 --- a/src/netcode/i_tcp.c +++ b/src/netcode/i_tcp.c @@ -656,7 +656,7 @@ static inline ssize_t SOCK_SendToAddr(SOCKET_TYPE socket, mysockaddr_t *sockaddr return sendto(socket, (char *)&doomcom->data, doomcom->datalength, 0, &sockaddr->any, d); } -#define ALLOWEDERROR(x) ((x) == ECONNREFUSED || (x) == EWOULDBLOCK || (x) == EHOSTUNREACH || (x) == ENETUNREACH) +#define ALLOWEDERROR(x) ((x) == ECONNREFUSED || (x) == EWOULDBLOCK || (x) == EHOSTUNREACH || (x) == ENETUNREACH || (x) == EADDRNOTAVAIL) static void SOCK_Send(void) { @@ -710,7 +710,7 @@ static void SOCK_Send(void) } } - if (c == ERRSOCKET && e != -1) // -1 means no socket for the address family was found + if (c == ERRSOCKET && e != 0) // 0 means no socket for the address family was found { if (!ALLOWEDERROR(e)) I_Error("SOCK_Send, error sending to node %d (%s) #%u, %s", doomcom->remotenode, From e06eead3eb7c24f82dfc3895829b2105ca3815e0 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Wed, 26 Feb 2025 21:01:47 -0500 Subject: [PATCH 50/83] GitLab CI: no more Gold linker --- .gitlab/ci/jobs/debian-stable-clang-amd64.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitlab/ci/jobs/debian-stable-clang-amd64.yml b/.gitlab/ci/jobs/debian-stable-clang-amd64.yml index c40998e17..0b8e6e50c 100644 --- a/.gitlab/ci/jobs/debian-stable-clang-amd64.yml +++ b/.gitlab/ci/jobs/debian-stable-clang-amd64.yml @@ -19,7 +19,6 @@ Debian stable Clang: CXX: clang WFLAGS: -Wno-cast-align -Wno-implicit-const-int-float-conversion -Werror CFLAGS: -Wno-cast-align -Wno-implicit-const-int-float-conversion -Werror - LDFLAGS: -Wl,-fuse-ld=gold script: - - | From db7508f7e43910c925e54369f2c15543d9909683 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Wed, 26 Feb 2025 21:02:48 -0500 Subject: [PATCH 51/83] GitLab CI: use "ccache --set-config" over tee on the ccache.conf file --- .gitlab/ci/jobs/alpine-3-gcc-makefile.yml | 12 +++++------- .gitlab/ci/jobs/alpine-3-gcc.yml | 12 +++++------- .gitlab/ci/templates/srb2ci.yml | 12 +++++------- 3 files changed, 15 insertions(+), 21 deletions(-) diff --git a/.gitlab/ci/jobs/alpine-3-gcc-makefile.yml b/.gitlab/ci/jobs/alpine-3-gcc-makefile.yml index 6b0b6a06f..3a17e0933 100644 --- a/.gitlab/ci/jobs/alpine-3-gcc-makefile.yml +++ b/.gitlab/ci/jobs/alpine-3-gcc-makefile.yml @@ -58,26 +58,24 @@ Alpine 3 GCC Makefile: - - | # ccache_config echo -e "\e[0Ksection_start:`date +%s`:ccache_config[collapsed=true]\r\e[0KSetting up ccache config" - - mkdir --parents --verbose ~/.ccache/ - - touch ~/.ccache/ccache.conf - | # cache.conf echo Adding ccache configution option - | # base_dir - echo base_dir = $PWD | tee -a ~/.ccache/ccache.conf + ccache --set-config base_dir=$CI_PROJECT_DIR - | # cache_dir - echo cache_dir = $PWD/ccache | tee -a ~/.ccache/ccache.conf + ccache --set-config cache_dir=$CI_PROJECT_DIR/build/ccache - | # compiler_check - echo compiler_check = content | tee -a ~/.ccache/ccache.conf + ccache --set-config compiler_check=content - | # stats_log - echo stats_log = $PWD/ccache_statslog | tee -a ~/.ccache/ccache.conf + ccache --set-config stats_log=$CI_PROJECT_DIR/build/ccache_statslog - | # max_size - echo max_size = 50M | tee -a ~/.ccache/ccache.conf + ccache --set-config max_size=300M - | # ccache_config echo -e "\e[0Ksection_end:`date +%s`:ccache_config\r\e[0K" diff --git a/.gitlab/ci/jobs/alpine-3-gcc.yml b/.gitlab/ci/jobs/alpine-3-gcc.yml index 72994d405..56339e332 100644 --- a/.gitlab/ci/jobs/alpine-3-gcc.yml +++ b/.gitlab/ci/jobs/alpine-3-gcc.yml @@ -58,26 +58,24 @@ Alpine 3 GCC: - - | # ccache_config echo -e "\e[0Ksection_start:`date +%s`:ccache_config[collapsed=true]\r\e[0KSetting up ccache config" - - mkdir --parents --verbose ~/.ccache/ - - touch ~/.ccache/ccache.conf - | # cache.conf echo Adding ccache configution option - | # base_dir - echo base_dir = $PWD | tee -a ~/.ccache/ccache.conf + ccache --set-config base_dir=$CI_PROJECT_DIR - | # cache_dir - echo cache_dir = $PWD/ccache | tee -a ~/.ccache/ccache.conf + ccache --set-config cache_dir=$CI_PROJECT_DIR/build/ccache - | # compiler_check - echo compiler_check = content | tee -a ~/.ccache/ccache.conf + ccache --set-config compiler_check=content - | # stats_log - echo stats_log = $PWD/ccache_statslog | tee -a ~/.ccache/ccache.conf + ccache --set-config stats_log=$CI_PROJECT_DIR/build/ccache_statslog - | # max_size - echo max_size = 50M | tee -a ~/.ccache/ccache.conf + ccache --set-config max_size=300M - | # ccache_config echo -e "\e[0Ksection_end:`date +%s`:ccache_config\r\e[0K" diff --git a/.gitlab/ci/templates/srb2ci.yml b/.gitlab/ci/templates/srb2ci.yml index bdf8a3ed6..102f5925d 100644 --- a/.gitlab/ci/templates/srb2ci.yml +++ b/.gitlab/ci/templates/srb2ci.yml @@ -93,26 +93,24 @@ - - | # ccache_config echo -e "\e[0Ksection_start:`date +%s`:ccache_config[collapsed=true]\r\e[0KSetting up ccache config" - - mkdir --parents --verbose ~/.ccache/ - - touch ~/.ccache/ccache.conf - | # cache.conf echo Adding ccache configution option - | # base_dir - echo base_dir = $CI_PROJECT_DIR | tee --append ~/.ccache/ccache.conf + ccache --set-config base_dir=$CI_PROJECT_DIR - | # cache_dir - echo cache_dir = $CI_PROJECT_DIR/build/ccache | tee --append ~/.ccache/ccache.conf + ccache --set-config cache_dir=$CI_PROJECT_DIR/build/ccache - | # compiler_check - echo compiler_check = content | tee --append ~/.ccache/ccache.conf + ccache --set-config compiler_check=content - | # stats_log - echo stats_log = $CI_PROJECT_DIR/build/ccache_statslog | tee --append ~/.ccache/ccache.conf + ccache --set-config stats_log=$CI_PROJECT_DIR/build/ccache_statslog - | # max_size - echo max_size = 300M | tee --append ~/.ccache/ccache.conf + ccache --set-config max_size=300M - | # ccache_config echo -e "\e[0Ksection_end:`date +%s`:ccache_config\r\e[0K" From fa4924bc1950a101b74d1e36dbed23e1890e0ab6 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Wed, 26 Feb 2025 21:16:20 -0500 Subject: [PATCH 52/83] GitLab CI: MacOS build does not use vcpkg --- .gitlab/ci/jobs/macos-x86_64.yml | 60 +------------------------------- 1 file changed, 1 insertion(+), 59 deletions(-) diff --git a/.gitlab/ci/jobs/macos-x86_64.yml b/.gitlab/ci/jobs/macos-x86_64.yml index d40ae65f6..3955a6a48 100644 --- a/.gitlab/ci/jobs/macos-x86_64.yml +++ b/.gitlab/ci/jobs/macos-x86_64.yml @@ -1,38 +1,13 @@ osxcross x86_64: extends: .srb2ci - stage: build - - cache: - - key: ccache-$CI_JOB_NAME_SLUG-$CI_COMMIT_REF_SLUG - fallback_keys: - - ccache-$CI_JOB_NAME_SLUG-$CI_DEFAULT_BRANCH - - ccache-$CI_JOB_NAME_SLUG-master - paths: - - build/ccache - - build/ccache_statslog - - - key: apt-$CI_JOB_IMAGE - paths: - - build/apt-cache - unprotect: true - - - key: vcpkg-root - paths: - - build/vcpkg-root - unprotect: true - - - key: vcpkg-binary-cache-x64-osx - paths: - - build/vcpkg-binary-cache - unprotect: true + stage: osxcross artifacts: paths: - "build.x86_64/bin/" - "build.x86_64/dist/x86_64.h" - "build.x86_64/src/config.h" - expose_as: "Mac x86_64" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-x86_64-apple-darwin21.4" variables: @@ -40,27 +15,6 @@ osxcross x86_64: LD: x86_64-apple-darwin21.4-ld script: - - | - # vcpkg - echo -e "\e[0Ksection_start:`date +%s`:vcpkg-root[collapsed=true]\r\e[0KUpdating vcpkg" - - if [ -d "build/vcpkg-root" ]; then - pushd build/vcpkg-root - git fetch https://github.com/Microsoft/vcpkg master - git reset --hard FETCH_HEAD - popd - else - mkdir -p build - git clone https://github.com/Microsoft/vcpkg build/vcpkg-root - fi - - export VCPKG_ROOT=$(pwd)/build/vcpkg-root - export VCPKG_BINARY_SOURCES="clear;files,$(pwd)/build/vcpkg-binary-cache,readwrite" - - mkdir -p "build/vcpkg-binary-cache" - - echo -e "\e[0Ksection_end:`date +%s`:vcpkg-root\r\e[0K" - - - | # apt_development echo -e "\e[0Ksection_start:`date +%s`:macports_development[collapsed=true]\r\e[0KInstalling development packages" @@ -105,18 +59,6 @@ osxcross x86_64: # apt_clean echo -e "\e[0Ksection_end:`date +%s`:apt_clean\r\e[0K" - - - | - # vcpkg_clean - echo -e "\e[0Ksection_start:`date +%s`:vcpkg_clean[collapsed=true]\r\e[0KCleaning vcpkg-root" - - if [ -d "build/vcpkg-root" ]; then - pushd "build/vcpkg-root" - git clean - popd - fi - - echo -e "\e[0Ksection_end:`date +%s`:vcpkg_clean\r\e[0K" - - - | # ccache_stats echo -e "\e[0Ksection_start:`date +%s`:ccache_stats[collapsed=true]\r\e[0Kccache statistics:" From 7cbec739716f3d2fe7d5228b799342f9276b42da Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Wed, 26 Feb 2025 21:17:00 -0500 Subject: [PATCH 53/83] GitLab CI: do not checkout own copy of vcpkg, use the one that comes with the builder image --- .gitlab/ci/jobs/windows-x64.yml | 32 ++------------------------------ .gitlab/ci/jobs/windows-x86.yml | 32 ++------------------------------ 2 files changed, 4 insertions(+), 60 deletions(-) diff --git a/.gitlab/ci/jobs/windows-x64.yml b/.gitlab/ci/jobs/windows-x64.yml index 73791e82a..36f12e308 100644 --- a/.gitlab/ci/jobs/windows-x64.yml +++ b/.gitlab/ci/jobs/windows-x64.yml @@ -21,11 +21,6 @@ Windows x64: - build/apt-cache unprotect: true - - key: vcpkg-root - paths: - - build/vcpkg-root - unprotect: true - - key: vcpkg-binary-cache-x64-mingw-static paths: - build/vcpkg-binary-cache @@ -46,20 +41,9 @@ Windows x64: script: - | # vcpkg - echo -e "\e[0Ksection_start:`date +%s`:vcpkg-root[collapsed=true]\r\e[0KUpdating vcpkg" + echo -e "\e[0Ksection_start:`date +%s`:vcpkg-root[collapsed=true]\r\e[0KSetting vcpkg cache" - if [ -d "build/vcpkg-root" ]; then - pushd build/vcpkg-root - git fetch https://github.com/Microsoft/vcpkg master - git reset --hard FETCH_HEAD - popd - else - mkdir -p build - git clone https://github.com/Microsoft/vcpkg build/vcpkg-root - fi - - export VCPKG_ROOT=$(pwd)/build/vcpkg-root - export VCPKG_BINARY_SOURCES="clear;files,/opt/vcpkg.bsources,read;files,$(pwd)/build/vcpkg-binary-cache,readwrite" + export VCPKG_DEFAULT_BINARY_CACHE="$(pwd)/build/vcpkg-binary-cache" mkdir -p "build/vcpkg-binary-cache" @@ -106,18 +90,6 @@ Windows x64: # apt_clean echo -e "\e[0Ksection_end:`date +%s`:apt_clean\r\e[0K" - - - | - # vcpkg_clean - echo -e "\e[0Ksection_start:`date +%s`:vcpkg_clean[collapsed=true]\r\e[0KCleaning vcpkg-root" - - if [ -d "build/vcpkg-root" ]; then - pushd "build/vcpkg-root" - git clean -f - popd - fi - - echo -e "\e[0Ksection_end:`date +%s`:vcpkg_clean\r\e[0K" - - - | # ccache_stats echo -e "\e[0Ksection_start:`date +%s`:ccache_stats[collapsed=true]\r\e[0Kccache statistics:" diff --git a/.gitlab/ci/jobs/windows-x86.yml b/.gitlab/ci/jobs/windows-x86.yml index 9a33364b2..7a298731d 100644 --- a/.gitlab/ci/jobs/windows-x86.yml +++ b/.gitlab/ci/jobs/windows-x86.yml @@ -17,11 +17,6 @@ Windows x86: - build/apt-cache unprotect: true - - key: vcpkg-root - paths: - - build/vcpkg-root - unprotect: true - - key: vcpkg-binary-cache-x86-mingw-static paths: - build/vcpkg-binary-cache @@ -42,20 +37,9 @@ Windows x86: script: - | # vcpkg - echo -e "\e[0Ksection_start:`date +%s`:vcpkg-root[collapsed=true]\r\e[0KUpdating vcpkg" + echo -e "\e[0Ksection_start:`date +%s`:vcpkg-root[collapsed=true]\r\e[0KSetting vcpkg cache" - if [ -d "build/vcpkg-root" ]; then - pushd build/vcpkg-root - git fetch https://github.com/Microsoft/vcpkg master - git reset --hard FETCH_HEAD - popd - else - mkdir -p build - git clone https://github.com/Microsoft/vcpkg build/vcpkg-root - fi - - export VCPKG_ROOT=$(pwd)/build/vcpkg-root - export VCPKG_BINARY_SOURCES="clear;files,/opt/vcpkg.bsources,read;files,$(pwd)/build/vcpkg-binary-cache,readwrite" + export VCPKG_DEFAULT_BINARY_CACHE="$(pwd)/build/vcpkg-binary-cache" mkdir -p "build/vcpkg-binary-cache" @@ -102,18 +86,6 @@ Windows x86: # apt_clean echo -e "\e[0Ksection_end:`date +%s`:apt_clean\r\e[0K" - - - | - # vcpkg_clean - echo -e "\e[0Ksection_start:`date +%s`:vcpkg_clean[collapsed=true]\r\e[0KCleaning vcpkg-root" - - if [ -d "build/vcpkg-root" ]; then - pushd "build/vcpkg-root" - git clean -f - popd - fi - - echo -e "\e[0Ksection_end:`date +%s`:vcpkg_clean\r\e[0K" - - - | # ccache_stats echo -e "\e[0Ksection_start:`date +%s`:ccache_stats[collapsed=true]\r\e[0Kccache statistics:" From c7801bdf6d915f80a4e3a53a746554305470a864 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Wed, 26 Feb 2025 21:55:14 -0500 Subject: [PATCH 54/83] GitLab CI: move around stages --- .gitlab-ci.yml | 8 +++++++- .gitlab/ci/jobs/alpine-3-gcc-makefile.yml | 2 +- .gitlab/ci/jobs/alpine-3-gcc.yml | 2 +- .gitlab/ci/jobs/batocera-arm64-makefile.yml | 2 ++ .gitlab/ci/jobs/batocera-arm64.yml | 2 ++ .gitlab/ci/jobs/debian-oldstable-amd64-makefile.yml | 2 ++ .gitlab/ci/jobs/debian-oldstable-amd64.yml | 2 ++ .gitlab/ci/jobs/debian-oldstable-arm64-makefile.yml | 2 ++ .gitlab/ci/jobs/debian-oldstable-arm64.yml | 2 ++ .gitlab/ci/jobs/debian-stable-amd64-makefile.yml | 2 +- .gitlab/ci/jobs/debian-stable-amd64.yml | 2 +- .gitlab/ci/jobs/debian-stable-arm64-makefile.yml | 2 +- .gitlab/ci/jobs/debian-stable-arm64.yml | 2 +- .gitlab/ci/jobs/debian-stable-clang-amd64.yml | 2 +- .gitlab/ci/jobs/debian-stable-i386-makefile.yml | 2 +- .gitlab/ci/jobs/debian-stable-i386.yml | 2 +- .gitlab/ci/jobs/debian-testing-gcc-amd64-makefile.yml | 2 +- .gitlab/ci/jobs/debian-testing-gcc-amd64.yml | 2 +- .gitlab/ci/jobs/macos-arm64.yml | 3 +-- .gitlab/ci/jobs/windows-x64-makefile.yml | 2 +- .gitlab/ci/jobs/windows-x64.yml | 2 +- .gitlab/ci/jobs/windows-x86-makefile.yml | 2 +- .gitlab/ci/jobs/windows-x86.yml | 2 +- 23 files changed, 35 insertions(+), 18 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 14c36213e..39b032df8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -11,7 +11,13 @@ variables: GIT_DEPTH: 20 stages: - - build + - clang + - alpine + - oldstable + - stable + - batocera + - testing + - win32 - osxcross default: diff --git a/.gitlab/ci/jobs/alpine-3-gcc-makefile.yml b/.gitlab/ci/jobs/alpine-3-gcc-makefile.yml index 3a17e0933..962f4fc54 100644 --- a/.gitlab/ci/jobs/alpine-3-gcc-makefile.yml +++ b/.gitlab/ci/jobs/alpine-3-gcc-makefile.yml @@ -1,5 +1,5 @@ Alpine 3 GCC Makefile: - stage: build + stage: alpine when: manual diff --git a/.gitlab/ci/jobs/alpine-3-gcc.yml b/.gitlab/ci/jobs/alpine-3-gcc.yml index 56339e332..30a2dee77 100644 --- a/.gitlab/ci/jobs/alpine-3-gcc.yml +++ b/.gitlab/ci/jobs/alpine-3-gcc.yml @@ -1,5 +1,5 @@ Alpine 3 GCC: - stage: build + stage: alpine when: manual diff --git a/.gitlab/ci/jobs/batocera-arm64-makefile.yml b/.gitlab/ci/jobs/batocera-arm64-makefile.yml index e02497d40..6b729195e 100644 --- a/.gitlab/ci/jobs/batocera-arm64-makefile.yml +++ b/.gitlab/ci/jobs/batocera-arm64-makefile.yml @@ -1,6 +1,8 @@ batocera:arm64 Makefile: extends: Debian stable:arm64 Makefile + stage: batocera + when: manual allow_failure: true diff --git a/.gitlab/ci/jobs/batocera-arm64.yml b/.gitlab/ci/jobs/batocera-arm64.yml index 3dcd73a0e..01bebc752 100644 --- a/.gitlab/ci/jobs/batocera-arm64.yml +++ b/.gitlab/ci/jobs/batocera-arm64.yml @@ -1,6 +1,8 @@ batocera:arm64: extends: Debian stable:arm64 + stage: batocera + when: manual allow_failure: true diff --git a/.gitlab/ci/jobs/debian-oldstable-amd64-makefile.yml b/.gitlab/ci/jobs/debian-oldstable-amd64-makefile.yml index bd4a92741..9f54349e0 100644 --- a/.gitlab/ci/jobs/debian-oldstable-amd64-makefile.yml +++ b/.gitlab/ci/jobs/debian-oldstable-amd64-makefile.yml @@ -1,6 +1,8 @@ Debian oldstable:amd64 Makefile: extends: Debian stable:amd64 Makefile + stage: oldstable + when: manual image: git.do.srb2.org:5050/stjr/srb2ci/srb2ci:oldstable diff --git a/.gitlab/ci/jobs/debian-oldstable-amd64.yml b/.gitlab/ci/jobs/debian-oldstable-amd64.yml index 231e8485d..90f6fd733 100644 --- a/.gitlab/ci/jobs/debian-oldstable-amd64.yml +++ b/.gitlab/ci/jobs/debian-oldstable-amd64.yml @@ -1,6 +1,8 @@ Debian oldstable:amd64: extends: Debian stable:amd64 + stage: oldstable + when: manual image: git.do.srb2.org:5050/stjr/srb2ci/srb2ci:oldstable diff --git a/.gitlab/ci/jobs/debian-oldstable-arm64-makefile.yml b/.gitlab/ci/jobs/debian-oldstable-arm64-makefile.yml index 426934bf9..4009fee3f 100644 --- a/.gitlab/ci/jobs/debian-oldstable-arm64-makefile.yml +++ b/.gitlab/ci/jobs/debian-oldstable-arm64-makefile.yml @@ -1,6 +1,8 @@ Debian oldstable:arm64 Makefile: extends: Debian stable:arm64 Makefile + stage: oldstable + when: manual image: git.do.srb2.org:5050/stjr/srb2ci/srb2ci:oldstable diff --git a/.gitlab/ci/jobs/debian-oldstable-arm64.yml b/.gitlab/ci/jobs/debian-oldstable-arm64.yml index 76d401309..75b563199 100644 --- a/.gitlab/ci/jobs/debian-oldstable-arm64.yml +++ b/.gitlab/ci/jobs/debian-oldstable-arm64.yml @@ -1,6 +1,8 @@ Debian oldstable:arm64: extends: Debian stable:arm64 + stage: oldstable + when: manual image: git.do.srb2.org:5050/stjr/srb2ci/srb2ci:oldstable diff --git a/.gitlab/ci/jobs/debian-stable-amd64-makefile.yml b/.gitlab/ci/jobs/debian-stable-amd64-makefile.yml index fee52c5a7..5d30dfe02 100644 --- a/.gitlab/ci/jobs/debian-stable-amd64-makefile.yml +++ b/.gitlab/ci/jobs/debian-stable-amd64-makefile.yml @@ -1,7 +1,7 @@ Debian stable:amd64 Makefile: extends: .srb2ci - stage: build + stage: stable artifacts: paths: diff --git a/.gitlab/ci/jobs/debian-stable-amd64.yml b/.gitlab/ci/jobs/debian-stable-amd64.yml index e58f5a112..7377cfe1d 100644 --- a/.gitlab/ci/jobs/debian-stable-amd64.yml +++ b/.gitlab/ci/jobs/debian-stable-amd64.yml @@ -1,7 +1,7 @@ Debian stable:amd64: extends: .srb2ci - stage: build + stage: stable artifacts: paths: diff --git a/.gitlab/ci/jobs/debian-stable-arm64-makefile.yml b/.gitlab/ci/jobs/debian-stable-arm64-makefile.yml index aa0ea3780..b00ebe7e0 100644 --- a/.gitlab/ci/jobs/debian-stable-arm64-makefile.yml +++ b/.gitlab/ci/jobs/debian-stable-arm64-makefile.yml @@ -1,7 +1,7 @@ Debian stable:arm64 Makefile: extends: .srb2ci - stage: build + stage: stable when: manual diff --git a/.gitlab/ci/jobs/debian-stable-arm64.yml b/.gitlab/ci/jobs/debian-stable-arm64.yml index 135d87aa5..d3446cd77 100644 --- a/.gitlab/ci/jobs/debian-stable-arm64.yml +++ b/.gitlab/ci/jobs/debian-stable-arm64.yml @@ -1,7 +1,7 @@ Debian stable:arm64: extends: .srb2ci - stage: build + stage: stable when: manual diff --git a/.gitlab/ci/jobs/debian-stable-clang-amd64.yml b/.gitlab/ci/jobs/debian-stable-clang-amd64.yml index 0b8e6e50c..1296a3347 100644 --- a/.gitlab/ci/jobs/debian-stable-clang-amd64.yml +++ b/.gitlab/ci/jobs/debian-stable-clang-amd64.yml @@ -1,7 +1,7 @@ Debian stable Clang: extends: .srb2ci - stage: build + stage: clang when: on_success diff --git a/.gitlab/ci/jobs/debian-stable-i386-makefile.yml b/.gitlab/ci/jobs/debian-stable-i386-makefile.yml index dd572ec38..acf757556 100644 --- a/.gitlab/ci/jobs/debian-stable-i386-makefile.yml +++ b/.gitlab/ci/jobs/debian-stable-i386-makefile.yml @@ -1,7 +1,7 @@ Debian stable:i386 Makefile: extends: .srb2ci - stage: build + stage: stable when: manual diff --git a/.gitlab/ci/jobs/debian-stable-i386.yml b/.gitlab/ci/jobs/debian-stable-i386.yml index 970b92a69..ff3dbface 100644 --- a/.gitlab/ci/jobs/debian-stable-i386.yml +++ b/.gitlab/ci/jobs/debian-stable-i386.yml @@ -1,7 +1,7 @@ Debian stable:i386: extends: .srb2ci - stage: build + stage: stable when: manual diff --git a/.gitlab/ci/jobs/debian-testing-gcc-amd64-makefile.yml b/.gitlab/ci/jobs/debian-testing-gcc-amd64-makefile.yml index 1165b1fea..e3cc09256 100644 --- a/.gitlab/ci/jobs/debian-testing-gcc-amd64-makefile.yml +++ b/.gitlab/ci/jobs/debian-testing-gcc-amd64-makefile.yml @@ -1,7 +1,7 @@ Debian testing GCC Makefile: extends: .srb2ci - stage: build + stage: testing when: manual diff --git a/.gitlab/ci/jobs/debian-testing-gcc-amd64.yml b/.gitlab/ci/jobs/debian-testing-gcc-amd64.yml index fc998ea47..fbad8dfb3 100644 --- a/.gitlab/ci/jobs/debian-testing-gcc-amd64.yml +++ b/.gitlab/ci/jobs/debian-testing-gcc-amd64.yml @@ -1,7 +1,7 @@ Debian testing GCC: extends: .srb2ci - stage: build + stage: testing when: manual diff --git a/.gitlab/ci/jobs/macos-arm64.yml b/.gitlab/ci/jobs/macos-arm64.yml index 1c89000c2..6067444e8 100644 --- a/.gitlab/ci/jobs/macos-arm64.yml +++ b/.gitlab/ci/jobs/macos-arm64.yml @@ -1,14 +1,13 @@ osxcross arm64: extends: .srb2ci - stage: build + stage: osxcross artifacts: paths: - "build.arm64/bin/" - "build.arm64/dist/arm64.h" - "build.arm64/src/config.h" - expose_as: "Mac arm64" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-arm64-apple-darwin21.4" variables: diff --git a/.gitlab/ci/jobs/windows-x64-makefile.yml b/.gitlab/ci/jobs/windows-x64-makefile.yml index 8da30d2b9..8fdc53073 100644 --- a/.gitlab/ci/jobs/windows-x64-makefile.yml +++ b/.gitlab/ci/jobs/windows-x64-makefile.yml @@ -1,7 +1,7 @@ Windows x64 Makefile: extends: .srb2ci - stage: build + stage: win32 when: manual diff --git a/.gitlab/ci/jobs/windows-x64.yml b/.gitlab/ci/jobs/windows-x64.yml index 36f12e308..b44097044 100644 --- a/.gitlab/ci/jobs/windows-x64.yml +++ b/.gitlab/ci/jobs/windows-x64.yml @@ -1,7 +1,7 @@ Windows x64: extends: .srb2ci - stage: build + stage: win32 when: manual diff --git a/.gitlab/ci/jobs/windows-x86-makefile.yml b/.gitlab/ci/jobs/windows-x86-makefile.yml index 213342cda..d81baf2f1 100644 --- a/.gitlab/ci/jobs/windows-x86-makefile.yml +++ b/.gitlab/ci/jobs/windows-x86-makefile.yml @@ -1,7 +1,7 @@ Windows x86 Makefile: extends: .srb2ci - stage: build + stage: win32 when: on_success diff --git a/.gitlab/ci/jobs/windows-x86.yml b/.gitlab/ci/jobs/windows-x86.yml index 7a298731d..22b799cda 100644 --- a/.gitlab/ci/jobs/windows-x86.yml +++ b/.gitlab/ci/jobs/windows-x86.yml @@ -1,7 +1,7 @@ Windows x86: extends: .srb2ci - stage: build + stage: win32 cache: - key: ccache-$CI_JOB_NAME_SLUG-$CI_COMMIT_REF_SLUG From 18d47ebbd3686a9f0f90700eee24e3f232463ba1 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Wed, 26 Feb 2025 22:49:01 -0500 Subject: [PATCH 55/83] GitLab CI: use short names like oa64/o64 so we can switch SDKs --- .gitlab/ci/jobs/macos-arm64.yml | 6 +++--- .gitlab/ci/jobs/macos-x86_64.yml | 10 +++++----- ...{osxccross-universal.yml => osxcross-universal.yml} | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) rename .gitlab/ci/jobs/{osxccross-universal.yml => osxcross-universal.yml} (98%) diff --git a/.gitlab/ci/jobs/macos-arm64.yml b/.gitlab/ci/jobs/macos-arm64.yml index 6067444e8..dfa258b86 100644 --- a/.gitlab/ci/jobs/macos-arm64.yml +++ b/.gitlab/ci/jobs/macos-arm64.yml @@ -8,11 +8,11 @@ osxcross arm64: - "build.arm64/bin/" - "build.arm64/dist/arm64.h" - "build.arm64/src/config.h" - name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-arm64-apple-darwin21.4" + name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-arm64-apple-darwin" variables: - OSXCROSS_HOST: arm64-apple-darwin21.4 - LD: arm64-apple-darwin21.4-ld + OSXCROSS_HOST: oa64 + LD: /opt/osxcross.arm64/ld script: - - | diff --git a/.gitlab/ci/jobs/macos-x86_64.yml b/.gitlab/ci/jobs/macos-x86_64.yml index 3955a6a48..dcdceadc6 100644 --- a/.gitlab/ci/jobs/macos-x86_64.yml +++ b/.gitlab/ci/jobs/macos-x86_64.yml @@ -8,18 +8,18 @@ osxcross x86_64: - "build.x86_64/bin/" - "build.x86_64/dist/x86_64.h" - "build.x86_64/src/config.h" - name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-x86_64-apple-darwin21.4" + name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-x86_64-apple-darwin" variables: - OSXCROSS_HOST: x86_64-apple-darwin21.4 - LD: x86_64-apple-darwin21.4-ld + OSXCROSS_HOST: o64 + LD: /opt/osxcross.x86_64/ld script: - - | # apt_development echo -e "\e[0Ksection_start:`date +%s`:macports_development[collapsed=true]\r\e[0KInstalling development packages" - - osxcross-macports install libxmp wavpack libopenmpt opusfile || osxcross-macports install libxmp wavpack libopenmpt opusfile - - osxcross-macports install --static curl libsdl2_mixer libpng || osxcross-macports install --static curl libsdl2_mixer libpng + - osxcross-macports install libxmp wavpack libopenmpt opusfile || osxcross-macports install libxmp wavpack libopenmpt opusfile + - osxcross-macports install --static curl libsdl2_mixer libpng || osxcross-macports install --static curl libsdl2_mixer libpng - | # apt_development echo -e "\e[0Ksection_end:`date +%s`:macports_development\r\e[0K" diff --git a/.gitlab/ci/jobs/osxccross-universal.yml b/.gitlab/ci/jobs/osxcross-universal.yml similarity index 98% rename from .gitlab/ci/jobs/osxccross-universal.yml rename to .gitlab/ci/jobs/osxcross-universal.yml index 841151f60..42bc12a57 100644 --- a/.gitlab/ci/jobs/osxccross-universal.yml +++ b/.gitlab/ci/jobs/osxcross-universal.yml @@ -15,7 +15,7 @@ osxcross universal: - "dist/bin" - "dist/src" expose_as: "Mac Universal" - name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-lipo-apple-darwin21.4" + name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-lipo-apple-darwin" script: - - | From 37043e367bdc44d0808fc4d189c9e28a2655f7e7 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Wed, 26 Feb 2025 22:50:53 -0500 Subject: [PATCH 56/83] GitLab CI: use clang++ as CXX for clang builds --- .gitlab/ci/jobs/debian-stable-clang-amd64.yml | 2 +- .gitlab/ci/jobs/debian-testing-clang-amd64.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab/ci/jobs/debian-stable-clang-amd64.yml b/.gitlab/ci/jobs/debian-stable-clang-amd64.yml index 1296a3347..2a7704ed9 100644 --- a/.gitlab/ci/jobs/debian-stable-clang-amd64.yml +++ b/.gitlab/ci/jobs/debian-stable-clang-amd64.yml @@ -16,7 +16,7 @@ Debian stable Clang: variables: CC: clang - CXX: clang + CXX: clang++ WFLAGS: -Wno-cast-align -Wno-implicit-const-int-float-conversion -Werror CFLAGS: -Wno-cast-align -Wno-implicit-const-int-float-conversion -Werror diff --git a/.gitlab/ci/jobs/debian-testing-clang-amd64.yml b/.gitlab/ci/jobs/debian-testing-clang-amd64.yml index 7349f2b92..132e72642 100644 --- a/.gitlab/ci/jobs/debian-testing-clang-amd64.yml +++ b/.gitlab/ci/jobs/debian-testing-clang-amd64.yml @@ -16,6 +16,6 @@ Debian testing Clang: variables: CC: clang - CXX: clang + CXX: clang++ WFLAGS: -Wno-cast-align -Wno-implicit-const-int-float-conversion -Werror -Wno-deprecated-non-prototype -Wno-single-bit-bitfield-constant-conversion CFLAGS: -Wno-cast-align -Wno-implicit-const-int-float-conversion -Werror -Wno-deprecated-non-prototype -Wno-single-bit-bitfield-constant-conversion From 893db88809a10cb6da07fcf4b0192caf4959b801 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Thu, 27 Feb 2025 04:34:07 -0500 Subject: [PATCH 57/83] GitLab CI: install miniupnpc from macports --- .gitlab/ci/jobs/macos-arm64.yml | 2 +- .gitlab/ci/jobs/macos-x86_64.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab/ci/jobs/macos-arm64.yml b/.gitlab/ci/jobs/macos-arm64.yml index dfa258b86..775025467 100644 --- a/.gitlab/ci/jobs/macos-arm64.yml +++ b/.gitlab/ci/jobs/macos-arm64.yml @@ -19,7 +19,7 @@ osxcross arm64: # apt_development echo -e "\e[0Ksection_start:`date +%s`:macports_development[collapsed=true]\r\e[0KInstalling development packages" - osxcross-macports install --arm64 libxmp wavpack libopenmpt opusfile || osxcross-macports install --arm64 libxmp wavpack libopenmpt opusfile - - osxcross-macports install --static --arm64 curl libsdl2_mixer libpng || osxcross-macports install --static --arm64 curl libsdl2_mixer libpng + - osxcross-macports install --static --arm64 miniupnpc libpng curl libsdl2_mixer || osxcross-macports install --static --arm64 miniupnpc libpng curl libsdl2_mixer - | # apt_development echo -e "\e[0Ksection_end:`date +%s`:macports_development\r\e[0K" diff --git a/.gitlab/ci/jobs/macos-x86_64.yml b/.gitlab/ci/jobs/macos-x86_64.yml index dcdceadc6..5f59f5cd7 100644 --- a/.gitlab/ci/jobs/macos-x86_64.yml +++ b/.gitlab/ci/jobs/macos-x86_64.yml @@ -18,8 +18,8 @@ osxcross x86_64: - - | # apt_development echo -e "\e[0Ksection_start:`date +%s`:macports_development[collapsed=true]\r\e[0KInstalling development packages" - - osxcross-macports install libxmp wavpack libopenmpt opusfile || osxcross-macports install libxmp wavpack libopenmpt opusfile - - osxcross-macports install --static curl libsdl2_mixer libpng || osxcross-macports install --static curl libsdl2_mixer libpng + - osxcross-macports install libopenmpt libxmp wavpack opusfile || osxcross-macports install libopenmpt libxmp wavpack opusfile + - osxcross-macports install --static miniupnpc curl libsdl2_mixer libpng || osxcross-macports install --static miniupnpc curl libsdl2_mixer libpng - | # apt_development echo -e "\e[0Ksection_end:`date +%s`:macports_development\r\e[0K" From a923bf70959b8365d9cbde71c9d65718ae0e5d2c Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Mon, 17 Feb 2025 18:49:16 -0500 Subject: [PATCH 58/83] SDL_Mixer: Added newlines for mixer errors --- src/sdl/mixer_sound.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sdl/mixer_sound.c b/src/sdl/mixer_sound.c index 8f2ca3408..0ab4ce917 100644 --- a/src/sdl/mixer_sound.c +++ b/src/sdl/mixer_sound.c @@ -135,7 +135,7 @@ static void Midiplayer_Onchange(void) if (Mix_GetMidiPlayer() != cv_midiplayer.value) { if (Mix_SetMidiPlayer(cv_midiplayer.value)) // <> 0 means error - CONS_Alert(CONS_ERROR, "Midi player error: %s", Mix_GetError()); + CONS_Alert(CONS_ERROR, "Midi player error: %s\n", Mix_GetError()); else restart = true; } @@ -143,7 +143,7 @@ static void Midiplayer_Onchange(void) if (!Mix_GetSoundFonts() || stricmp(Mix_GetSoundFonts(), cv_midisoundfontpath.string)) { if (!Mix_SetSoundFonts(cv_midisoundfontpath.string)) // == 0 means error - CONS_Alert(CONS_ERROR, "Sound font error: %s", Mix_GetError()); + CONS_Alert(CONS_ERROR, "Sound font error: %s\n", Mix_GetError()); else restart = true; } @@ -190,7 +190,7 @@ static void MidiSoundfontPath_Onchange(void) if (proceed) { if (!Mix_SetSoundFonts(cv_midisoundfontpath.string)) - CONS_Alert(CONS_ERROR, "Sound font error: %s", Mix_GetError()); + CONS_Alert(CONS_ERROR, "Sound font error: %s\n", Mix_GetError()); else S_StartEx(true); } From 75fb1cd2aa1d5563620e5713bdf6ea40ccdb4268 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Mon, 17 Feb 2025 18:50:05 -0500 Subject: [PATCH 59/83] SDL_Mixer: options for all MIDI players in SDL-Mixer-X 2.5.0+ --- src/sdl/mixer_sound.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/sdl/mixer_sound.c b/src/sdl/mixer_sound.c index 0ab4ce917..0f9983ee1 100644 --- a/src/sdl/mixer_sound.c +++ b/src/sdl/mixer_sound.c @@ -199,7 +199,18 @@ static void MidiSoundfontPath_Onchange(void) // make sure that s_sound.c does not already verify these // which happens when: defined(HAVE_MIXERX) && !defined(HAVE_MIXER) -static CV_PossibleValue_t midiplayer_cons_t[] = {{MIDI_OPNMIDI, "OPNMIDI"}, {MIDI_Fluidsynth, "Fluidsynth"}, {MIDI_Timidity, "Timidity"}, {MIDI_Native, "Native"}, {0, NULL}}; +static CV_PossibleValue_t midiplayer_cons_t[] = { + {MIDI_ADLMIDI, "ADLMIDI"}, + {MIDI_OPNMIDI, "OPNMIDI"}, + {MIDI_Timidity, "Timidity"}, + {MIDI_Fluidsynth, "Fluidsynth"}, +#if SDL_MIXER_VERSION_ATLEAST(2,6,0) + {MIDI_EDMIDI, "EDMIDI"}, +#endif + {MIDI_Native, "Native"}, + {MIDI_ANY, "Any"}, + {0, NULL} +}; consvar_t cv_midiplayer = CVAR_INIT ("midiplayer", "OPNMIDI" /*MIDI_OPNMIDI*/, CV_CALL|CV_NOINIT|CV_SAVE, midiplayer_cons_t, Midiplayer_Onchange); consvar_t cv_midisoundfontpath = CVAR_INIT ("midisoundfont", "sf2/8bitsf.SF2", CV_CALL|CV_NOINIT|CV_SAVE, NULL, MidiSoundfontPath_Onchange); consvar_t cv_miditimiditypath = CVAR_INIT ("midisoundbank", "./timidity", CV_SAVE, NULL, NULL); From 2511312504f7a3d3f3bf9d3d0ffc9e5b43dee59a Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Wed, 12 Feb 2025 09:06:41 -0500 Subject: [PATCH 60/83] vcpkg: testing compiling with x86-linux, x64-linux, arm64-linux, x86-mingw-static and x64-mingw-static --- vcpkg.json | 161 ++++++++++++++++++++++++++--------------------------- 1 file changed, 78 insertions(+), 83 deletions(-) diff --git a/vcpkg.json b/vcpkg.json index 07c4244ad..36626c3e9 100644 --- a/vcpkg.json +++ b/vcpkg.json @@ -1,85 +1,80 @@ { - "$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json", - "name": "srb2", - "version": "1.0.0", - "builtin-baseline": "c823fd3e57035b10d970a96da2796a2db55e5df5", - "dependencies": [ - "curl", - { - "name": "libgme", - "platform": "!(windows & mingw) & !native" - }, - { - "name": "libopenmpt", - "platform": "!(windows & mingw)" - }, - "libpng", - "miniupnpc", - "sdl2", - { - "name": "sdl2-mixer-ext", - "features": [ - { - "name": "cmd", - "platform": "linux" - }, - { - "name": "libflac", - "platform": "!(windows & mingw & !static)" - }, - { - "name": "libgme", - "platform": "!(windows & mingw) & !native" - }, - { - "name": "libmodplug", - "platform": "!(windows & mingw)" - }, - { - "name": "libopnmidi", - "platform": "!(windows & mingw)" - }, - { - "name": "libvorbis", - "platform": "!(windows & mingw & !static)" - }, - { - "name": "libxmp", - "platform": "!(windows & mingw)" - }, - { - "name": "mpg123", - "platform": "!(windows & mingw)" - }, - { - "name": "nativemidi", - "platform": "!(windows & mingw)" - }, - { - "name": "opusfile", - "platform": "!(windows & mingw)" - }, - { - "name": "pxtone", - "platform": "!(windows & mingw)" - }, - { - "name": "timidity", - "platform": "!(windows & mingw)" - }, - { - "name": "wavpack", - "platform": "!(windows & mingw)" - } - ] - }, - "zlib" - ], - "overrides": [ - { - "name": "sdl2", - "version": "2.28.5", - "port-version": 1 - } - ] + "$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json", + "name": "srb2", + "version": "1.0.0", + "dependencies": [ + { + "name": "zlib" + }, + { + "name": "libpng" + }, + { + "name": "curl", + "platform": "!(osx & !native)" + }, + { + "name": "libopenmpt" + }, + { + "name": "libgme" + }, + { + "name": "miniupnpc" + }, + { + "name": "sdl2", + "default-features": false, + "features": [ + { + "name": "wayland", + "platform": "linux" + }, + { + "name": "x11", + "platform": "!windows" + } + ] + }, + { + "name": "sdl2-mixer-ext", + "default-features": true, + "features": [ + { + "name": "ffmpeg" + }, + { + "name": "fluidsynth", + "platform": "!(osx & !native)" + }, + { + "name": "libflac" + }, + { + "name": "libgme" + }, + { + "name": "libmodplug" + }, + { + "name": "libvorbis" + }, + { + "name": "libxmp" + }, + { + "name": "mpg123" + }, + { + "name": "opusfile" + }, + { + "name": "pxtone" + }, + { + "name": "timidity" + } + ] + } + ] } From 3683a8f939eeb74106fa3321414c12eb1d516906 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Fri, 28 Feb 2025 21:02:25 -0500 Subject: [PATCH 61/83] vcpkg: format-manifest --- vcpkg.json | 127 +++++++++++++++++++++-------------------------------- 1 file changed, 49 insertions(+), 78 deletions(-) diff --git a/vcpkg.json b/vcpkg.json index 36626c3e9..dd714dc65 100644 --- a/vcpkg.json +++ b/vcpkg.json @@ -1,80 +1,51 @@ { - "$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json", - "name": "srb2", - "version": "1.0.0", - "dependencies": [ - { - "name": "zlib" - }, - { - "name": "libpng" - }, - { - "name": "curl", - "platform": "!(osx & !native)" - }, - { - "name": "libopenmpt" - }, - { - "name": "libgme" - }, - { - "name": "miniupnpc" - }, - { - "name": "sdl2", - "default-features": false, - "features": [ - { - "name": "wayland", - "platform": "linux" - }, - { - "name": "x11", - "platform": "!windows" - } - ] - }, - { - "name": "sdl2-mixer-ext", - "default-features": true, - "features": [ - { - "name": "ffmpeg" - }, - { - "name": "fluidsynth", - "platform": "!(osx & !native)" - }, - { - "name": "libflac" - }, - { - "name": "libgme" - }, - { - "name": "libmodplug" - }, - { - "name": "libvorbis" - }, - { - "name": "libxmp" - }, - { - "name": "mpg123" - }, - { - "name": "opusfile" - }, - { - "name": "pxtone" - }, - { - "name": "timidity" - } - ] - } - ] + "$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json", + "name": "srb2", + "version": "1.0.0", + "builtin-baseline": "d5ec528843d29e3a52d745a64b469f810b2cedbf", + "dependencies": [ + { + "name": "curl", + "platform": "!(osx & !native)" + }, + "libgme", + "libopenmpt", + "libpng", + "miniupnpc", + { + "name": "sdl2", + "default-features": false, + "features": [ + { + "name": "wayland", + "platform": "linux" + }, + { + "name": "x11", + "platform": "!windows" + } + ], + "platform": "!(osx & !native)", + "version>=": "2.30.7" + }, + { + "name": "sdl2-mixer-ext", + "features": [ + "ffmpeg", + "fluidsynth", + "libflac", + "libgme", + "libmodplug", + "libvorbis", + "libxmp", + "mpg123", + "opusfile", + "pxtone", + "timidity" + ], + "platform": "!(osx & !native)", + "version>=": "2.6.0" + }, + "zlib" + ] } From fc7768fad96bed9944a3ca28edd0374bcd0b1210 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Fri, 28 Feb 2025 21:03:00 -0500 Subject: [PATCH 62/83] GitLab CI: do not force CC/CXX with Mingw32 vcpkg builds --- .gitlab/ci/jobs/windows-x64.yml | 2 -- .gitlab/ci/jobs/windows-x86.yml | 2 -- 2 files changed, 4 deletions(-) diff --git a/.gitlab/ci/jobs/windows-x64.yml b/.gitlab/ci/jobs/windows-x64.yml index b44097044..70af9401b 100644 --- a/.gitlab/ci/jobs/windows-x64.yml +++ b/.gitlab/ci/jobs/windows-x64.yml @@ -35,8 +35,6 @@ Windows x64: variables: PREFIX: x86_64-w64-mingw32 - CC: /usr/lib/ccache/x86_64-w64-mingw32-gcc - CXX: /usr/lib/ccache/x86_64-w64-mingw32-g++ script: - | diff --git a/.gitlab/ci/jobs/windows-x86.yml b/.gitlab/ci/jobs/windows-x86.yml index 22b799cda..a7d013649 100644 --- a/.gitlab/ci/jobs/windows-x86.yml +++ b/.gitlab/ci/jobs/windows-x86.yml @@ -31,8 +31,6 @@ Windows x86: variables: PREFIX: i686-w64-mingw32 - CC: /usr/lib/ccache/i686-w64-mingw32-gcc - CXX: /usr/lib/ccache/i686-w64-mingw32-g++ script: - | From aebc3ff558936e811ab57cf9fe921766132479ed Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Fri, 28 Feb 2025 21:09:33 -0500 Subject: [PATCH 63/83] GitLab CI: move back to only 2 stages, build and osxcross --- .gitlab-ci.yml | 8 +------- .gitlab/ci/jobs/alpine-3-gcc-makefile.yml | 2 +- .gitlab/ci/jobs/alpine-3-gcc.yml | 2 +- .gitlab/ci/jobs/batocera-arm64-makefile.yml | 2 +- .gitlab/ci/jobs/batocera-arm64.yml | 2 +- .gitlab/ci/jobs/debian-oldstable-amd64-makefile.yml | 2 +- .gitlab/ci/jobs/debian-oldstable-amd64.yml | 2 +- .gitlab/ci/jobs/debian-oldstable-arm64-makefile.yml | 2 +- .gitlab/ci/jobs/debian-oldstable-arm64.yml | 2 +- .gitlab/ci/jobs/debian-stable-amd64-makefile.yml | 2 +- .gitlab/ci/jobs/debian-stable-amd64.yml | 2 +- .gitlab/ci/jobs/debian-stable-arm64-makefile.yml | 2 +- .gitlab/ci/jobs/debian-stable-arm64.yml | 2 +- .gitlab/ci/jobs/debian-stable-clang-amd64.yml | 2 +- .gitlab/ci/jobs/debian-stable-i386-makefile.yml | 2 +- .gitlab/ci/jobs/debian-stable-i386.yml | 2 +- .gitlab/ci/jobs/debian-testing-gcc-amd64-makefile.yml | 2 +- .gitlab/ci/jobs/debian-testing-gcc-amd64.yml | 2 +- .gitlab/ci/jobs/macos-arm64.yml | 2 +- .gitlab/ci/jobs/macos-x86_64.yml | 2 +- .gitlab/ci/jobs/windows-x64-makefile.yml | 2 +- .gitlab/ci/jobs/windows-x64.yml | 2 +- .gitlab/ci/jobs/windows-x86-makefile.yml | 2 +- .gitlab/ci/jobs/windows-x86.yml | 2 +- 24 files changed, 24 insertions(+), 30 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 39b032df8..14c36213e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -11,13 +11,7 @@ variables: GIT_DEPTH: 20 stages: - - clang - - alpine - - oldstable - - stable - - batocera - - testing - - win32 + - build - osxcross default: diff --git a/.gitlab/ci/jobs/alpine-3-gcc-makefile.yml b/.gitlab/ci/jobs/alpine-3-gcc-makefile.yml index 962f4fc54..3a17e0933 100644 --- a/.gitlab/ci/jobs/alpine-3-gcc-makefile.yml +++ b/.gitlab/ci/jobs/alpine-3-gcc-makefile.yml @@ -1,5 +1,5 @@ Alpine 3 GCC Makefile: - stage: alpine + stage: build when: manual diff --git a/.gitlab/ci/jobs/alpine-3-gcc.yml b/.gitlab/ci/jobs/alpine-3-gcc.yml index 30a2dee77..56339e332 100644 --- a/.gitlab/ci/jobs/alpine-3-gcc.yml +++ b/.gitlab/ci/jobs/alpine-3-gcc.yml @@ -1,5 +1,5 @@ Alpine 3 GCC: - stage: alpine + stage: build when: manual diff --git a/.gitlab/ci/jobs/batocera-arm64-makefile.yml b/.gitlab/ci/jobs/batocera-arm64-makefile.yml index 6b729195e..dd8f57759 100644 --- a/.gitlab/ci/jobs/batocera-arm64-makefile.yml +++ b/.gitlab/ci/jobs/batocera-arm64-makefile.yml @@ -1,7 +1,7 @@ batocera:arm64 Makefile: extends: Debian stable:arm64 Makefile - stage: batocera + stage: build when: manual diff --git a/.gitlab/ci/jobs/batocera-arm64.yml b/.gitlab/ci/jobs/batocera-arm64.yml index 01bebc752..5011c4322 100644 --- a/.gitlab/ci/jobs/batocera-arm64.yml +++ b/.gitlab/ci/jobs/batocera-arm64.yml @@ -1,7 +1,7 @@ batocera:arm64: extends: Debian stable:arm64 - stage: batocera + stage: build when: manual diff --git a/.gitlab/ci/jobs/debian-oldstable-amd64-makefile.yml b/.gitlab/ci/jobs/debian-oldstable-amd64-makefile.yml index 9f54349e0..f365a7927 100644 --- a/.gitlab/ci/jobs/debian-oldstable-amd64-makefile.yml +++ b/.gitlab/ci/jobs/debian-oldstable-amd64-makefile.yml @@ -1,7 +1,7 @@ Debian oldstable:amd64 Makefile: extends: Debian stable:amd64 Makefile - stage: oldstable + stage: build when: manual diff --git a/.gitlab/ci/jobs/debian-oldstable-amd64.yml b/.gitlab/ci/jobs/debian-oldstable-amd64.yml index 90f6fd733..3989f750b 100644 --- a/.gitlab/ci/jobs/debian-oldstable-amd64.yml +++ b/.gitlab/ci/jobs/debian-oldstable-amd64.yml @@ -1,7 +1,7 @@ Debian oldstable:amd64: extends: Debian stable:amd64 - stage: oldstable + stage: build when: manual diff --git a/.gitlab/ci/jobs/debian-oldstable-arm64-makefile.yml b/.gitlab/ci/jobs/debian-oldstable-arm64-makefile.yml index 4009fee3f..25782baf2 100644 --- a/.gitlab/ci/jobs/debian-oldstable-arm64-makefile.yml +++ b/.gitlab/ci/jobs/debian-oldstable-arm64-makefile.yml @@ -1,7 +1,7 @@ Debian oldstable:arm64 Makefile: extends: Debian stable:arm64 Makefile - stage: oldstable + stage: build when: manual diff --git a/.gitlab/ci/jobs/debian-oldstable-arm64.yml b/.gitlab/ci/jobs/debian-oldstable-arm64.yml index 75b563199..db0e7f861 100644 --- a/.gitlab/ci/jobs/debian-oldstable-arm64.yml +++ b/.gitlab/ci/jobs/debian-oldstable-arm64.yml @@ -1,7 +1,7 @@ Debian oldstable:arm64: extends: Debian stable:arm64 - stage: oldstable + stage: build when: manual diff --git a/.gitlab/ci/jobs/debian-stable-amd64-makefile.yml b/.gitlab/ci/jobs/debian-stable-amd64-makefile.yml index 5d30dfe02..fee52c5a7 100644 --- a/.gitlab/ci/jobs/debian-stable-amd64-makefile.yml +++ b/.gitlab/ci/jobs/debian-stable-amd64-makefile.yml @@ -1,7 +1,7 @@ Debian stable:amd64 Makefile: extends: .srb2ci - stage: stable + stage: build artifacts: paths: diff --git a/.gitlab/ci/jobs/debian-stable-amd64.yml b/.gitlab/ci/jobs/debian-stable-amd64.yml index 7377cfe1d..e58f5a112 100644 --- a/.gitlab/ci/jobs/debian-stable-amd64.yml +++ b/.gitlab/ci/jobs/debian-stable-amd64.yml @@ -1,7 +1,7 @@ Debian stable:amd64: extends: .srb2ci - stage: stable + stage: build artifacts: paths: diff --git a/.gitlab/ci/jobs/debian-stable-arm64-makefile.yml b/.gitlab/ci/jobs/debian-stable-arm64-makefile.yml index b00ebe7e0..aa0ea3780 100644 --- a/.gitlab/ci/jobs/debian-stable-arm64-makefile.yml +++ b/.gitlab/ci/jobs/debian-stable-arm64-makefile.yml @@ -1,7 +1,7 @@ Debian stable:arm64 Makefile: extends: .srb2ci - stage: stable + stage: build when: manual diff --git a/.gitlab/ci/jobs/debian-stable-arm64.yml b/.gitlab/ci/jobs/debian-stable-arm64.yml index d3446cd77..135d87aa5 100644 --- a/.gitlab/ci/jobs/debian-stable-arm64.yml +++ b/.gitlab/ci/jobs/debian-stable-arm64.yml @@ -1,7 +1,7 @@ Debian stable:arm64: extends: .srb2ci - stage: stable + stage: build when: manual diff --git a/.gitlab/ci/jobs/debian-stable-clang-amd64.yml b/.gitlab/ci/jobs/debian-stable-clang-amd64.yml index 2a7704ed9..870e96bc7 100644 --- a/.gitlab/ci/jobs/debian-stable-clang-amd64.yml +++ b/.gitlab/ci/jobs/debian-stable-clang-amd64.yml @@ -1,7 +1,7 @@ Debian stable Clang: extends: .srb2ci - stage: clang + stage: build when: on_success diff --git a/.gitlab/ci/jobs/debian-stable-i386-makefile.yml b/.gitlab/ci/jobs/debian-stable-i386-makefile.yml index acf757556..dd572ec38 100644 --- a/.gitlab/ci/jobs/debian-stable-i386-makefile.yml +++ b/.gitlab/ci/jobs/debian-stable-i386-makefile.yml @@ -1,7 +1,7 @@ Debian stable:i386 Makefile: extends: .srb2ci - stage: stable + stage: build when: manual diff --git a/.gitlab/ci/jobs/debian-stable-i386.yml b/.gitlab/ci/jobs/debian-stable-i386.yml index ff3dbface..970b92a69 100644 --- a/.gitlab/ci/jobs/debian-stable-i386.yml +++ b/.gitlab/ci/jobs/debian-stable-i386.yml @@ -1,7 +1,7 @@ Debian stable:i386: extends: .srb2ci - stage: stable + stage: build when: manual diff --git a/.gitlab/ci/jobs/debian-testing-gcc-amd64-makefile.yml b/.gitlab/ci/jobs/debian-testing-gcc-amd64-makefile.yml index e3cc09256..1165b1fea 100644 --- a/.gitlab/ci/jobs/debian-testing-gcc-amd64-makefile.yml +++ b/.gitlab/ci/jobs/debian-testing-gcc-amd64-makefile.yml @@ -1,7 +1,7 @@ Debian testing GCC Makefile: extends: .srb2ci - stage: testing + stage: build when: manual diff --git a/.gitlab/ci/jobs/debian-testing-gcc-amd64.yml b/.gitlab/ci/jobs/debian-testing-gcc-amd64.yml index fbad8dfb3..fc998ea47 100644 --- a/.gitlab/ci/jobs/debian-testing-gcc-amd64.yml +++ b/.gitlab/ci/jobs/debian-testing-gcc-amd64.yml @@ -1,7 +1,7 @@ Debian testing GCC: extends: .srb2ci - stage: testing + stage: build when: manual diff --git a/.gitlab/ci/jobs/macos-arm64.yml b/.gitlab/ci/jobs/macos-arm64.yml index 775025467..476bb6aba 100644 --- a/.gitlab/ci/jobs/macos-arm64.yml +++ b/.gitlab/ci/jobs/macos-arm64.yml @@ -1,7 +1,7 @@ osxcross arm64: extends: .srb2ci - stage: osxcross + stage: build artifacts: paths: diff --git a/.gitlab/ci/jobs/macos-x86_64.yml b/.gitlab/ci/jobs/macos-x86_64.yml index 5f59f5cd7..cc9749e9a 100644 --- a/.gitlab/ci/jobs/macos-x86_64.yml +++ b/.gitlab/ci/jobs/macos-x86_64.yml @@ -1,7 +1,7 @@ osxcross x86_64: extends: .srb2ci - stage: osxcross + stage: build artifacts: paths: diff --git a/.gitlab/ci/jobs/windows-x64-makefile.yml b/.gitlab/ci/jobs/windows-x64-makefile.yml index 8fdc53073..8da30d2b9 100644 --- a/.gitlab/ci/jobs/windows-x64-makefile.yml +++ b/.gitlab/ci/jobs/windows-x64-makefile.yml @@ -1,7 +1,7 @@ Windows x64 Makefile: extends: .srb2ci - stage: win32 + stage: build when: manual diff --git a/.gitlab/ci/jobs/windows-x64.yml b/.gitlab/ci/jobs/windows-x64.yml index 70af9401b..abb5ec3e3 100644 --- a/.gitlab/ci/jobs/windows-x64.yml +++ b/.gitlab/ci/jobs/windows-x64.yml @@ -1,7 +1,7 @@ Windows x64: extends: .srb2ci - stage: win32 + stage: build when: manual diff --git a/.gitlab/ci/jobs/windows-x86-makefile.yml b/.gitlab/ci/jobs/windows-x86-makefile.yml index d81baf2f1..213342cda 100644 --- a/.gitlab/ci/jobs/windows-x86-makefile.yml +++ b/.gitlab/ci/jobs/windows-x86-makefile.yml @@ -1,7 +1,7 @@ Windows x86 Makefile: extends: .srb2ci - stage: win32 + stage: build when: on_success diff --git a/.gitlab/ci/jobs/windows-x86.yml b/.gitlab/ci/jobs/windows-x86.yml index a7d013649..195c1aab1 100644 --- a/.gitlab/ci/jobs/windows-x86.yml +++ b/.gitlab/ci/jobs/windows-x86.yml @@ -1,7 +1,7 @@ Windows x86: extends: .srb2ci - stage: win32 + stage: build cache: - key: ccache-$CI_JOB_NAME_SLUG-$CI_COMMIT_REF_SLUG From 3019e70ecba8a1c8786ff58f5a77b4feceedf165 Mon Sep 17 00:00:00 2001 From: Logan Aerl Arias Date: Fri, 28 Feb 2025 21:41:35 -0500 Subject: [PATCH 64/83] GitLab CI: use Ninja on MacOSX GitLab CI: use Ninja on MacOSX --- .gitlab/ci/jobs/macos-arm64.yml | 21 ++++++++++++++++++++- .gitlab/ci/jobs/macos-x86_64.yml | 4 ++-- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/.gitlab/ci/jobs/macos-arm64.yml b/.gitlab/ci/jobs/macos-arm64.yml index 476bb6aba..a74ca5d9c 100644 --- a/.gitlab/ci/jobs/macos-arm64.yml +++ b/.gitlab/ci/jobs/macos-arm64.yml @@ -27,7 +27,7 @@ osxcross arm64: - - | # cmake echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles" - - cmake -B build.arm64 --toolchain /osxcross/toolchain.cmake -DCPM_USE_LOCAL_PACKAGES:BOOL=ON -DOPENMPT_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/include" -DSDL2_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/lib" -DSRB2_CONFIG_ENABLE_TESTS:BOOL=OFF -DSRB2_CONFIG_SYSTEM_LIBRARIES:BOOL=ON -DSRB2_CONFIG_FORCE_NO_MS_BITFIELDS:BOOL=ON -DSRB2_CONFIG_USE_GME:BOOL=OFF -DSRB2_SDL2_EXE_NAME=srb2_$CI_PIPELINE_ID + - cmake -B build.arm64 --toolchain /osxcross/toolchain.cmake -DCPM_USE_LOCAL_PACKAGES:BOOL=ON -DOPENMPT_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/include" -DSDL2_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/lib" -DSRB2_CONFIG_ENABLE_TESTS:BOOL=OFF -DSRB2_CONFIG_SYSTEM_LIBRARIES:BOOL=ON -DSRB2_CONFIG_FORCE_NO_MS_BITFIELDS:BOOL=ON -DSRB2_CONFIG_USE_GME:BOOL=OFF -DSRB2_SDL2_EXE_NAME=srb2_$CI_PIPELINE_ID -G "Ninja" - | # make echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" @@ -48,3 +48,22 @@ osxcross arm64: - | # make echo -e "\e[0Ksection_end:`date +%s`:copy\r\e[0K" + + + after_script: + - - | + # apt_clean + echo -e "\e[0Ksection_start:`date +%s`:apt_clean[collapsed=true]\r\e[0KCleaning of unneeded APT packages" + - apt-get autoclean + - | + # apt_clean + echo -e "\e[0Ksection_end:`date +%s`:apt_clean\r\e[0K" + + - - | + # ccache_stats + echo -e "\e[0Ksection_start:`date +%s`:ccache_stats[collapsed=true]\r\e[0Kccache statistics:" + - ccache --show-stats + - ccache --show-log-stats || true + - | + # ccahe_stats + echo -e "\e[0Ksection_end:`date +%s`:ccache_stats\r\e[0K" diff --git a/.gitlab/ci/jobs/macos-x86_64.yml b/.gitlab/ci/jobs/macos-x86_64.yml index cc9749e9a..9ac718406 100644 --- a/.gitlab/ci/jobs/macos-x86_64.yml +++ b/.gitlab/ci/jobs/macos-x86_64.yml @@ -27,7 +27,7 @@ osxcross x86_64: - - | # cmake echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles" - - cmake -B build.x86_64 --toolchain /osxcross/toolchain.cmake -DCPM_USE_LOCAL_PACKAGES:BOOL=ON -DOPENMPT_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/include" -DSDL2_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/lib" -DSRB2_CONFIG_ENABLE_TESTS:BOOL=OFF -DSRB2_CONFIG_SYSTEM_LIBRARIES:BOOL=ON -DSRB2_CONFIG_USE_GME:BOOL=OFF -DSRB2_SDL2_EXE_NAME=srb2_$CI_PIPELINE_ID + - cmake -B build.x86_64 --toolchain /osxcross/toolchain.cmake -DCPM_USE_LOCAL_PACKAGES:BOOL=ON -DOPENMPT_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/include" -DSDL2_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/lib" -DSRB2_CONFIG_ENABLE_TESTS:BOOL=OFF -DSRB2_CONFIG_SYSTEM_LIBRARIES:BOOL=ON -DSRB2_CONFIG_USE_GME:BOOL=OFF -DSRB2_SDL2_EXE_NAME=srb2_$CI_PIPELINE_ID -G "Ninja" - | # make echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" @@ -35,7 +35,7 @@ osxcross x86_64: - - | # make echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - - cmake --build build.x86_64 --parallel 1 --verbose + - cmake --build build.x86_64 --parallel 1 --verbose - | # make echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" From 9860fa9f619ce01db0efcf16e465aeeef2de0866 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sun, 2 Mar 2025 18:20:43 -0500 Subject: [PATCH 65/83] vcpkg: wasm build check --- vcpkg.json | 40 +++++++++++++++++++++++++++++----------- 1 file changed, 29 insertions(+), 11 deletions(-) diff --git a/vcpkg.json b/vcpkg.json index dd714dc65..ab936993e 100644 --- a/vcpkg.json +++ b/vcpkg.json @@ -6,10 +6,13 @@ "dependencies": [ { "name": "curl", - "platform": "!(osx & !native)" + "platform": "!wasm32" }, "libgme", - "libopenmpt", + { + "name":"libopenmpt", + "platform": "!wasm32" + }, "libpng", "miniupnpc", { @@ -25,26 +28,41 @@ "platform": "!windows" } ], - "platform": "!(osx & !native)", - "version>=": "2.30.7" + "platform": "!wasm32", + "version>=": "2.30.6#2" }, { "name": "sdl2-mixer-ext", "features": [ "ffmpeg", - "fluidsynth", - "libflac", + { + "name":"fluidsynth", + "platform": "!wasm32" + }, + { + "name":"libflac", + "platform": "!wasm32" + }, "libgme", "libmodplug", - "libvorbis", + { + "name":"libvorbis", + "platform": "!wasm32" + }, "libxmp", - "mpg123", - "opusfile", + { + "name":"mpg123", + "platform": "!wasm32" + }, + { + "name":"opusfile", + "platform": "!wasm32" + }, "pxtone", "timidity" ], - "platform": "!(osx & !native)", - "version>=": "2.6.0" + "platform": "!wasm32", + "version>=": "2.6.0#0" }, "zlib" ] From fb6ce070fda356706d296073b64623afb88641db Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sun, 2 Mar 2025 19:17:17 -0500 Subject: [PATCH 66/83] GitLib CI: try keep building --- .gitlab/ci/jobs/alpine-3-gcc.yml | 4 ++-- .gitlab/ci/jobs/batocera-arm64.yml | 4 ++-- .gitlab/ci/jobs/debian-oldstable-amd64.yml | 4 ++-- .gitlab/ci/jobs/debian-oldstable-arm64.yml | 4 ++-- .gitlab/ci/jobs/debian-stable-amd64.yml | 4 ++-- .gitlab/ci/jobs/debian-stable-arm64.yml | 4 ++-- .gitlab/ci/jobs/debian-stable-clang-amd64.yml | 4 ++-- .gitlab/ci/jobs/debian-stable-i386.yml | 4 ++-- .gitlab/ci/jobs/debian-testing-gcc-amd64.yml | 4 ++-- .gitlab/ci/jobs/macos-arm64.yml | 9 ++++----- .gitlab/ci/jobs/macos-x86_64.yml | 5 ++--- .gitlab/ci/jobs/windows-x64-makefile.yml | 2 ++ .gitlab/ci/jobs/windows-x64.yml | 5 +++-- .gitlab/ci/jobs/windows-x86.yml | 5 +++-- 14 files changed, 32 insertions(+), 30 deletions(-) diff --git a/.gitlab/ci/jobs/alpine-3-gcc.yml b/.gitlab/ci/jobs/alpine-3-gcc.yml index 56339e332..fdf73bafc 100644 --- a/.gitlab/ci/jobs/alpine-3-gcc.yml +++ b/.gitlab/ci/jobs/alpine-3-gcc.yml @@ -109,7 +109,7 @@ Alpine 3 GCC: - - | # cmake echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles" - - cmake -B build.cmake -DSRB2_USE_CCACHE=YES -DSRB2_CONFIG_ERRORMODE=ON -DSRB2_CONFIG_EXECINFO=NO -DSRB2_CONFIG_USE_GME:BOOL=ON + - cmake -B build.cmake -DSRB2_CONFIG_ERRORMODE=ON -DSRB2_CONFIG_EXECINFO=NO -DSRB2_CONFIG_USE_GME:BOOL=ON -G "Unix Makefiles" - | # cmake echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K" @@ -117,7 +117,7 @@ Alpine 3 GCC: - - | # make echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - - cmake --build build.cmake --parallel 1 --verbose + - cmake --build build.cmake --parallel 1 --verbose -- --keep-going - | # make echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" diff --git a/.gitlab/ci/jobs/batocera-arm64.yml b/.gitlab/ci/jobs/batocera-arm64.yml index 5011c4322..4832c389b 100644 --- a/.gitlab/ci/jobs/batocera-arm64.yml +++ b/.gitlab/ci/jobs/batocera-arm64.yml @@ -34,7 +34,7 @@ batocera:arm64: - - | # cmake echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles" - - cmake -B build.cmake -DSRB2_USE_CCACHE=YES -DSRB2_CONFIG_ERRORMODE=ON -DSRB2_CONFIG_FORCE_NO_MS_BITFIELDS=ON -DSRB2_CONFIG_USE_GME:BOOL=OFF + - cmake -B build.cmake -DSRB2_CONFIG_ERRORMODE=ON -DSRB2_CONFIG_FORCE_NO_MS_BITFIELDS=ON -DSRB2_CONFIG_USE_GME:BOOL=OFF -G "Unix Makefiles" - | # cmake echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K" @@ -42,7 +42,7 @@ batocera:arm64: - - | # make echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - - cmake --build build.cmake --parallel 1 --verbose + - cmake --build build.cmake --parallel 1 --verbose -- --keep-going - | # make echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" diff --git a/.gitlab/ci/jobs/debian-oldstable-amd64.yml b/.gitlab/ci/jobs/debian-oldstable-amd64.yml index 3989f750b..c4b6629fd 100644 --- a/.gitlab/ci/jobs/debian-oldstable-amd64.yml +++ b/.gitlab/ci/jobs/debian-oldstable-amd64.yml @@ -36,7 +36,7 @@ Debian oldstable:amd64: - - | # cmake echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles" - - cmake -B build.cmake -DSRB2_USE_CCACHE=YES -DSRB2_CONFIG_ERRORMODE=ON -DSRB2_CONFIG_USE_GME:BOOL=ON + - cmake -B build.cmake -DSRB2_CONFIG_ERRORMODE=ON -DSRB2_CONFIG_USE_GME:BOOL=ON -G "Unix Makefiles" - | # cmake echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K" @@ -44,7 +44,7 @@ Debian oldstable:amd64: - - | # make echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - - cmake --build build.cmake --parallel 1 --verbose + - cmake --build build.cmake --parallel 1 --verbose -- --keep-going - | # make echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" diff --git a/.gitlab/ci/jobs/debian-oldstable-arm64.yml b/.gitlab/ci/jobs/debian-oldstable-arm64.yml index db0e7f861..2e69b0b62 100644 --- a/.gitlab/ci/jobs/debian-oldstable-arm64.yml +++ b/.gitlab/ci/jobs/debian-oldstable-arm64.yml @@ -36,7 +36,7 @@ Debian oldstable:arm64: - - | # cmake echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles" - - cmake -B build.cmake -DSRB2_USE_CCACHE=YES -DSRB2_CONFIG_ERRORMODE=ON -DSRB2_CONFIG_FORCE_NO_MS_BITFIELDS=ON -DSRB2_CONFIG_USE_GME:BOOL=ON + - cmake -B build.cmake -DSRB2_CONFIG_ERRORMODE=ON -DSRB2_CONFIG_FORCE_NO_MS_BITFIELDS=ON -DSRB2_CONFIG_USE_GME:BOOL=ON -G "Unix Makefiles" - | # cmake echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K" @@ -44,7 +44,7 @@ Debian oldstable:arm64: - - | # make echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - - cmake --build build.cmake --parallel 1 --verbose + - cmake --build build.cmake --parallel 1 --verbose -- --keep-going - | # make echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" diff --git a/.gitlab/ci/jobs/debian-stable-amd64.yml b/.gitlab/ci/jobs/debian-stable-amd64.yml index e58f5a112..807a7ef18 100644 --- a/.gitlab/ci/jobs/debian-stable-amd64.yml +++ b/.gitlab/ci/jobs/debian-stable-amd64.yml @@ -39,7 +39,7 @@ Debian stable:amd64: - - | # cmake echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles" - - cmake -B build.cmake -DSRB2_USE_CCACHE=YES -DSRB2_CONFIG_ERRORMODE=ON -DSRB2_CONFIG_USE_GME:BOOL=ON + - cmake -B build.cmake -DSRB2_CONFIG_ERRORMODE=ON -DSRB2_CONFIG_USE_GME:BOOL=ON -G "Unix Makefiles" - | # cmake echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K" @@ -47,7 +47,7 @@ Debian stable:amd64: - - | # make echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - - cmake --build build.cmake --parallel 1 --verbose + - cmake --build build.cmake --parallel 1 --verbose -- --keep-going - | # make echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" diff --git a/.gitlab/ci/jobs/debian-stable-arm64.yml b/.gitlab/ci/jobs/debian-stable-arm64.yml index 135d87aa5..e08dac501 100644 --- a/.gitlab/ci/jobs/debian-stable-arm64.yml +++ b/.gitlab/ci/jobs/debian-stable-arm64.yml @@ -40,7 +40,7 @@ Debian stable:arm64: - - | # cmake echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles" - - cmake -B build.cmake -DSRB2_USE_CCACHE=YES -DSRB2_CONFIG_ERRORMODE=ON -DSRB2_CONFIG_FORCE_NO_MS_BITFIELDS=ON -DSRB2_CONFIG_USE_GME:BOOL=ON + - cmake -B build.cmake -DSRB2_CONFIG_ERRORMODE=ON -DSRB2_CONFIG_FORCE_NO_MS_BITFIELDS=ON -DSRB2_CONFIG_USE_GME:BOOL=ON -G "Unix Makefiles" - | # cmake echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K" @@ -48,7 +48,7 @@ Debian stable:arm64: - - | # make echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - - cmake --build build.cmake --parallel 1 --verbose + - cmake --build build.cmake --parallel 1 --verbose -- --keep-going - | # make echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" diff --git a/.gitlab/ci/jobs/debian-stable-clang-amd64.yml b/.gitlab/ci/jobs/debian-stable-clang-amd64.yml index 870e96bc7..7861c4dea 100644 --- a/.gitlab/ci/jobs/debian-stable-clang-amd64.yml +++ b/.gitlab/ci/jobs/debian-stable-clang-amd64.yml @@ -40,7 +40,7 @@ Debian stable Clang: - - | # cmake echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles" - - cmake -B build.cmake -DCPM_USE_LOCAL_PACKAGES:BOOL=ON -DSRB2_CONFIG_ENABLE_TESTS:BOOL=OFF -DSRB2_CONFIG_SYSTEM_LIBRARIES:BOOL=ON -DSRB2_USE_LIBGME:BOOL=OFF -DSRB2_CONFIG_USE_GME:BOOL=ON + - cmake -B build.cmake -DCPM_USE_LOCAL_PACKAGES:BOOL=ON -DSRB2_CONFIG_ENABLE_TESTS:BOOL=OFF -DSRB2_CONFIG_SYSTEM_LIBRARIES:BOOL=ON -DSRB2_USE_LIBGME:BOOL=OFF -DSRB2_CONFIG_USE_GME:BOOL=ON -G "Unix Makefiles" - | # cmake echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K" @@ -48,7 +48,7 @@ Debian stable Clang: - - | # make echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - - cmake --build build.cmake --parallel 1 --verbose + - cmake --build build.cmake --parallel 1 --verbose -- --keep-going - | # make echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" diff --git a/.gitlab/ci/jobs/debian-stable-i386.yml b/.gitlab/ci/jobs/debian-stable-i386.yml index 970b92a69..cf43dd8f9 100644 --- a/.gitlab/ci/jobs/debian-stable-i386.yml +++ b/.gitlab/ci/jobs/debian-stable-i386.yml @@ -40,7 +40,7 @@ Debian stable:i386: - - | # cmake echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles" - - cmake -B build.cmake -DSRB2_USE_CCACHE=YES -DSRB2_CONFIG_ERRORMODE=ON -DSRB2_CONFIG_USE_GME:BOOL=ON + - cmake -B build.cmake -DSRB2_CONFIG_ERRORMODE=ON -DSRB2_CONFIG_USE_GME:BOOL=ON -G "Unix Makefiles" - | # cmake echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K" @@ -48,7 +48,7 @@ Debian stable:i386: - - | # make echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - - cmake --build build.cmake --parallel 1 --verbose + - cmake --build build.cmake --parallel 1 --verbose -- --keep-going - | # make echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" diff --git a/.gitlab/ci/jobs/debian-testing-gcc-amd64.yml b/.gitlab/ci/jobs/debian-testing-gcc-amd64.yml index fc998ea47..513495fee 100644 --- a/.gitlab/ci/jobs/debian-testing-gcc-amd64.yml +++ b/.gitlab/ci/jobs/debian-testing-gcc-amd64.yml @@ -40,7 +40,7 @@ Debian testing GCC: - - | # cmake echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles" - - cmake -B build.cmake -DSRB2_USE_CCACHE=YES -DSRB2_CONFIG_ERRORMODE=ON -DSRB2_CONFIG_USE_GME:BOOL=ON + - cmake -B build.cmake -DSRB2_CONFIG_ERRORMODE=ON -DSRB2_CONFIG_USE_GME:BOOL=ON -G "Unix Makefiles" - | # cmake echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K" @@ -48,7 +48,7 @@ Debian testing GCC: - - | # make echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - - cmake --build build.cmake --parallel 1 --verbose + - cmake --build build.cmake --parallel 1 --verbose -- --keep-going - | # make echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" diff --git a/.gitlab/ci/jobs/macos-arm64.yml b/.gitlab/ci/jobs/macos-arm64.yml index a74ca5d9c..1d2bc40d3 100644 --- a/.gitlab/ci/jobs/macos-arm64.yml +++ b/.gitlab/ci/jobs/macos-arm64.yml @@ -11,15 +11,14 @@ osxcross arm64: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-arm64-apple-darwin" variables: - OSXCROSS_HOST: oa64 LD: /opt/osxcross.arm64/ld script: - - | # apt_development echo -e "\e[0Ksection_start:`date +%s`:macports_development[collapsed=true]\r\e[0KInstalling development packages" - - osxcross-macports install --arm64 libxmp wavpack libopenmpt opusfile || osxcross-macports install --arm64 libxmp wavpack libopenmpt opusfile - - osxcross-macports install --static --arm64 miniupnpc libpng curl libsdl2_mixer || osxcross-macports install --static --arm64 miniupnpc libpng curl libsdl2_mixer + - osxcross-macports install --arm64 libopenmpt libxmp wavpack opusfile || osxcross-macports install --arm64 libopenmpt libxmp wavpack opusfile + - osxcross-macports install --static --arm64 miniupnpc curl libsdl2_mixer libpng || osxcross-macports install --static --arm64 miniupnpc curl libsdl2_mixer libpng - | # apt_development echo -e "\e[0Ksection_end:`date +%s`:macports_development\r\e[0K" @@ -27,7 +26,7 @@ osxcross arm64: - - | # cmake echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles" - - cmake -B build.arm64 --toolchain /osxcross/toolchain.cmake -DCPM_USE_LOCAL_PACKAGES:BOOL=ON -DOPENMPT_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/include" -DSDL2_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/lib" -DSRB2_CONFIG_ENABLE_TESTS:BOOL=OFF -DSRB2_CONFIG_SYSTEM_LIBRARIES:BOOL=ON -DSRB2_CONFIG_FORCE_NO_MS_BITFIELDS:BOOL=ON -DSRB2_CONFIG_USE_GME:BOOL=OFF -DSRB2_SDL2_EXE_NAME=srb2_$CI_PIPELINE_ID -G "Ninja" + - oa64-cmake -B build.arm64 -DCPM_USE_LOCAL_PACKAGES:BOOL=ON -DOPENMPT_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/include" -DSDL2_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/lib" -DSRB2_CONFIG_ENABLE_TESTS:BOOL=OFF -DSRB2_CONFIG_SYSTEM_LIBRARIES:BOOL=ON -DSRB2_CONFIG_USE_GME:BOOL=OFF -DSRB2_SDL2_EXE_NAME=srb2_$CI_PIPELINE_ID -DSRB2_CONFIG_FORCE_NO_MS_BITFIELDS:BOOL=ON -G "Unix Makefiles" - | # make echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" @@ -35,7 +34,7 @@ osxcross arm64: - - | # make echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - - cmake --build build.arm64 --parallel 1 --verbose + - oa64-cmake --build build.arm64 --parallel 1 --verbose -- --keep-going - | # make echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" diff --git a/.gitlab/ci/jobs/macos-x86_64.yml b/.gitlab/ci/jobs/macos-x86_64.yml index 9ac718406..afc377265 100644 --- a/.gitlab/ci/jobs/macos-x86_64.yml +++ b/.gitlab/ci/jobs/macos-x86_64.yml @@ -11,7 +11,6 @@ osxcross x86_64: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-x86_64-apple-darwin" variables: - OSXCROSS_HOST: o64 LD: /opt/osxcross.x86_64/ld script: @@ -27,7 +26,7 @@ osxcross x86_64: - - | # cmake echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles" - - cmake -B build.x86_64 --toolchain /osxcross/toolchain.cmake -DCPM_USE_LOCAL_PACKAGES:BOOL=ON -DOPENMPT_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/include" -DSDL2_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/lib" -DSRB2_CONFIG_ENABLE_TESTS:BOOL=OFF -DSRB2_CONFIG_SYSTEM_LIBRARIES:BOOL=ON -DSRB2_CONFIG_USE_GME:BOOL=OFF -DSRB2_SDL2_EXE_NAME=srb2_$CI_PIPELINE_ID -G "Ninja" + - o64-cmake -B build.x86_64 -DCPM_USE_LOCAL_PACKAGES:BOOL=ON -DOPENMPT_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/include" -DSDL2_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/lib" -DSRB2_CONFIG_ENABLE_TESTS:BOOL=OFF -DSRB2_CONFIG_SYSTEM_LIBRARIES:BOOL=ON -DSRB2_CONFIG_USE_GME:BOOL=OFF -DSRB2_SDL2_EXE_NAME=srb2_$CI_PIPELINE_ID -G "Unix Makefiles" - | # make echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" @@ -35,7 +34,7 @@ osxcross x86_64: - - | # make echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - - cmake --build build.x86_64 --parallel 1 --verbose + - o64-cmake --build build.x86_64 --parallel 1 --verbose -- --keep-going - | # make echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" diff --git a/.gitlab/ci/jobs/windows-x64-makefile.yml b/.gitlab/ci/jobs/windows-x64-makefile.yml index 8da30d2b9..aea9de4ce 100644 --- a/.gitlab/ci/jobs/windows-x64-makefile.yml +++ b/.gitlab/ci/jobs/windows-x64-makefile.yml @@ -16,6 +16,8 @@ Windows x64 Makefile: variables: PREFIX: x86_64-w64-mingw32 + CC: /usr/bin/x86_64-w64-mingw32-gcc + CXX: /usr/bin/x86_64-w64-mingw32-g++ script: - - | diff --git a/.gitlab/ci/jobs/windows-x64.yml b/.gitlab/ci/jobs/windows-x64.yml index abb5ec3e3..93f49665f 100644 --- a/.gitlab/ci/jobs/windows-x64.yml +++ b/.gitlab/ci/jobs/windows-x64.yml @@ -35,6 +35,7 @@ Windows x64: variables: PREFIX: x86_64-w64-mingw32 + VCPKG_DEFAULT_TRIPLET=x64-mingw-static script: - | @@ -66,7 +67,7 @@ Windows x64: - - | # cmake echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles" - - cmake -B build.cmake -DSRB2_USE_CCACHE=NO -DSRB2_CONFIG_ERRORMODE=ON -DCMAKE_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-mingw-static -DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/toolchains/mingw.cmake -G "Unix Makefiles" + - cmake -B build.cmake -DSRB2_CONFIG_ERRORMODE=ON -DCMAKE_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-mingw-static -DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/toolchains/mingw.cmake -G "Unix Makefiles" -G "Unix Makefiles" - | # cmake echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K" @@ -74,7 +75,7 @@ Windows x64: - - | # make echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - - cmake --build build.cmake --parallel 1 --verbose + - cmake --build build.cmake --parallel 1 --verbose -- --keep-going - | # make echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" diff --git a/.gitlab/ci/jobs/windows-x86.yml b/.gitlab/ci/jobs/windows-x86.yml index 195c1aab1..dcb87b099 100644 --- a/.gitlab/ci/jobs/windows-x86.yml +++ b/.gitlab/ci/jobs/windows-x86.yml @@ -31,6 +31,7 @@ Windows x86: variables: PREFIX: i686-w64-mingw32 + VCPKG_DEFAULT_TRIPLET=x86-mingw-static script: - | @@ -62,7 +63,7 @@ Windows x86: - - | # cmake echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles" - - cmake -B build.cmake -DSRB2_USE_CCACHE=NO -DSRB2_CONFIG_ERRORMODE=ON -DCMAKE_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x86-mingw-static -DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/toolchains/mingw.cmake -G "Unix Makefiles" + - cmake -B build.cmake -DSRB2_CONFIG_ERRORMODE=ON -DCMAKE_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x86-mingw-static -DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/toolchains/mingw.cmake -G "Unix Makefiles" - | # cmake echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K" @@ -70,7 +71,7 @@ Windows x86: - - | # make echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - - cmake --build build.cmake --parallel 1 --verbose + - cmake --build build.cmake --parallel 1 --verbose -- --keep-going - | # make echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" From a7424b9952eccf63e600eed24b0b41fe10cd3c7f Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sun, 2 Mar 2025 19:30:38 -0500 Subject: [PATCH 67/83] GitLab CI: use :, not = for variables --- .gitlab/ci/jobs/windows-x64.yml | 2 +- .gitlab/ci/jobs/windows-x86.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab/ci/jobs/windows-x64.yml b/.gitlab/ci/jobs/windows-x64.yml index 93f49665f..d8824e185 100644 --- a/.gitlab/ci/jobs/windows-x64.yml +++ b/.gitlab/ci/jobs/windows-x64.yml @@ -35,7 +35,7 @@ Windows x64: variables: PREFIX: x86_64-w64-mingw32 - VCPKG_DEFAULT_TRIPLET=x64-mingw-static + VCPKG_DEFAULT_TRIPLET: x64-mingw-static script: - | diff --git a/.gitlab/ci/jobs/windows-x86.yml b/.gitlab/ci/jobs/windows-x86.yml index dcb87b099..f375042d7 100644 --- a/.gitlab/ci/jobs/windows-x86.yml +++ b/.gitlab/ci/jobs/windows-x86.yml @@ -31,7 +31,7 @@ Windows x86: variables: PREFIX: i686-w64-mingw32 - VCPKG_DEFAULT_TRIPLET=x86-mingw-static + VCPKG_DEFAULT_TRIPLET: x86-mingw-static script: - | From 682fb8f07f99b01424a859381d7285e1f8fbe5af Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sun, 2 Mar 2025 19:44:10 -0500 Subject: [PATCH 68/83] GitLab CI: set LD for Mingw32 nad use plain cmake for darwin builds --- .gitlab/ci/jobs/macos-arm64.yml | 6 ++++-- .gitlab/ci/jobs/macos-x86_64.yml | 6 ++++-- .gitlab/ci/jobs/windows-x64.yml | 1 + .gitlab/ci/jobs/windows-x86.yml | 1 + 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.gitlab/ci/jobs/macos-arm64.yml b/.gitlab/ci/jobs/macos-arm64.yml index 1d2bc40d3..121cdb49b 100644 --- a/.gitlab/ci/jobs/macos-arm64.yml +++ b/.gitlab/ci/jobs/macos-arm64.yml @@ -11,6 +11,8 @@ osxcross arm64: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-arm64-apple-darwin" variables: + OSXCROSS_HOST: oa64 + CMAKE_TOOLCHAIN_FILE: /osxcross/toolchain.cmake LD: /opt/osxcross.arm64/ld script: @@ -26,7 +28,7 @@ osxcross arm64: - - | # cmake echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles" - - oa64-cmake -B build.arm64 -DCPM_USE_LOCAL_PACKAGES:BOOL=ON -DOPENMPT_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/include" -DSDL2_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/lib" -DSRB2_CONFIG_ENABLE_TESTS:BOOL=OFF -DSRB2_CONFIG_SYSTEM_LIBRARIES:BOOL=ON -DSRB2_CONFIG_USE_GME:BOOL=OFF -DSRB2_SDL2_EXE_NAME=srb2_$CI_PIPELINE_ID -DSRB2_CONFIG_FORCE_NO_MS_BITFIELDS:BOOL=ON -G "Unix Makefiles" + - cmake -B build.arm64 -DCPM_USE_LOCAL_PACKAGES:BOOL=ON -DOPENMPT_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/include" -DSDL2_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/lib" -DSRB2_CONFIG_ENABLE_TESTS:BOOL=OFF -DSRB2_CONFIG_SYSTEM_LIBRARIES:BOOL=ON -DSRB2_CONFIG_USE_GME:BOOL=OFF -DSRB2_SDL2_EXE_NAME=srb2_$CI_PIPELINE_ID -DSRB2_CONFIG_FORCE_NO_MS_BITFIELDS:BOOL=ON -G "Unix Makefiles" - | # make echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" @@ -34,7 +36,7 @@ osxcross arm64: - - | # make echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - - oa64-cmake --build build.arm64 --parallel 1 --verbose -- --keep-going + - cmake --build build.arm64 --parallel 1 --verbose -- --keep-going - | # make echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" diff --git a/.gitlab/ci/jobs/macos-x86_64.yml b/.gitlab/ci/jobs/macos-x86_64.yml index afc377265..4d3b4295c 100644 --- a/.gitlab/ci/jobs/macos-x86_64.yml +++ b/.gitlab/ci/jobs/macos-x86_64.yml @@ -11,6 +11,8 @@ osxcross x86_64: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-x86_64-apple-darwin" variables: + OSXCROSS_HOST: o64 + CMAKE_TOOLCHAIN_FILE: /osxcross/toolchain.cmake LD: /opt/osxcross.x86_64/ld script: @@ -26,7 +28,7 @@ osxcross x86_64: - - | # cmake echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles" - - o64-cmake -B build.x86_64 -DCPM_USE_LOCAL_PACKAGES:BOOL=ON -DOPENMPT_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/include" -DSDL2_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/lib" -DSRB2_CONFIG_ENABLE_TESTS:BOOL=OFF -DSRB2_CONFIG_SYSTEM_LIBRARIES:BOOL=ON -DSRB2_CONFIG_USE_GME:BOOL=OFF -DSRB2_SDL2_EXE_NAME=srb2_$CI_PIPELINE_ID -G "Unix Makefiles" + - cmake -B build.x86_64 -DCPM_USE_LOCAL_PACKAGES:BOOL=ON -DOPENMPT_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/include" -DSDL2_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/lib" -DSRB2_CONFIG_ENABLE_TESTS:BOOL=OFF -DSRB2_CONFIG_SYSTEM_LIBRARIES:BOOL=ON -DSRB2_CONFIG_USE_GME:BOOL=OFF -DSRB2_SDL2_EXE_NAME=srb2_$CI_PIPELINE_ID -G "Unix Makefiles" - | # make echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" @@ -34,7 +36,7 @@ osxcross x86_64: - - | # make echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - - o64-cmake --build build.x86_64 --parallel 1 --verbose -- --keep-going + - cmake --build build.x86_64 --parallel 1 --verbose -- --keep-going - | # make echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" diff --git a/.gitlab/ci/jobs/windows-x64.yml b/.gitlab/ci/jobs/windows-x64.yml index d8824e185..b1ba9b53a 100644 --- a/.gitlab/ci/jobs/windows-x64.yml +++ b/.gitlab/ci/jobs/windows-x64.yml @@ -36,6 +36,7 @@ Windows x64: variables: PREFIX: x86_64-w64-mingw32 VCPKG_DEFAULT_TRIPLET: x64-mingw-static + LD: /usr/bin/x86_64-w64-mingw32-ld script: - | diff --git a/.gitlab/ci/jobs/windows-x86.yml b/.gitlab/ci/jobs/windows-x86.yml index f375042d7..10d5f8170 100644 --- a/.gitlab/ci/jobs/windows-x86.yml +++ b/.gitlab/ci/jobs/windows-x86.yml @@ -32,6 +32,7 @@ Windows x86: variables: PREFIX: i686-w64-mingw32 VCPKG_DEFAULT_TRIPLET: x86-mingw-static + LD: /usr/bin/i686-w64-mingw32-ld script: - | From 61afd65fc1b43187e23eaf98526c8e353bfe0939 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sun, 2 Mar 2025 20:01:59 -0500 Subject: [PATCH 69/83] GitLab CI: w64-mingw32 vcpkgs to use --toolchain --- .gitlab/ci/jobs/windows-x64.yml | 2 +- .gitlab/ci/jobs/windows-x86.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab/ci/jobs/windows-x64.yml b/.gitlab/ci/jobs/windows-x64.yml index b1ba9b53a..5291be850 100644 --- a/.gitlab/ci/jobs/windows-x64.yml +++ b/.gitlab/ci/jobs/windows-x64.yml @@ -68,7 +68,7 @@ Windows x64: - - | # cmake echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles" - - cmake -B build.cmake -DSRB2_CONFIG_ERRORMODE=ON -DCMAKE_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-mingw-static -DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/toolchains/mingw.cmake -G "Unix Makefiles" -G "Unix Makefiles" + - cmake -B build.cmake -DSRB2_CONFIG_ERRORMODE=ON --toolchain $VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake -DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/toolchains/mingw.cmake -G "Unix Makefiles" - | # cmake echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K" diff --git a/.gitlab/ci/jobs/windows-x86.yml b/.gitlab/ci/jobs/windows-x86.yml index 10d5f8170..a35de2a6c 100644 --- a/.gitlab/ci/jobs/windows-x86.yml +++ b/.gitlab/ci/jobs/windows-x86.yml @@ -64,7 +64,7 @@ Windows x86: - - | # cmake echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles" - - cmake -B build.cmake -DSRB2_CONFIG_ERRORMODE=ON -DCMAKE_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x86-mingw-static -DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/toolchains/mingw.cmake -G "Unix Makefiles" + - cmake -B build.cmake -DSRB2_CONFIG_ERRORMODE=ON --toolchain $VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake -DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/toolchains/mingw.cmake -G "Unix Makefiles" - | # cmake echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K" From e2200c1eb5423b2cf3038dc303604528345f15a6 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sun, 2 Mar 2025 20:18:59 -0500 Subject: [PATCH 70/83] GitLab CI: use VCPKG_TARGET_TRIPLET, not VCPKG_DEFAULT_TRIPLET --- .gitlab/ci/jobs/windows-x64.yml | 2 +- .gitlab/ci/jobs/windows-x86.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab/ci/jobs/windows-x64.yml b/.gitlab/ci/jobs/windows-x64.yml index 5291be850..c488f3184 100644 --- a/.gitlab/ci/jobs/windows-x64.yml +++ b/.gitlab/ci/jobs/windows-x64.yml @@ -35,7 +35,7 @@ Windows x64: variables: PREFIX: x86_64-w64-mingw32 - VCPKG_DEFAULT_TRIPLET: x64-mingw-static + VCPKG_TARGET_TRIPLET: x64-mingw-static LD: /usr/bin/x86_64-w64-mingw32-ld script: diff --git a/.gitlab/ci/jobs/windows-x86.yml b/.gitlab/ci/jobs/windows-x86.yml index a35de2a6c..802022f9e 100644 --- a/.gitlab/ci/jobs/windows-x86.yml +++ b/.gitlab/ci/jobs/windows-x86.yml @@ -31,7 +31,7 @@ Windows x86: variables: PREFIX: i686-w64-mingw32 - VCPKG_DEFAULT_TRIPLET: x86-mingw-static + VCPKG_TARGET_TRIPLET: x86-mingw-static LD: /usr/bin/i686-w64-mingw32-ld script: From 3145253ff34b4799c850de24269c5d0fc97e74ca Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sun, 2 Mar 2025 20:34:17 -0500 Subject: [PATCH 71/83] GitLab CI: set CC,CXX and LD for Windows vcpkg builds --- .gitlab/ci/jobs/windows-x64.yml | 25 ++++--------------------- .gitlab/ci/jobs/windows-x86.yml | 25 ++++--------------------- 2 files changed, 8 insertions(+), 42 deletions(-) diff --git a/.gitlab/ci/jobs/windows-x64.yml b/.gitlab/ci/jobs/windows-x64.yml index c488f3184..9085588e9 100644 --- a/.gitlab/ci/jobs/windows-x64.yml +++ b/.gitlab/ci/jobs/windows-x64.yml @@ -34,9 +34,10 @@ Windows x64: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win64" variables: - PREFIX: x86_64-w64-mingw32 VCPKG_TARGET_TRIPLET: x64-mingw-static - LD: /usr/bin/x86_64-w64-mingw32-ld + CC: x86_64-w64-mingw32-gcc + CXX: x86_64-w64-mingw32-g++ + LD: x86_64-w64-mingw32-ld script: - | @@ -68,7 +69,7 @@ Windows x64: - - | # cmake echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles" - - cmake -B build.cmake -DSRB2_CONFIG_ERRORMODE=ON --toolchain $VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake -DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/toolchains/mingw.cmake -G "Unix Makefiles" + - cmake -B build.cmake -DSRB2_CONFIG_ERRORMODE=ON -DCMAKE_TOOLCHAIN_FILE=${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=${VCPKG_TARGET_TRIPLET} -DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/toolchains/mingw.cmake -G "Unix Makefiles" - | # cmake echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K" @@ -80,21 +81,3 @@ Windows x64: - | # make echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" - - after_script: - - - | - # apt_clean - echo -e "\e[0Ksection_start:`date +%s`:apt_clean[collapsed=true]\r\e[0KCleaning of unneeded APT packages" - - apt-get autoclean - - | - # apt_clean - echo -e "\e[0Ksection_end:`date +%s`:apt_clean\r\e[0K" - - - - | - # ccache_stats - echo -e "\e[0Ksection_start:`date +%s`:ccache_stats[collapsed=true]\r\e[0Kccache statistics:" - - ccache --show-stats - - ccache --show-log-stats || true - - | - # ccahe_stats - echo -e "\e[0Ksection_end:`date +%s`:ccache_stats\r\e[0K" diff --git a/.gitlab/ci/jobs/windows-x86.yml b/.gitlab/ci/jobs/windows-x86.yml index 802022f9e..006291cda 100644 --- a/.gitlab/ci/jobs/windows-x86.yml +++ b/.gitlab/ci/jobs/windows-x86.yml @@ -30,9 +30,10 @@ Windows x86: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win32" variables: - PREFIX: i686-w64-mingw32 VCPKG_TARGET_TRIPLET: x86-mingw-static - LD: /usr/bin/i686-w64-mingw32-ld + CC: i686-w64-mingw32-gcc + CXX: i686-w64-mingw32-g++ + LD: i686-w64-mingw32-ld script: - | @@ -64,7 +65,7 @@ Windows x86: - - | # cmake echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles" - - cmake -B build.cmake -DSRB2_CONFIG_ERRORMODE=ON --toolchain $VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake -DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/toolchains/mingw.cmake -G "Unix Makefiles" + - cmake -B build.cmake -DSRB2_CONFIG_ERRORMODE=ON -DCMAKE_TOOLCHAIN_FILE=${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=${VCPKG_TARGET_TRIPLET} -DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/toolchains/mingw.cmake -G "Unix Makefiles" - | # cmake echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K" @@ -76,21 +77,3 @@ Windows x86: - | # make echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" - - after_script: - - - | - # apt_clean - echo -e "\e[0Ksection_start:`date +%s`:apt_clean[collapsed=true]\r\e[0KCleaning of unneeded APT packages" - - apt-get autoclean - - | - # apt_clean - echo -e "\e[0Ksection_end:`date +%s`:apt_clean\r\e[0K" - - - - | - # ccache_stats - echo -e "\e[0Ksection_start:`date +%s`:ccache_stats[collapsed=true]\r\e[0Kccache statistics:" - - ccache --show-stats - - ccache --show-log-stats || true - - | - # ccahe_stats - echo -e "\e[0Ksection_end:`date +%s`:ccache_stats\r\e[0K" From 61ba912ae9bd5180af328d8b85a9b68b7149224a Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sun, 2 Mar 2025 20:58:13 -0500 Subject: [PATCH 72/83] vcpkg: no fluidsynth for sdl2-mixer-ext on non-native mingw builds --- vcpkg.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vcpkg.json b/vcpkg.json index ab936993e..42fe44d4b 100644 --- a/vcpkg.json +++ b/vcpkg.json @@ -37,7 +37,7 @@ "ffmpeg", { "name":"fluidsynth", - "platform": "!wasm32" + "platform": "!(mingw & !native) & !wasm32" }, { "name":"libflac", From 5d5cd27e289681b70381fefba1951b3122ff588a Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sun, 2 Mar 2025 21:39:59 -0500 Subject: [PATCH 73/83] vcpkg: fluidsynth does not work for static build --- vcpkg.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vcpkg.json b/vcpkg.json index 42fe44d4b..dd6f69299 100644 --- a/vcpkg.json +++ b/vcpkg.json @@ -37,7 +37,7 @@ "ffmpeg", { "name":"fluidsynth", - "platform": "!(mingw & !native) & !wasm32" + "platform": "!static" }, { "name":"libflac", From 51494ca8101118efae4a0d78b90c62df09308630 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sun, 2 Mar 2025 21:40:23 -0500 Subject: [PATCH 74/83] GitLab CI: disable SRB2_CONFIG_ENABLE_WEBM_MOVIES for cmake builds --- .gitlab/ci/jobs/alpine-3-gcc.yml | 2 +- .gitlab/ci/jobs/batocera-arm64.yml | 2 +- .gitlab/ci/jobs/debian-oldstable-amd64.yml | 2 +- .gitlab/ci/jobs/debian-oldstable-arm64.yml | 2 +- .gitlab/ci/jobs/debian-stable-amd64.yml | 2 +- .gitlab/ci/jobs/debian-stable-arm64.yml | 2 +- .gitlab/ci/jobs/debian-stable-clang-amd64.yml | 2 +- .gitlab/ci/jobs/debian-stable-i386.yml | 2 +- .gitlab/ci/jobs/debian-testing-gcc-amd64.yml | 2 +- .gitlab/ci/jobs/macos-arm64.yml | 2 +- .gitlab/ci/jobs/macos-x86_64.yml | 2 +- .gitlab/ci/jobs/windows-x64.yml | 2 +- .gitlab/ci/jobs/windows-x86.yml | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.gitlab/ci/jobs/alpine-3-gcc.yml b/.gitlab/ci/jobs/alpine-3-gcc.yml index fdf73bafc..3456a7070 100644 --- a/.gitlab/ci/jobs/alpine-3-gcc.yml +++ b/.gitlab/ci/jobs/alpine-3-gcc.yml @@ -109,7 +109,7 @@ Alpine 3 GCC: - - | # cmake echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles" - - cmake -B build.cmake -DSRB2_CONFIG_ERRORMODE=ON -DSRB2_CONFIG_EXECINFO=NO -DSRB2_CONFIG_USE_GME:BOOL=ON -G "Unix Makefiles" + - cmake -B build.cmake -DSRB2_CONFIG_ENABLE_WEBM_MOVIES=OFF -DSRB2_CONFIG_ERRORMODE=ON -DSRB2_CONFIG_EXECINFO=NO -DSRB2_CONFIG_USE_GME:BOOL=ON -G "Unix Makefiles" - | # cmake echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K" diff --git a/.gitlab/ci/jobs/batocera-arm64.yml b/.gitlab/ci/jobs/batocera-arm64.yml index 4832c389b..7acba8c79 100644 --- a/.gitlab/ci/jobs/batocera-arm64.yml +++ b/.gitlab/ci/jobs/batocera-arm64.yml @@ -34,7 +34,7 @@ batocera:arm64: - - | # cmake echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles" - - cmake -B build.cmake -DSRB2_CONFIG_ERRORMODE=ON -DSRB2_CONFIG_FORCE_NO_MS_BITFIELDS=ON -DSRB2_CONFIG_USE_GME:BOOL=OFF -G "Unix Makefiles" + - cmake -B build.cmake -DSRB2_CONFIG_ENABLE_WEBM_MOVIES=OFF -DSRB2_CONFIG_ERRORMODE=ON -DSRB2_CONFIG_FORCE_NO_MS_BITFIELDS=ON -DSRB2_CONFIG_USE_GME:BOOL=OFF -G "Unix Makefiles" - | # cmake echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K" diff --git a/.gitlab/ci/jobs/debian-oldstable-amd64.yml b/.gitlab/ci/jobs/debian-oldstable-amd64.yml index c4b6629fd..90b0a3023 100644 --- a/.gitlab/ci/jobs/debian-oldstable-amd64.yml +++ b/.gitlab/ci/jobs/debian-oldstable-amd64.yml @@ -36,7 +36,7 @@ Debian oldstable:amd64: - - | # cmake echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles" - - cmake -B build.cmake -DSRB2_CONFIG_ERRORMODE=ON -DSRB2_CONFIG_USE_GME:BOOL=ON -G "Unix Makefiles" + - cmake -B build.cmake -DSRB2_CONFIG_ENABLE_WEBM_MOVIES=OFF -DSRB2_CONFIG_ERRORMODE=ON -DSRB2_CONFIG_USE_GME:BOOL=ON -G "Unix Makefiles" - | # cmake echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K" diff --git a/.gitlab/ci/jobs/debian-oldstable-arm64.yml b/.gitlab/ci/jobs/debian-oldstable-arm64.yml index 2e69b0b62..89fe8630e 100644 --- a/.gitlab/ci/jobs/debian-oldstable-arm64.yml +++ b/.gitlab/ci/jobs/debian-oldstable-arm64.yml @@ -36,7 +36,7 @@ Debian oldstable:arm64: - - | # cmake echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles" - - cmake -B build.cmake -DSRB2_CONFIG_ERRORMODE=ON -DSRB2_CONFIG_FORCE_NO_MS_BITFIELDS=ON -DSRB2_CONFIG_USE_GME:BOOL=ON -G "Unix Makefiles" + - cmake -B build.cmake -DSRB2_CONFIG_ENABLE_WEBM_MOVIES=OFF -DSRB2_CONFIG_ERRORMODE=ON -DSRB2_CONFIG_FORCE_NO_MS_BITFIELDS=ON -DSRB2_CONFIG_USE_GME:BOOL=ON -G "Unix Makefiles" - | # cmake echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K" diff --git a/.gitlab/ci/jobs/debian-stable-amd64.yml b/.gitlab/ci/jobs/debian-stable-amd64.yml index 807a7ef18..481e6d1b8 100644 --- a/.gitlab/ci/jobs/debian-stable-amd64.yml +++ b/.gitlab/ci/jobs/debian-stable-amd64.yml @@ -39,7 +39,7 @@ Debian stable:amd64: - - | # cmake echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles" - - cmake -B build.cmake -DSRB2_CONFIG_ERRORMODE=ON -DSRB2_CONFIG_USE_GME:BOOL=ON -G "Unix Makefiles" + - cmake -B build.cmake -DSRB2_CONFIG_ENABLE_WEBM_MOVIES=OFF -DSRB2_CONFIG_ERRORMODE=ON -DSRB2_CONFIG_USE_GME:BOOL=ON -G "Unix Makefiles" - | # cmake echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K" diff --git a/.gitlab/ci/jobs/debian-stable-arm64.yml b/.gitlab/ci/jobs/debian-stable-arm64.yml index e08dac501..970001fd5 100644 --- a/.gitlab/ci/jobs/debian-stable-arm64.yml +++ b/.gitlab/ci/jobs/debian-stable-arm64.yml @@ -40,7 +40,7 @@ Debian stable:arm64: - - | # cmake echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles" - - cmake -B build.cmake -DSRB2_CONFIG_ERRORMODE=ON -DSRB2_CONFIG_FORCE_NO_MS_BITFIELDS=ON -DSRB2_CONFIG_USE_GME:BOOL=ON -G "Unix Makefiles" + - cmake -B build.cmake -DSRB2_CONFIG_ENABLE_WEBM_MOVIES=OFF -DSRB2_CONFIG_ERRORMODE=ON -DSRB2_CONFIG_FORCE_NO_MS_BITFIELDS=ON -DSRB2_CONFIG_USE_GME:BOOL=ON -G "Unix Makefiles" - | # cmake echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K" diff --git a/.gitlab/ci/jobs/debian-stable-clang-amd64.yml b/.gitlab/ci/jobs/debian-stable-clang-amd64.yml index 7861c4dea..02879f4f5 100644 --- a/.gitlab/ci/jobs/debian-stable-clang-amd64.yml +++ b/.gitlab/ci/jobs/debian-stable-clang-amd64.yml @@ -40,7 +40,7 @@ Debian stable Clang: - - | # cmake echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles" - - cmake -B build.cmake -DCPM_USE_LOCAL_PACKAGES:BOOL=ON -DSRB2_CONFIG_ENABLE_TESTS:BOOL=OFF -DSRB2_CONFIG_SYSTEM_LIBRARIES:BOOL=ON -DSRB2_USE_LIBGME:BOOL=OFF -DSRB2_CONFIG_USE_GME:BOOL=ON -G "Unix Makefiles" + - cmake -B build.cmake -DSRB2_CONFIG_ENABLE_WEBM_MOVIES=OFF -DCPM_USE_LOCAL_PACKAGES:BOOL=ON -DSRB2_CONFIG_ENABLE_TESTS:BOOL=OFF -DSRB2_CONFIG_SYSTEM_LIBRARIES:BOOL=ON -DSRB2_USE_LIBGME:BOOL=OFF -DSRB2_CONFIG_USE_GME:BOOL=ON -G "Unix Makefiles" - | # cmake echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K" diff --git a/.gitlab/ci/jobs/debian-stable-i386.yml b/.gitlab/ci/jobs/debian-stable-i386.yml index cf43dd8f9..563ff9aca 100644 --- a/.gitlab/ci/jobs/debian-stable-i386.yml +++ b/.gitlab/ci/jobs/debian-stable-i386.yml @@ -40,7 +40,7 @@ Debian stable:i386: - - | # cmake echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles" - - cmake -B build.cmake -DSRB2_CONFIG_ERRORMODE=ON -DSRB2_CONFIG_USE_GME:BOOL=ON -G "Unix Makefiles" + - cmake -B build.cmake -DSRB2_CONFIG_ENABLE_WEBM_MOVIES=OFF -DSRB2_CONFIG_ERRORMODE=ON -DSRB2_CONFIG_USE_GME:BOOL=ON -G "Unix Makefiles" - | # cmake echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K" diff --git a/.gitlab/ci/jobs/debian-testing-gcc-amd64.yml b/.gitlab/ci/jobs/debian-testing-gcc-amd64.yml index 513495fee..cd3ac33a2 100644 --- a/.gitlab/ci/jobs/debian-testing-gcc-amd64.yml +++ b/.gitlab/ci/jobs/debian-testing-gcc-amd64.yml @@ -40,7 +40,7 @@ Debian testing GCC: - - | # cmake echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles" - - cmake -B build.cmake -DSRB2_CONFIG_ERRORMODE=ON -DSRB2_CONFIG_USE_GME:BOOL=ON -G "Unix Makefiles" + - cmake -B build.cmake -DSRB2_CONFIG_ENABLE_WEBM_MOVIES=OFF -DSRB2_CONFIG_ERRORMODE=ON -DSRB2_CONFIG_USE_GME:BOOL=ON -G "Unix Makefiles" - | # cmake echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K" diff --git a/.gitlab/ci/jobs/macos-arm64.yml b/.gitlab/ci/jobs/macos-arm64.yml index 121cdb49b..66720cfd3 100644 --- a/.gitlab/ci/jobs/macos-arm64.yml +++ b/.gitlab/ci/jobs/macos-arm64.yml @@ -28,7 +28,7 @@ osxcross arm64: - - | # cmake echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles" - - cmake -B build.arm64 -DCPM_USE_LOCAL_PACKAGES:BOOL=ON -DOPENMPT_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/include" -DSDL2_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/lib" -DSRB2_CONFIG_ENABLE_TESTS:BOOL=OFF -DSRB2_CONFIG_SYSTEM_LIBRARIES:BOOL=ON -DSRB2_CONFIG_USE_GME:BOOL=OFF -DSRB2_SDL2_EXE_NAME=srb2_$CI_PIPELINE_ID -DSRB2_CONFIG_FORCE_NO_MS_BITFIELDS:BOOL=ON -G "Unix Makefiles" + - cmake -B build.arm64 -DSRB2_CONFIG_ENABLE_WEBM_MOVIES=OFF -DCPM_USE_LOCAL_PACKAGES:BOOL=ON -DOPENMPT_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/include" -DSDL2_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/lib" -DSRB2_CONFIG_ENABLE_TESTS:BOOL=OFF -DSRB2_CONFIG_SYSTEM_LIBRARIES:BOOL=ON -DSRB2_CONFIG_USE_GME:BOOL=OFF -DSRB2_SDL2_EXE_NAME=srb2_$CI_PIPELINE_ID -DSRB2_CONFIG_FORCE_NO_MS_BITFIELDS:BOOL=ON -G "Unix Makefiles" - | # make echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" diff --git a/.gitlab/ci/jobs/macos-x86_64.yml b/.gitlab/ci/jobs/macos-x86_64.yml index 4d3b4295c..79f99fcae 100644 --- a/.gitlab/ci/jobs/macos-x86_64.yml +++ b/.gitlab/ci/jobs/macos-x86_64.yml @@ -28,7 +28,7 @@ osxcross x86_64: - - | # cmake echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles" - - cmake -B build.x86_64 -DCPM_USE_LOCAL_PACKAGES:BOOL=ON -DOPENMPT_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/include" -DSDL2_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/lib" -DSRB2_CONFIG_ENABLE_TESTS:BOOL=OFF -DSRB2_CONFIG_SYSTEM_LIBRARIES:BOOL=ON -DSRB2_CONFIG_USE_GME:BOOL=OFF -DSRB2_SDL2_EXE_NAME=srb2_$CI_PIPELINE_ID -G "Unix Makefiles" + - cmake -B build.x86_64 -DSRB2_CONFIG_ENABLE_WEBM_MOVIES=OFF -DCPM_USE_LOCAL_PACKAGES:BOOL=ON -DOPENMPT_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/include" -DSDL2_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/lib" -DSRB2_CONFIG_ENABLE_TESTS:BOOL=OFF -DSRB2_CONFIG_SYSTEM_LIBRARIES:BOOL=ON -DSRB2_CONFIG_USE_GME:BOOL=OFF -DSRB2_SDL2_EXE_NAME=srb2_$CI_PIPELINE_ID -G "Unix Makefiles" - | # make echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" diff --git a/.gitlab/ci/jobs/windows-x64.yml b/.gitlab/ci/jobs/windows-x64.yml index 9085588e9..c03bf8f32 100644 --- a/.gitlab/ci/jobs/windows-x64.yml +++ b/.gitlab/ci/jobs/windows-x64.yml @@ -69,7 +69,7 @@ Windows x64: - - | # cmake echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles" - - cmake -B build.cmake -DSRB2_CONFIG_ERRORMODE=ON -DCMAKE_TOOLCHAIN_FILE=${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=${VCPKG_TARGET_TRIPLET} -DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/toolchains/mingw.cmake -G "Unix Makefiles" + - cmake -B build.cmake -DSRB2_CONFIG_ENABLE_WEBM_MOVIES=OFF -DSRB2_CONFIG_ERRORMODE=ON -DCMAKE_TOOLCHAIN_FILE=${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=${VCPKG_TARGET_TRIPLET} -DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/toolchains/mingw.cmake -G "Unix Makefiles" - | # cmake echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K" diff --git a/.gitlab/ci/jobs/windows-x86.yml b/.gitlab/ci/jobs/windows-x86.yml index 006291cda..91bcf8467 100644 --- a/.gitlab/ci/jobs/windows-x86.yml +++ b/.gitlab/ci/jobs/windows-x86.yml @@ -65,7 +65,7 @@ Windows x86: - - | # cmake echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles" - - cmake -B build.cmake -DSRB2_CONFIG_ERRORMODE=ON -DCMAKE_TOOLCHAIN_FILE=${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=${VCPKG_TARGET_TRIPLET} -DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/toolchains/mingw.cmake -G "Unix Makefiles" + - cmake -B build.cmake -DSRB2_CONFIG_ENABLE_WEBM_MOVIES=OFF -DSRB2_CONFIG_ERRORMODE=ON -DCMAKE_TOOLCHAIN_FILE=${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=${VCPKG_TARGET_TRIPLET} -DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/toolchains/mingw.cmake -G "Unix Makefiles" - | # cmake echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K" From 910add7efbf646a7d98ef7e2d15524374c871e18 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Mon, 3 Mar 2025 05:33:55 -0500 Subject: [PATCH 75/83] GitLab CI: macports downloads can fail --- .gitlab/ci/jobs/macos-arm64.yml | 2 ++ .gitlab/ci/jobs/macos-x86_64.yml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/.gitlab/ci/jobs/macos-arm64.yml b/.gitlab/ci/jobs/macos-arm64.yml index 66720cfd3..351b3a02b 100644 --- a/.gitlab/ci/jobs/macos-arm64.yml +++ b/.gitlab/ci/jobs/macos-arm64.yml @@ -3,6 +3,8 @@ osxcross arm64: stage: build + allow_failure: true + artifacts: paths: - "build.arm64/bin/" diff --git a/.gitlab/ci/jobs/macos-x86_64.yml b/.gitlab/ci/jobs/macos-x86_64.yml index 79f99fcae..fd0618eb1 100644 --- a/.gitlab/ci/jobs/macos-x86_64.yml +++ b/.gitlab/ci/jobs/macos-x86_64.yml @@ -3,6 +3,8 @@ osxcross x86_64: stage: build + allow_failure: true + artifacts: paths: - "build.x86_64/bin/" From 817db981338cb6394a71e165867a62b8fea1d249 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Mon, 3 Mar 2025 05:36:32 -0500 Subject: [PATCH 76/83] GitLab CI: old version of ccache do not have stats_log option --- .gitlab/ci/templates/srb2ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab/ci/templates/srb2ci.yml b/.gitlab/ci/templates/srb2ci.yml index 102f5925d..765048614 100644 --- a/.gitlab/ci/templates/srb2ci.yml +++ b/.gitlab/ci/templates/srb2ci.yml @@ -107,7 +107,7 @@ ccache --set-config compiler_check=content - | # stats_log - ccache --set-config stats_log=$CI_PROJECT_DIR/build/ccache_statslog + ccache --set-config stats_log=$CI_PROJECT_DIR/build/ccache_statslog || true - | # max_size ccache --set-config max_size=300M From 823d28839b6a10872bc847cf27e29f527b687f38 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Mon, 3 Mar 2025 05:43:51 -0500 Subject: [PATCH 77/83] GitLab CI: since macports downloads can fail, allow the lipo job to fail as well --- .gitlab/ci/jobs/osxcross-universal.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitlab/ci/jobs/osxcross-universal.yml b/.gitlab/ci/jobs/osxcross-universal.yml index 42bc12a57..e76f6dda4 100644 --- a/.gitlab/ci/jobs/osxcross-universal.yml +++ b/.gitlab/ci/jobs/osxcross-universal.yml @@ -10,6 +10,8 @@ osxcross universal: stage: osxcross + allow_failure: true + artifacts: paths: - "dist/bin" From f32bdb77a28f01856c9a1ab0e56562de2d36b8e6 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Mon, 3 Mar 2025 05:59:40 -0500 Subject: [PATCH 78/83] GitLab CI: allow failure of sdl2_mixer download from macports --- .gitlab/ci/jobs/macos-arm64.yml | 3 ++- .gitlab/ci/jobs/macos-x86_64.yml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitlab/ci/jobs/macos-arm64.yml b/.gitlab/ci/jobs/macos-arm64.yml index 351b3a02b..557f3a52a 100644 --- a/.gitlab/ci/jobs/macos-arm64.yml +++ b/.gitlab/ci/jobs/macos-arm64.yml @@ -22,7 +22,8 @@ osxcross arm64: # apt_development echo -e "\e[0Ksection_start:`date +%s`:macports_development[collapsed=true]\r\e[0KInstalling development packages" - osxcross-macports install --arm64 libopenmpt libxmp wavpack opusfile || osxcross-macports install --arm64 libopenmpt libxmp wavpack opusfile - - osxcross-macports install --static --arm64 miniupnpc curl libsdl2_mixer libpng || osxcross-macports install --static --arm64 miniupnpc curl libsdl2_mixer libpng + - osxcross-macports install --static --arm64 libsdl2_mixer || osxcross-macports install --static --arm64 libsdl2_mixer || true + - osxcross-macports install --static --arm64 miniupnpc curl libpng || osxcross-macports install --static --arm64 miniupnpc curl libpng - | # apt_development echo -e "\e[0Ksection_end:`date +%s`:macports_development\r\e[0K" diff --git a/.gitlab/ci/jobs/macos-x86_64.yml b/.gitlab/ci/jobs/macos-x86_64.yml index fd0618eb1..2e78f2203 100644 --- a/.gitlab/ci/jobs/macos-x86_64.yml +++ b/.gitlab/ci/jobs/macos-x86_64.yml @@ -22,7 +22,8 @@ osxcross x86_64: # apt_development echo -e "\e[0Ksection_start:`date +%s`:macports_development[collapsed=true]\r\e[0KInstalling development packages" - osxcross-macports install libopenmpt libxmp wavpack opusfile || osxcross-macports install libopenmpt libxmp wavpack opusfile - - osxcross-macports install --static miniupnpc curl libsdl2_mixer libpng || osxcross-macports install --static miniupnpc curl libsdl2_mixer libpng + - osxcross-macports install --static libsdl2_mixer || osxcross-macports install --static libsdl2_mixer || true + - osxcross-macports install --static miniupnpc curl libpng || osxcross-macports install --static miniupnpc curl libpng - | # apt_development echo -e "\e[0Ksection_end:`date +%s`:macports_development\r\e[0K" From 28aa3f10bdbad0f398365e35833015da3440db28 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Mon, 3 Mar 2025 06:11:29 -0500 Subject: [PATCH 79/83] GitLab CI: allow failure of libopenmpt download from macports --- .gitlab/ci/jobs/macos-arm64.yml | 7 ++++--- .gitlab/ci/jobs/macos-x86_64.yml | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.gitlab/ci/jobs/macos-arm64.yml b/.gitlab/ci/jobs/macos-arm64.yml index 557f3a52a..269b4a0a1 100644 --- a/.gitlab/ci/jobs/macos-arm64.yml +++ b/.gitlab/ci/jobs/macos-arm64.yml @@ -21,9 +21,10 @@ osxcross arm64: - - | # apt_development echo -e "\e[0Ksection_start:`date +%s`:macports_development[collapsed=true]\r\e[0KInstalling development packages" - - osxcross-macports install --arm64 libopenmpt libxmp wavpack opusfile || osxcross-macports install --arm64 libopenmpt libxmp wavpack opusfile - - osxcross-macports install --static --arm64 libsdl2_mixer || osxcross-macports install --static --arm64 libsdl2_mixer || true - - osxcross-macports install --static --arm64 miniupnpc curl libpng || osxcross-macports install --static --arm64 miniupnpc curl libpng + - osxcross-macports install --arm64 libopenmpt || osxcross-macports install --verbose --arm64 libopenmpt || true + - osxcross-macports install --arm64 libxmp wavpack opusfile || osxcross-macports install --verbose --arm64 libxmp wavpack opusfile + - osxcross-macports install --static --arm64 libsdl2_mixer || osxcross-macports install --verbose --static --arm64 libsdl2_mixer || true + - osxcross-macports install --static --arm64 miniupnpc curl libpng || osxcross-macports install --verbose --static --arm64 miniupnpc curl libpng - | # apt_development echo -e "\e[0Ksection_end:`date +%s`:macports_development\r\e[0K" diff --git a/.gitlab/ci/jobs/macos-x86_64.yml b/.gitlab/ci/jobs/macos-x86_64.yml index 2e78f2203..61e4a114c 100644 --- a/.gitlab/ci/jobs/macos-x86_64.yml +++ b/.gitlab/ci/jobs/macos-x86_64.yml @@ -21,9 +21,10 @@ osxcross x86_64: - - | # apt_development echo -e "\e[0Ksection_start:`date +%s`:macports_development[collapsed=true]\r\e[0KInstalling development packages" - - osxcross-macports install libopenmpt libxmp wavpack opusfile || osxcross-macports install libopenmpt libxmp wavpack opusfile - - osxcross-macports install --static libsdl2_mixer || osxcross-macports install --static libsdl2_mixer || true - - osxcross-macports install --static miniupnpc curl libpng || osxcross-macports install --static miniupnpc curl libpng + - osxcross-macports install libopenmpt || osxcross-macports install --verbose libopenmpt || true + - osxcross-macports install libxmp wavpack opusfile || osxcross-macports install --verbose libxmp wavpack opusfile + - osxcross-macports install --static libsdl2_mixer || osxcross-macports install --verbose --static libsdl2_mixer || true + - osxcross-macports install --static miniupnpc curl libpng || osxcross-macports install --verbose --static miniupnpc curl libpng - | # apt_development echo -e "\e[0Ksection_end:`date +%s`:macports_development\r\e[0K" From d47c59a3424802fe561b1e682eafb2e1d930c5fe Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Mon, 3 Mar 2025 06:18:23 -0500 Subject: [PATCH 80/83] GitLab CI: allow failure of wavpack download from macports --- .gitlab/ci/jobs/macos-arm64.yml | 3 ++- .gitlab/ci/jobs/macos-x86_64.yml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitlab/ci/jobs/macos-arm64.yml b/.gitlab/ci/jobs/macos-arm64.yml index 269b4a0a1..8cb77d1b8 100644 --- a/.gitlab/ci/jobs/macos-arm64.yml +++ b/.gitlab/ci/jobs/macos-arm64.yml @@ -22,7 +22,8 @@ osxcross arm64: # apt_development echo -e "\e[0Ksection_start:`date +%s`:macports_development[collapsed=true]\r\e[0KInstalling development packages" - osxcross-macports install --arm64 libopenmpt || osxcross-macports install --verbose --arm64 libopenmpt || true - - osxcross-macports install --arm64 libxmp wavpack opusfile || osxcross-macports install --verbose --arm64 libxmp wavpack opusfile + - osxcross-macports install --arm64 wavpack || osxcross-macports install --verbose --arm64 wavpack || true + - osxcross-macports install --arm64 libxmp opusfile || osxcross-macports install --verbose --arm64 libxmp opusfile - osxcross-macports install --static --arm64 libsdl2_mixer || osxcross-macports install --verbose --static --arm64 libsdl2_mixer || true - osxcross-macports install --static --arm64 miniupnpc curl libpng || osxcross-macports install --verbose --static --arm64 miniupnpc curl libpng - | diff --git a/.gitlab/ci/jobs/macos-x86_64.yml b/.gitlab/ci/jobs/macos-x86_64.yml index 61e4a114c..a7e510fb5 100644 --- a/.gitlab/ci/jobs/macos-x86_64.yml +++ b/.gitlab/ci/jobs/macos-x86_64.yml @@ -22,7 +22,8 @@ osxcross x86_64: # apt_development echo -e "\e[0Ksection_start:`date +%s`:macports_development[collapsed=true]\r\e[0KInstalling development packages" - osxcross-macports install libopenmpt || osxcross-macports install --verbose libopenmpt || true - - osxcross-macports install libxmp wavpack opusfile || osxcross-macports install --verbose libxmp wavpack opusfile + - osxcross-macports install wavpack || osxcross-macports install --verbose wavpack || true + - osxcross-macports install libxmp opusfile || osxcross-macports install --verbose libxmp opusfile - osxcross-macports install --static libsdl2_mixer || osxcross-macports install --verbose --static libsdl2_mixer || true - osxcross-macports install --static miniupnpc curl libpng || osxcross-macports install --verbose --static miniupnpc curl libpng - | From c7396e86efb0805eb36e6602fc31db5c4c1e97f5 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Mon, 3 Mar 2025 07:41:42 -0500 Subject: [PATCH 81/83] whitespace cleanup --- src/p_maputl.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/p_maputl.c b/src/p_maputl.c index 3e30c5d6e..4c7b95927 100644 --- a/src/p_maputl.c +++ b/src/p_maputl.c @@ -1053,7 +1053,7 @@ boolean P_BlockLinesIterator(INT32 x, INT32 y, boolean (*func)(line_t *)) boolean P_BlockThingsIterator(INT32 x, INT32 y, boolean (*func)(mobj_t *), mobj_t *thing) { blocknode_t *block, *next = NULL; - + boolean checkthing = false; if (thing) checkthing = true; @@ -1473,12 +1473,12 @@ boolean P_PathTraverse(fixed_t px1, fixed_t py1, fixed_t px2, fixed_t py2, trace.y = py1; trace.dx = px2 - px1; trace.dy = py2 - py1; - + xt1 = px1>>MAPBLOCKSHIFT; yt1 = py2>>MAPBLOCKSHIFT; px1 = (unsigned)(px1 - bmaporgx); py1 = (unsigned)(py1 - bmaporgy); - + xt2 = px2>>MAPBLOCKSHIFT; yt2 = py2>>MAPBLOCKSHIFT; px2 = (unsigned)(px2 - bmaporgx); @@ -1524,11 +1524,11 @@ boolean P_PathTraverse(fixed_t px1, fixed_t py1, fixed_t px2, fixed_t py2, xstep = 256*FRACUNIT; } xintercept = ((unsigned)px1>>MAPBTOFRAC) + FixedMul(partialy, xstep); - + // [RH] Fix for traces that pass only through blockmap corners. In that case, // xintercept and yintercept can both be set ahead of mapx and mapy, so the // for loop would never advance anywhere. - + if (abs(xstep) == 1 && abs(ystep) == 1) { if (ystep < 0) @@ -1545,7 +1545,7 @@ boolean P_PathTraverse(fixed_t px1, fixed_t py1, fixed_t px2, fixed_t py2, yintercept = yt1; } } - + xt1 = (unsigned)px1>>MAPBLOCKSHIFT; yt1 = (unsigned)py1>>MAPBLOCKSHIFT; xt2 = (unsigned)px2>>MAPBLOCKSHIFT; @@ -1577,21 +1577,21 @@ boolean P_PathTraverse(fixed_t px1, fixed_t py1, fixed_t px2, fixed_t py2, case 0: // neither xintercept nor yintercept match! count = 64; // Stop traversing, because somebody screwed up. break; - + case 1: // xintercept matches xintercept += xstep; mapy += mapystep; if (mapy == yt2) mapystep = 0; break; - + case 2: // yintercept matches yintercept += ystep; mapx += mapxstep; if (mapx == xt2) mapxstep = 0; break; - + case 3: // xintercept and yintercept both match // The trace is exiting a block through its corner. Not only does the block // being entered need to be checked (which will happen when this loop @@ -1604,7 +1604,7 @@ boolean P_PathTraverse(fixed_t px1, fixed_t py1, fixed_t px2, fixed_t py2, if (!P_BlockLinesIterator(mapx, mapy + mapystep, PIT_AddLineIntercepts)) return false; // early out } - + if (flags & PT_ADDTHINGS) { if (!P_BlockThingsIterator(mapx + mapxstep, mapy, PIT_AddThingIntercepts, NULL)) @@ -1612,7 +1612,7 @@ boolean P_PathTraverse(fixed_t px1, fixed_t py1, fixed_t px2, fixed_t py2, if (!P_BlockThingsIterator(mapx, mapy + mapystep, PIT_AddThingIntercepts, NULL)) return false; // early out } - + xintercept += xstep; yintercept += ystep; mapx += mapxstep; From 7b010557abb20ec1e5d00c2b0529bbf9c801bfbd Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Tue, 4 Mar 2025 20:55:39 -0500 Subject: [PATCH 82/83] GitLab CI: fix building oldstable amd64 on non-amd64 builders --- .gitlab/ci/jobs/debian-oldstable-amd64.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab/ci/jobs/debian-oldstable-amd64.yml b/.gitlab/ci/jobs/debian-oldstable-amd64.yml index 90b0a3023..a59dd43d4 100644 --- a/.gitlab/ci/jobs/debian-oldstable-amd64.yml +++ b/.gitlab/ci/jobs/debian-oldstable-amd64.yml @@ -20,7 +20,7 @@ Debian oldstable:amd64: - - | # apt_toolchain echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - - apt-get install ++-x86-64-linux-gnu || apt-get install g++ + - apt-get install g++-x86-64-linux-gnu || apt-get install g++ - | # apt_toolchain echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" From 33c1289a4657ed103adfdd926dcc97c0938e4488 Mon Sep 17 00:00:00 2001 From: Eidolon Date: Mon, 10 Mar 2025 13:22:19 -0500 Subject: [PATCH 83/83] Fix write Y range for splat drawing Fixes a silent memory error during splat drawing when splats cross the bottom of the screen. --- src/r_splats.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/src/r_splats.c b/src/r_splats.c index ce35a35b4..4b4de8275 100644 --- a/src/r_splats.c +++ b/src/r_splats.c @@ -53,7 +53,7 @@ static void rasterize_segment_tex(INT32 x1, INT32 y1, INT32 x2, INT32 y2, INT32 if (dir == 0) { - for (;;) + for (; count > 0; count--) { rastertab[y1].maxx = xs; rastertab[y1].tx2 = xe; @@ -62,13 +62,11 @@ static void rasterize_segment_tex(INT32 x1, INT32 y1, INT32 x2, INT32 y2, INT32 xs += dx0; xe += dx1; y1++; - - if (count-- < 1) break; } } else { - for (;;) + for (; count > 0; count--) { rastertab[y1].maxx = xs; rastertab[y1].tx2 = tc; @@ -77,8 +75,6 @@ static void rasterize_segment_tex(INT32 x1, INT32 y1, INT32 x2, INT32 y2, INT32 xs += dx0; xe += dx1; y1++; - - if (count-- < 1) break; } } } @@ -95,7 +91,7 @@ static void rasterize_segment_tex(INT32 x1, INT32 y1, INT32 x2, INT32 y2, INT32 if (dir == 0) { - for (;;) + for (; count > 0; count--) { rastertab[y2].minx = xs; rastertab[y2].tx1 = xe; @@ -104,13 +100,11 @@ static void rasterize_segment_tex(INT32 x1, INT32 y1, INT32 x2, INT32 y2, INT32 xs += dx0; xe += dx1; y2++; - - if (count-- < 1) break; } } else { - for (;;) + for (; count > 0; count--) { rastertab[y2].minx = xs; rastertab[y2].tx1 = tc; @@ -119,8 +113,6 @@ static void rasterize_segment_tex(INT32 x1, INT32 y1, INT32 x2, INT32 y2, INT32 xs += dx0; xe += dx1; y2++; - - if (count-- < 1) break; } } }