From aec041af072e140d7c756c7115f2872d5b33bd10 Mon Sep 17 00:00:00 2001 From: Radicalicious Date: Wed, 2 Dec 2020 00:04:03 -0500 Subject: [PATCH 001/142] Update deh_tables.c --- src/deh_tables.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/deh_tables.c b/src/deh_tables.c index 5733d9b0e..1b877d4b4 100644 --- a/src/deh_tables.c +++ b/src/deh_tables.c @@ -3822,6 +3822,7 @@ const char *const MOBJTYPE_LIST[] = { // array length left dynamic for sanity t "MT_BIGMACE", // Big Mace "MT_SMALLGRABCHAIN", // Small Grab Chain "MT_BIGGRABCHAIN", // Big Grab Chain + "MT_BLUESPRINGBALL", // Blue spring on a ball "MT_YELLOWSPRINGBALL", // Yellow spring on a ball "MT_REDSPRINGBALL", // Red spring on a ball "MT_SMALLFIREBAR", // Small Firebar From 4da83888c9e2407f5582cb7c2cab39f92e3c0c97 Mon Sep 17 00:00:00 2001 From: Radicalicious Date: Wed, 2 Dec 2020 00:11:31 -0500 Subject: [PATCH 002/142] Update info.c --- src/info.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/src/info.c b/src/info.c index 29a79b1d6..8281cb80c 100644 --- a/src/info.c +++ b/src/info.c @@ -2234,6 +2234,13 @@ state_t states[NUMSTATES] = {SPR_BMCE, 0, -1, {NULL}, 0, 0, S_NULL}, // S_BIGMACE {SPR_SMCH, 1, -1, {NULL}, 0, 0, S_NULL}, // S_SMALLGRABCHAIN {SPR_BMCH, 1, -1, {NULL}, 0, 0, S_NULL}, // S_BIGGRABCHAIN + + // Blue spring on a ball + {SPR_BSPB, 0, -1, {NULL}, 0, 0, S_NULL}, // S_BLUESPRINGBALL + {SPR_BSPB, 4, 4, {A_Pain}, 0, 0, S_BLUESPRINGBALL3}, // S_BLUESPRINGBALL2 + {SPR_BSPB, 3, 1, {NULL}, 0, 0, S_BLUESPRINGBALL4}, // S_BLUESPRINGBALL3 + {SPR_BSPB, 2, 1, {NULL}, 0, 0, S_BLUESPRINGBALL5}, // S_BLUESPRINGBALL4 + {SPR_BSPB, 1, 1, {NULL}, 0, 0, S_BLUESPRINGBALL}, // S_BLUESPRINGBALL5 // Yellow spring on a ball {SPR_YSPB, 0, -1, {NULL}, 0, 0, S_NULL}, // S_YELLOWSPRINGBALL @@ -11511,6 +11518,33 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = MF_SCENERY|MF_SPECIAL|MF_NOGRAVITY, // flags S_NULL // raisestate }, + + { // MT_BLUESPRINGBALL + 1133, // doomednum + S_BLUESPRINGBALL, // spawnstate + 1000, // spawnhealth + S_BLUESPRINGBALL2, // seestate + sfx_None, // seesound + 0, // reactiontime + sfx_None, // attacksound + S_NULL, // painstate + 0, // painchance + sfx_spring, // painsound + S_NULL, // meleestate + S_NULL, // missilestate + S_NULL, // deathstate + S_NULL, // xdeathstate + sfx_None, // deathsound + 24*FRACUNIT, // speed + 17*FRACUNIT, // radius + 34*FRACUNIT, // height + 1, // display offset + 11*FRACUNIT, // mass + 0, // damage + sfx_mswing, // activesound + MF_SCENERY|MF_SPRING|MF_NOGRAVITY, // flags + S_BLUESPRINGBALL2 // raisestate + }, { // MT_YELLOWSPRINGBALL 1134, // doomednum From 8ce067d7ebca9cb96878f902a6ec7022b2fab5f8 Mon Sep 17 00:00:00 2001 From: Radicalicious Date: Wed, 2 Dec 2020 00:13:59 -0500 Subject: [PATCH 003/142] Update p_mobj.c --- src/p_mobj.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/p_mobj.c b/src/p_mobj.c index 7ba6d1fad..0fdf95155 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -10379,6 +10379,7 @@ static fixed_t P_DefaultMobjShadowScale (mobj_t *thing) case MT_SMALLGRABCHAIN: case MT_BIGGRABCHAIN: + case MT_BLUESPRINGBALL: case MT_YELLOWSPRINGBALL: case MT_REDSPRINGBALL: From 802f5ab4ea9119e4796f6ec5c96ba1a96a303f1e Mon Sep 17 00:00:00 2001 From: Radicalicious Date: Wed, 2 Dec 2020 00:17:13 -0500 Subject: [PATCH 004/142] Update info.h --- src/info.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/info.h b/src/info.h index 604922beb..125497644 100644 --- a/src/info.h +++ b/src/info.h @@ -779,6 +779,7 @@ typedef enum sprite SPR_BMCH, // Big Mace Chain SPR_SMCE, // Small Mace SPR_BMCE, // Big Mace + SPR_BSPB, // Blue spring on a ball SPR_YSPB, // Yellow spring on a ball SPR_RSPB, // Red spring on a ball SPR_SFBR, // Small Firebar @@ -2669,6 +2670,14 @@ typedef enum state S_SMALLGRABCHAIN, S_BIGGRABCHAIN, + // Blue spring on a ball + S_BLUESPRINGBALL, + S_BLUESPRINGBALL2, + S_BLUESPRINGBALL3, + S_BLUESPRINGBALL4, + S_BLUESPRINGBALL5, + + // Yellow spring on a ball S_YELLOWSPRINGBALL, S_YELLOWSPRINGBALL2, @@ -4644,6 +4653,7 @@ typedef enum mobj_type MT_BIGMACE, // Big Mace MT_SMALLGRABCHAIN, // Small Grab Chain MT_BIGGRABCHAIN, // Big Grab Chain + MT_BLUESPRINGBALL, // Blue spring on a ball MT_YELLOWSPRINGBALL, // Yellow spring on a ball MT_REDSPRINGBALL, // Red spring on a ball MT_SMALLFIREBAR, // Small Firebar From 3195022936adef7d3019a435f198e7eea56e5da3 Mon Sep 17 00:00:00 2001 From: Radicalicious Date: Wed, 2 Dec 2020 00:19:32 -0500 Subject: [PATCH 005/142] Update deh_tables.c --- src/deh_tables.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/deh_tables.c b/src/deh_tables.c index 1b877d4b4..d2087ebb0 100644 --- a/src/deh_tables.c +++ b/src/deh_tables.c @@ -1867,6 +1867,13 @@ const char *const STATE_LIST[] = { // array length left dynamic for sanity testi "S_SMALLGRABCHAIN", "S_BIGGRABCHAIN", + // Blue spring on a ball + "S_BLUESPRINGBALL", + "S_BLUESPRINGBALL2", + "S_BLUESPRINGBALL3", + "S_BLUESPRINGBALL4", + "S_BLUESPRINGBALL5", + // Yellow spring on a ball "S_YELLOWSPRINGBALL", "S_YELLOWSPRINGBALL2", From 8fbf24d68b018eeaffc9ffca788c67f60d53b8ef Mon Sep 17 00:00:00 2001 From: Radicalicious Date: Wed, 2 Dec 2020 00:35:17 -0500 Subject: [PATCH 006/142] Update info.c --- src/info.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/info.c b/src/info.c index 8281cb80c..3da92bb96 100644 --- a/src/info.c +++ b/src/info.c @@ -245,6 +245,7 @@ char sprnames[NUMSPRITES + 1][5] = "BMCH", // Big Mace Chain "SMCE", // Small Mace "BMCE", // Big Mace + "BSPB", // Blue spring on a ball "YSPB", // Yellow spring on a ball "RSPB", // Red spring on a ball "SFBR", // Small Firebar From b0fe3b6b5ac3aaef0ca9ac1e84052017d73c19f7 Mon Sep 17 00:00:00 2001 From: Radicalicious Date: Wed, 2 Dec 2020 00:36:41 -0500 Subject: [PATCH 007/142] Update hw_light.c --- src/hardware/hw_light.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/hardware/hw_light.c b/src/hardware/hw_light.c index 987d70c69..76fecd7aa 100644 --- a/src/hardware/hw_light.c +++ b/src/hardware/hw_light.c @@ -340,6 +340,7 @@ light_t *t_lspr[NUMSPRITES] = &lspr[NOLIGHT], // SPR_BMCH &lspr[NOLIGHT], // SPR_SMCE &lspr[NOLIGHT], // SPR_BMCE + &lspr[NOLIGHT], // SPR_BSPB &lspr[NOLIGHT], // SPR_YSPB &lspr[NOLIGHT], // SPR_RSPB &lspr[REDBALL_L], // SPR_SFBR From 6c9b73ba29a21bed9762408a874d88c265e3a70e Mon Sep 17 00:00:00 2001 From: Radicalicious Date: Wed, 2 Dec 2020 11:53:24 -0500 Subject: [PATCH 008/142] Fixed formatting From 63c95e91867559ce062a54774e1285b839a740d4 Mon Sep 17 00:00:00 2001 From: Radicalicious Date: Wed, 2 Dec 2020 11:55:03 -0500 Subject: [PATCH 009/142] Update info.c --- src/info.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/info.c b/src/info.c index 3da92bb96..c53241cdf 100644 --- a/src/info.c +++ b/src/info.c @@ -2237,7 +2237,7 @@ state_t states[NUMSTATES] = {SPR_BMCH, 1, -1, {NULL}, 0, 0, S_NULL}, // S_BIGGRABCHAIN // Blue spring on a ball - {SPR_BSPB, 0, -1, {NULL}, 0, 0, S_NULL}, // S_BLUESPRINGBALL + {SPR_BSPB, 0, -1, {NULL}, 0, 0, S_NULL}, // S_BLUESPRINGBALL {SPR_BSPB, 4, 4, {A_Pain}, 0, 0, S_BLUESPRINGBALL3}, // S_BLUESPRINGBALL2 {SPR_BSPB, 3, 1, {NULL}, 0, 0, S_BLUESPRINGBALL4}, // S_BLUESPRINGBALL3 {SPR_BSPB, 2, 1, {NULL}, 0, 0, S_BLUESPRINGBALL5}, // S_BLUESPRINGBALL4 From 3b01da753f0cdb457ee94c5f0f3707288de7321f Mon Sep 17 00:00:00 2001 From: Radicalicious Date: Wed, 2 Dec 2020 16:17:21 -0500 Subject: [PATCH 010/142] Update p_mobj.c --- src/p_mobj.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/p_mobj.c b/src/p_mobj.c index 0fdf95155..ac971f5db 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -10378,8 +10378,8 @@ static fixed_t P_DefaultMobjShadowScale (mobj_t *thing) case MT_SMALLGRABCHAIN: case MT_BIGGRABCHAIN: - - case MT_BLUESPRINGBALL: + + case MT_BLUESPRINGBALL: case MT_YELLOWSPRINGBALL: case MT_REDSPRINGBALL: From 6f4117f7161a46c6b6751eb56d0e4416bcee7ade Mon Sep 17 00:00:00 2001 From: Radicalicious Date: Wed, 2 Dec 2020 16:18:54 -0500 Subject: [PATCH 011/142] Update info.h --- src/info.h | 1 - 1 file changed, 1 deletion(-) diff --git a/src/info.h b/src/info.h index 125497644..1a26922f7 100644 --- a/src/info.h +++ b/src/info.h @@ -2677,7 +2677,6 @@ typedef enum state S_BLUESPRINGBALL4, S_BLUESPRINGBALL5, - // Yellow spring on a ball S_YELLOWSPRINGBALL, S_YELLOWSPRINGBALL2, From 979ebe262bde2fbd003c9ec97a5d56254cd19c6f Mon Sep 17 00:00:00 2001 From: Radicalicious Date: Wed, 2 Dec 2020 18:03:36 -0500 Subject: [PATCH 012/142] Update info.c --- src/info.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/info.c b/src/info.c index c53241cdf..9b1c4ac55 100644 --- a/src/info.c +++ b/src/info.c @@ -2235,7 +2235,7 @@ state_t states[NUMSTATES] = {SPR_BMCE, 0, -1, {NULL}, 0, 0, S_NULL}, // S_BIGMACE {SPR_SMCH, 1, -1, {NULL}, 0, 0, S_NULL}, // S_SMALLGRABCHAIN {SPR_BMCH, 1, -1, {NULL}, 0, 0, S_NULL}, // S_BIGGRABCHAIN - + // Blue spring on a ball {SPR_BSPB, 0, -1, {NULL}, 0, 0, S_NULL}, // S_BLUESPRINGBALL {SPR_BSPB, 4, 4, {A_Pain}, 0, 0, S_BLUESPRINGBALL3}, // S_BLUESPRINGBALL2 @@ -11519,7 +11519,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = MF_SCENERY|MF_SPECIAL|MF_NOGRAVITY, // flags S_NULL // raisestate }, - + { // MT_BLUESPRINGBALL 1133, // doomednum S_BLUESPRINGBALL, // spawnstate From 3f63bb1a676a0f1b0fea925651346f4659f43b52 Mon Sep 17 00:00:00 2001 From: Radicalicious Date: Wed, 2 Dec 2020 18:16:22 -0500 Subject: [PATCH 013/142] Update p_mobj.c --- 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 ac971f5db..6c7721aa1 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -10378,7 +10378,7 @@ static fixed_t P_DefaultMobjShadowScale (mobj_t *thing) case MT_SMALLGRABCHAIN: case MT_BIGGRABCHAIN: - + case MT_BLUESPRINGBALL: case MT_YELLOWSPRINGBALL: case MT_REDSPRINGBALL: From 1a5f0d94f3379ed2c07e83190c140cd3246359bf Mon Sep 17 00:00:00 2001 From: Radicalicious Date: Sat, 1 May 2021 14:05:01 -0400 Subject: [PATCH 014/142] Expose P_ThrustEvenIn2D and P_VectorInstaThrust --- src/p_user.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/p_user.c b/src/p_user.c index c5f919c78..6a879c785 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -104,8 +104,7 @@ void P_Thrust(mobj_t *mo, angle_t angle, fixed_t move) mo->momy += FixedMul(move, FINESINE(angle)); } -#if 0 -static inline void P_ThrustEvenIn2D(mobj_t *mo, angle_t angle, fixed_t move) +void P_ThrustEvenIn2D(mobj_t *mo, angle_t angle, fixed_t move) { angle >>= ANGLETOFINESHIFT; @@ -113,7 +112,7 @@ static inline void P_ThrustEvenIn2D(mobj_t *mo, angle_t angle, fixed_t move) mo->momy += FixedMul(move, FINESINE(angle)); } -static inline void P_VectorInstaThrust(fixed_t xa, fixed_t xb, fixed_t xc, fixed_t ya, fixed_t yb, fixed_t yc, +void P_VectorInstaThrust(fixed_t xa, fixed_t xb, fixed_t xc, fixed_t ya, fixed_t yb, fixed_t yc, fixed_t za, fixed_t zb, fixed_t zc, fixed_t momentum, mobj_t *mo) { fixed_t a1, b1, c1, a2, b2, c2, i, j, k; @@ -143,7 +142,6 @@ static inline void P_VectorInstaThrust(fixed_t xa, fixed_t xb, fixed_t xc, fixed mo->momy = j; mo->momz = k; } -#endif // // P_InstaThrust From 47a2710ec292b551ce559813863611ef1805c3f7 Mon Sep 17 00:00:00 2001 From: Radicalicious Date: Sat, 1 May 2021 14:05:07 -0400 Subject: [PATCH 015/142] Expose P_ThrustEvenIn2D, P_InstaThrustEvenIn2D, and P_VectorInstaThrust to Lua --- src/lua_baselib.c | 50 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/src/lua_baselib.c b/src/lua_baselib.c index 4667fdbf4..64c5967b8 100644 --- a/src/lua_baselib.c +++ b/src/lua_baselib.c @@ -1514,6 +1514,19 @@ static int lib_pInstaThrust(lua_State *L) return 0; } +static int lib_pInstaThrustEvenIn2D(lua_State *L) +{ + mobj_t *mo = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ)); + angle_t angle = luaL_checkangle(L, 2); + fixed_t move = luaL_checkfixed(L, 3); + NOHUD + INLEVEL + if (!mo) + return LUA_ErrInvalid(L, "mobj_t"); + P_InstaThrustEvenIn2D(mo, angle, move); + return 0; +} + static int lib_pReturnThrustX(lua_State *L) { angle_t angle; @@ -2075,6 +2088,40 @@ static int lib_pThrust(lua_State *L) return 0; } +static int lib_pThrustEvenIn2D(lua_State *L) +{ + mobj_t *mo = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ)); + angle_t angle = luaL_checkangle(L, 2); + fixed_t move = luaL_checkfixed(L, 3); + NOHUD + INLEVEL + if (!mo) + return LUA_ErrInvalid(L, "mobj_t"); + P_ThrustEvenIn2D(mo, angle, move); + return 0; +} + +static int lib_pVectorInstaThrust(lua_State *L) +{ + fixed_t xa = luaL_checkfixed(L, 1); + fixed_t xb = luaL_checkfixed(L, 2); + fixed_t xc = luaL_checkfixed(L, 3); + fixed_t ya = luaL_checkfixed(L, 4); + fixed_t yb = luaL_checkfixed(L, 5); + fixed_t yc = luaL_checkfixed(L, 6); + fixed_t za = luaL_checkfixed(L, 7); + fixed_t zb = luaL_checkfixed(L, 8); + fixed_t zc = luaL_checkfixed(L, 9); + fixed_t momentum = luaL_checkfixed(L, 10); + mobj_t *mo = *((mobj_t **)luaL_checkudata(L, 11, META_MOBJ)); + NOHUD + INLEVEL + if (!mo) + return LUA_ErrInvalid(L, "mobj_t"); + P_VectorInstaThrust(xa, xb, xc, ya, yb, yc, za, zb, zc, momentum, mo); + return 0; +} + static int lib_pSetMobjStateNF(lua_State *L) { mobj_t *mobj = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ)); @@ -3853,6 +3900,7 @@ static luaL_Reg lib[] = { {"P_DoPlayerFinish",lib_pDoPlayerFinish}, {"P_DoPlayerExit",lib_pDoPlayerExit}, {"P_InstaThrust",lib_pInstaThrust}, + {"P_InstaThrustEvenIn2D",lib_pInstaThrustEvenIn2D}, {"P_ReturnThrustX",lib_pReturnThrustX}, {"P_ReturnThrustY",lib_pReturnThrustY}, {"P_LookForEnemies",lib_pLookForEnemies}, @@ -3900,6 +3948,8 @@ static luaL_Reg lib[] = { // p_spec {"P_Thrust",lib_pThrust}, + {"P_ThrustEvenIn2D",lib_pThrustEvenIn2D}, + {"P_VectorInstaThrust",lib_pVectorInstaThrust}, {"P_SetMobjStateNF",lib_pSetMobjStateNF}, {"P_DoSuperTransformation",lib_pDoSuperTransformation}, {"P_ExplodeMissile",lib_pExplodeMissile}, From e16a8946807349c5b308e422aaf09a1f29b8252b Mon Sep 17 00:00:00 2001 From: Radicalicious Date: Sat, 1 May 2021 20:47:01 -0400 Subject: [PATCH 016/142] Actually define newly exposed thrust functions. Oops. --- src/p_local.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/p_local.h b/src/p_local.h index 8a5084962..ab6ef0177 100644 --- a/src/p_local.h +++ b/src/p_local.h @@ -527,6 +527,9 @@ boolean P_Teleport(mobj_t *thing, fixed_t x, fixed_t y, fixed_t z, angle_t angle boolean P_SetMobjStateNF(mobj_t *mobj, statenum_t state); boolean P_CheckMissileSpawn(mobj_t *th); void P_Thrust(mobj_t *mo, angle_t angle, fixed_t move); +void P_ThrustEvenIn2D(mobj_t *mo, angle_t angle, fixed_t move); +void P_VectorInstaThrust(fixed_t xa, fixed_t xb, fixed_t xc, fixed_t ya, fixed_t yb, fixed_t yc, + fixed_t za, fixed_t zb, fixed_t zc, fixed_t momentum, mobj_t *mo); void P_DoSuperTransformation(player_t *player, boolean giverings); void P_ExplodeMissile(mobj_t *mo); void P_CheckGravity(mobj_t *mo, boolean affect); From b53b2df7eeae7f3fe4f01418962495de6541a506 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustaf=20Alh=C3=A4ll?= Date: Sun, 17 Sep 2023 22:44:47 +0200 Subject: [PATCH 017/142] Fix saturation option not being applied on OpenGL --- src/v_video.c | 45 +++++++++++++++++++++++---------------------- 1 file changed, 23 insertions(+), 22 deletions(-) diff --git a/src/v_video.c b/src/v_video.c index 3f958b286..25da6af40 100644 --- a/src/v_video.c +++ b/src/v_video.c @@ -1336,32 +1336,33 @@ void V_DrawFill(INT32 x, INT32 y, INT32 w, INT32 h, INT32 c) // This is now a function since it's otherwise repeated 2 times and honestly looks retarded: static UINT32 V_GetHWConsBackColor(void) { - UINT32 hwcolor; + UINT8 r, g, b; switch (cons_backcolor.value) { - case 0: hwcolor = 0xffffff00; break; // White - case 1: hwcolor = 0x80808000; break; // Black - case 2: hwcolor = 0xdeb88700; break; // Sepia - case 3: hwcolor = 0x40201000; break; // Brown - case 4: hwcolor = 0xfa807200; break; // Pink - case 5: hwcolor = 0xff69b400; break; // Raspberry - case 6: hwcolor = 0xff000000; break; // Red - case 7: hwcolor = 0xffd68300; break; // Creamsicle - case 8: hwcolor = 0xff800000; break; // Orange - case 9: hwcolor = 0xdaa52000; break; // Gold - case 10: hwcolor = 0x80800000; break; // Yellow - case 11: hwcolor = 0x00ff0000; break; // Emerald - case 12: hwcolor = 0x00800000; break; // Green - case 13: hwcolor = 0x4080ff00; break; // Cyan - case 14: hwcolor = 0x4682b400; break; // Steel - case 15: hwcolor = 0x1e90ff00; break; // Periwinkle - case 16: hwcolor = 0x0000ff00; break; // Blue - case 17: hwcolor = 0xff00ff00; break; // Purple - case 18: hwcolor = 0xee82ee00; break; // Lavender + case 0: r = 0xff; g = 0xff; b = 0xff; break; // White + case 1: r = 0x80; g = 0x80; b = 0x80; break; // Black + case 2: r = 0xde; g = 0xb8; b = 0x87; break; // Sepia + case 3: r = 0x40; g = 0x20; b = 0x10; break; // Brown + case 4: r = 0xfa; g = 0x80; b = 0x72; break; // Pink + case 5: r = 0xff; g = 0x69; b = 0xb4; break; // Raspberry + case 6: r = 0xff; g = 0x00; b = 0x00; break; // Red + case 7: r = 0xff; g = 0xd6; b = 0x83; break; // Creamsicle + case 8: r = 0xff; g = 0x80; b = 0x00; break; // Orange + case 9: r = 0xda; g = 0xa5; b = 0x20; break; // Gold + case 10: r = 0x80; g = 0x80; b = 0x00; break; // Yellow + case 11: r = 0x00; g = 0xff; b = 0x00; break; // Emerald + case 12: r = 0x00; g = 0x80; b = 0x00; break; // Green + case 13: r = 0x40; g = 0x80; b = 0xff; break; // Cyan + case 14: r = 0x46; g = 0x82; b = 0xb4; break; // Steel + case 15: r = 0x1e; g = 0x90; b = 0xff; break; // Periwinkle + case 16: r = 0x00; g = 0x00; b = 0xff; break; // Blue + case 17: r = 0xff; g = 0x00; b = 0xff; break; // Purple + case 18: r = 0xee; g = 0x82; b = 0xee; break; // Lavender // Default green - default: hwcolor = 0x00800000; break; + default: r = 0x00; g = 0x80; b = 0x00; break; } - return hwcolor; + V_CubeApply(&r, &g, &b); + return (r << 24) | (g << 16) | (b << 8); } #endif From fc205082956990dcfc40381976c4724ce8902e13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustaf=20Alh=C3=A4ll?= Date: Mon, 18 Sep 2023 18:16:10 +0200 Subject: [PATCH 018/142] Fix saturation not being applied on colormaps in OpenGL --- src/hardware/hw_main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/hardware/hw_main.c b/src/hardware/hw_main.c index f2022bcea..78c0b1dab 100644 --- a/src/hardware/hw_main.c +++ b/src/hardware/hw_main.c @@ -229,6 +229,8 @@ void HWR_Lighting(FSurfaceInfo *Surface, INT32 light_level, extracolormap_t *col // Clamp the light level, since it can sometimes go out of the 0-255 range from animations light_level = min(max(light_level, 0), 255); + V_CubeApply(&tint_color.s.red, &tint_color.s.green, &tint_color.s.blue); + V_CubeApply(&fade_color.s.red, &fade_color.s.green, &fade_color.s.blue); Surface->PolyColor.rgba = poly_color.rgba; Surface->TintColor.rgba = tint_color.rgba; Surface->FadeColor.rgba = fade_color.rgba; From fb9e6c9c6d34cdb4b3750969bdae81095db327f4 Mon Sep 17 00:00:00 2001 From: Zwip-Zwap Zapony Date: Fri, 22 Sep 2023 18:16:54 +0200 Subject: [PATCH 019/142] Use if-range instead of switch for demo versions --- src/g_demo.c | 89 +++++++++++++--------------------------------------- 1 file changed, 22 insertions(+), 67 deletions(-) diff --git a/src/g_demo.c b/src/g_demo.c index 4e959bcf3..cb168dfd9 100644 --- a/src/g_demo.c +++ b/src/g_demo.c @@ -1891,16 +1891,9 @@ UINT8 G_CmpDemoTime(char *oldname, char *newname) p++; // VERSION p++; // SUBVERSION oldversion = READUINT16(p); - switch(oldversion) // demoversion + if (oldversion < 0x000c || oldversion > DEMOVERSION) { - case DEMOVERSION: // latest always supported - case 0x000f: // The previous demoversions also supported - case 0x000e: - case 0x000d: // all that changed between then and now was longer color name - case 0x000c: - break; - // too old, cannot support. - default: + // too old (or new), cannot support CONS_Alert(CONS_NOTICE, M_GetText("File '%s' invalid format. It will be overwritten.\n"), oldname); Z_Free(buffer); return UINT8_MAX; @@ -1973,14 +1966,11 @@ void G_DoPlayDemo(char *defdemoname) UINT8 i; lumpnum_t l; char skin[17],color[MAXCOLORNAME+1],*n,*pdemoname; - UINT8 version,subversion,charability,charability2,thrustfactor,accelstart,acceleration,cnamelen; + UINT8 version,subversion,charability,charability2,thrustfactor,accelstart,acceleration; pflags_t pflags; UINT32 randseed, followitem; fixed_t camerascale,shieldscale,actionspd,mindash,maxdash,normalspeed,runspeed,jumpfactor,height,spinheight; char msg[1024]; -#ifdef OLD22DEMOCOMPAT - boolean use_old_demo_vars = false; -#endif skin[16] = '\0'; color[MAXCOLORNAME] = '\0'; @@ -2039,23 +2029,13 @@ void G_DoPlayDemo(char *defdemoname) subversion = READUINT8(demo_p); demoversion = READUINT16(demo_p); demo_forwardmove_rng = (demoversion < 0x0010); - switch(demoversion) - { - case 0x000f: - case 0x000d: - case 0x000e: - case DEMOVERSION: // latest always supported - cnamelen = MAXCOLORNAME; - break; #ifdef OLD22DEMOCOMPAT - // all that changed between then and now was longer color name - case 0x000c: - cnamelen = 16; - use_old_demo_vars = true; - break; + if (demoversion < 0x000c || demoversion > DEMOVERSION) +#else + if (demoversion < 0x000d || demoversion > DEMOVERSION) #endif - // too old, cannot support. - default: + { + // too old (or new), cannot support snprintf(msg, 1024, M_GetText("%s is an incompatible replay format and cannot be played.\n"), pdemoname); CONS_Alert(CONS_ERROR, "%s", msg); M_StartMessage(msg, NULL, MM_NOTHING); @@ -2182,8 +2162,8 @@ void G_DoPlayDemo(char *defdemoname) demo_p += 16; // Color - M_Memcpy(color,demo_p,cnamelen); - demo_p += cnamelen; + M_Memcpy(color, demo_p, (demoversion < 0x000d) ? 16 : MAXCOLORNAME); + demo_p += (demoversion < 0x000d) ? 16 : MAXCOLORNAME; charability = READUINT8(demo_p); charability2 = READUINT8(demo_p); @@ -2219,7 +2199,7 @@ void G_DoPlayDemo(char *defdemoname) // net var data #ifdef OLD22DEMOCOMPAT - if (use_old_demo_vars) + if (demoversion < 0x000d) CV_LoadOldDemoVars(&demo_p); else #endif @@ -2352,19 +2332,13 @@ UINT8 G_CheckDemoForError(char *defdemoname) demo_p++; // version demo_p++; // subversion our_demo_version = READUINT16(demo_p); - switch(our_demo_version) - { - case 0x000d: - case 0x000e: - case 0x000f: - case DEMOVERSION: // latest always supported - break; #ifdef OLD22DEMOCOMPAT - case 0x000c: - break; + if (our_demo_version < 0x000c || our_demo_version > DEMOVERSION) +#else + if (our_demo_version < 0x000d || our_demo_version > DEMOVERSION) #endif - // too old, cannot support. - default: + { + // too old (or new), cannot support return DFILE_ERROR_NOTDEMO; } demo_p += 16; // demo checksum @@ -2386,7 +2360,6 @@ void G_AddGhost(char *defdemoname) INT32 i; lumpnum_t l; char name[17],skin[17],color[MAXCOLORNAME+1],*n,*pdemoname,md5[16]; - UINT8 cnamelen; demoghost *gh; UINT8 flags, subversion; UINT8 *buffer,*p; @@ -2438,20 +2411,9 @@ void G_AddGhost(char *defdemoname) p++; // VERSION subversion = READUINT8(p); // SUBVERSION ghostversion = READUINT16(p); - switch(ghostversion) + if (ghostversion < 0x000c || ghostversion > DEMOVERSION) { - case 0x000f: - case 0x000d: - case 0x000e: - case DEMOVERSION: // latest always supported - cnamelen = MAXCOLORNAME; - break; - // all that changed between then and now was longer color name - case 0x000c: - cnamelen = 16; - break; - // too old, cannot support. - default: + // too old (or new), cannot support CONS_Alert(CONS_NOTICE, M_GetText("Ghost %s: Demo version incompatible.\n"), pdemoname); Z_Free(pdemoname); Z_Free(buffer); @@ -2514,8 +2476,8 @@ void G_AddGhost(char *defdemoname) p += 16; // Color - M_Memcpy(color, p,cnamelen); - p += cnamelen; + M_Memcpy(color, p, (ghostversion < 0x000d) ? 16 : MAXCOLORNAME); + p += (ghostversion < 0x000d) ? 16 : MAXCOLORNAME; // Ghosts do not have a player structure to put this in. p++; // charability @@ -2698,16 +2660,9 @@ void G_DoPlayMetal(void) metal_p++; // VERSION metal_p++; // SUBVERSION metalversion = READUINT16(metal_p); - switch(metalversion) + if (metalversion < 0x000c || metalversion > DEMOVERSION) { - case DEMOVERSION: // latest always supported - case 0x000f: - case 0x000e: // There are checks wheter the momentum is from older demo versions or not - case 0x000d: // all that changed between then and now was longer color name - case 0x000c: - break; - // too old, cannot support. - default: + // too old (or new), cannot support CONS_Alert(CONS_WARNING, M_GetText("Failed to load bot recording for this map, format version incompatible.\n")); Z_Free(metalbuffer); return; From 12d595399ec20b30dfcb99ff3358cd309fafc980 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustaf=20Alh=C3=A4ll?= Date: Sun, 1 Oct 2023 17:34:13 +0200 Subject: [PATCH 020/142] Avoid branch prediction slowdowns in R_PointOnSide --- src/r_main.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/r_main.c b/src/r_main.c index 54f7d7639..0655bd06f 100644 --- a/src/r_main.c +++ b/src/r_main.c @@ -249,7 +249,7 @@ static void FlipCam2_OnChange(void) // // killough 5/2/98: reformatted // -INT32 R_PointOnSide(fixed_t x, fixed_t y, node_t *node) +INT32 R_PointOnSide(fixed_t x, fixed_t y, node_t *restrict node) { if (!node->dx) return x <= node->x ? node->dy > 0 : node->dy < 0; @@ -261,9 +261,10 @@ INT32 R_PointOnSide(fixed_t x, fixed_t y, node_t *node) fixed_t dy = (y >> 1) - (node->y >> 1); // Try to quickly decide by looking at sign bits. - if ((node->dy ^ node->dx ^ dx ^ dy) < 0) - return (node->dy ^ dx) < 0; // (left is negative) - return FixedMul(dy, node->dx>>FRACBITS) >= FixedMul(node->dy>>FRACBITS, dx); + // also use a mask to avoid branch prediction + INT32 mask = (node->dy ^ node->dx ^ dx ^ dy) >> 31; + return (mask & ((node->dy ^ dx) < 0)) | // (left is negative) + (~mask & (FixedMul(dy, node->dx>>FRACBITS) >= FixedMul(node->dy>>FRACBITS, dx))); } // killough 5/2/98: reformatted From 5aa89a712ab29c514e0aa6e7df493abdb5a2fbd7 Mon Sep 17 00:00:00 2001 From: Logan Arias Date: Tue, 10 Oct 2023 23:40:41 +0000 Subject: [PATCH 021/142] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 000000000..d260df55c --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,35 @@ +# This file is a template, and might need editing before it works on your project. +# This is a sample GitLab CI/CD configuration file that should run without any modifications. +# It demonstrates a basic 3 stage CI/CD pipeline. Instead of real tests or scripts, +# it uses echo commands to simulate the pipeline execution. +# +# A pipeline is composed of independent jobs that run scripts, grouped into stages. +# Stages run in sequential order, but jobs within stages run in parallel. +# +# For more information, see: https://docs.gitlab.com/ee/ci/yaml/index.html#stages +# +# You can copy and paste this template into a new `.gitlab-ci.yml` file. +# You should not add this template to an existing `.gitlab-ci.yml` file by using the `include:` keyword. +# +# To contribute improvements to CI/CD templates, please follow the Development guide at: +# https://docs.gitlab.com/ee/development/cicd/templates.html +# This specific template is located at: +# https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Getting-Started.gitlab-ci.yml + +stages: # List of stages for jobs, and their order of execution + - build + + +build-job: # This job runs in the build stage, which runs first. + stage: build + image: cimg + #artifacts: + # paths: + # - "*.bin" + + script: + - "ls" + + + + From eb44efbc2f412474ffcec9136bd43337edd980f9 Mon Sep 17 00:00:00 2001 From: Logan Arias Date: Tue, 10 Oct 2023 23:43:50 +0000 Subject: [PATCH 022/142] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d260df55c..cc2f89868 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -29,7 +29,7 @@ build-job: # This job runs in the build stage, which runs first. script: - "ls" - + - "pwd" From 124aca3267da8b4f4f504f6e8feb55bc265c5429 Mon Sep 17 00:00:00 2001 From: Logan Arias Date: Tue, 10 Oct 2023 23:46:11 +0000 Subject: [PATCH 023/142] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index cc2f89868..443295881 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -22,7 +22,7 @@ stages: # List of stages for jobs, and their order of execution build-job: # This job runs in the build stage, which runs first. stage: build - image: cimg + image: debian #artifacts: # paths: # - "*.bin" From 9f8bc2125363eef882e62ef9f42f011bc45f31d6 Mon Sep 17 00:00:00 2001 From: Logan Arias Date: Tue, 10 Oct 2023 23:54:46 +0000 Subject: [PATCH 024/142] Update .gitlab-ci.yml file try running the makefile with nothing --- .gitlab-ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 443295881..76f4783ca 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -28,8 +28,9 @@ build-job: # This job runs in the build stage, which runs first. # - "*.bin" script: - - "ls" - - "pwd" + - "apt update" + - "apt-get install --no-install-recommends --yes make" + - "make --directory=src" From 959c1753d3c7e7abc5593fa3907ee620296cc372 Mon Sep 17 00:00:00 2001 From: Logan Arias Date: Wed, 11 Oct 2023 00:05:38 +0000 Subject: [PATCH 025/142] Update .gitlab-ci.yml file try running the makefile with some dispends libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev upx git libopenmpt-dev gettext --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 76f4783ca..aac53e06b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -29,7 +29,7 @@ build-job: # This job runs in the build stage, which runs first. script: - "apt update" - - "apt-get install --no-install-recommends --yes make" + - "apt-get install --no-install-recommends --yes build-essential libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev upx git libopenmpt-dev gettext" - "make --directory=src" From 7083dffc01be2e91bda59c96fa40d75fbfbb0037 Mon Sep 17 00:00:00 2001 From: Logan Arias Date: Wed, 11 Oct 2023 00:08:16 +0000 Subject: [PATCH 026/142] Update .gitlab-ci.yml file remove upx install --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index aac53e06b..e768c1735 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -29,8 +29,8 @@ build-job: # This job runs in the build stage, which runs first. script: - "apt update" - - "apt-get install --no-install-recommends --yes build-essential libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev upx git libopenmpt-dev gettext" - - "make --directory=src" + - "apt-get install --no-install-recommends --yes build-essential libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev git libopenmpt-dev gettext" + - "make --directory=src " From 4adce8e3cddad16d48e7244edd0616a166ed17f4 Mon Sep 17 00:00:00 2001 From: Logan Arias Date: Wed, 11 Oct 2023 00:23:05 +0000 Subject: [PATCH 027/142] Update .gitlab-ci.yml file keep artifacts try using ccache --- .gitlab-ci.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e768c1735..de3ff8a73 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -23,14 +23,15 @@ stages: # List of stages for jobs, and their order of execution build-job: # This job runs in the build stage, which runs first. stage: build image: debian - #artifacts: - # paths: - # - "*.bin" + artifacts: + paths: + - "bin/*" script: + - "" - "apt update" - - "apt-get install --no-install-recommends --yes build-essential libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev git libopenmpt-dev gettext" - - "make --directory=src " + - "apt-get install --no-install-recommends --yes build-essential libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev git libopenmpt-dev gettext ccache" + - "CC=\"ccache gcc\" make --directory=src " From b3273a899aa5773c86a9110a7f57403b8544f6e8 Mon Sep 17 00:00:00 2001 From: Logan Arias Date: Wed, 11 Oct 2023 00:40:49 +0000 Subject: [PATCH 028/142] Update .gitlab-ci.yml file cache the ccache --- .gitlab-ci.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index de3ff8a73..913823b67 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -23,15 +23,22 @@ stages: # List of stages for jobs, and their order of execution build-job: # This job runs in the build stage, which runs first. stage: build image: debian + cache: + - key: + files: + - .ccache/stats + paths: + - .ccache artifacts: paths: - "bin/*" script: - - "" - "apt update" - "apt-get install --no-install-recommends --yes build-essential libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev git libopenmpt-dev gettext ccache" - - "CC=\"ccache gcc\" make --directory=src " + - "ccache --max-size 10M" + - "CC=\"ccache gcc\" make --directory=src" + - "ccache --show-stats" From 67dcc2dd0af4f48e4232b6c9d358fbfae5138f9c Mon Sep 17 00:00:00 2001 From: Logan Arias Date: Wed, 11 Oct 2023 00:49:43 +0000 Subject: [PATCH 029/142] Update .gitlab-ci.yml file cache the ccache part two --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 913823b67..a8eb0854f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -28,7 +28,7 @@ build-job: # This job runs in the build stage, which runs first. files: - .ccache/stats paths: - - .ccache + - .ccache/ artifacts: paths: - "bin/*" From 219691895df27ad5314304c4fe5eaca1977cc407 Mon Sep 17 00:00:00 2001 From: Logan Arias Date: Wed, 11 Oct 2023 01:10:02 +0000 Subject: [PATCH 030/142] Update .gitlab-ci.yml file use variables to test if we are using DigitalOcean --- .gitlab-ci.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a8eb0854f..b593c478c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -16,6 +16,8 @@ # This specific template is located at: # https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Getting-Started.gitlab-ci.yml + + stages: # List of stages for jobs, and their order of execution - build @@ -23,6 +25,9 @@ stages: # List of stages for jobs, and their order of execution build-job: # This job runs in the build stage, which runs first. stage: build image: debian + variables: + CCMaxSize: "10M" + CCC: "ccache gcc" cache: - key: files: @@ -36,9 +41,10 @@ build-job: # This job runs in the build stage, which runs first. script: - "apt update" - "apt-get install --no-install-recommends --yes build-essential libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev git libopenmpt-dev gettext ccache" - - "ccache --max-size 10M" - - "CC=\"ccache gcc\" make --directory=src" + - "ccache --max-size $CCMaxSize" + - "CC=\"$CCC\" make --directory=src" - "ccache --show-stats" + - "echo Are we running on DO? $DigitalOceanDebianMirror" From 0f2d3e9134ed658ac7f94de87b83f2b18b1931bb Mon Sep 17 00:00:00 2001 From: Logan Arias Date: Wed, 11 Oct 2023 01:26:22 +0000 Subject: [PATCH 031/142] Update .gitlab-ci.yml file fix ccache path --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b593c478c..d2c27a221 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -31,9 +31,9 @@ build-job: # This job runs in the build stage, which runs first. cache: - key: files: - - .ccache/stats + - .cache/ccache/stats paths: - - .ccache/ + - .cache/ccache/ artifacts: paths: - "bin/*" From 2fae2b54db1f203a7b5d538372924491fdb98798 Mon Sep 17 00:00:00 2001 From: Logan Arias Date: Wed, 11 Oct 2023 01:39:08 +0000 Subject: [PATCH 032/142] Update .gitlab-ci.yml file fix ccache path part two --- .gitlab-ci.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d2c27a221..7ee079494 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -27,7 +27,8 @@ build-job: # This job runs in the build stage, which runs first. image: debian variables: CCMaxSize: "10M" - CCC: "ccache gcc" + CC: "ccache gcc" + CCACHE_DIR: "$CI_BUILDS_DIR/.cache/ccache" cache: - key: files: @@ -39,10 +40,13 @@ build-job: # This job runs in the build stage, which runs first. - "bin/*" script: + - "export $CC" + - "export $CCACHE_DIR" + - "export $CI_BUILDS_DIR" - "apt update" - "apt-get install --no-install-recommends --yes build-essential libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev git libopenmpt-dev gettext ccache" - "ccache --max-size $CCMaxSize" - - "CC=\"$CCC\" make --directory=src" + - "make --directory=src" - "ccache --show-stats" - "echo Are we running on DO? $DigitalOceanDebianMirror" From 16741b2cb0577d8c5ad917a5909187ed359a4c63 Mon Sep 17 00:00:00 2001 From: Logan Arias Date: Wed, 11 Oct 2023 02:08:04 +0000 Subject: [PATCH 033/142] Update .gitlab-ci.yml file fix ccache path part three --- .gitlab-ci.yml | 39 ++++++++++++++++++++++++--------------- 1 file changed, 24 insertions(+), 15 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7ee079494..738895268 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -27,28 +27,37 @@ build-job: # This job runs in the build stage, which runs first. image: debian variables: CCMaxSize: "10M" - CC: "ccache gcc" - CCACHE_DIR: "$CI_BUILDS_DIR/.cache/ccache" cache: - - key: - files: - - .cache/ccache/stats + - key: ccache-$CI_JOB_NAME_SLUG + fallback_keys: + - cache-$CI_DEFAULT_BRANCH + - cache-default paths: - - .cache/ccache/ + - ccache artifacts: paths: - "bin/*" + before_script: + - export PATH="/usr/lib/ccache:$PATH" + - export CCACHE_BASEDIR="$PWD" + - export CCACHE_DIR="$PWD/ccache" + - export CCACHE_COMPILERCHECK=content + - ccache --max-size $CCMaxSize + - ccache --zero-stats || true + - ccache --show-stats || true + after_script: + - export CCACHE_DIR="$PWD/ccache" + - ccache --show-stats + script: - - "export $CC" - - "export $CCACHE_DIR" - - "export $CI_BUILDS_DIR" - - "apt update" - - "apt-get install --no-install-recommends --yes build-essential libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev git libopenmpt-dev gettext ccache" - - "ccache --max-size $CCMaxSize" - - "make --directory=src" - - "ccache --show-stats" - - "echo Are we running on DO? $DigitalOceanDebianMirror" + - pwd + - echo "$CI_JOB_NAME_SLUG" + - echo "$CCACHE_DIR" + - echo Are we running on DO? "$DigitalOceanDebianMirror" + - apt update + - apt-get install --no-install-recommends --yes build-essential libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev git libopenmpt-dev gettext ccache + - make --directory=src From 84a2463d2f45287e04a69056fc1485692c824d18 Mon Sep 17 00:00:00 2001 From: Logan Arias Date: Wed, 11 Oct 2023 02:09:54 +0000 Subject: [PATCH 034/142] Update .gitlab-ci.yml file fix ccache path part four --- .gitlab-ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 738895268..2f089efc9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -42,6 +42,8 @@ build-job: # This job runs in the build stage, which runs first. - export CCACHE_BASEDIR="$PWD" - export CCACHE_DIR="$PWD/ccache" - export CCACHE_COMPILERCHECK=content + - apt update + - apt-get install --no-install-recommends ccache - ccache --max-size $CCMaxSize - ccache --zero-stats || true - ccache --show-stats || true @@ -55,8 +57,7 @@ build-job: # This job runs in the build stage, which runs first. - echo "$CI_JOB_NAME_SLUG" - echo "$CCACHE_DIR" - echo Are we running on DO? "$DigitalOceanDebianMirror" - - apt update - - apt-get install --no-install-recommends --yes build-essential libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev git libopenmpt-dev gettext ccache + - apt-get install --no-install-recommends --yes build-essential libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev git libopenmpt-dev gettext - make --directory=src From 0ff83947ac4349f89d5f46835aeedff7364a4b9b Mon Sep 17 00:00:00 2001 From: Logan Arias Date: Wed, 11 Oct 2023 02:11:04 +0000 Subject: [PATCH 035/142] Update .gitlab-ci.yml file fix ccache path part 5 --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2f089efc9..037608416 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -43,7 +43,7 @@ build-job: # This job runs in the build stage, which runs first. - export CCACHE_DIR="$PWD/ccache" - export CCACHE_COMPILERCHECK=content - apt update - - apt-get install --no-install-recommends ccache + - apt-get install --no-install-recommends --yes ccache - ccache --max-size $CCMaxSize - ccache --zero-stats || true - ccache --show-stats || true From 4b015c91e12dcc7d8a7056e0d16c2431f2272884 Mon Sep 17 00:00:00 2001 From: Logan Arias Date: Wed, 11 Oct 2023 03:03:37 +0000 Subject: [PATCH 036/142] Update .gitlab-ci.yml file rename ccache keys up ccache size to 30M --- .gitlab-ci.yml | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 037608416..68d5c5eb1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -22,16 +22,16 @@ stages: # List of stages for jobs, and their order of execution - build -build-job: # This job runs in the build stage, which runs first. +build-native: # This job runs in the build stage, which runs first. stage: build image: debian variables: - CCMaxSize: "10M" + CCACHE_MAXSIZE: "30M" cache: - - key: ccache-$CI_JOB_NAME_SLUG + - key: ccache-$CI_PROJECT_PATH_SLUG-$CI_JOB_NAME_SLUG fallback_keys: - - cache-$CI_DEFAULT_BRANCH - - cache-default + - cache-$CI_PROJECT_PATH_SLUG-$CI_DEFAULT_BRANCH + - cache-$CI_PROJECT_PATH_SLUG-default paths: - ccache artifacts: @@ -44,19 +44,12 @@ build-job: # This job runs in the build stage, which runs first. - export CCACHE_COMPILERCHECK=content - apt update - apt-get install --no-install-recommends --yes ccache - - ccache --max-size $CCMaxSize - ccache --zero-stats || true - ccache --show-stats || true after_script: - export CCACHE_DIR="$PWD/ccache" - ccache --show-stats - - script: - - pwd - - echo "$CI_JOB_NAME_SLUG" - - echo "$CCACHE_DIR" - - echo Are we running on DO? "$DigitalOceanDebianMirror" - apt-get install --no-install-recommends --yes build-essential libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev git libopenmpt-dev gettext - make --directory=src From 92f16c8142cd035049cbde95008400072cdade28 Mon Sep 17 00:00:00 2001 From: Logan Arias Date: Wed, 11 Oct 2023 04:11:56 +0000 Subject: [PATCH 037/142] Update .gitlab-ci.yml file use git clone options up CCACHE size to 50M --- .gitlab-ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 68d5c5eb1..3a0eff4ad 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -26,7 +26,9 @@ build-native: # This job runs in the build stage, which runs first. stage: build image: debian variables: - CCACHE_MAXSIZE: "30M" + CCACHE_MAXSIZE: "50M" + GIT_STRATEGY: clone + GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_CONCURRENT_ID/$CI_PROJECT_PATH cache: - key: ccache-$CI_PROJECT_PATH_SLUG-$CI_JOB_NAME_SLUG fallback_keys: From 3ee5ed2dacfadfcfad4ddc38bfae17c24379a6ab Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Wed, 11 Oct 2023 04:25:05 +0000 Subject: [PATCH 038/142] Update .gitlab-ci.yml file cache apt packages --- .gitlab-ci.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3a0eff4ad..48cf42697 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -36,6 +36,9 @@ build-native: # This job runs in the build stage, which runs first. - cache-$CI_PROJECT_PATH_SLUG-default paths: - ccache + - key: apt + paths: + - /var/cache/apt artifacts: paths: - "bin/*" @@ -44,7 +47,7 @@ build-native: # This job runs in the build stage, which runs first. - export CCACHE_BASEDIR="$PWD" - export CCACHE_DIR="$PWD/ccache" - export CCACHE_COMPILERCHECK=content - - apt update + - apt-get update - apt-get install --no-install-recommends --yes ccache - ccache --zero-stats || true - ccache --show-stats || true From 3ef89e990216233abbd95db7201d25d70da261a0 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Wed, 11 Oct 2023 04:27:50 +0000 Subject: [PATCH 039/142] Update .gitlab-ci.yml file cache apt packages, part 2 --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 48cf42697..37c6d76e8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -38,7 +38,7 @@ build-native: # This job runs in the build stage, which runs first. - ccache - key: apt paths: - - /var/cache/apt + - /var/cache/apt/ artifacts: paths: - "bin/*" From 9597a19ecf0106f5198df19b7bb9e8847f6ec858 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Wed, 11 Oct 2023 04:37:01 +0000 Subject: [PATCH 040/142] Update .gitlab-ci.yml file cache apt packages, part 3 --- .gitlab-ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 37c6d76e8..22724f679 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -38,7 +38,7 @@ build-native: # This job runs in the build stage, which runs first. - ccache - key: apt paths: - - /var/cache/apt/ + - apt artifacts: paths: - "bin/*" @@ -47,6 +47,7 @@ build-native: # This job runs in the build stage, which runs first. - export CCACHE_BASEDIR="$PWD" - export CCACHE_DIR="$PWD/ccache" - export CCACHE_COMPILERCHECK=content + - echo Dir::Cache="$PWD/apt" > /etc/apt/apt.conf.d/99cache - apt-get update - apt-get install --no-install-recommends --yes ccache - ccache --zero-stats || true From 7231631a3ff391be9b3fb889ee20cfc6d033d84c Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Wed, 11 Oct 2023 04:39:48 +0000 Subject: [PATCH 041/142] Update .gitlab-ci.yml file cache apt packages, part 4 --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 22724f679..2e388ac18 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -47,7 +47,7 @@ build-native: # This job runs in the build stage, which runs first. - export CCACHE_BASEDIR="$PWD" - export CCACHE_DIR="$PWD/ccache" - export CCACHE_COMPILERCHECK=content - - echo Dir::Cache="$PWD/apt" > /etc/apt/apt.conf.d/99cache + - echo Dir::Cache="$PWD/apt" | tee /etc/apt/apt.conf.d/99cache - apt-get update - apt-get install --no-install-recommends --yes ccache - ccache --zero-stats || true From eb6ed2e7e7e657abf48b63e0faa17058d111b509 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Wed, 11 Oct 2023 04:43:22 +0000 Subject: [PATCH 042/142] Update .gitlab-ci.yml file cache apt packages, part 5 --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2e388ac18..18ae4459c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -47,7 +47,7 @@ build-native: # This job runs in the build stage, which runs first. - export CCACHE_BASEDIR="$PWD" - export CCACHE_DIR="$PWD/ccache" - export CCACHE_COMPILERCHECK=content - - echo Dir::Cache="$PWD/apt" | tee /etc/apt/apt.conf.d/99cache + - echo -n Dir::Cache="$PWD/apt" | tee /etc/apt/apt.conf.d/99cache - apt-get update - apt-get install --no-install-recommends --yes ccache - ccache --zero-stats || true From 3db57df3532db301b4dd4374fcf119ffbb68f584 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Wed, 11 Oct 2023 04:57:29 +0000 Subject: [PATCH 043/142] Update .gitlab-ci.yml file cache apt packages, part 6 --- .gitlab-ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 18ae4459c..7bc250338 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -47,7 +47,9 @@ build-native: # This job runs in the build stage, which runs first. - export CCACHE_BASEDIR="$PWD" - export CCACHE_DIR="$PWD/ccache" - export CCACHE_COMPILERCHECK=content - - echo -n Dir::Cache="$PWD/apt" | tee /etc/apt/apt.conf.d/99cache + - export APT_CACHE_DIR=`pwd`/apt-cache + - mkdir --parents --verbose $APT_CACHE_DIR/partial/ + - echo dir::cache::archives="$APT_CACHE_DIR" | tee --append /etc/apt/apt.conf.d/99cache - apt-get update - apt-get install --no-install-recommends --yes ccache - ccache --zero-stats || true From 97096445dfb445f1eb35c3e4d573100a65043930 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Wed, 11 Oct 2023 05:00:08 +0000 Subject: [PATCH 044/142] Update .gitlab-ci.yml file cache apt packages, part 7 --- .gitlab-ci.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7bc250338..30db01e1e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -49,16 +49,15 @@ build-native: # This job runs in the build stage, which runs first. - export CCACHE_COMPILERCHECK=content - export APT_CACHE_DIR=`pwd`/apt-cache - mkdir --parents --verbose $APT_CACHE_DIR/partial/ - - echo dir::cache::archives="$APT_CACHE_DIR" | tee --append /etc/apt/apt.conf.d/99cache - apt-get update - - apt-get install --no-install-recommends --yes ccache + - apt-get -o dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes ccache - ccache --zero-stats || true - ccache --show-stats || true after_script: - export CCACHE_DIR="$PWD/ccache" - ccache --show-stats script: - - apt-get install --no-install-recommends --yes build-essential libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev git libopenmpt-dev gettext + - apt-get -o dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes build-essential libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev git libopenmpt-dev gettext - make --directory=src From 37909c95b18a328381a587c440a49695821732f9 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Wed, 11 Oct 2023 05:03:19 +0000 Subject: [PATCH 045/142] Update .gitlab-ci.yml file cache apt packages, part 8 --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 30db01e1e..02b2edc92 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -38,7 +38,7 @@ build-native: # This job runs in the build stage, which runs first. - ccache - key: apt paths: - - apt + - apt-cache artifacts: paths: - "bin/*" From e7417ea11653ed3f52d9c813150ab63a35e4f16a Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Wed, 11 Oct 2023 05:07:25 +0000 Subject: [PATCH 046/142] Update .gitlab-ci.yml file switch docker image to debian, slim version --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 02b2edc92..2e21653d7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -24,7 +24,7 @@ stages: # List of stages for jobs, and their order of execution build-native: # This job runs in the build stage, which runs first. stage: build - image: debian + image: debian-slim variables: CCACHE_MAXSIZE: "50M" GIT_STRATEGY: clone From 4b43f92b134f2d8841a8b1af65460d44e6b28bd5 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Wed, 11 Oct 2023 05:10:23 +0000 Subject: [PATCH 047/142] Update .gitlab-ci.yml file switch docker image to debian, slim version, part 2 --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2e21653d7..597a6cb8a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -24,7 +24,7 @@ stages: # List of stages for jobs, and their order of execution build-native: # This job runs in the build stage, which runs first. stage: build - image: debian-slim + image: debian:stable-slim variables: CCACHE_MAXSIZE: "50M" GIT_STRATEGY: clone From 8b4548384249d211a8d8f82bb18281f8d75dace5 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Thu, 12 Oct 2023 01:06:00 +0000 Subject: [PATCH 048/142] Update .gitlab-ci.yml file autoclean apt cache and change cache key to image name --- .gitlab-ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 597a6cb8a..0cf36d679 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -36,7 +36,7 @@ build-native: # This job runs in the build stage, which runs first. - cache-$CI_PROJECT_PATH_SLUG-default paths: - ccache - - key: apt + - key: apt-$CI_JOB_IMAGE paths: - apt-cache artifacts: @@ -50,14 +50,14 @@ build-native: # This job runs in the build stage, which runs first. - export APT_CACHE_DIR=`pwd`/apt-cache - mkdir --parents --verbose $APT_CACHE_DIR/partial/ - apt-get update - - apt-get -o dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes ccache + - pt-get -o dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes build-essential libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev git libopenmpt-dev gettext ccache - ccache --zero-stats || true - ccache --show-stats || true after_script: - export CCACHE_DIR="$PWD/ccache" - ccache --show-stats + - apt-get autoclean script: - - apt-get -o dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes build-essential libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev git libopenmpt-dev gettext - make --directory=src From 53eafa046cef88f21d347fd71769da72fbce4c7f Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Thu, 12 Oct 2023 01:07:42 +0000 Subject: [PATCH 049/142] Update .gitlab-ci.yml file fixup typo --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0cf36d679..c7301e418 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -50,7 +50,7 @@ build-native: # This job runs in the build stage, which runs first. - export APT_CACHE_DIR=`pwd`/apt-cache - mkdir --parents --verbose $APT_CACHE_DIR/partial/ - apt-get update - - pt-get -o dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes build-essential libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev git libopenmpt-dev gettext ccache + - apt-get -o dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes build-essential libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev git libopenmpt-dev gettext ccache - ccache --zero-stats || true - ccache --show-stats || true after_script: From d7ea647f9bc74ff8787c9d3fa817d8bc01aa81ab Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Thu, 12 Oct 2023 01:21:23 +0000 Subject: [PATCH 050/142] Update .gitlab-ci.yml file apt cache do not need to be protected also, name artifact for binaries from build-native job --- .gitlab-ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c7301e418..e182098b5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -39,9 +39,11 @@ build-native: # This job runs in the build stage, which runs first. - key: apt-$CI_JOB_IMAGE paths: - apt-cache + unprotect: true artifacts: paths: - "bin/*" + name: "Debian native" before_script: - export PATH="/usr/lib/ccache:$PATH" - export CCACHE_BASEDIR="$PWD" @@ -51,12 +53,12 @@ build-native: # This job runs in the build stage, which runs first. - mkdir --parents --verbose $APT_CACHE_DIR/partial/ - apt-get update - apt-get -o dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes build-essential libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev git libopenmpt-dev gettext ccache + - apt-get autoclean - ccache --zero-stats || true - ccache --show-stats || true after_script: - export CCACHE_DIR="$PWD/ccache" - ccache --show-stats - - apt-get autoclean script: - make --directory=src From dc2a5b949692c35505d60910afbf22fd1ccfb331 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Thu, 12 Oct 2023 01:36:29 +0000 Subject: [PATCH 051/142] Update .gitlab-ci.yml file do not play games with $PATH --- .gitlab-ci.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e182098b5..14f171d04 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -45,21 +45,24 @@ build-native: # This job runs in the build stage, which runs first. - "bin/*" name: "Debian native" before_script: - - export PATH="/usr/lib/ccache:$PATH" - - export CCACHE_BASEDIR="$PWD" - - export CCACHE_DIR="$PWD/ccache" - - export CCACHE_COMPILERCHECK=content - export APT_CACHE_DIR=`pwd`/apt-cache - mkdir --parents --verbose $APT_CACHE_DIR/partial/ - apt-get update - apt-get -o dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes build-essential libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev git libopenmpt-dev gettext ccache - apt-get autoclean + - export CCACHE_BASEDIR="$PWD" + - export CCACHE_DIR="$PWD/ccache" - ccache --zero-stats || true - ccache --show-stats || true after_script: + - export CCACHE_BASEDIR="$PWD" - export CCACHE_DIR="$PWD/ccache" - ccache --show-stats script: + - export CC="ccache gcc" + - export CCACHE_BASEDIR="$PWD" + - export CCACHE_DIR="$PWD/ccache" + - export CCACHE_COMPILERCHECK=content - make --directory=src From dbd40ef4220ad83100a42dacc6d7228fc32439b3 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Thu, 12 Oct 2023 01:52:52 +0000 Subject: [PATCH 052/142] Update .gitlab-ci.yml file auto cache our apt cache --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 14f171d04..7abbfc980 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -49,7 +49,7 @@ build-native: # This job runs in the build stage, which runs first. - mkdir --parents --verbose $APT_CACHE_DIR/partial/ - apt-get update - apt-get -o dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes build-essential libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev git libopenmpt-dev gettext ccache - - apt-get autoclean + - apt-get -o dir::cache::archives="$APT_CACHE_DIR" autoclean - export CCACHE_BASEDIR="$PWD" - export CCACHE_DIR="$PWD/ccache" - ccache --zero-stats || true From 01fc7810e28028304a899f55007e7808d33f594c Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Thu, 12 Oct 2023 02:03:04 +0000 Subject: [PATCH 053/142] Update .gitlab-ci.yml file use DO mirror? --- .gitlab-ci.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7abbfc980..94e1676a2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -45,11 +45,13 @@ build-native: # This job runs in the build stage, which runs first. - "bin/*" name: "Debian native" before_script: + - sed --expression="s/deb.debian.org/mirrors.digitalocean.com/g" /etc/apt/sources.list > /etc/apt/sources.list.d/debian.list + - rm --force /etc/apt/sources.list + - apt-get update - export APT_CACHE_DIR=`pwd`/apt-cache - mkdir --parents --verbose $APT_CACHE_DIR/partial/ - - apt-get update - - apt-get -o dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes build-essential libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev git libopenmpt-dev gettext ccache - - apt-get -o dir::cache::archives="$APT_CACHE_DIR" autoclean + - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes build-essential libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev git libopenmpt-dev gettext ccache + - apt-get --option dir::cache::archives="$APT_CACHE_DIR" autoclean - export CCACHE_BASEDIR="$PWD" - export CCACHE_DIR="$PWD/ccache" - ccache --zero-stats || true From 27776173ca16431067aeadeba06b8b0ef8bd8701 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Thu, 12 Oct 2023 02:08:24 +0000 Subject: [PATCH 054/142] Update .gitlab-ci.yml file let see what in the /etc/apt folder --- .gitlab-ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 94e1676a2..61c03e315 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -45,8 +45,9 @@ build-native: # This job runs in the build stage, which runs first. - "bin/*" name: "Debian native" before_script: - - sed --expression="s/deb.debian.org/mirrors.digitalocean.com/g" /etc/apt/sources.list > /etc/apt/sources.list.d/debian.list - - rm --force /etc/apt/sources.list + - ls --human-readable --all -l /etc/apt/sources.list* + - rem sed --expression="s/deb.debian.org/mirrors.digitalocean.com/g" /etc/apt/sources.list > /etc/apt/sources.list.d/debian.list + - rem rm --force /etc/apt/sources.list - apt-get update - export APT_CACHE_DIR=`pwd`/apt-cache - mkdir --parents --verbose $APT_CACHE_DIR/partial/ From 58a10836f0520c05b22422f9e49d7ec00e1c244d Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Thu, 12 Oct 2023 02:15:47 +0000 Subject: [PATCH 055/142] Update .gitlab-ci.yml file try to overwrite mirrors file --- .gitlab-ci.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 61c03e315..edc47f3b9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -45,9 +45,7 @@ build-native: # This job runs in the build stage, which runs first. - "bin/*" name: "Debian native" before_script: - - ls --human-readable --all -l /etc/apt/sources.list* - - rem sed --expression="s/deb.debian.org/mirrors.digitalocean.com/g" /etc/apt/sources.list > /etc/apt/sources.list.d/debian.list - - rem rm --force /etc/apt/sources.list + - if [ $DigitalOceanDebianMirror == "1" ]; then echo http://mirrors.digitalocean.com/debian | tee /etc/apt/mirrors/debian.list; fi - apt-get update - export APT_CACHE_DIR=`pwd`/apt-cache - mkdir --parents --verbose $APT_CACHE_DIR/partial/ From f015b6ea68b5a1df40ea63b03bb36936246f7253 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Thu, 12 Oct 2023 02:18:29 +0000 Subject: [PATCH 056/142] Update .gitlab-ci.yml file let look inside debian.sources --- .gitlab-ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index edc47f3b9..172fba5bc 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -45,7 +45,8 @@ build-native: # This job runs in the build stage, which runs first. - "bin/*" name: "Debian native" before_script: - - if [ $DigitalOceanDebianMirror == "1" ]; then echo http://mirrors.digitalocean.com/debian | tee /etc/apt/mirrors/debian.list; fi + - cat /etc/apt/sources.list.d/debian.sources + - if [ $DigitalOceanDebianMirror == "1" ]; then echo http://mirrors.digitalocean.com/debian | tee /etc/apt/mirrors/debian.list; fi || true - apt-get update - export APT_CACHE_DIR=`pwd`/apt-cache - mkdir --parents --verbose $APT_CACHE_DIR/partial/ From 735b8314e82a50bfb8f22a28d622dd0a62670790 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Thu, 12 Oct 2023 02:23:36 +0000 Subject: [PATCH 057/142] Update .gitlab-ci.yml file forget about change the Debian mirror --- .gitlab-ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 172fba5bc..529d5d914 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -45,8 +45,6 @@ build-native: # This job runs in the build stage, which runs first. - "bin/*" name: "Debian native" before_script: - - cat /etc/apt/sources.list.d/debian.sources - - if [ $DigitalOceanDebianMirror == "1" ]; then echo http://mirrors.digitalocean.com/debian | tee /etc/apt/mirrors/debian.list; fi || true - apt-get update - export APT_CACHE_DIR=`pwd`/apt-cache - mkdir --parents --verbose $APT_CACHE_DIR/partial/ From 95c81696a5594442ae9795fedccace91dd7b72d7 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Thu, 12 Oct 2023 03:00:34 +0000 Subject: [PATCH 058/142] Update .gitlab-ci.yml file build Mingw64 binary --- .gitlab-ci.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 529d5d914..75415adc9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -48,7 +48,7 @@ build-native: # This job runs in the build stage, which runs first. - apt-get update - export APT_CACHE_DIR=`pwd`/apt-cache - mkdir --parents --verbose $APT_CACHE_DIR/partial/ - - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes build-essential libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev git libopenmpt-dev gettext ccache + - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes build-essential libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev git libopenmpt-dev gettext ccache mingw-w64 - apt-get --option dir::cache::archives="$APT_CACHE_DIR" autoclean - export CCACHE_BASEDIR="$PWD" - export CCACHE_DIR="$PWD/ccache" @@ -59,11 +59,10 @@ build-native: # This job runs in the build stage, which runs first. - export CCACHE_DIR="$PWD/ccache" - ccache --show-stats script: - - export CC="ccache gcc" - export CCACHE_BASEDIR="$PWD" - export CCACHE_DIR="$PWD/ccache" - export CCACHE_COMPILERCHECK=content - - make --directory=src - + - make --directory=src CCACHE=1 + - make --directory=src CCACHE=1 MINGW64=1 PREFIX=x86_64-w64 From ae25f9ac4495e18bfc0c6c119e7dea9356477d3d Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Thu, 12 Oct 2023 03:06:17 +0000 Subject: [PATCH 059/142] Update .gitlab-ci.yml file yea the Mingw-w64 is called "x86_64-w64-mingw32", not "x86_64-w64" --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 75415adc9..1ceaa1ef1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -63,6 +63,6 @@ build-native: # This job runs in the build stage, which runs first. - export CCACHE_DIR="$PWD/ccache" - export CCACHE_COMPILERCHECK=content - make --directory=src CCACHE=1 - - make --directory=src CCACHE=1 MINGW64=1 PREFIX=x86_64-w64 + - make --directory=src CCACHE=1 MINGW64=1 PREFIX=x86_64-w64-mingw32 From ff4c4c806a9a9a41915b4eff736dd75eb01eb3dd Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Thu, 12 Oct 2023 04:12:15 +0000 Subject: [PATCH 060/142] Update .gitlab-ci.yml file split build job for each target: x86-64, Win32, Win64 --- .gitlab-ci.yml | 47 +++++++++++++++++++++++++++++++++++------------ 1 file changed, 35 insertions(+), 12 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1ceaa1ef1..88872359f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -21,8 +21,7 @@ stages: # List of stages for jobs, and their order of execution - build - -build-native: # This job runs in the build stage, which runs first. +.job_template: &job_build # This job runs in the build stage, which runs first. stage: build image: debian:stable-slim variables: @@ -40,10 +39,6 @@ build-native: # This job runs in the build stage, which runs first. paths: - apt-cache unprotect: true - artifacts: - paths: - - "bin/*" - name: "Debian native" before_script: - apt-get update - export APT_CACHE_DIR=`pwd`/apt-cache @@ -58,11 +53,39 @@ build-native: # This job runs in the build stage, which runs first. - export CCACHE_BASEDIR="$PWD" - export CCACHE_DIR="$PWD/ccache" - ccache --show-stats + +.default_Scripts: &ccache + - export CCACHE_BASEDIR="$PWD" + - export CCACHE_DIR="$PWD/ccache" + - export CCACHE_COMPILERCHECK=content + +build-x86_64-linux-gnu: + <<: *job_build + artifacts: + paths: + - "bin/lsdl2srb2*" + name: "x86-64" script: - - export CCACHE_BASEDIR="$PWD" - - export CCACHE_DIR="$PWD/ccache" - - export CCACHE_COMPILERCHECK=content - - make --directory=src CCACHE=1 + - *ccache + - export CC="x86_64-linux-gnu-gcc + - make --directory=src CCACHE=1 LINUX64=1 + +build-i686-w64-mingw32: + <<: *job_build + artifacts: + paths: + - "bin/srb2win.exe*" + name: "Win32" + script: + - *ccache + - make --directory=src CCACHE=1 MINGW=1 PREFIX=i686-w64-mingw32 + +build-x86_64-w64-mingw32: + <<: *job_build + artifacts: + paths: + - "bin/srb2win64.exe*" + name: "Win64" + script: + - *ccache - make --directory=src CCACHE=1 MINGW64=1 PREFIX=x86_64-w64-mingw32 - - From bd1adb266771c7272e9b01edc9c8a5298a6c44de Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Thu, 12 Oct 2023 04:22:15 +0000 Subject: [PATCH 061/142] Update .gitlab-ci.yml file inline the script to setup ccache should be done in one line? --- .gitlab-ci.yml | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 88872359f..5c1f4a3ee 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -21,6 +21,9 @@ stages: # List of stages for jobs, and their order of execution - build +.default_Scripts: &ccache + export CCACHE_BASEDIR="$PWD";export CCACHE_DIR="$PWD/ccache";export CCACHE_COMPILERCHECK=content + .job_template: &job_build # This job runs in the build stage, which runs first. stage: build image: debian:stable-slim @@ -45,20 +48,13 @@ stages: # List of stages for jobs, and their order of execution - mkdir --parents --verbose $APT_CACHE_DIR/partial/ - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes build-essential libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev git libopenmpt-dev gettext ccache mingw-w64 - apt-get --option dir::cache::archives="$APT_CACHE_DIR" autoclean - - export CCACHE_BASEDIR="$PWD" - - export CCACHE_DIR="$PWD/ccache" + - *ccache - ccache --zero-stats || true - ccache --show-stats || true after_script: - - export CCACHE_BASEDIR="$PWD" - - export CCACHE_DIR="$PWD/ccache" + - *ccache - ccache --show-stats -.default_Scripts: &ccache - - export CCACHE_BASEDIR="$PWD" - - export CCACHE_DIR="$PWD/ccache" - - export CCACHE_COMPILERCHECK=content - build-x86_64-linux-gnu: <<: *job_build artifacts: From ce760342c22e4a204408d6269268bcf4d7ee0059 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Thu, 12 Oct 2023 04:26:02 +0000 Subject: [PATCH 062/142] Update .gitlab-ci.yml file fix setting $CC in build-x86_64-linux-gnu job --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5c1f4a3ee..5e0f91923 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -63,7 +63,7 @@ build-x86_64-linux-gnu: name: "x86-64" script: - *ccache - - export CC="x86_64-linux-gnu-gcc + - export CC="x86_64-linux-gnu-gcc" - make --directory=src CCACHE=1 LINUX64=1 build-i686-w64-mingw32: From 82b29bdfcf349795fafb28384b3d8b251d14a0f7 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Thu, 12 Oct 2023 05:04:02 +0000 Subject: [PATCH 063/142] Update .gitlab-ci.yml file Name the artifacts by project name,branch, then SHA --- .gitlab-ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5e0f91923..f2c9573dc 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -60,7 +60,7 @@ build-x86_64-linux-gnu: artifacts: paths: - "bin/lsdl2srb2*" - name: "x86-64" + name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-x86-64" script: - *ccache - export CC="x86_64-linux-gnu-gcc" @@ -71,7 +71,7 @@ build-i686-w64-mingw32: artifacts: paths: - "bin/srb2win.exe*" - name: "Win32" + name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win32" script: - *ccache - make --directory=src CCACHE=1 MINGW=1 PREFIX=i686-w64-mingw32 @@ -81,7 +81,7 @@ build-x86_64-w64-mingw32: artifacts: paths: - "bin/srb2win64.exe*" - name: "Win64" + name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win64" script: - *ccache - make --directory=src CCACHE=1 MINGW64=1 PREFIX=x86_64-w64-mingw32 From ea02f5c8104ea3b157323835131240113156b28b Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Thu, 12 Oct 2023 05:22:42 +0000 Subject: [PATCH 064/142] Update .gitlab-ci.yml file since each build job run in their own docker, only install packages as needed for each job --- .gitlab-ci.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f2c9573dc..63fcb805b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -46,7 +46,7 @@ stages: # List of stages for jobs, and their order of execution - apt-get update - export APT_CACHE_DIR=`pwd`/apt-cache - mkdir --parents --verbose $APT_CACHE_DIR/partial/ - - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes build-essential libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev git libopenmpt-dev gettext ccache mingw-w64 + - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes make git ccache - apt-get --option dir::cache::archives="$APT_CACHE_DIR" autoclean - *ccache - ccache --zero-stats || true @@ -63,6 +63,8 @@ build-x86_64-linux-gnu: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-x86-64" script: - *ccache + - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev libopenmpt-dev gcc + - apt-get --option dir::cache::archives="$APT_CACHE_DIR" autoclean - export CC="x86_64-linux-gnu-gcc" - make --directory=src CCACHE=1 LINUX64=1 @@ -74,6 +76,8 @@ build-i686-w64-mingw32: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win32" script: - *ccache + - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc-mingw-w64 + - apt-get --option dir::cache::archives="$APT_CACHE_DIR" autoclean - make --directory=src CCACHE=1 MINGW=1 PREFIX=i686-w64-mingw32 build-x86_64-w64-mingw32: @@ -84,4 +88,6 @@ build-x86_64-w64-mingw32: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win64" script: - *ccache + - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc-mingw-w64-x86-64 + - apt-get --option dir::cache::archives="$APT_CACHE_DIR" autoclean - make --directory=src CCACHE=1 MINGW64=1 PREFIX=x86_64-w64-mingw32 From caf2b486c4716f68e7e03d2bd065091ab92deb7c Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Thu, 12 Oct 2023 05:31:31 +0000 Subject: [PATCH 065/142] Update .gitlab-ci.yml file do not install posix version of mingw-w64 --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 63fcb805b..4498c1d85 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -76,7 +76,7 @@ build-i686-w64-mingw32: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win32" script: - *ccache - - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc-mingw-w64 + - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc-mingw-w64-win32 - apt-get --option dir::cache::archives="$APT_CACHE_DIR" autoclean - make --directory=src CCACHE=1 MINGW=1 PREFIX=i686-w64-mingw32 @@ -88,6 +88,6 @@ build-x86_64-w64-mingw32: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win64" script: - *ccache - - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc-mingw-w64-x86-64 + - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc-mingw-w64-x86-64-win32 - apt-get --option dir::cache::archives="$APT_CACHE_DIR" autoclean - make --directory=src CCACHE=1 MINGW64=1 PREFIX=x86_64-w64-mingw32 From 567565968d0487e57ab04ca865cc38f52da54024 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Thu, 12 Oct 2023 05:38:11 +0000 Subject: [PATCH 066/142] Update .gitlab-ci.yml file use gcc-mingw-w64-(i686|x86-64)-win32 package --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4498c1d85..805ad781c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -76,7 +76,7 @@ build-i686-w64-mingw32: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win32" script: - *ccache - - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc-mingw-w64-win32 + - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc-mingw-w64-i686-win32 - apt-get --option dir::cache::archives="$APT_CACHE_DIR" autoclean - make --directory=src CCACHE=1 MINGW=1 PREFIX=i686-w64-mingw32 From 50c32451fb9b0353667c74c01109e615da14dee9 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Thu, 12 Oct 2023 12:55:10 +0000 Subject: [PATCH 067/142] Update .gitlab-ci.yml file Try to build i686 linux binaries --- .gitlab-ci.yml | 50 ++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 36 insertions(+), 14 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 805ad781c..97ec84372 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -16,13 +16,18 @@ # This specific template is located at: # https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Getting-Started.gitlab-ci.yml - - stages: # List of stages for jobs, and their order of execution - build -.default_Scripts: &ccache - export CCACHE_BASEDIR="$PWD";export CCACHE_DIR="$PWD/ccache";export CCACHE_COMPILERCHECK=content +.ccache_Scripts: &ccache + - export CCACHE_BASEDIR="$PWD" + - export CCACHE_DIR="$PWD/ccache" + - export CCACHE_COMPILERCHECK=content + +.aptcache_Scripts: &aptcache + - export APT_CACHE_DIR=`pwd`/apt-cache + - mkdir --parents --verbose $APT_CACHE_DIR/partial/ + .job_template: &job_build # This job runs in the build stage, which runs first. stage: build @@ -43,18 +48,34 @@ stages: # List of stages for jobs, and their order of execution - apt-cache unprotect: true before_script: + - dpkg --add-architecture i386 + - dpkg --add-architecture amd64 - apt-get update - - export APT_CACHE_DIR=`pwd`/apt-cache - - mkdir --parents --verbose $APT_CACHE_DIR/partial/ + - *aptcache - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes make git ccache - - apt-get --option dir::cache::archives="$APT_CACHE_DIR" autoclean - *ccache - ccache --zero-stats || true - ccache --show-stats || true after_script: + - *aptcache + - apt-get --option dir::cache::archives="$APT_CACHE_DIR" autoclean - *ccache - ccache --show-stats +build-i686-linux-gnu: + <<: *job_build + artifacts: + paths: + - "bin/lsdl2srb2*" + name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-i686" + script: + - *aptcache + - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc-i686-linux-gnu + - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes libsdl2-mixer-dev:i386 libpng-dev:i386 libcurl4-openssl-dev:i386 libgme-dev:i386 libopenmpt-dev:i386 + - export CC="i686-linux-gnu-gcc" + - *ccache + - make --directory=src CCACHE=1 LINUX=1 + build-x86_64-linux-gnu: <<: *job_build artifacts: @@ -62,10 +83,11 @@ build-x86_64-linux-gnu: - "bin/lsdl2srb2*" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-x86-64" script: - - *ccache - - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev libopenmpt-dev gcc - - apt-get --option dir::cache::archives="$APT_CACHE_DIR" autoclean + - *aptcache + - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc-x86-64-linux-gnu + - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes libsdl2-mixer-dev:amd64 libpng-dev:amd64 libcurl4-openssl-dev:amd64 libgme-dev:amd64 libopenmpt-dev:amd64 - export CC="x86_64-linux-gnu-gcc" + - *ccache - make --directory=src CCACHE=1 LINUX64=1 build-i686-w64-mingw32: @@ -75,9 +97,9 @@ build-i686-w64-mingw32: - "bin/srb2win.exe*" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win32" script: - - *ccache + - *aptcache - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc-mingw-w64-i686-win32 - - apt-get --option dir::cache::archives="$APT_CACHE_DIR" autoclean + - *ccache - make --directory=src CCACHE=1 MINGW=1 PREFIX=i686-w64-mingw32 build-x86_64-w64-mingw32: @@ -87,7 +109,7 @@ build-x86_64-w64-mingw32: - "bin/srb2win64.exe*" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win64" script: - - *ccache + - *aptcache - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc-mingw-w64-x86-64-win32 - - apt-get --option dir::cache::archives="$APT_CACHE_DIR" autoclean + - *ccache - make --directory=src CCACHE=1 MINGW64=1 PREFIX=x86_64-w64-mingw32 From 83628d6049b00c5e01b48de191d54eb65288bd2c Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Thu, 12 Oct 2023 13:11:16 +0000 Subject: [PATCH 068/142] Update .gitlab-ci.yml file Set PKG_CONFIG_PATH for targeted archs --- .gitlab-ci.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 97ec84372..76d62bab5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -52,7 +52,7 @@ stages: # List of stages for jobs, and their order of execution - dpkg --add-architecture amd64 - apt-get update - *aptcache - - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes make git ccache + - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes make git ccache gcc - *ccache - ccache --zero-stats || true - ccache --show-stats || true @@ -70,9 +70,10 @@ build-i686-linux-gnu: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-i686" script: - *aptcache - - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc-i686-linux-gnu + - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc-i686-linux-gnu || true - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes libsdl2-mixer-dev:i386 libpng-dev:i386 libcurl4-openssl-dev:i386 libgme-dev:i386 libopenmpt-dev:i386 - export CC="i686-linux-gnu-gcc" + - export PKG_CONFIG_PATH=/usr/lib/i386-linux-gnu/pkgconfig - *ccache - make --directory=src CCACHE=1 LINUX=1 @@ -84,9 +85,10 @@ build-x86_64-linux-gnu: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-x86-64" script: - *aptcache - - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc-x86-64-linux-gnu + - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc-x86-64-linux-gnu || true - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes libsdl2-mixer-dev:amd64 libpng-dev:amd64 libcurl4-openssl-dev:amd64 libgme-dev:amd64 libopenmpt-dev:amd64 - export CC="x86_64-linux-gnu-gcc" + - export PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig - *ccache - make --directory=src CCACHE=1 LINUX64=1 From 7ba7c5e6a0f101538dfa2513a41d6d07239fe45e Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Thu, 12 Oct 2023 16:17:10 +0000 Subject: [PATCH 069/142] Update .gitlab-ci.yml file Add build for ARM64 --- .gitlab-ci.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 76d62bab5..83320aac1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -77,6 +77,21 @@ build-i686-linux-gnu: - *ccache - make --directory=src CCACHE=1 LINUX=1 +build-aarch64-linux-gnu: + <<: *job_build + artifacts: + paths: + - "bin/lsdl2srb2*" + name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-aarch64" + script: + - *aptcache + - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc-aarch64-linux-gnu || true + - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes libsdl2-mixer-dev:arm64 libpng-dev:arm64 libcurl4-openssl-dev:arm64 libgme-dev:arm64 libopenmpt-dev:arm64 + - export CC="aarch64-linux-gnu-gcc" + - export PKG_CONFIG_PATH=/usr/lib/aarch64-linux-gnu/pkgconfig + - *ccache + - make --directory=src CCACHE=1 LINUX64=1 NONX86=1 + build-x86_64-linux-gnu: <<: *job_build artifacts: From f5cf1ce5a5ab7f6fe7256cb20ba985b4cc35e3d4 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Thu, 12 Oct 2023 16:53:32 +0000 Subject: [PATCH 070/142] Update .gitlab-ci.yml file Forget to add arm64 arch to the Debian system --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 83320aac1..00072725b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -50,6 +50,7 @@ stages: # List of stages for jobs, and their order of execution before_script: - dpkg --add-architecture i386 - dpkg --add-architecture amd64 + - dpkg --add-architecture arm64 - apt-get update - *aptcache - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes make git ccache gcc From 88ec9233b5973fe102f201bbfb4b9d517188e0ec Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Thu, 12 Oct 2023 17:36:37 +0000 Subject: [PATCH 071/142] Update .gitlab-ci.yml file Overwrite OBJCOPY and OBJDUMP settings for Linux targets --- .gitlab-ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 00072725b..5828037ac 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -76,7 +76,7 @@ build-i686-linux-gnu: - export CC="i686-linux-gnu-gcc" - export PKG_CONFIG_PATH=/usr/lib/i386-linux-gnu/pkgconfig - *ccache - - make --directory=src CCACHE=1 LINUX=1 + - make --directory=src CCACHE=1 LINUX=1 OBJCOPY=i686-linux-gnu-objcopy OBJDUMP=i686-linux-gnu-objdump build-aarch64-linux-gnu: <<: *job_build @@ -91,7 +91,7 @@ build-aarch64-linux-gnu: - export CC="aarch64-linux-gnu-gcc" - export PKG_CONFIG_PATH=/usr/lib/aarch64-linux-gnu/pkgconfig - *ccache - - make --directory=src CCACHE=1 LINUX64=1 NONX86=1 + - make --directory=src CCACHE=1 LINUX64=1 NONX86=1 OBJCOPY=aarch64-linux-gnu-objcopy OBJDUMP=aarch64-linux-gnu-objdump build-x86_64-linux-gnu: <<: *job_build @@ -106,7 +106,7 @@ build-x86_64-linux-gnu: - export CC="x86_64-linux-gnu-gcc" - export PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig - *ccache - - make --directory=src CCACHE=1 LINUX64=1 + - make --directory=src CCACHE=1 LINUX64=1 OBJCOPY=x86_64-linux-gnu-objcopy OBJDUMP=x86_64-linux-gnu-objdump build-i686-w64-mingw32: <<: *job_build From fa76733feeffb1184413e2dcd310449596e3fe23 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Thu, 12 Oct 2023 18:01:44 +0000 Subject: [PATCH 072/142] Update .gitlab-ci.yml file let see if the Makefile system will just read from env --- .gitlab-ci.yml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5828037ac..681c6e61f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -73,10 +73,12 @@ build-i686-linux-gnu: - *aptcache - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc-i686-linux-gnu || true - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes libsdl2-mixer-dev:i386 libpng-dev:i386 libcurl4-openssl-dev:i386 libgme-dev:i386 libopenmpt-dev:i386 - - export CC="i686-linux-gnu-gcc" + - export CC=i686-linux-gnu-gcc + - export OBJCOPY=i686-linux-gnu-objcopy + - export OBJDUMP=i686-linux-gnu-objdump - export PKG_CONFIG_PATH=/usr/lib/i386-linux-gnu/pkgconfig - *ccache - - make --directory=src CCACHE=1 LINUX=1 OBJCOPY=i686-linux-gnu-objcopy OBJDUMP=i686-linux-gnu-objdump + - make --directory=src CCACHE=1 LINUX=1 build-aarch64-linux-gnu: <<: *job_build @@ -88,10 +90,12 @@ build-aarch64-linux-gnu: - *aptcache - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc-aarch64-linux-gnu || true - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes libsdl2-mixer-dev:arm64 libpng-dev:arm64 libcurl4-openssl-dev:arm64 libgme-dev:arm64 libopenmpt-dev:arm64 - - export CC="aarch64-linux-gnu-gcc" + - export CC=aarch64-linux-gnu-gcc + - export OBJCOPY=aarch64-linux-gnu-objcopy + - export OBJDUMP=aarch64-linux-gnu-objdump - export PKG_CONFIG_PATH=/usr/lib/aarch64-linux-gnu/pkgconfig - *ccache - - make --directory=src CCACHE=1 LINUX64=1 NONX86=1 OBJCOPY=aarch64-linux-gnu-objcopy OBJDUMP=aarch64-linux-gnu-objdump + - make --directory=src CCACHE=1 LINUX64=1 NONX86=1 build-x86_64-linux-gnu: <<: *job_build @@ -103,10 +107,12 @@ build-x86_64-linux-gnu: - *aptcache - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc-x86-64-linux-gnu || true - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes libsdl2-mixer-dev:amd64 libpng-dev:amd64 libcurl4-openssl-dev:amd64 libgme-dev:amd64 libopenmpt-dev:amd64 - - export CC="x86_64-linux-gnu-gcc" + - export CC=x86_64-linux-gnu-gcc + - export OBJCOPY=x86_64-linux-gnu-objcopy + - export OBJDUMP=x86_64-linux-gnu-objdump - export PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig - *ccache - - make --directory=src CCACHE=1 LINUX64=1 OBJCOPY=x86_64-linux-gnu-objcopy OBJDUMP=x86_64-linux-gnu-objdump + - make --directory=src CCACHE=1 LINUX64=1 build-i686-w64-mingw32: <<: *job_build From fe65f2b27150afb550919e7429574967a2c36e66 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Thu, 12 Oct 2023 18:12:23 +0000 Subject: [PATCH 073/142] Update cpdebug.mk Allow Env to overwrite Makefile's default OBJCOPY and OBJDUMP, just like CC --- cpdebug.mk | 64 +++++++++++++++++++++++++++--------------------------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/cpdebug.mk b/cpdebug.mk index 6baedf227..e7b076303 100644 --- a/cpdebug.mk +++ b/cpdebug.mk @@ -1,32 +1,32 @@ -#Add-on Makefile for wxDev-C++ project file -ifdef ComSpec -COMSPEC=$(ComSpec) -endif -ifdef COMSPEC -OBJCOPY=objcopy.exe -OBJDUMP=objdump.exe -GZIP?=gzip.exe -else -OBJCOPY=objcopy -OBJDUMP=objdump -GZIP?=gzip -endif -DBGNAME=$(BIN).debug -OBJDUMP_OPTS?=--wide --source --line-numbers -GZIP_OPTS?=-9 -f -n -GZIP_OPT2=$(GZIP_OPTS) --rsyncable -UPX?=upx -UPX_OPTS?=--best --preserve-build-id -UPX_OPTS+=-q - -all-after: - $(OBJDUMP) $(OBJDUMP_OPTS) "$(BIN)" > "$(DBGNAME).txt" - $(OBJCOPY) $(BIN) $(DBGNAME) - $(OBJCOPY) --strip-debug $(BIN) - -$(OBJCOPY) --add-gnu-debuglink=$(DBGNAME) $(BIN) - -$(GZIP) $(GZIP_OPTS) "$(DBGNAME).txt" -ifndef COMSPEC - -$(GZIP) $(GZIP_OPT2) "$(DBGNAME).txt" -endif - -$(UPX) $(UPX_OPTS) $(BIN) - +#Add-on Makefile for wxDev-C++ project file +ifdef ComSpec +COMSPEC=$(ComSpec) +endif +ifdef COMSPEC +OBJCOPY?=objcopy.exe +OBJDUMP?=objdump.exe +GZIP?=gzip.exe +else +OBJCOPY?=objcopy +OBJDUMP?=objdump +GZIP?=gzip +endif +DBGNAME=$(BIN).debug +OBJDUMP_OPTS?=--wide --source --line-numbers +GZIP_OPTS?=-9 -f -n +GZIP_OPT2=$(GZIP_OPTS) --rsyncable +UPX?=upx +UPX_OPTS?=--best --preserve-build-id +UPX_OPTS+=-q + +all-after: + $(OBJDUMP) $(OBJDUMP_OPTS) "$(BIN)" > "$(DBGNAME).txt" + $(OBJCOPY) $(BIN) $(DBGNAME) + $(OBJCOPY) --strip-debug $(BIN) + -$(OBJCOPY) --add-gnu-debuglink=$(DBGNAME) $(BIN) + -$(GZIP) $(GZIP_OPTS) "$(DBGNAME).txt" +ifndef COMSPEC + -$(GZIP) $(GZIP_OPT2) "$(DBGNAME).txt" +endif + -$(UPX) $(UPX_OPTS) $(BIN) + From 5449ca2dbfb3ddaa3ee6336b7b461757bf93fdba Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Thu, 12 Oct 2023 18:25:02 +0000 Subject: [PATCH 074/142] Update .gitlab-ci.yml file force the Makefile system to use our cross-compile binutil package --- .gitlab-ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 681c6e61f..e2ec24996 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -78,7 +78,7 @@ build-i686-linux-gnu: - export OBJDUMP=i686-linux-gnu-objdump - export PKG_CONFIG_PATH=/usr/lib/i386-linux-gnu/pkgconfig - *ccache - - make --directory=src CCACHE=1 LINUX=1 + - make --directory=src CCACHE=1 OBJCOPY=$OBJCOPY OBJDUMP=$OBJDUMP LINUX=1 build-aarch64-linux-gnu: <<: *job_build @@ -95,7 +95,7 @@ build-aarch64-linux-gnu: - export OBJDUMP=aarch64-linux-gnu-objdump - export PKG_CONFIG_PATH=/usr/lib/aarch64-linux-gnu/pkgconfig - *ccache - - make --directory=src CCACHE=1 LINUX64=1 NONX86=1 + - make --directory=src CCACHE=1 OBJCOPY=$OBJCOPY OBJDUMP=$OBJDUMP LINUX64=1 NONX86=1 build-x86_64-linux-gnu: <<: *job_build @@ -112,7 +112,7 @@ build-x86_64-linux-gnu: - export OBJDUMP=x86_64-linux-gnu-objdump - export PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig - *ccache - - make --directory=src CCACHE=1 LINUX64=1 + - make --directory=src CCACHE=1 OBJCOPY=$OBJCOPY OBJDUMP=$OBJDUMP LINUX64=1 build-i686-w64-mingw32: <<: *job_build From 4e2324216d6d3c276322fe4c4ef722221265c10f Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Thu, 12 Oct 2023 19:40:35 -0400 Subject: [PATCH 075/142] Makefile Also allow overwrite of OBJCOPY, OBJDUMP and WINDRES --- .gitlab-ci.yml | 6 ++--- cpdebug.mk | 64 +++++++++++++++++++++++++------------------------- src/Makefile | 6 ++--- 3 files changed, 38 insertions(+), 38 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e2ec24996..681c6e61f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -78,7 +78,7 @@ build-i686-linux-gnu: - export OBJDUMP=i686-linux-gnu-objdump - export PKG_CONFIG_PATH=/usr/lib/i386-linux-gnu/pkgconfig - *ccache - - make --directory=src CCACHE=1 OBJCOPY=$OBJCOPY OBJDUMP=$OBJDUMP LINUX=1 + - make --directory=src CCACHE=1 LINUX=1 build-aarch64-linux-gnu: <<: *job_build @@ -95,7 +95,7 @@ build-aarch64-linux-gnu: - export OBJDUMP=aarch64-linux-gnu-objdump - export PKG_CONFIG_PATH=/usr/lib/aarch64-linux-gnu/pkgconfig - *ccache - - make --directory=src CCACHE=1 OBJCOPY=$OBJCOPY OBJDUMP=$OBJDUMP LINUX64=1 NONX86=1 + - make --directory=src CCACHE=1 LINUX64=1 NONX86=1 build-x86_64-linux-gnu: <<: *job_build @@ -112,7 +112,7 @@ build-x86_64-linux-gnu: - export OBJDUMP=x86_64-linux-gnu-objdump - export PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig - *ccache - - make --directory=src CCACHE=1 OBJCOPY=$OBJCOPY OBJDUMP=$OBJDUMP LINUX64=1 + - make --directory=src CCACHE=1 LINUX64=1 build-i686-w64-mingw32: <<: *job_build diff --git a/cpdebug.mk b/cpdebug.mk index e7b076303..75f08c66f 100644 --- a/cpdebug.mk +++ b/cpdebug.mk @@ -1,32 +1,32 @@ -#Add-on Makefile for wxDev-C++ project file -ifdef ComSpec -COMSPEC=$(ComSpec) -endif -ifdef COMSPEC -OBJCOPY?=objcopy.exe -OBJDUMP?=objdump.exe -GZIP?=gzip.exe -else -OBJCOPY?=objcopy -OBJDUMP?=objdump -GZIP?=gzip -endif -DBGNAME=$(BIN).debug -OBJDUMP_OPTS?=--wide --source --line-numbers -GZIP_OPTS?=-9 -f -n -GZIP_OPT2=$(GZIP_OPTS) --rsyncable -UPX?=upx -UPX_OPTS?=--best --preserve-build-id -UPX_OPTS+=-q - -all-after: - $(OBJDUMP) $(OBJDUMP_OPTS) "$(BIN)" > "$(DBGNAME).txt" - $(OBJCOPY) $(BIN) $(DBGNAME) - $(OBJCOPY) --strip-debug $(BIN) - -$(OBJCOPY) --add-gnu-debuglink=$(DBGNAME) $(BIN) - -$(GZIP) $(GZIP_OPTS) "$(DBGNAME).txt" -ifndef COMSPEC - -$(GZIP) $(GZIP_OPT2) "$(DBGNAME).txt" -endif - -$(UPX) $(UPX_OPTS) $(BIN) - +#Add-on Makefile for wxDev-C++ project file +ifdef ComSpec +COMSPEC=$(ComSpec) +endif +ifdef COMSPEC +OBJCOPY?=objcopy.exe +OBJDUMP?=objdump.exe +GZIP?=gzip.exe +else +OBJCOPY?=objcopy +OBJDUMP?=objdump +GZIP?=gzip +endif +DBGNAME=$(BIN).debug +OBJDUMP_OPTS?=--wide --source --line-numbers +GZIP_OPTS?=-9 -f -n +GZIP_OPT2=$(GZIP_OPTS) --rsyncable +UPX?=upx +UPX_OPTS?=--best --preserve-build-id +UPX_OPTS+=-q + +all-after: + $(OBJDUMP) $(OBJDUMP_OPTS) "$(BIN)" > "$(DBGNAME).txt" + $(OBJCOPY) $(BIN) $(DBGNAME) + $(OBJCOPY) --strip-debug $(BIN) + -$(OBJCOPY) --add-gnu-debuglink=$(DBGNAME) $(BIN) + -$(GZIP) $(GZIP_OPTS) "$(DBGNAME).txt" +ifndef COMSPEC + -$(GZIP) $(GZIP_OPT2) "$(DBGNAME).txt" +endif + -$(UPX) $(UPX_OPTS) $(BIN) + diff --git a/src/Makefile b/src/Makefile index 41cef2a17..539c2fa74 100644 --- a/src/Makefile +++ b/src/Makefile @@ -141,9 +141,9 @@ endif OBJDUMP_OPTS?=--wide --source --line-numbers -OBJCOPY:=$(call Prefix,objcopy) -OBJDUMP:=$(call Prefix,objdump) -WINDRES:=$(call Prefix,windres) +OBJCOPY?=$(call Prefix,objcopy) +OBJDUMP?=$(call Prefix,objdump) +WINDRES?=$(call Prefix,windres) GZIP?=gzip GZIP_OPTS?=-9 -f -n From 903792f1090f5c0f72bae544c1d63a93dc50c80d Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Thu, 12 Oct 2023 20:07:22 -0400 Subject: [PATCH 076/142] Update .gitlib-ci.yml Remove whitespace --- .gitlab-ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 681c6e61f..bad819d34 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -27,7 +27,6 @@ stages: # List of stages for jobs, and their order of execution .aptcache_Scripts: &aptcache - export APT_CACHE_DIR=`pwd`/apt-cache - mkdir --parents --verbose $APT_CACHE_DIR/partial/ - .job_template: &job_build # This job runs in the build stage, which runs first. stage: build From 008efa9b0edc00dca994d55c3b11c4454e4bd4dc Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Fri, 13 Oct 2023 02:08:53 +0000 Subject: [PATCH 077/142] Update .gitlab-ci.yml file We do not need to install GCC for w64-mingw32 jobs --- .gitlab-ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index bad819d34..aa63365a5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -52,7 +52,7 @@ stages: # List of stages for jobs, and their order of execution - dpkg --add-architecture arm64 - apt-get update - *aptcache - - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes make git ccache gcc + - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes make git ccache - *ccache - ccache --zero-stats || true - ccache --show-stats || true @@ -70,7 +70,7 @@ build-i686-linux-gnu: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-i686" script: - *aptcache - - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc-i686-linux-gnu || true + - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc-i686-linux-gnu || apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes libsdl2-mixer-dev:i386 libpng-dev:i386 libcurl4-openssl-dev:i386 libgme-dev:i386 libopenmpt-dev:i386 - export CC=i686-linux-gnu-gcc - export OBJCOPY=i686-linux-gnu-objcopy @@ -87,7 +87,7 @@ build-aarch64-linux-gnu: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-aarch64" script: - *aptcache - - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc-aarch64-linux-gnu || true + - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc-aarch64-linux-gnu || apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes libsdl2-mixer-dev:arm64 libpng-dev:arm64 libcurl4-openssl-dev:arm64 libgme-dev:arm64 libopenmpt-dev:arm64 - export CC=aarch64-linux-gnu-gcc - export OBJCOPY=aarch64-linux-gnu-objcopy @@ -104,7 +104,7 @@ build-x86_64-linux-gnu: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-x86-64" script: - *aptcache - - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc-x86-64-linux-gnu || true + - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc-x86-64-linux-gnu || apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes libsdl2-mixer-dev:amd64 libpng-dev:amd64 libcurl4-openssl-dev:amd64 libgme-dev:amd64 libopenmpt-dev:amd64 - export CC=x86_64-linux-gnu-gcc - export OBJCOPY=x86_64-linux-gnu-objcopy From 4f116673f3e03ab0e95b4e8ca15577a6902467ab Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Thu, 12 Oct 2023 22:26:43 -0400 Subject: [PATCH 078/142] Undo src/Makefile Let see, revert OBJCOPY,OBJDUMP and WINDRES statements --- src/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Makefile b/src/Makefile index 539c2fa74..41cef2a17 100644 --- a/src/Makefile +++ b/src/Makefile @@ -141,9 +141,9 @@ endif OBJDUMP_OPTS?=--wide --source --line-numbers -OBJCOPY?=$(call Prefix,objcopy) -OBJDUMP?=$(call Prefix,objdump) -WINDRES?=$(call Prefix,windres) +OBJCOPY:=$(call Prefix,objcopy) +OBJDUMP:=$(call Prefix,objdump) +WINDRES:=$(call Prefix,windres) GZIP?=gzip GZIP_OPTS?=-9 -f -n From dfe181058033d4f5a94ae2433ffd1cef33d69149 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Thu, 12 Oct 2023 22:30:26 -0400 Subject: [PATCH 079/142] Revert "Undo src/Makefile" This reverts commit 4f116673f3e03ab0e95b4e8ca15577a6902467ab. --- src/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Makefile b/src/Makefile index 41cef2a17..539c2fa74 100644 --- a/src/Makefile +++ b/src/Makefile @@ -141,9 +141,9 @@ endif OBJDUMP_OPTS?=--wide --source --line-numbers -OBJCOPY:=$(call Prefix,objcopy) -OBJDUMP:=$(call Prefix,objdump) -WINDRES:=$(call Prefix,windres) +OBJCOPY?=$(call Prefix,objcopy) +OBJDUMP?=$(call Prefix,objdump) +WINDRES?=$(call Prefix,windres) GZIP?=gzip GZIP_OPTS?=-9 -f -n From 5acceaa2389b35307ecf973dcc0019426da198d2 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Fri, 13 Oct 2023 02:46:00 +0000 Subject: [PATCH 080/142] Update .gitlab-ci.yml file Let see if we can pass an option for what architecture we are installing for --- .gitlab-ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index aa63365a5..d5a92e5e6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -71,7 +71,7 @@ build-i686-linux-gnu: script: - *aptcache - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc-i686-linux-gnu || apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc - - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes libsdl2-mixer-dev:i386 libpng-dev:i386 libcurl4-openssl-dev:i386 libgme-dev:i386 libopenmpt-dev:i386 + - apt-get --option dir::cache::archives="$APT_CACHE_DIR" --option APT::Architecture="i386" install --no-install-recommends --yes libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev libopenmpt-dev - export CC=i686-linux-gnu-gcc - export OBJCOPY=i686-linux-gnu-objcopy - export OBJDUMP=i686-linux-gnu-objdump @@ -88,7 +88,7 @@ build-aarch64-linux-gnu: script: - *aptcache - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc-aarch64-linux-gnu || apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc - - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes libsdl2-mixer-dev:arm64 libpng-dev:arm64 libcurl4-openssl-dev:arm64 libgme-dev:arm64 libopenmpt-dev:arm64 + - apt-get --option dir::cache::archives="$APT_CACHE_DIR" --option APT::Architecture="arm64" install --no-install-recommends --yes libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev libopenmpt-dev - export CC=aarch64-linux-gnu-gcc - export OBJCOPY=aarch64-linux-gnu-objcopy - export OBJDUMP=aarch64-linux-gnu-objdump @@ -105,7 +105,7 @@ build-x86_64-linux-gnu: script: - *aptcache - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc-x86-64-linux-gnu || apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc - - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes libsdl2-mixer-dev:amd64 libpng-dev:amd64 libcurl4-openssl-dev:amd64 libgme-dev:amd64 libopenmpt-dev:amd64 + - apt-get --option dir::cache::archives="$APT_CACHE_DIR" --option APT::Architecture="amd64" install --no-install-recommends --yes libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev libopenmpt-dev - export CC=x86_64-linux-gnu-gcc - export OBJCOPY=x86_64-linux-gnu-objcopy - export OBJDUMP=x86_64-linux-gnu-objdump From 8b33dd604b21b5c8e00082a50163df2e51ecb1b1 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Thu, 12 Oct 2023 22:48:34 -0400 Subject: [PATCH 081/142] Revert "Update .gitlab-ci.yml file" This reverts commit 5acceaa2389b35307ecf973dcc0019426da198d2. --- .gitlab-ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d5a92e5e6..aa63365a5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -71,7 +71,7 @@ build-i686-linux-gnu: script: - *aptcache - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc-i686-linux-gnu || apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc - - apt-get --option dir::cache::archives="$APT_CACHE_DIR" --option APT::Architecture="i386" install --no-install-recommends --yes libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev libopenmpt-dev + - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes libsdl2-mixer-dev:i386 libpng-dev:i386 libcurl4-openssl-dev:i386 libgme-dev:i386 libopenmpt-dev:i386 - export CC=i686-linux-gnu-gcc - export OBJCOPY=i686-linux-gnu-objcopy - export OBJDUMP=i686-linux-gnu-objdump @@ -88,7 +88,7 @@ build-aarch64-linux-gnu: script: - *aptcache - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc-aarch64-linux-gnu || apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc - - apt-get --option dir::cache::archives="$APT_CACHE_DIR" --option APT::Architecture="arm64" install --no-install-recommends --yes libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev libopenmpt-dev + - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes libsdl2-mixer-dev:arm64 libpng-dev:arm64 libcurl4-openssl-dev:arm64 libgme-dev:arm64 libopenmpt-dev:arm64 - export CC=aarch64-linux-gnu-gcc - export OBJCOPY=aarch64-linux-gnu-objcopy - export OBJDUMP=aarch64-linux-gnu-objdump @@ -105,7 +105,7 @@ build-x86_64-linux-gnu: script: - *aptcache - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc-x86-64-linux-gnu || apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc - - apt-get --option dir::cache::archives="$APT_CACHE_DIR" --option APT::Architecture="amd64" install --no-install-recommends --yes libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev libopenmpt-dev + - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes libsdl2-mixer-dev:amd64 libpng-dev:amd64 libcurl4-openssl-dev:amd64 libgme-dev:amd64 libopenmpt-dev:amd64 - export CC=x86_64-linux-gnu-gcc - export OBJCOPY=x86_64-linux-gnu-objcopy - export OBJDUMP=x86_64-linux-gnu-objdump From 0368a1ce8b95169d0663bb4ebdfc196273411fae Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Thu, 12 Oct 2023 22:49:44 -0400 Subject: [PATCH 082/142] cleanup whitespace in .gitlab-ci.yml --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index aa63365a5..f1ec1edab 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -71,7 +71,7 @@ build-i686-linux-gnu: script: - *aptcache - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc-i686-linux-gnu || apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc - - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes libsdl2-mixer-dev:i386 libpng-dev:i386 libcurl4-openssl-dev:i386 libgme-dev:i386 libopenmpt-dev:i386 + - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes libsdl2-mixer-dev:i386 libpng-dev:i386 libcurl4-openssl-dev:i386 libgme-dev:i386 libopenmpt-dev:i386 - export CC=i686-linux-gnu-gcc - export OBJCOPY=i686-linux-gnu-objcopy - export OBJDUMP=i686-linux-gnu-objdump From aa9d84b6d23d31f28474e86d05dad9b2f98a7c5d Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Fri, 13 Oct 2023 16:13:31 +0000 Subject: [PATCH 083/142] Update .gitlab-ci.yml file Let try building on Debian Testing --- .gitlab-ci.yml | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f1ec1edab..cacb68744 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -28,9 +28,11 @@ stages: # List of stages for jobs, and their order of execution - export APT_CACHE_DIR=`pwd`/apt-cache - mkdir --parents --verbose $APT_CACHE_DIR/partial/ -.job_template: &job_build # This job runs in the build stage, which runs first. - stage: build +default: image: debian:stable-slim + +.job_template: &job_build # This job runs in the build stage, which runs first. + stage: build variables: CCACHE_MAXSIZE: "50M" GIT_STRATEGY: clone @@ -136,3 +138,18 @@ build-x86_64-w64-mingw32: - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc-mingw-w64-x86-64-win32 - *ccache - make --directory=src CCACHE=1 MINGW64=1 PREFIX=x86_64-w64-mingw32 + +build-testing: + <<: *job_build + image: debian:testing-slim + allow_failure: true + artifacts: + paths: + - "bin/lsdl2srb2*" + name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-testing" + script: + - *aptcache + - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc + - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev libopenmpt-dev + - *ccache + - make --directory=src CCACHE=1 NONX86=1 \ No newline at end of file From f6d37d504b2eb73589dc99153b385454e3cd54a9 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Fri, 13 Oct 2023 16:37:06 +0000 Subject: [PATCH 084/142] Update .gitlab-ci.yml file quiet out the apt-get commands --- .gitlab-ci.yml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index cacb68744..927ad705e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -52,15 +52,15 @@ default: - dpkg --add-architecture i386 - dpkg --add-architecture amd64 - dpkg --add-architecture arm64 - - apt-get update + - apt-get --quiet update - *aptcache - - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes make git ccache + - apt-get --no-install-recommends --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install make git ccache - *ccache - ccache --zero-stats || true - ccache --show-stats || true after_script: - *aptcache - - apt-get --option dir::cache::archives="$APT_CACHE_DIR" autoclean + - apt-get --quiet --option dir::cache::archives="$APT_CACHE_DIR" autoclean - *ccache - ccache --show-stats @@ -72,8 +72,8 @@ build-i686-linux-gnu: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-i686" script: - *aptcache - - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc-i686-linux-gnu || apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc - - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes libsdl2-mixer-dev:i386 libpng-dev:i386 libcurl4-openssl-dev:i386 libgme-dev:i386 libopenmpt-dev:i386 + - apt-get --no-install-recommends --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc-i686-linux-gnu || apt-get --no-install-recommends --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc + - apt-get --no-install-recommends --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install libsdl2-mixer-dev:i386 libpng-dev:i386 libcurl4-openssl-dev:i386 libgme-dev:i386 libopenmpt-dev:i386 - export CC=i686-linux-gnu-gcc - export OBJCOPY=i686-linux-gnu-objcopy - export OBJDUMP=i686-linux-gnu-objdump @@ -89,8 +89,8 @@ build-aarch64-linux-gnu: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-aarch64" script: - *aptcache - - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc-aarch64-linux-gnu || apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc - - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes libsdl2-mixer-dev:arm64 libpng-dev:arm64 libcurl4-openssl-dev:arm64 libgme-dev:arm64 libopenmpt-dev:arm64 + - apt-get --no-install-recommends --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc-aarch64-linux-gnu || apt-get --no-install-recommends --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc + - apt-get --no-install-recommends --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install libsdl2-mixer-dev:arm64 libpng-dev:arm64 libcurl4-openssl-dev:arm64 libgme-dev:arm64 libopenmpt-dev:arm64 - export CC=aarch64-linux-gnu-gcc - export OBJCOPY=aarch64-linux-gnu-objcopy - export OBJDUMP=aarch64-linux-gnu-objdump @@ -106,8 +106,8 @@ build-x86_64-linux-gnu: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-x86-64" script: - *aptcache - - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc-x86-64-linux-gnu || apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc - - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes libsdl2-mixer-dev:amd64 libpng-dev:amd64 libcurl4-openssl-dev:amd64 libgme-dev:amd64 libopenmpt-dev:amd64 + - apt-get --no-install-recommends --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc-x86-64-linux-gnu || apt-get --no-install-recommends --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc + - apt-get --no-install-recommends --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install libsdl2-mixer-dev:amd64 libpng-dev:amd64 libcurl4-openssl-dev:amd64 libgme-dev:amd64 libopenmpt-dev:amd64 - export CC=x86_64-linux-gnu-gcc - export OBJCOPY=x86_64-linux-gnu-objcopy - export OBJDUMP=x86_64-linux-gnu-objdump @@ -123,7 +123,7 @@ build-i686-w64-mingw32: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win32" script: - *aptcache - - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc-mingw-w64-i686-win32 + - apt-get --no-install-recommends --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc-mingw-w64-i686-win32 - *ccache - make --directory=src CCACHE=1 MINGW=1 PREFIX=i686-w64-mingw32 @@ -135,7 +135,7 @@ build-x86_64-w64-mingw32: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win64" script: - *aptcache - - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc-mingw-w64-x86-64-win32 + - apt-get --no-install-recommends --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc-mingw-w64-x86-64-win32 - *ccache - make --directory=src CCACHE=1 MINGW64=1 PREFIX=x86_64-w64-mingw32 @@ -149,7 +149,7 @@ build-testing: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-testing" script: - *aptcache - - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc - - apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev libopenmpt-dev + - apt-get --no-install-recommends --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc + - apt-get --no-install-recommends --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev libopenmpt-dev - *ccache - make --directory=src CCACHE=1 NONX86=1 \ No newline at end of file From b8fb0280ab322a54ea7fa57873b0b383ed8660f1 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Fri, 13 Oct 2023 16:45:02 +0000 Subject: [PATCH 085/142] Update .gitlab-ci.yml file more quiet out the apt-get commands --- .gitlab-ci.yml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 927ad705e..1efb639fb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -52,15 +52,15 @@ default: - dpkg --add-architecture i386 - dpkg --add-architecture amd64 - dpkg --add-architecture arm64 - - apt-get --quiet update + - apt-get --quiet --quiet update - *aptcache - - apt-get --no-install-recommends --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install make git ccache + - apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install make git ccache - *ccache - ccache --zero-stats || true - ccache --show-stats || true after_script: - *aptcache - - apt-get --quiet --option dir::cache::archives="$APT_CACHE_DIR" autoclean + - apt-get --quiet --quiet --option dir::cache::archives="$APT_CACHE_DIR" autoclean - *ccache - ccache --show-stats @@ -72,8 +72,8 @@ build-i686-linux-gnu: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-i686" script: - *aptcache - - apt-get --no-install-recommends --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc-i686-linux-gnu || apt-get --no-install-recommends --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc - - apt-get --no-install-recommends --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install libsdl2-mixer-dev:i386 libpng-dev:i386 libcurl4-openssl-dev:i386 libgme-dev:i386 libopenmpt-dev:i386 + - apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc-i686-linux-gnu || apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc + - apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install libsdl2-mixer-dev:i386 libpng-dev:i386 libcurl4-openssl-dev:i386 libgme-dev:i386 libopenmpt-dev:i386 - export CC=i686-linux-gnu-gcc - export OBJCOPY=i686-linux-gnu-objcopy - export OBJDUMP=i686-linux-gnu-objdump @@ -89,8 +89,8 @@ build-aarch64-linux-gnu: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-aarch64" script: - *aptcache - - apt-get --no-install-recommends --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc-aarch64-linux-gnu || apt-get --no-install-recommends --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc - - apt-get --no-install-recommends --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install libsdl2-mixer-dev:arm64 libpng-dev:arm64 libcurl4-openssl-dev:arm64 libgme-dev:arm64 libopenmpt-dev:arm64 + - apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc-aarch64-linux-gnu || apt-get --no-install-recommend --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc + - apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install libsdl2-mixer-dev:arm64 libpng-dev:arm64 libcurl4-openssl-dev:arm64 libgme-dev:arm64 libopenmpt-dev:arm64 - export CC=aarch64-linux-gnu-gcc - export OBJCOPY=aarch64-linux-gnu-objcopy - export OBJDUMP=aarch64-linux-gnu-objdump @@ -106,8 +106,8 @@ build-x86_64-linux-gnu: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-x86-64" script: - *aptcache - - apt-get --no-install-recommends --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc-x86-64-linux-gnu || apt-get --no-install-recommends --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc - - apt-get --no-install-recommends --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install libsdl2-mixer-dev:amd64 libpng-dev:amd64 libcurl4-openssl-dev:amd64 libgme-dev:amd64 libopenmpt-dev:amd64 + - apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc-x86-64-linux-gnu || apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc + - apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install libsdl2-mixer-dev:amd64 libpng-dev:amd64 libcurl4-openssl-dev:amd64 libgme-dev:amd64 libopenmpt-dev:amd64 - export CC=x86_64-linux-gnu-gcc - export OBJCOPY=x86_64-linux-gnu-objcopy - export OBJDUMP=x86_64-linux-gnu-objdump @@ -123,7 +123,7 @@ build-i686-w64-mingw32: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win32" script: - *aptcache - - apt-get --no-install-recommends --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc-mingw-w64-i686-win32 + - apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc-mingw-w64-i686-win32 - *ccache - make --directory=src CCACHE=1 MINGW=1 PREFIX=i686-w64-mingw32 @@ -135,7 +135,7 @@ build-x86_64-w64-mingw32: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win64" script: - *aptcache - - apt-get --no-install-recommends --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc-mingw-w64-x86-64-win32 + - apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc-mingw-w64-x86-64-win32 - *ccache - make --directory=src CCACHE=1 MINGW64=1 PREFIX=x86_64-w64-mingw32 @@ -149,7 +149,7 @@ build-testing: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-testing" script: - *aptcache - - apt-get --no-install-recommends --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc - - apt-get --no-install-recommends --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev libopenmpt-dev + - apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc + - apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev libopenmpt-dev - *ccache - make --directory=src CCACHE=1 NONX86=1 \ No newline at end of file From a6038dd6f2a226cd439c3bfb750b4308caaeae92 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Fri, 13 Oct 2023 19:49:43 +0000 Subject: [PATCH 086/142] Update detect.mk Add support for GCC 13.2 --- src/Makefile.d/detect.mk | 215 ++++++++++++++++++++------------------- 1 file changed, 109 insertions(+), 106 deletions(-) diff --git a/src/Makefile.d/detect.mk b/src/Makefile.d/detect.mk index aca498721..4719d6593 100644 --- a/src/Makefile.d/detect.mk +++ b/src/Makefile.d/detect.mk @@ -1,106 +1,109 @@ -# -# Detect the host system and compiler version. -# - -# Previously featured:\ - PANDORA\ - HAIKU\ - DUMMY\ - DJGPPDOS\ - SOLARIS\ - MACOSX\ - -all_systems:=\ - LINUX64\ - MINGW64\ - MINGW\ - UNIX\ - LINUX\ - FREEBSD\ - -# check for user specified system -ifeq (,$(filter $(all_systems),$(.VARIABLES))) -ifeq ($(OS),Windows_NT) # all windows are Windows_NT... - -_m=Detected a Windows system,\ - compiling for 32-bit MinGW SDL...) -$(call Print,$(_m)) - -# go for a 32-bit sdl mingw exe by default -MINGW:=1 - -else # if you on the *nix - -system:=$(shell uname -s) - -ifeq ($(system),Linux) -new_system:=LINUX -else - -$(error \ - Could not automatically detect your system,\ - try specifying a system manually) - -endif - -ifeq ($(shell getconf LONG_BIT),64) -system+=64-bit -new_system:=$(new_system)64 -endif - -$(call Print,Detected $(system) ($(new_system))...) -$(new_system):=1 - -endif -endif - -# This must have high to low order. -gcc_versions:=\ - 102 101\ - 93 92 91\ - 84 83 82 81\ - 75 74 73 72 71\ - 64 63 62 61\ - 55 54 53 52 51\ - 49 48 47 46 45 44 43 42 41 40 - -latest_gcc_version:=10.2 - -# Automatically set version flag, but not if one was -# manually set. And don't bother if this is a clean only -# run. -ifeq (,$(call Wildvar,GCC% destructive)) - -# can't use $(CC) --version here since that uses argv[0] to display the name -# also gcc outputs the information to stderr, so I had to do 2>&1 -# this program really doesn't like identifying itself -version:=$(shell $(CC) -v 2>&1) - -# check if this is in fact GCC -ifneq (,$(findstring gcc version,$(version))) - -# in stark contrast to the name, gcc will give me a nicely formatted version number for free -version:=$(shell $(CC) -dumpfullversion) - -# Turn version into words of major, minor -v:=$(subst ., ,$(version)) -# concat. major minor -v:=$(word 1,$(v))$(word 2,$(v)) - -# If this version is not in the list, -# default to the latest supported -ifeq (,$(filter $(v),$(gcc_versions))) -define line = -Your compiler version, GCC $(version), \ -is not supported by the Makefile. -The Makefile will assume GCC $(latest_gcc_version). -endef -$(call Print,$(line)) -GCC$(subst .,,$(latest_gcc_version)):=1 -else -$(call Print,Detected GCC $(version) (GCC$(v))) -GCC$(v):=1 -endif - -endif -endif +# +# Detect the host system and compiler version. +# + +# Previously featured:\ + PANDORA\ + HAIKU\ + DUMMY\ + DJGPPDOS\ + SOLARIS\ + MACOSX\ + +all_systems:=\ + LINUX64\ + MINGW64\ + MINGW\ + UNIX\ + LINUX\ + FREEBSD\ + +# check for user specified system +ifeq (,$(filter $(all_systems),$(.VARIABLES))) +ifeq ($(OS),Windows_NT) # all windows are Windows_NT... + +_m=Detected a Windows system,\ + compiling for 32-bit MinGW SDL...) +$(call Print,$(_m)) + +# go for a 32-bit sdl mingw exe by default +MINGW:=1 + +else # if you on the *nix + +system:=$(shell uname -s) + +ifeq ($(system),Linux) +new_system:=LINUX +else + +$(error \ + Could not automatically detect your system,\ + try specifying a system manually) + +endif + +ifeq ($(shell getconf LONG_BIT),64) +system+=64-bit +new_system:=$(new_system)64 +endif + +$(call Print,Detected $(system) ($(new_system))...) +$(new_system):=1 + +endif +endif + +# This must have high to low order. +gcc_versions:=\ + 132 131\ + 123 122 121\ + 114 113 112 111\ + 105 104 103 102 101\ + 95 94 93 92 91\ + 85 84 83 82 81\ + 75 74 73 72 71\ + 64 63 62 61\ + 55 54 53 52 51\ + 49 48 47 46 45 44 43 42 41 40 + +latest_gcc_version:=13.2 + +# Automatically set version flag, but not if one was +# manually set. And don't bother if this is a clean only +# run. +ifeq (,$(call Wildvar,GCC% destructive)) + +# can't use $(CC) --version here since that uses argv[0] to display the name +# also gcc outputs the information to stderr, so I had to do 2>&1 +# this program really doesn't like identifying itself +version:=$(shell $(CC) -v 2>&1) + +# check if this is in fact GCC +ifneq (,$(findstring gcc version,$(version))) + +# in stark contrast to the name, gcc will give me a nicely formatted version number for free +version:=$(shell $(CC) -dumpfullversion) + +# Turn version into words of major, minor +v:=$(subst ., ,$(version)) +# concat. major minor +v:=$(word 1,$(v))$(word 2,$(v)) + +# If this version is not in the list, +# default to the latest supported +ifeq (,$(filter $(v),$(gcc_versions))) +define line = +Your compiler version, GCC $(version), \ +is not supported by the Makefile. +The Makefile will assume GCC $(latest_gcc_version). +endef +$(call Print,$(line)) +GCC$(subst .,,$(latest_gcc_version)):=1 +else +$(call Print,Detected GCC $(version) (GCC$(v))) +GCC$(v):=1 +endif + +endif +endif From fb299dd63e6f4cb0067538ee07807e13db118c8d Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Fri, 13 Oct 2023 20:09:00 +0000 Subject: [PATCH 087/142] Update .gitlab-ci.yml file Make the buildbot yell at us for warnings --- .gitlab-ci.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1efb639fb..ec1e7dc0a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -54,6 +54,7 @@ default: - dpkg --add-architecture arm64 - apt-get --quiet --quiet update - *aptcache + - apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install apt-utils - apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install make git ccache - *ccache - ccache --zero-stats || true @@ -79,7 +80,7 @@ build-i686-linux-gnu: - export OBJDUMP=i686-linux-gnu-objdump - export PKG_CONFIG_PATH=/usr/lib/i386-linux-gnu/pkgconfig - *ccache - - make --directory=src CCACHE=1 LINUX=1 + - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX=1 build-aarch64-linux-gnu: <<: *job_build @@ -96,7 +97,7 @@ build-aarch64-linux-gnu: - export OBJDUMP=aarch64-linux-gnu-objdump - export PKG_CONFIG_PATH=/usr/lib/aarch64-linux-gnu/pkgconfig - *ccache - - make --directory=src CCACHE=1 LINUX64=1 NONX86=1 + - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 NONX86=1 build-x86_64-linux-gnu: <<: *job_build @@ -113,7 +114,7 @@ build-x86_64-linux-gnu: - export OBJDUMP=x86_64-linux-gnu-objdump - export PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig - *ccache - - make --directory=src CCACHE=1 LINUX64=1 + - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 build-i686-w64-mingw32: <<: *job_build @@ -125,7 +126,7 @@ build-i686-w64-mingw32: - *aptcache - apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc-mingw-w64-i686-win32 - *ccache - - make --directory=src CCACHE=1 MINGW=1 PREFIX=i686-w64-mingw32 + - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW=1 PREFIX=i686-w64-mingw32 build-x86_64-w64-mingw32: <<: *job_build @@ -137,7 +138,7 @@ build-x86_64-w64-mingw32: - *aptcache - apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc-mingw-w64-x86-64-win32 - *ccache - - make --directory=src CCACHE=1 MINGW64=1 PREFIX=x86_64-w64-mingw32 + - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW64=1 PREFIX=x86_64-w64-mingw32 build-testing: <<: *job_build @@ -152,4 +153,4 @@ build-testing: - apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc - apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev libopenmpt-dev - *ccache - - make --directory=src CCACHE=1 NONX86=1 \ No newline at end of file + - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 \ No newline at end of file From af020810bf0a1a500222a01e674c2a6a7fbe656f Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Fri, 13 Oct 2023 17:02:33 -0400 Subject: [PATCH 088/142] fix compiling for GCC 11+ --- src/Makefile.d/detect.mk | 4 ++-- src/p_map.c | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Makefile.d/detect.mk b/src/Makefile.d/detect.mk index 4719d6593..ab6268757 100644 --- a/src/Makefile.d/detect.mk +++ b/src/Makefile.d/detect.mk @@ -57,8 +57,8 @@ endif # This must have high to low order. gcc_versions:=\ 132 131\ - 123 122 121\ - 114 113 112 111\ + 123 122 121\ + 114 113 112 111\ 105 104 103 102 101\ 95 94 93 92 91\ 85 84 83 82 81\ diff --git a/src/p_map.c b/src/p_map.c index 80135db74..a9d2cf45d 100644 --- a/src/p_map.c +++ b/src/p_map.c @@ -3732,6 +3732,8 @@ void P_SlideMove(mobj_t *mo) vertex_t v1, v2; // fake vertexes line_t junk; // fake linedef + memset(&junk, 1, sizeof(junk)); + if (tmhitthing && mo->z + mo->height > tmhitthing->z && mo->z < tmhitthing->z + tmhitthing->height) { // Don't mess with your momentum if it's a pushable object. Pushables do their own crazy things already. From 796adec979834ca55ba2d2fa547fe8b4105800ce Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Fri, 13 Oct 2023 21:40:41 +0000 Subject: [PATCH 089/142] Update .gitlab-ci.yml file Retry building so we point out why it failed to compile --- .gitlab-ci.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ec1e7dc0a..4d59ef1a6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -37,6 +37,7 @@ default: CCACHE_MAXSIZE: "50M" GIT_STRATEGY: clone GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_CONCURRENT_ID/$CI_PROJECT_PATH + ENV DEBIAN_FRONTEND: noninteractive cache: - key: ccache-$CI_PROJECT_PATH_SLUG-$CI_JOB_NAME_SLUG fallback_keys: @@ -80,7 +81,7 @@ build-i686-linux-gnu: - export OBJDUMP=i686-linux-gnu-objdump - export PKG_CONFIG_PATH=/usr/lib/i386-linux-gnu/pkgconfig - *ccache - - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX=1 + - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX=1 build-aarch64-linux-gnu: <<: *job_build @@ -97,7 +98,7 @@ build-aarch64-linux-gnu: - export OBJDUMP=aarch64-linux-gnu-objdump - export PKG_CONFIG_PATH=/usr/lib/aarch64-linux-gnu/pkgconfig - *ccache - - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 NONX86=1 + - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 NONX86=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 NONX86=1 build-x86_64-linux-gnu: <<: *job_build @@ -114,7 +115,7 @@ build-x86_64-linux-gnu: - export OBJDUMP=x86_64-linux-gnu-objdump - export PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig - *ccache - - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 + - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 build-i686-w64-mingw32: <<: *job_build @@ -126,7 +127,7 @@ build-i686-w64-mingw32: - *aptcache - apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc-mingw-w64-i686-win32 - *ccache - - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW=1 PREFIX=i686-w64-mingw32 + - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW=1 PREFIX=i686-w64-mingw32 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW=1 PREFIX=i686-w64-mingw32 build-x86_64-w64-mingw32: <<: *job_build @@ -138,7 +139,7 @@ build-x86_64-w64-mingw32: - *aptcache - apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc-mingw-w64-x86-64-win32 - *ccache - - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW64=1 PREFIX=x86_64-w64-mingw32 + - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW64=1 PREFIX=x86_64-w64-mingw32 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW64=1 PREFIX=x86_64-w64-mingw32 build-testing: <<: *job_build @@ -153,4 +154,4 @@ build-testing: - apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc - apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev libopenmpt-dev - *ccache - - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 \ No newline at end of file + - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 \ No newline at end of file From 96beee1d4d61c8b6cd1413db8a6e8c4b5f80acbf Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Fri, 13 Oct 2023 21:43:15 +0000 Subject: [PATCH 090/142] Update .gitlab-ci.yml file set DEBIAN_FRONTEND envvar in aptcache --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4d59ef1a6..347aeea94 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -27,6 +27,7 @@ stages: # List of stages for jobs, and their order of execution .aptcache_Scripts: &aptcache - export APT_CACHE_DIR=`pwd`/apt-cache - mkdir --parents --verbose $APT_CACHE_DIR/partial/ + - export DEBIAN_FRONTEND=noninteractive default: image: debian:stable-slim @@ -37,7 +38,6 @@ default: CCACHE_MAXSIZE: "50M" GIT_STRATEGY: clone GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_CONCURRENT_ID/$CI_PROJECT_PATH - ENV DEBIAN_FRONTEND: noninteractive cache: - key: ccache-$CI_PROJECT_PATH_SLUG-$CI_JOB_NAME_SLUG fallback_keys: From 1bf78686e27fb61449ea652a9bdc70f9c0cb8754 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Fri, 13 Oct 2023 19:33:31 -0400 Subject: [PATCH 091/142] let not pass a point of a temp stack var around --- src/p_map.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/p_map.c b/src/p_map.c index a9d2cf45d..2911e4d40 100644 --- a/src/p_map.c +++ b/src/p_map.c @@ -3730,7 +3730,7 @@ void P_SlideMove(mobj_t *mo) boolean papercol = false; vertex_t v1, v2; // fake vertexes - line_t junk; // fake linedef + static line_t junk; // fake linedef memset(&junk, 1, sizeof(junk)); From fc586b5c62bf34212b51dc245427f33c204e4607 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Fri, 13 Oct 2023 23:46:44 +0000 Subject: [PATCH 092/142] Update .gitlab-ci.yml file Build in the following order: testing, win32, amd64, i386, arm64 then win64 --- .gitlab-ci.yml | 90 +++++++++++++++++++++++++------------------------- 1 file changed, 45 insertions(+), 45 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 347aeea94..9f3229d5c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -66,6 +66,50 @@ default: - *ccache - ccache --show-stats +build-testing: + <<: *job_build + image: debian:testing-slim + allow_failure: true + artifacts: + paths: + - "bin/lsdl2srb2*" + name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-testing" + script: + - *aptcache + - apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc + - apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev libopenmpt-dev + - *ccache + - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 + +build-i686-w64-mingw32: + <<: *job_build + artifacts: + paths: + - "bin/srb2win.exe*" + name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win32" + script: + - *aptcache + - apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc-mingw-w64-i686-win32 + - *ccache + - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW=1 PREFIX=i686-w64-mingw32 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW=1 PREFIX=i686-w64-mingw32 + +build-x86_64-linux-gnu: + <<: *job_build + artifacts: + paths: + - "bin/lsdl2srb2*" + name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-x86-64" + script: + - *aptcache + - apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc-x86-64-linux-gnu || apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc + - apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install libsdl2-mixer-dev:amd64 libpng-dev:amd64 libcurl4-openssl-dev:amd64 libgme-dev:amd64 libopenmpt-dev:amd64 + - export CC=x86_64-linux-gnu-gcc + - export OBJCOPY=x86_64-linux-gnu-objcopy + - export OBJDUMP=x86_64-linux-gnu-objdump + - export PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig + - *ccache + - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 + build-i686-linux-gnu: <<: *job_build artifacts: @@ -100,35 +144,6 @@ build-aarch64-linux-gnu: - *ccache - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 NONX86=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 NONX86=1 -build-x86_64-linux-gnu: - <<: *job_build - artifacts: - paths: - - "bin/lsdl2srb2*" - name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-x86-64" - script: - - *aptcache - - apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc-x86-64-linux-gnu || apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc - - apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install libsdl2-mixer-dev:amd64 libpng-dev:amd64 libcurl4-openssl-dev:amd64 libgme-dev:amd64 libopenmpt-dev:amd64 - - export CC=x86_64-linux-gnu-gcc - - export OBJCOPY=x86_64-linux-gnu-objcopy - - export OBJDUMP=x86_64-linux-gnu-objdump - - export PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig - - *ccache - - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 - -build-i686-w64-mingw32: - <<: *job_build - artifacts: - paths: - - "bin/srb2win.exe*" - name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win32" - script: - - *aptcache - - apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc-mingw-w64-i686-win32 - - *ccache - - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW=1 PREFIX=i686-w64-mingw32 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW=1 PREFIX=i686-w64-mingw32 - build-x86_64-w64-mingw32: <<: *job_build artifacts: @@ -139,19 +154,4 @@ build-x86_64-w64-mingw32: - *aptcache - apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc-mingw-w64-x86-64-win32 - *ccache - - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW64=1 PREFIX=x86_64-w64-mingw32 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW64=1 PREFIX=x86_64-w64-mingw32 - -build-testing: - <<: *job_build - image: debian:testing-slim - allow_failure: true - artifacts: - paths: - - "bin/lsdl2srb2*" - name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-testing" - script: - - *aptcache - - apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc - - apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev libopenmpt-dev - - *ccache - - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 \ No newline at end of file + - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW64=1 PREFIX=x86_64-w64-mingw32 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW64=1 PREFIX=x86_64-w64-mingw32 \ No newline at end of file From 8f00667abec65a57f3b2a5581b9bbf42536d2846 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Fri, 13 Oct 2023 20:10:34 -0400 Subject: [PATCH 093/142] Update src/Makefile.d/*.mk both Makefile and *.mk should be in the same EOL --- .gitattributes | 4 +- .gitlab-ci.yml | 4 +- src/Makefile.d/detect.mk | 218 ++++++++++++++++++------------------- src/Makefile.d/features.mk | 136 +++++++++++------------ 4 files changed, 182 insertions(+), 180 deletions(-) diff --git a/.gitattributes b/.gitattributes index 7751149ac..c2e507352 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,15 +1,17 @@ #Source code +/Makefile text=auto /src/*.c text=auto /src/*.h text=auto /src/*.s text=auto /src/*.m text=auto /src/*.xpm text=auto /src/Makefile text=auto +/tools/Makefile text=auto /src/Make*.cfg text=auto /src/CMakeLists.txt text=auto +*.mk -whitespace text=auto # Windows EOL *.cs -crlf -whitespace -*.mk -crlf -whitespace *.bat -crlf -whitespace *.dev -crlf -whitespace *.dsp -crlf -whitespace diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9f3229d5c..7ea13db6a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -33,7 +33,7 @@ default: image: debian:stable-slim .job_template: &job_build # This job runs in the build stage, which runs first. - stage: build + stage: build variables: CCACHE_MAXSIZE: "50M" GIT_STRATEGY: clone @@ -154,4 +154,4 @@ build-x86_64-w64-mingw32: - *aptcache - apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc-mingw-w64-x86-64-win32 - *ccache - - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW64=1 PREFIX=x86_64-w64-mingw32 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW64=1 PREFIX=x86_64-w64-mingw32 \ No newline at end of file + - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW64=1 PREFIX=x86_64-w64-mingw32 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW64=1 PREFIX=x86_64-w64-mingw32 diff --git a/src/Makefile.d/detect.mk b/src/Makefile.d/detect.mk index ab6268757..0cd618c69 100644 --- a/src/Makefile.d/detect.mk +++ b/src/Makefile.d/detect.mk @@ -1,109 +1,109 @@ -# -# Detect the host system and compiler version. -# - -# Previously featured:\ - PANDORA\ - HAIKU\ - DUMMY\ - DJGPPDOS\ - SOLARIS\ - MACOSX\ - -all_systems:=\ - LINUX64\ - MINGW64\ - MINGW\ - UNIX\ - LINUX\ - FREEBSD\ - -# check for user specified system -ifeq (,$(filter $(all_systems),$(.VARIABLES))) -ifeq ($(OS),Windows_NT) # all windows are Windows_NT... - -_m=Detected a Windows system,\ - compiling for 32-bit MinGW SDL...) -$(call Print,$(_m)) - -# go for a 32-bit sdl mingw exe by default -MINGW:=1 - -else # if you on the *nix - -system:=$(shell uname -s) - -ifeq ($(system),Linux) -new_system:=LINUX -else - -$(error \ - Could not automatically detect your system,\ - try specifying a system manually) - -endif - -ifeq ($(shell getconf LONG_BIT),64) -system+=64-bit -new_system:=$(new_system)64 -endif - -$(call Print,Detected $(system) ($(new_system))...) -$(new_system):=1 - -endif -endif - -# This must have high to low order. -gcc_versions:=\ - 132 131\ - 123 122 121\ - 114 113 112 111\ - 105 104 103 102 101\ - 95 94 93 92 91\ - 85 84 83 82 81\ - 75 74 73 72 71\ - 64 63 62 61\ - 55 54 53 52 51\ - 49 48 47 46 45 44 43 42 41 40 - -latest_gcc_version:=13.2 - -# Automatically set version flag, but not if one was -# manually set. And don't bother if this is a clean only -# run. -ifeq (,$(call Wildvar,GCC% destructive)) - -# can't use $(CC) --version here since that uses argv[0] to display the name -# also gcc outputs the information to stderr, so I had to do 2>&1 -# this program really doesn't like identifying itself -version:=$(shell $(CC) -v 2>&1) - -# check if this is in fact GCC -ifneq (,$(findstring gcc version,$(version))) - -# in stark contrast to the name, gcc will give me a nicely formatted version number for free -version:=$(shell $(CC) -dumpfullversion) - -# Turn version into words of major, minor -v:=$(subst ., ,$(version)) -# concat. major minor -v:=$(word 1,$(v))$(word 2,$(v)) - -# If this version is not in the list, -# default to the latest supported -ifeq (,$(filter $(v),$(gcc_versions))) -define line = -Your compiler version, GCC $(version), \ -is not supported by the Makefile. -The Makefile will assume GCC $(latest_gcc_version). -endef -$(call Print,$(line)) -GCC$(subst .,,$(latest_gcc_version)):=1 -else -$(call Print,Detected GCC $(version) (GCC$(v))) -GCC$(v):=1 -endif - -endif -endif +# +# Detect the host system and compiler version. +# + +# Previously featured:\ + PANDORA\ + HAIKU\ + DUMMY\ + DJGPPDOS\ + SOLARIS\ + MACOSX\ + +all_systems:=\ + LINUX64\ + MINGW64\ + MINGW\ + UNIX\ + LINUX\ + FREEBSD\ + +# check for user specified system +ifeq (,$(filter $(all_systems),$(.VARIABLES))) +ifeq ($(OS),Windows_NT) # all windows are Windows_NT... + +_m=Detected a Windows system,\ + compiling for 32-bit MinGW SDL...) +$(call Print,$(_m)) + +# go for a 32-bit sdl mingw exe by default +MINGW:=1 + +else # if you on the *nix + +system:=$(shell uname -s) + +ifeq ($(system),Linux) +new_system:=LINUX +else + +$(error \ + Could not automatically detect your system,\ + try specifying a system manually) + +endif + +ifeq ($(shell getconf LONG_BIT),64) +system+=64-bit +new_system:=$(new_system)64 +endif + +$(call Print,Detected $(system) ($(new_system))...) +$(new_system):=1 + +endif +endif + +# This must have high to low order. +gcc_versions:=\ + 132 131\ + 123 122 121\ + 114 113 112 111\ + 105 104 103 102 101\ + 95 94 93 92 91\ + 85 84 83 82 81\ + 75 74 73 72 71\ + 64 63 62 61\ + 55 54 53 52 51\ + 49 48 47 46 45 44 43 42 41 40 + +latest_gcc_version:=13.2 + +# Automatically set version flag, but not if one was +# manually set. And don't bother if this is a clean only +# run. +ifeq (,$(call Wildvar,GCC% destructive)) + +# can't use $(CC) --version here since that uses argv[0] to display the name +# also gcc outputs the information to stderr, so I had to do 2>&1 +# this program really doesn't like identifying itself +version:=$(shell $(CC) -v 2>&1) + +# check if this is in fact GCC +ifneq (,$(findstring gcc version,$(version))) + +# in stark contrast to the name, gcc will give me a nicely formatted version number for free +version:=$(shell $(CC) -dumpfullversion) + +# Turn version into words of major, minor +v:=$(subst ., ,$(version)) +# concat. major minor +v:=$(word 1,$(v))$(word 2,$(v)) + +# If this version is not in the list, +# default to the latest supported +ifeq (,$(filter $(v),$(gcc_versions))) +define line = +Your compiler version, GCC $(version), \ +is not supported by the Makefile. +The Makefile will assume GCC $(latest_gcc_version). +endef +$(call Print,$(line)) +GCC$(subst .,,$(latest_gcc_version)):=1 +else +$(call Print,Detected GCC $(version) (GCC$(v))) +GCC$(v):=1 +endif + +endif +endif diff --git a/src/Makefile.d/features.mk b/src/Makefile.d/features.mk index 1787f94cb..653100cb5 100644 --- a/src/Makefile.d/features.mk +++ b/src/Makefile.d/features.mk @@ -1,68 +1,68 @@ -# -# Makefile for feature flags. -# - -passthru_opts+=\ - NONET NO_IPV6 NOHW NOMD5 NOPOSTPROCESSING\ - MOBJCONSISTANCY PACKETDROP ZDEBUG\ - HAVE_MINIUPNPC\ - -# build with debugging information -ifdef DEBUGMODE -PACKETDROP=1 -opts+=-DPARANOIA -DRANGECHECK -endif - -ifndef NOHW -opts+=-DHWRENDER -sources+=$(call List,hardware/Sourcefile) -endif - -ifndef NOMD5 -sources+=md5.c -endif - -ifndef NOZLIB -ifndef NOPNG -ifdef PNG_PKGCONFIG -$(eval $(call Use_pkg_config,PNG_PKGCONFIG)) -else -PNG_CONFIG?=$(call Prefix,libpng-config) -$(eval $(call Configure,PNG,$(PNG_CONFIG) \ - $(if $(PNG_STATIC),--static),,--ldflags)) -endif -ifdef LINUX -opts+=-D_LARGEFILE64_SOURCE -endif -opts+=-DHAVE_PNG -sources+=apng.c -endif -endif - -ifndef NONET -ifndef NOCURL -CURLCONFIG?=curl-config -$(eval $(call Configure,CURL,$(CURLCONFIG))) -opts+=-DHAVE_CURL -endif -endif - -ifdef HAVE_MINIUPNPC -libs+=-lminiupnpc -endif - -# (Valgrind is a memory debugger.) -ifdef VALGRIND -VALGRIND_PKGCONFIG?=valgrind -$(eval $(call Use_pkg_config,VALGRIND)) -ZDEBUG=1 -opts+=-DHAVE_VALGRIND -endif - -default_packages:=\ - GME/libgme/LIBGME\ - OPENMPT/libopenmpt/LIBOPENMPT\ - ZLIB/zlib\ - -$(foreach p,$(default_packages),\ - $(eval $(call Check_pkg_config,$(p)))) +# +# Makefile for feature flags. +# + +passthru_opts+=\ + NONET NO_IPV6 NOHW NOMD5 NOPOSTPROCESSING\ + MOBJCONSISTANCY PACKETDROP ZDEBUG\ + HAVE_MINIUPNPC\ + +# build with debugging information +ifdef DEBUGMODE +PACKETDROP=1 +opts+=-DPARANOIA -DRANGECHECK +endif + +ifndef NOHW +opts+=-DHWRENDER +sources+=$(call List,hardware/Sourcefile) +endif + +ifndef NOMD5 +sources+=md5.c +endif + +ifndef NOZLIB +ifndef NOPNG +ifdef PNG_PKGCONFIG +$(eval $(call Use_pkg_config,PNG_PKGCONFIG)) +else +PNG_CONFIG?=$(call Prefix,libpng-config) +$(eval $(call Configure,PNG,$(PNG_CONFIG) \ + $(if $(PNG_STATIC),--static),,--ldflags)) +endif +ifdef LINUX +opts+=-D_LARGEFILE64_SOURCE +endif +opts+=-DHAVE_PNG +sources+=apng.c +endif +endif + +ifndef NONET +ifndef NOCURL +CURLCONFIG?=curl-config +$(eval $(call Configure,CURL,$(CURLCONFIG))) +opts+=-DHAVE_CURL +endif +endif + +ifdef HAVE_MINIUPNPC +libs+=-lminiupnpc +endif + +# (Valgrind is a memory debugger.) +ifdef VALGRIND +VALGRIND_PKGCONFIG?=valgrind +$(eval $(call Use_pkg_config,VALGRIND)) +ZDEBUG=1 +opts+=-DHAVE_VALGRIND +endif + +default_packages:=\ + GME/libgme/LIBGME\ + OPENMPT/libopenmpt/LIBOPENMPT\ + ZLIB/zlib\ + +$(foreach p,$(default_packages),\ + $(eval $(call Check_pkg_config,$(p)))) From d3d3ee54519660a74de6161cb0c90140b9ec1642 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sat, 14 Oct 2023 01:37:05 +0000 Subject: [PATCH 094/142] Update .gitlab-ci.yml file Try to keep a stats log of ccache --- .gitlab-ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7ea13db6a..b0f82607c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -23,6 +23,7 @@ stages: # List of stages for jobs, and their order of execution - export CCACHE_BASEDIR="$PWD" - export CCACHE_DIR="$PWD/ccache" - export CCACHE_COMPILERCHECK=content + - export CCACHE_STATSLOG=CCACHE_DIR="$PWD/ccache_statslog" .aptcache_Scripts: &aptcache - export APT_CACHE_DIR=`pwd`/apt-cache @@ -35,7 +36,7 @@ default: .job_template: &job_build # This job runs in the build stage, which runs first. stage: build variables: - CCACHE_MAXSIZE: "50M" + CCACHE_MAXSIZE: 50M GIT_STRATEGY: clone GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_CONCURRENT_ID/$CI_PROJECT_PATH cache: @@ -65,6 +66,7 @@ default: - apt-get --quiet --quiet --option dir::cache::archives="$APT_CACHE_DIR" autoclean - *ccache - ccache --show-stats + - ccache --show-log-stats || true build-testing: <<: *job_build From 2fe5755f531f13c9689aac1ba727aa842bdfba1f Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sat, 14 Oct 2023 01:44:23 +0000 Subject: [PATCH 095/142] Update .gitlab-ci.yml file Fix CCACHE_STATSLOG? --- .gitlab-ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b0f82607c..ccf190781 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -23,7 +23,8 @@ stages: # List of stages for jobs, and their order of execution - export CCACHE_BASEDIR="$PWD" - export CCACHE_DIR="$PWD/ccache" - export CCACHE_COMPILERCHECK=content - - export CCACHE_STATSLOG=CCACHE_DIR="$PWD/ccache_statslog" + - export CCACHE_STATS=true + - export CCACHE_STATSLOG="$PWD/ccache_statslog" .aptcache_Scripts: &aptcache - export APT_CACHE_DIR=`pwd`/apt-cache From 98fd34e76c843f248de13a898b1912cdce20a95b Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sat, 14 Oct 2023 02:11:52 +0000 Subject: [PATCH 096/142] Update .gitlab-ci.yml file save ccache_statslog between runs? --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ccf190781..82c851601 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -47,6 +47,7 @@ default: - cache-$CI_PROJECT_PATH_SLUG-default paths: - ccache + - ccache_statslog - key: apt-$CI_JOB_IMAGE paths: - apt-cache From 8533955da808295bfa0825ec8d932e0225f2f944 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Fri, 13 Oct 2023 22:50:19 -0400 Subject: [PATCH 097/142] Update src/p_map.c it seems line_t have pointers, clear all of it --- src/p_map.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/p_map.c b/src/p_map.c index 2911e4d40..251837876 100644 --- a/src/p_map.c +++ b/src/p_map.c @@ -3732,7 +3732,7 @@ void P_SlideMove(mobj_t *mo) vertex_t v1, v2; // fake vertexes static line_t junk; // fake linedef - memset(&junk, 1, sizeof(junk)); + memset(&junk, 0x00, sizeof(junk)); if (tmhitthing && mo->z + mo->height > tmhitthing->z && mo->z < tmhitthing->z + tmhitthing->height) { From b469064e40290850c8e660e30f8f33697cfc6d85 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sat, 14 Oct 2023 03:11:56 +0000 Subject: [PATCH 098/142] Update .gitlab-ci.yml file remove double space --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 82c851601..4eb4b48f4 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -139,7 +139,7 @@ build-aarch64-linux-gnu: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-aarch64" script: - *aptcache - - apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc-aarch64-linux-gnu || apt-get --no-install-recommend --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc + - apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc-aarch64-linux-gnu || apt-get --no-install-recommend --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc - apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install libsdl2-mixer-dev:arm64 libpng-dev:arm64 libcurl4-openssl-dev:arm64 libgme-dev:arm64 libopenmpt-dev:arm64 - export CC=aarch64-linux-gnu-gcc - export OBJCOPY=aarch64-linux-gnu-objcopy From d659ce563ccbd239abbf38a1598538f3b184c4cc Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sat, 14 Oct 2023 11:40:25 +0000 Subject: [PATCH 099/142] Update .gitlab-ci.yml file Set common apt settings to /etc/apt/apt.conf.d/99build --- .gitlab-ci.yml | 55 +++++++++++++++++++------------------------------- 1 file changed, 21 insertions(+), 34 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4eb4b48f4..754da90a1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,21 +1,3 @@ -# This file is a template, and might need editing before it works on your project. -# This is a sample GitLab CI/CD configuration file that should run without any modifications. -# It demonstrates a basic 3 stage CI/CD pipeline. Instead of real tests or scripts, -# it uses echo commands to simulate the pipeline execution. -# -# A pipeline is composed of independent jobs that run scripts, grouped into stages. -# Stages run in sequential order, but jobs within stages run in parallel. -# -# For more information, see: https://docs.gitlab.com/ee/ci/yaml/index.html#stages -# -# You can copy and paste this template into a new `.gitlab-ci.yml` file. -# You should not add this template to an existing `.gitlab-ci.yml` file by using the `include:` keyword. -# -# To contribute improvements to CI/CD templates, please follow the Development guide at: -# https://docs.gitlab.com/ee/development/cicd/templates.html -# This specific template is located at: -# https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Getting-Started.gitlab-ci.yml - stages: # List of stages for jobs, and their order of execution - build @@ -23,12 +5,10 @@ stages: # List of stages for jobs, and their order of execution - export CCACHE_BASEDIR="$PWD" - export CCACHE_DIR="$PWD/ccache" - export CCACHE_COMPILERCHECK=content - - export CCACHE_STATS=true - export CCACHE_STATSLOG="$PWD/ccache_statslog" .aptcache_Scripts: &aptcache - export APT_CACHE_DIR=`pwd`/apt-cache - - mkdir --parents --verbose $APT_CACHE_DIR/partial/ - export DEBIAN_FRONTEND=noninteractive default: @@ -56,16 +36,23 @@ default: - dpkg --add-architecture i386 - dpkg --add-architecture amd64 - dpkg --add-architecture arm64 - - apt-get --quiet --quiet update - *aptcache - - apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install apt-utils - - apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install make git ccache + - touch /etc/apt/apt.conf.d/99build + - echo Adding options to apt.conf':' + - echo APT::Install-Recommends "false"\; | tee --append /etc/apt/apt.conf.d/99build + - echo quiet "2"\; | tee --append /etc/apt/apt.conf.d/99build + - echo APT::Get::Assume-Yes "true"\; | tee --append /etc/apt/apt.conf.d/99build + - echo Dir::Cache::Archives "$APT_CACHE_DIR"\; | tee --append /etc/apt/apt.conf.d/99build + - apt-get update + - mkdir --parents --verbose $APT_CACHE_DIR/partial/ + - apt-get install apt-utils + - apt-get install make git ccache - *ccache - ccache --zero-stats || true - ccache --show-stats || true after_script: - *aptcache - - apt-get --quiet --quiet --option dir::cache::archives="$APT_CACHE_DIR" autoclean + - apt-get autoclean - *ccache - ccache --show-stats - ccache --show-log-stats || true @@ -80,8 +67,8 @@ build-testing: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-testing" script: - *aptcache - - apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc - - apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev libopenmpt-dev + - apt-get install gcc + - apt-get install libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev libopenmpt-dev - *ccache - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 @@ -93,7 +80,7 @@ build-i686-w64-mingw32: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win32" script: - *aptcache - - apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc-mingw-w64-i686-win32 + - apt-get install gcc-mingw-w64-i686-win32 - *ccache - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW=1 PREFIX=i686-w64-mingw32 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW=1 PREFIX=i686-w64-mingw32 @@ -105,8 +92,8 @@ build-x86_64-linux-gnu: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-x86-64" script: - *aptcache - - apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc-x86-64-linux-gnu || apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc - - apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install libsdl2-mixer-dev:amd64 libpng-dev:amd64 libcurl4-openssl-dev:amd64 libgme-dev:amd64 libopenmpt-dev:amd64 + - apt-get install gcc-x86-64-linux-gnu || apt-get gcc + - apt-get libsdl2-mixer-dev:amd64 libpng-dev:amd64 libcurl4-openssl-dev:amd64 libgme-dev:amd64 libopenmpt-dev:amd64 - export CC=x86_64-linux-gnu-gcc - export OBJCOPY=x86_64-linux-gnu-objcopy - export OBJDUMP=x86_64-linux-gnu-objdump @@ -122,8 +109,8 @@ build-i686-linux-gnu: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-i686" script: - *aptcache - - apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc-i686-linux-gnu || apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc - - apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install libsdl2-mixer-dev:i386 libpng-dev:i386 libcurl4-openssl-dev:i386 libgme-dev:i386 libopenmpt-dev:i386 + - apt-get gcc-i686-linux-gnu || apt-get install gcc + - apt-get install libsdl2-mixer-dev:i386 libpng-dev:i386 libcurl4-openssl-dev:i386 libgme-dev:i386 libopenmpt-dev:i386 - export CC=i686-linux-gnu-gcc - export OBJCOPY=i686-linux-gnu-objcopy - export OBJDUMP=i686-linux-gnu-objdump @@ -139,8 +126,8 @@ build-aarch64-linux-gnu: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-aarch64" script: - *aptcache - - apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc-aarch64-linux-gnu || apt-get --no-install-recommend --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc - - apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install libsdl2-mixer-dev:arm64 libpng-dev:arm64 libcurl4-openssl-dev:arm64 libgme-dev:arm64 libopenmpt-dev:arm64 + - apt-get install gcc-aarch64-linux-gnu || apt-get install gcc + - apt-get install libsdl2-mixer-dev:arm64 libpng-dev:arm64 libcurl4-openssl-dev:arm64 libgme-dev:arm64 libopenmpt-dev:arm64 - export CC=aarch64-linux-gnu-gcc - export OBJCOPY=aarch64-linux-gnu-objcopy - export OBJDUMP=aarch64-linux-gnu-objdump @@ -156,6 +143,6 @@ build-x86_64-w64-mingw32: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win64" script: - *aptcache - - apt-get --no-install-recommends --quiet --quiet --yes --option dir::cache::archives="$APT_CACHE_DIR" install gcc-mingw-w64-x86-64-win32 + - apt-get install gcc-mingw-w64-x86-64-win32 - *ccache - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW64=1 PREFIX=x86_64-w64-mingw32 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW64=1 PREFIX=x86_64-w64-mingw32 From 52e4ed33af2bbdc8328c41d2885b7bd382fdb88b Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sat, 14 Oct 2023 11:54:16 +0000 Subject: [PATCH 100/142] Update .gitlab-ci.yml file Fix install command for GCC in build jobs --- .gitlab-ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 754da90a1..e10ad1bd5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -92,8 +92,8 @@ build-x86_64-linux-gnu: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-x86-64" script: - *aptcache - - apt-get install gcc-x86-64-linux-gnu || apt-get gcc - - apt-get libsdl2-mixer-dev:amd64 libpng-dev:amd64 libcurl4-openssl-dev:amd64 libgme-dev:amd64 libopenmpt-dev:amd64 + - apt-get install gcc-x86-64-linux-gnu || apt-get install gcc + - apt-get install libsdl2-mixer-dev:amd64 libpng-dev:amd64 libcurl4-openssl-dev:amd64 libgme-dev:amd64 libopenmpt-dev:amd64 - export CC=x86_64-linux-gnu-gcc - export OBJCOPY=x86_64-linux-gnu-objcopy - export OBJDUMP=x86_64-linux-gnu-objdump @@ -109,7 +109,7 @@ build-i686-linux-gnu: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-i686" script: - *aptcache - - apt-get gcc-i686-linux-gnu || apt-get install gcc + - apt-get install gcc-i686-linux-gnu || apt-get install gcc - apt-get install libsdl2-mixer-dev:i386 libpng-dev:i386 libcurl4-openssl-dev:i386 libgme-dev:i386 libopenmpt-dev:i386 - export CC=i686-linux-gnu-gcc - export OBJCOPY=i686-linux-gnu-objcopy From 806c8f259cb8cbec347ef5f1c4e59d138131e559 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sat, 14 Oct 2023 08:23:03 -0400 Subject: [PATCH 101/142] Update src/Makefile.d/detect.mk Support Mingw64 toolchain versions --- src/Makefile.d/detect.mk | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/src/Makefile.d/detect.mk b/src/Makefile.d/detect.mk index 0cd618c69..9e2736946 100644 --- a/src/Makefile.d/detect.mk +++ b/src/Makefile.d/detect.mk @@ -56,15 +56,15 @@ endif # This must have high to low order. gcc_versions:=\ - 132 131\ - 123 122 121\ - 114 113 112 111\ - 105 104 103 102 101\ - 95 94 93 92 91\ - 85 84 83 82 81\ - 75 74 73 72 71\ - 64 63 62 61\ - 55 54 53 52 51\ + 132 131 130\ + 123 122 121 120\ + 114 113 112 111 110\ + 105 104 103 102 101 100\ + 95 94 93 92 91 90\ + 85 84 83 82 81 80\ + 75 74 73 72 71 70\ + 64 63 62 61 60\ + 55 54 53 52 51 50\ 49 48 47 46 45 44 43 42 41 40 latest_gcc_version:=13.2 @@ -77,13 +77,18 @@ ifeq (,$(call Wildvar,GCC% destructive)) # can't use $(CC) --version here since that uses argv[0] to display the name # also gcc outputs the information to stderr, so I had to do 2>&1 # this program really doesn't like identifying itself -version:=$(shell $(CC) -v 2>&1) +shellversion:=$(shell $(CC) -v 2>&1) +# Try to remove "-win32" +version:=$(subst -win32,.0,$(shellversion)) # check if this is in fact GCC ifneq (,$(findstring gcc version,$(version))) # in stark contrast to the name, gcc will give me a nicely formatted version number for free -version:=$(shell $(CC) -dumpfullversion) +shellversion:=$(shell $(CC) -dumpfullversion) + +# Try to remove "-win32" +version:=$(subst -win32,.0,$(shellversion)) # Turn version into words of major, minor v:=$(subst ., ,$(version)) From ff3993257a46bc1f913a28015015b9d62dc94904 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sat, 14 Oct 2023 13:01:32 +0000 Subject: [PATCH 102/142] Update .gitlab-ci.yml file place sections around "apt-get install" and "make" commands --- .gitlab-ci.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e10ad1bd5..c35824c8c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -45,8 +45,12 @@ default: - echo Dir::Cache::Archives "$APT_CACHE_DIR"\; | tee --append /etc/apt/apt.conf.d/99build - apt-get update - mkdir --parents --verbose $APT_CACHE_DIR/partial/ + - echo -e "\e[0Ksection_start:`date +%s`:apt_pre[collapsed=true]\r\e[0Kinstalling pre packages" - apt-get install apt-utils + - echo -e "\e[0Ksection_end:`date +%s`:apt_pre\r\e[0K" + - echo -e "\e[0Ksection_start:`date +%s`:apt_common[collapsed=true]\r\e[0Kinstalling common packages " - apt-get install make git ccache + - echo -e "\e[0Ksection_end:`date +%s`:apt_common\r\e[0K" - *ccache - ccache --zero-stats || true - ccache --show-stats || true @@ -67,10 +71,16 @@ build-testing: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-testing" script: - *aptcache + - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0Kinstalling toolchain packages" - apt-get install gcc + - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" + - echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0Kinstalling development packages" - apt-get install libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev libopenmpt-dev + - echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" - *ccache + - echo -e "\e[0Ksection_start:`date +%s`:make\r\e[0KCompiling SRB2" - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 + - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" build-i686-w64-mingw32: <<: *job_build @@ -80,9 +90,13 @@ build-i686-w64-mingw32: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win32" script: - *aptcache + - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0Kinstalling toolchain packages - apt-get install gcc-mingw-w64-i686-win32 + - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" - *ccache + - echo -e "\e[0Ksection_start:`date +%s`:make\r\e[0KCompiling SRB2" - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW=1 PREFIX=i686-w64-mingw32 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW=1 PREFIX=i686-w64-mingw32 + - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" build-x86_64-linux-gnu: <<: *job_build @@ -92,14 +106,20 @@ build-x86_64-linux-gnu: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-x86-64" script: - *aptcache + - 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 + - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" + - echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0Kinstalling development packages" - apt-get install libsdl2-mixer-dev:amd64 libpng-dev:amd64 libcurl4-openssl-dev:amd64 libgme-dev:amd64 libopenmpt-dev:amd64 + - echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" - export CC=x86_64-linux-gnu-gcc - export OBJCOPY=x86_64-linux-gnu-objcopy - export OBJDUMP=x86_64-linux-gnu-objdump - export PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig - *ccache + - echo -e "\e[0Ksection_start:`date +%s`:make\r\e[0KCompiling SRB2" - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 + - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" build-i686-linux-gnu: <<: *job_build @@ -109,14 +129,20 @@ build-i686-linux-gnu: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-i686" script: - *aptcache + - 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 + - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" + - echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0Kinstalling development packages" - apt-get install libsdl2-mixer-dev:i386 libpng-dev:i386 libcurl4-openssl-dev:i386 libgme-dev:i386 libopenmpt-dev:i386 + - echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" - export CC=i686-linux-gnu-gcc - export OBJCOPY=i686-linux-gnu-objcopy - export OBJDUMP=i686-linux-gnu-objdump - export PKG_CONFIG_PATH=/usr/lib/i386-linux-gnu/pkgconfig - *ccache + - echo -e "\e[0Ksection_start:`date +%s`:make\r\e[0KCompiling SRB2" - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX=1 + - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" build-aarch64-linux-gnu: <<: *job_build @@ -126,14 +152,20 @@ build-aarch64-linux-gnu: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-aarch64" script: - *aptcache + - 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 + - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" + - echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0Kinstalling development packages" - apt-get install libsdl2-mixer-dev:arm64 libpng-dev:arm64 libcurl4-openssl-dev:arm64 libgme-dev:arm64 libopenmpt-dev:arm64 + - echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" - export CC=aarch64-linux-gnu-gcc - export OBJCOPY=aarch64-linux-gnu-objcopy - export OBJDUMP=aarch64-linux-gnu-objdump - export PKG_CONFIG_PATH=/usr/lib/aarch64-linux-gnu/pkgconfig - *ccache + - echo -e "\e[0Ksection_start:`date +%s`:make\r\e[0KCompiling SRB2" - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 NONX86=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 NONX86=1 + - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" build-x86_64-w64-mingw32: <<: *job_build @@ -143,6 +175,10 @@ build-x86_64-w64-mingw32: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win64" script: - *aptcache + - 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 + - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" - *ccache + - echo -e "\e[0Ksection_start:`date +%s`:make\r\e[0KCompiling SRB2" - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW64=1 PREFIX=x86_64-w64-mingw32 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW64=1 PREFIX=x86_64-w64-mingw32 + - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" From 1a0fad75f9014bd1b169ad0429c68f0eeca97d77 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sat, 14 Oct 2023 13:09:59 +0000 Subject: [PATCH 103/142] Update .gitlab-ci.yml file fixup EOL on section commands --- .gitlab-ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c35824c8c..e65a6f41e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -90,7 +90,7 @@ build-i686-w64-mingw32: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win32" script: - *aptcache - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0Kinstalling toolchain packages + - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0Kinstalling toolchain packages" - apt-get install gcc-mingw-w64-i686-win32 - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" - *ccache @@ -106,7 +106,7 @@ build-x86_64-linux-gnu: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-x86-64" script: - *aptcache - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0Kinstalling toolchain packages + - 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 - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" - echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0Kinstalling development packages" @@ -129,7 +129,7 @@ build-i686-linux-gnu: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-i686" script: - *aptcache - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0Kinstalling toolchain packages + - 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 - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" - echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0Kinstalling development packages" @@ -152,7 +152,7 @@ build-aarch64-linux-gnu: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-aarch64" script: - *aptcache - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0Kinstalling toolchain packages + - 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 - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" - echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0Kinstalling development packages" @@ -175,7 +175,7 @@ build-x86_64-w64-mingw32: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win64" script: - *aptcache - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0Kinstalling toolchain packages + - 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 - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" - *ccache From c17c5327a8ba7247aef0f93446ac766d91d2ceff Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sat, 14 Oct 2023 13:11:49 +0000 Subject: [PATCH 104/142] Update .gitlab-ci.yml file remove extra space --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e65a6f41e..203f44fdb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -48,7 +48,7 @@ default: - echo -e "\e[0Ksection_start:`date +%s`:apt_pre[collapsed=true]\r\e[0Kinstalling pre packages" - apt-get install apt-utils - echo -e "\e[0Ksection_end:`date +%s`:apt_pre\r\e[0K" - - echo -e "\e[0Ksection_start:`date +%s`:apt_common[collapsed=true]\r\e[0Kinstalling common packages " + - echo -e "\e[0Ksection_start:`date +%s`:apt_common[collapsed=true]\r\e[0Kinstalling common packages" - apt-get install make git ccache - echo -e "\e[0Ksection_end:`date +%s`:apt_common\r\e[0K" - *ccache From 1886b9f9458e503eb05436b549501186822daa2e Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sat, 14 Oct 2023 14:18:23 +0000 Subject: [PATCH 105/142] Update .gitlab-ci.yml file Add more sections to the build log --- .gitlab-ci.yml | 178 ++++++++++++++++++++++++++----------------------- 1 file changed, 95 insertions(+), 83 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 203f44fdb..333ab25ba 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,15 +1,9 @@ stages: # List of stages for jobs, and their order of execution - build -.ccache_Scripts: &ccache - - export CCACHE_BASEDIR="$PWD" - - export CCACHE_DIR="$PWD/ccache" - - export CCACHE_COMPILERCHECK=content - - export CCACHE_STATSLOG="$PWD/ccache_statslog" - .aptcache_Scripts: &aptcache - - export APT_CACHE_DIR=`pwd`/apt-cache - - export DEBIAN_FRONTEND=noninteractive + export APT_CACHE_DIR=`pwd`/apt-cache; + export DEBIAN_FRONTEND=noninteractive; default: image: debian:stable-slim @@ -17,7 +11,6 @@ default: .job_template: &job_build # This job runs in the build stage, which runs first. stage: build variables: - CCACHE_MAXSIZE: 50M GIT_STRATEGY: clone GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_CONCURRENT_ID/$CI_PROJECT_PATH cache: @@ -33,31 +26,56 @@ default: - apt-cache unprotect: true before_script: - - dpkg --add-architecture i386 - - dpkg --add-architecture amd64 - - dpkg --add-architecture arm64 - - *aptcache - - touch /etc/apt/apt.conf.d/99build - - echo Adding options to apt.conf':' - - echo APT::Install-Recommends "false"\; | tee --append /etc/apt/apt.conf.d/99build - - echo quiet "2"\; | tee --append /etc/apt/apt.conf.d/99build - - echo APT::Get::Assume-Yes "true"\; | tee --append /etc/apt/apt.conf.d/99build - - echo Dir::Cache::Archives "$APT_CACHE_DIR"\; | tee --append /etc/apt/apt.conf.d/99build - - apt-get update - - mkdir --parents --verbose $APT_CACHE_DIR/partial/ - - echo -e "\e[0Ksection_start:`date +%s`:apt_pre[collapsed=true]\r\e[0Kinstalling pre packages" - - apt-get install apt-utils - - echo -e "\e[0Ksection_end:`date +%s`:apt_pre\r\e[0K" - - echo -e "\e[0Ksection_start:`date +%s`:apt_common[collapsed=true]\r\e[0Kinstalling common packages" - - apt-get install make git ccache - - echo -e "\e[0Ksection_end:`date +%s`:apt_common\r\e[0K" - - *ccache + - - echo -e "\e[0Ksection_start:`date +%s`:dpkg_aa[collapsed=true]\r\e[0KAdding architectures to dpkg" + - dpkg --add-architecture i386 + - dpkg --add-architecture amd64 + - dpkg --add-architecture arm64 + - echo -e "\e[0Ksection_end:`date +%s`:dpkg_aa\r\e[0K" + + - - echo -e "\e[0Ksection_start:`date +%s`:ac_pre[collapsed=true]\r\e[0KSetting up APT cache" + - *aptcache + - echo -e "\e[0Ksection_end:`date +%s`:ac_pre\r\e[0K" + + - - echo -e "\e[0Ksection_start:`date +%s`:apt_conf[collapsed=true]\r\e[0KSetting up APT conf" + - touch /etc/apt/apt.conf.d/99build + - echo Adding options to apt.conf':' + - echo APT::Install-Recommends "false"\; | tee --append /etc/apt/apt.conf.d/99build + - echo quiet "1"\; | tee --append /etc/apt/apt.conf.d/99build + - echo APT::Get::Assume-Yes "true"\; | tee --append /etc/apt/apt.conf.d/99build + - echo Dir::Cache::Archives "$APT_CACHE_DIR"\; | tee --append /etc/apt/apt.conf.d/99build + - echo -e "\e[0Ksection_end:`date +%s`:apt_conf\r\e[0K" + + - - echo -e "\e[0Ksection_start:`date +%s`:apt_update[collapsed=true]\r\e[0KUpdating APT listing" + - apt-get update + - echo -e "\e[0Ksection_end:`date +%s`:apt_update\r\e[0K" + + - - echo -e "\e[0Ksection_start:`date +%s`:apt_cache[collapsed=true]\r\e[0KMaking APT cache directory" + - mkdir --parents --verbose $APT_CACHE_DIR/partial/ + - echo -e "\e[0Ksection_end:`date +%s`:apt_cache\r\e[0K" + + - - echo -e "\e[0Ksection_start:`date +%s`:apt_pre[collapsed=true]\r\e[0KInstalling pre packages" + - apt-get install apt-utils + - echo -e "\e[0Ksection_end:`date +%s`:apt_pre\r\e[0K" + + - - echo -e "\e[0Ksection_start:`date +%s`:apt_common[collapsed=true]\r\e[0KInstalling common packages" + - apt-get install make git ccache + - echo -e "\e[0Ksection_end:`date +%s`:apt_common\r\e[0K" + + - - echo -e "\e[0Ksection_start:`date +%s`:ccache_config[collapsed=true]\r\e[0KSetting up ccache config" + - echo Adding ccache configution option + - touch ~/.ccache/ccache.conf + - echo base_dir = "$PWD" | tee ~/.ccache/ccache.conf + - echo cache_dir = "$PWD/ccache" | tee ~/.ccache/ccache.conf + - echo compiler_check = content | tee ~/.ccache/ccache.conf + - echo stats_log = "$PWD/ccache_statslog" | tee ~/.ccache/ccache.conf + - echo max_size = 50M | tee ~/.ccache/ccache.conf + - echo -e "\e[0Ksection_end:`date +%s`:ccache_config\r\e[0K" + - ccache --zero-stats || true - ccache --show-stats || true after_script: - *aptcache - apt-get autoclean - - *ccache - ccache --show-stats - ccache --show-log-stats || true @@ -71,16 +89,15 @@ build-testing: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-testing" script: - *aptcache - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0Kinstalling toolchain packages" - - apt-get install gcc - - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" - - echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0Kinstalling development packages" - - apt-get install libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev libopenmpt-dev - - echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" - - *ccache - - echo -e "\e[0Ksection_start:`date +%s`:make\r\e[0KCompiling SRB2" - - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 - - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" + - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0Kinstalling toolchain packages" + - apt-get install gcc + - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" + - - echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0Kinstalling development packages" + - apt-get install libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev libopenmpt-dev + - echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" + - - echo -e "\e[0Ksection_start:`date +%s`:make\r\e[0KCompiling SRB2" + - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 + - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" build-i686-w64-mingw32: <<: *job_build @@ -90,13 +107,12 @@ build-i686-w64-mingw32: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win32" script: - *aptcache - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0Kinstalling toolchain packages" - - apt-get install gcc-mingw-w64-i686-win32 - - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" - - *ccache - - echo -e "\e[0Ksection_start:`date +%s`:make\r\e[0KCompiling SRB2" - - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW=1 PREFIX=i686-w64-mingw32 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW=1 PREFIX=i686-w64-mingw32 - - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" + - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0Kinstalling toolchain packages" + - apt-get install gcc-mingw-w64-i686-win32 + - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" + - - echo -e "\e[0Ksection_start:`date +%s`:make\r\e[0KCompiling SRB2" + - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW=1 PREFIX=i686-w64-mingw32 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW=1 PREFIX=i686-w64-mingw32 + - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" build-x86_64-linux-gnu: <<: *job_build @@ -106,20 +122,19 @@ build-x86_64-linux-gnu: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-x86-64" script: - *aptcache - - 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 - - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" - - echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0Kinstalling development packages" - - apt-get install libsdl2-mixer-dev:amd64 libpng-dev:amd64 libcurl4-openssl-dev:amd64 libgme-dev:amd64 libopenmpt-dev:amd64 - - echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" + - - 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 + - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" + - - echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0Kinstalling development packages" + - apt-get install libsdl2-mixer-dev:amd64 libpng-dev:amd64 libcurl4-openssl-dev:amd64 libgme-dev:amd64 libopenmpt-dev:amd64 + - echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" - export CC=x86_64-linux-gnu-gcc - export OBJCOPY=x86_64-linux-gnu-objcopy - export OBJDUMP=x86_64-linux-gnu-objdump - export PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig - - *ccache - - echo -e "\e[0Ksection_start:`date +%s`:make\r\e[0KCompiling SRB2" - - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 - - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" + - - echo -e "\e[0Ksection_start:`date +%s`:make\r\e[0KCompiling SRB2" + - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 + - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" build-i686-linux-gnu: <<: *job_build @@ -129,20 +144,19 @@ build-i686-linux-gnu: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-i686" script: - *aptcache - - 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 - - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" - - echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0Kinstalling development packages" - - apt-get install libsdl2-mixer-dev:i386 libpng-dev:i386 libcurl4-openssl-dev:i386 libgme-dev:i386 libopenmpt-dev:i386 - - echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" + - - 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 + - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" + - - echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0Kinstalling development packages" + - apt-get install libsdl2-mixer-dev:i386 libpng-dev:i386 libcurl4-openssl-dev:i386 libgme-dev:i386 libopenmpt-dev:i386 + - echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" - export CC=i686-linux-gnu-gcc - export OBJCOPY=i686-linux-gnu-objcopy - export OBJDUMP=i686-linux-gnu-objdump - export PKG_CONFIG_PATH=/usr/lib/i386-linux-gnu/pkgconfig - - *ccache - - echo -e "\e[0Ksection_start:`date +%s`:make\r\e[0KCompiling SRB2" - - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX=1 - - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" + - - echo -e "\e[0Ksection_start:`date +%s`:make\r\e[0KCompiling SRB2" + - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX=1 + - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" build-aarch64-linux-gnu: <<: *job_build @@ -152,20 +166,19 @@ build-aarch64-linux-gnu: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-aarch64" script: - *aptcache - - 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 - - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" - - echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0Kinstalling development packages" - - apt-get install libsdl2-mixer-dev:arm64 libpng-dev:arm64 libcurl4-openssl-dev:arm64 libgme-dev:arm64 libopenmpt-dev:arm64 - - echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" + - - 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 + - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" + - - echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0Kinstalling development packages" + - apt-get install libsdl2-mixer-dev:arm64 libpng-dev:arm64 libcurl4-openssl-dev:arm64 libgme-dev:arm64 libopenmpt-dev:arm64 + - echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" - export CC=aarch64-linux-gnu-gcc - export OBJCOPY=aarch64-linux-gnu-objcopy - export OBJDUMP=aarch64-linux-gnu-objdump - export PKG_CONFIG_PATH=/usr/lib/aarch64-linux-gnu/pkgconfig - - *ccache - - echo -e "\e[0Ksection_start:`date +%s`:make\r\e[0KCompiling SRB2" - - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 NONX86=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 NONX86=1 - - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" + - - echo -e "\e[0Ksection_start:`date +%s`:make\r\e[0KCompiling SRB2" + - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 NONX86=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 NONX86=1 + - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" build-x86_64-w64-mingw32: <<: *job_build @@ -175,10 +188,9 @@ build-x86_64-w64-mingw32: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win64" script: - *aptcache - - 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 - - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" - - *ccache - - echo -e "\e[0Ksection_start:`date +%s`:make\r\e[0KCompiling SRB2" - - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW64=1 PREFIX=x86_64-w64-mingw32 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW64=1 PREFIX=x86_64-w64-mingw32 - - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" + - - 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 + - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" + - - echo -e "\e[0Ksection_start:`date +%s`:make\r\e[0KCompiling SRB2" + - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW64=1 PREFIX=x86_64-w64-mingw32 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW64=1 PREFIX=x86_64-w64-mingw32 + - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" From 2e4d5b6fa9d31b761546ef56c575cff435521eb3 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sat, 14 Oct 2023 14:29:57 +0000 Subject: [PATCH 106/142] Update .gitlab-ci.yml file mkdir ~/.ccache before make the config file --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 333ab25ba..5447fe7f8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -63,6 +63,7 @@ default: - - echo -e "\e[0Ksection_start:`date +%s`:ccache_config[collapsed=true]\r\e[0KSetting up ccache config" - echo Adding ccache configution option + - mkdir --parents --verbose ~/.ccache - touch ~/.ccache/ccache.conf - echo base_dir = "$PWD" | tee ~/.ccache/ccache.conf - echo cache_dir = "$PWD/ccache" | tee ~/.ccache/ccache.conf From e6044ec9f10888d9b47fb486c46aa060567b3746 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sat, 14 Oct 2023 15:05:50 +0000 Subject: [PATCH 107/142] Update .gitlab-ci.yml file append, not overwrite ccache.conf --- .gitlab-ci.yml | 43 +++++++++++++++++++++++++++++-------------- 1 file changed, 29 insertions(+), 14 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5447fe7f8..d8a6f4247 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -63,20 +63,22 @@ default: - - echo -e "\e[0Ksection_start:`date +%s`:ccache_config[collapsed=true]\r\e[0KSetting up ccache config" - echo Adding ccache configution option - - mkdir --parents --verbose ~/.ccache - touch ~/.ccache/ccache.conf - - echo base_dir = "$PWD" | tee ~/.ccache/ccache.conf - - echo cache_dir = "$PWD/ccache" | tee ~/.ccache/ccache.conf - - echo compiler_check = content | tee ~/.ccache/ccache.conf - - echo stats_log = "$PWD/ccache_statslog" | tee ~/.ccache/ccache.conf - - echo max_size = 50M | tee ~/.ccache/ccache.conf + - echo base_dir = $PWD | tee --append ~/.ccache/ccache.conf + - echo cache_dir = $PWD/ccache | tee --append ~/.ccache/ccache.conf + - echo compiler_check = content | tee --append ~/.ccache/ccache.conf + - echo stats_log = $PWD/ccache_statslog | tee --append ~/.ccache/ccache.conf + - echo max_size = 50M | tee --append ~/.ccache/ccache.conf - echo -e "\e[0Ksection_end:`date +%s`:ccache_config\r\e[0K" - ccache --zero-stats || true - ccache --show-stats || true after_script: - - *aptcache - - apt-get autoclean + - - echo -e "\e[0Ksection_start:`date +%s`:apt_clean[collapsed=true]\r\e[0KCleaning of unneeded APT packages" + - *aptcache + - apt-get autoclean + - echo -e "\e[0Ksection_end:`date +%s`:apt_clean\r\e[0K" + - ccache --show-stats - ccache --show-log-stats || true @@ -89,13 +91,15 @@ build-testing: - "bin/lsdl2srb2*" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-testing" script: - - *aptcache - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0Kinstalling toolchain packages" + - *aptcache - apt-get install gcc - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" + - - echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0Kinstalling development packages" - apt-get install libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev libopenmpt-dev - echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" + - - echo -e "\e[0Ksection_start:`date +%s`:make\r\e[0KCompiling SRB2" - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" @@ -107,10 +111,11 @@ build-i686-w64-mingw32: - "bin/srb2win.exe*" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win32" script: - - *aptcache - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0Kinstalling toolchain packages" + - *aptcache - apt-get install gcc-mingw-w64-i686-win32 - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" + - - echo -e "\e[0Ksection_start:`date +%s`:make\r\e[0KCompiling SRB2" - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW=1 PREFIX=i686-w64-mingw32 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW=1 PREFIX=i686-w64-mingw32 - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" @@ -122,17 +127,20 @@ build-x86_64-linux-gnu: - "bin/lsdl2srb2*" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-x86-64" script: - - *aptcache - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0Kinstalling toolchain packages" + - *aptcache - apt-get install gcc-x86-64-linux-gnu || apt-get install gcc - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" + - - echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0Kinstalling development packages" - apt-get install libsdl2-mixer-dev:amd64 libpng-dev:amd64 libcurl4-openssl-dev:amd64 libgme-dev:amd64 libopenmpt-dev:amd64 - echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" + - export CC=x86_64-linux-gnu-gcc - export OBJCOPY=x86_64-linux-gnu-objcopy - export OBJDUMP=x86_64-linux-gnu-objdump - export PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig + - - echo -e "\e[0Ksection_start:`date +%s`:make\r\e[0KCompiling SRB2" - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" @@ -144,17 +152,20 @@ build-i686-linux-gnu: - "bin/lsdl2srb2*" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-i686" script: - - *aptcache - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0Kinstalling toolchain packages" + - *aptcache - apt-get install gcc-i686-linux-gnu || apt-get install gcc - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" + - - echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0Kinstalling development packages" - apt-get install libsdl2-mixer-dev:i386 libpng-dev:i386 libcurl4-openssl-dev:i386 libgme-dev:i386 libopenmpt-dev:i386 - echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" + - export CC=i686-linux-gnu-gcc - export OBJCOPY=i686-linux-gnu-objcopy - export OBJDUMP=i686-linux-gnu-objdump - export PKG_CONFIG_PATH=/usr/lib/i386-linux-gnu/pkgconfig + - - echo -e "\e[0Ksection_start:`date +%s`:make\r\e[0KCompiling SRB2" - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX=1 - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" @@ -166,17 +177,20 @@ build-aarch64-linux-gnu: - "bin/lsdl2srb2*" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-aarch64" script: - - *aptcache - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0Kinstalling toolchain packages" + - *aptcache - apt-get install gcc-aarch64-linux-gnu || apt-get install gcc - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" + - - echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0Kinstalling development packages" - apt-get install libsdl2-mixer-dev:arm64 libpng-dev:arm64 libcurl4-openssl-dev:arm64 libgme-dev:arm64 libopenmpt-dev:arm64 - echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" + - export CC=aarch64-linux-gnu-gcc - export OBJCOPY=aarch64-linux-gnu-objcopy - export OBJDUMP=aarch64-linux-gnu-objdump - export PKG_CONFIG_PATH=/usr/lib/aarch64-linux-gnu/pkgconfig + - - echo -e "\e[0Ksection_start:`date +%s`:make\r\e[0KCompiling SRB2" - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 NONX86=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 NONX86=1 - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" @@ -188,10 +202,11 @@ build-x86_64-w64-mingw32: - "bin/srb2win64.exe*" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win64" script: - - *aptcache - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0Kinstalling toolchain packages" + - *aptcache - apt-get install gcc-mingw-w64-x86-64-win32 - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" + - - echo -e "\e[0Ksection_start:`date +%s`:make\r\e[0KCompiling SRB2" - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW64=1 PREFIX=x86_64-w64-mingw32 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW64=1 PREFIX=x86_64-w64-mingw32 - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" From dee306c58b71a25aa25b2dc171d024637a37afad Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sat, 14 Oct 2023 15:25:04 +0000 Subject: [PATCH 108/142] Update .gitlab-ci.yml file I need to make the .ccache folder --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d8a6f4247..a196ce281 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -63,6 +63,7 @@ default: - - echo -e "\e[0Ksection_start:`date +%s`:ccache_config[collapsed=true]\r\e[0KSetting up ccache config" - echo Adding ccache configution option + - mkdir --parents --verbose ~/.ccache/ - touch ~/.ccache/ccache.conf - echo base_dir = $PWD | tee --append ~/.ccache/ccache.conf - echo cache_dir = $PWD/ccache | tee --append ~/.ccache/ccache.conf From c74711fefa1f4233ee444dfa51bc9e04801c89f9 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sat, 14 Oct 2023 19:51:11 +0000 Subject: [PATCH 109/142] Update .gitlab-ci.yml file section off ccache output --- .gitlab-ci.yml | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a196ce281..ea0d6668f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -72,16 +72,20 @@ default: - echo max_size = 50M | tee --append ~/.ccache/ccache.conf - echo -e "\e[0Ksection_end:`date +%s`:ccache_config\r\e[0K" - - ccache --zero-stats || true - - ccache --show-stats || true + - - echo -e "\e[0Ksection_start:`date +%s`:apt_reset[collapsed=true]\r\e[0KResetting ccache statistics" + - ccache --zero-stats || true + - ccache --show-stats || true + - echo -e "\e[0Ksection_end:`date +%s`:ccache_reset\r\e[0K" after_script: - - echo -e "\e[0Ksection_start:`date +%s`:apt_clean[collapsed=true]\r\e[0KCleaning of unneeded APT packages" - *aptcache - apt-get autoclean - echo -e "\e[0Ksection_end:`date +%s`:apt_clean\r\e[0K" - - ccache --show-stats - - ccache --show-log-stats || true + - - echo -e "\e[0Ksection_start:`date +%s`:ccache_stats[collapsed=false]\r\e[0Kccache statistics:" + - ccache --show-stats --verbose + - ccache --show-log-stats --verbose || true + - echo -e "\e[0Ksection_end:`date +%s`:ccache_stats\r\e[0K" build-testing: <<: *job_build @@ -92,12 +96,12 @@ build-testing: - "bin/lsdl2srb2*" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-testing" script: - - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0Kinstalling toolchain packages" + - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - *aptcache - apt-get install gcc - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" - - - echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0Kinstalling development packages" + - - echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages" - apt-get install libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev libopenmpt-dev - echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" @@ -112,7 +116,7 @@ build-i686-w64-mingw32: - "bin/srb2win.exe*" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win32" script: - - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0Kinstalling toolchain packages" + - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - *aptcache - apt-get install gcc-mingw-w64-i686-win32 - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" @@ -128,12 +132,12 @@ build-x86_64-linux-gnu: - "bin/lsdl2srb2*" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-x86-64" script: - - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0Kinstalling toolchain packages" + - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - *aptcache - apt-get install gcc-x86-64-linux-gnu || apt-get install gcc - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" - - - echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0Kinstalling development packages" + - - echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages" - apt-get install libsdl2-mixer-dev:amd64 libpng-dev:amd64 libcurl4-openssl-dev:amd64 libgme-dev:amd64 libopenmpt-dev:amd64 - echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" @@ -153,12 +157,12 @@ build-i686-linux-gnu: - "bin/lsdl2srb2*" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-i686" script: - - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0Kinstalling toolchain packages" + - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - *aptcache - apt-get install gcc-i686-linux-gnu || apt-get install gcc - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" - - - echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0Kinstalling development packages" + - - echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages" - apt-get install libsdl2-mixer-dev:i386 libpng-dev:i386 libcurl4-openssl-dev:i386 libgme-dev:i386 libopenmpt-dev:i386 - echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" @@ -178,12 +182,12 @@ build-aarch64-linux-gnu: - "bin/lsdl2srb2*" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-aarch64" script: - - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0Kinstalling toolchain packages" + - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - *aptcache - apt-get install gcc-aarch64-linux-gnu || apt-get install gcc - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" - - - echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0Kinstalling development packages" + - - echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages" - apt-get install libsdl2-mixer-dev:arm64 libpng-dev:arm64 libcurl4-openssl-dev:arm64 libgme-dev:arm64 libopenmpt-dev:arm64 - echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" @@ -203,7 +207,7 @@ build-x86_64-w64-mingw32: - "bin/srb2win64.exe*" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win64" script: - - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0Kinstalling toolchain packages" + - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - *aptcache - apt-get install gcc-mingw-w64-x86-64-win32 - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" From 50d8cb4c00de891b8d13a06e36b6104a241a7f81 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sat, 14 Oct 2023 21:08:13 +0000 Subject: [PATCH 110/142] Update .gitlab-ci.yml file hide ccache statistics --- .gitlab-ci.yml | 45 +++++++++++++++------------------------------ 1 file changed, 15 insertions(+), 30 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ea0d6668f..206d1d888 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,10 +1,6 @@ stages: # List of stages for jobs, and their order of execution - build -.aptcache_Scripts: &aptcache - export APT_CACHE_DIR=`pwd`/apt-cache; - export DEBIAN_FRONTEND=noninteractive; - default: image: debian:stable-slim @@ -13,6 +9,7 @@ default: variables: GIT_STRATEGY: clone GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_CONCURRENT_ID/$CI_PROJECT_PATH + DEBIAN_FRONTEND: noninteractive cache: - key: ccache-$CI_PROJECT_PATH_SLUG-$CI_JOB_NAME_SLUG fallback_keys: @@ -32,27 +29,21 @@ default: - dpkg --add-architecture arm64 - echo -e "\e[0Ksection_end:`date +%s`:dpkg_aa\r\e[0K" - - - echo -e "\e[0Ksection_start:`date +%s`:ac_pre[collapsed=true]\r\e[0KSetting up APT cache" - - *aptcache - - echo -e "\e[0Ksection_end:`date +%s`:ac_pre\r\e[0K" - - - echo -e "\e[0Ksection_start:`date +%s`:apt_conf[collapsed=true]\r\e[0KSetting up APT conf" + - export APT_CACHE_DIR=`pwd`/apt-cache - touch /etc/apt/apt.conf.d/99build - echo Adding options to apt.conf':' - echo APT::Install-Recommends "false"\; | tee --append /etc/apt/apt.conf.d/99build - echo quiet "1"\; | tee --append /etc/apt/apt.conf.d/99build - echo APT::Get::Assume-Yes "true"\; | tee --append /etc/apt/apt.conf.d/99build - echo Dir::Cache::Archives "$APT_CACHE_DIR"\; | tee --append /etc/apt/apt.conf.d/99build + - mkdir --parents --verbose $APT_CACHE_DIR/partial/ - echo -e "\e[0Ksection_end:`date +%s`:apt_conf\r\e[0K" - - echo -e "\e[0Ksection_start:`date +%s`:apt_update[collapsed=true]\r\e[0KUpdating APT listing" - apt-get update - echo -e "\e[0Ksection_end:`date +%s`:apt_update\r\e[0K" - - - echo -e "\e[0Ksection_start:`date +%s`:apt_cache[collapsed=true]\r\e[0KMaking APT cache directory" - - mkdir --parents --verbose $APT_CACHE_DIR/partial/ - - echo -e "\e[0Ksection_end:`date +%s`:apt_cache\r\e[0K" - - - echo -e "\e[0Ksection_start:`date +%s`:apt_pre[collapsed=true]\r\e[0KInstalling pre packages" - apt-get install apt-utils - echo -e "\e[0Ksection_end:`date +%s`:apt_pre\r\e[0K" @@ -72,19 +63,19 @@ default: - echo max_size = 50M | tee --append ~/.ccache/ccache.conf - echo -e "\e[0Ksection_end:`date +%s`:ccache_config\r\e[0K" - - - echo -e "\e[0Ksection_start:`date +%s`:apt_reset[collapsed=true]\r\e[0KResetting ccache statistics" - - ccache --zero-stats || true - - ccache --show-stats || true + - - echo -e "\e[0Ksection_start:`date +%s`:ccache_reset[collapsed=true]\r\e[0KResetting ccache statistics" + - ccache --zero-stats + - ccache --show-stats - echo -e "\e[0Ksection_end:`date +%s`:ccache_reset\r\e[0K" + after_script: - - echo -e "\e[0Ksection_start:`date +%s`:apt_clean[collapsed=true]\r\e[0KCleaning of unneeded APT packages" - - *aptcache - apt-get autoclean - echo -e "\e[0Ksection_end:`date +%s`:apt_clean\r\e[0K" - - - echo -e "\e[0Ksection_start:`date +%s`:ccache_stats[collapsed=false]\r\e[0Kccache statistics:" + - - echo -e "\e[0Ksection_start:`date +%s`:ccache_stats[collapsed=true]\r\e[0Kccache statistics:" - ccache --show-stats --verbose - - ccache --show-log-stats --verbose || true + - ccache --show-log-stats --verbose - echo -e "\e[0Ksection_end:`date +%s`:ccache_stats\r\e[0K" build-testing: @@ -97,7 +88,6 @@ build-testing: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-testing" script: - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - - *aptcache - apt-get install gcc - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" @@ -105,7 +95,7 @@ build-testing: - apt-get install libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev libopenmpt-dev - echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" - - - echo -e "\e[0Ksection_start:`date +%s`:make\r\e[0KCompiling SRB2" + - - echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" @@ -117,11 +107,10 @@ build-i686-w64-mingw32: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win32" script: - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - - *aptcache - apt-get install gcc-mingw-w64-i686-win32 - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" - - - echo -e "\e[0Ksection_start:`date +%s`:make\r\e[0KCompiling SRB2" + - - echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW=1 PREFIX=i686-w64-mingw32 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW=1 PREFIX=i686-w64-mingw32 - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" @@ -133,7 +122,6 @@ build-x86_64-linux-gnu: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-x86-64" script: - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - - *aptcache - apt-get install gcc-x86-64-linux-gnu || apt-get install gcc - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" @@ -146,7 +134,7 @@ build-x86_64-linux-gnu: - export OBJDUMP=x86_64-linux-gnu-objdump - export PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig - - - echo -e "\e[0Ksection_start:`date +%s`:make\r\e[0KCompiling SRB2" + - - echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" @@ -158,7 +146,6 @@ build-i686-linux-gnu: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-i686" script: - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - - *aptcache - apt-get install gcc-i686-linux-gnu || apt-get install gcc - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" @@ -171,7 +158,7 @@ build-i686-linux-gnu: - export OBJDUMP=i686-linux-gnu-objdump - export PKG_CONFIG_PATH=/usr/lib/i386-linux-gnu/pkgconfig - - - echo -e "\e[0Ksection_start:`date +%s`:make\r\e[0KCompiling SRB2" + - - echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX=1 - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" @@ -183,7 +170,6 @@ build-aarch64-linux-gnu: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-aarch64" script: - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - - *aptcache - apt-get install gcc-aarch64-linux-gnu || apt-get install gcc - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" @@ -196,7 +182,7 @@ build-aarch64-linux-gnu: - export OBJDUMP=aarch64-linux-gnu-objdump - export PKG_CONFIG_PATH=/usr/lib/aarch64-linux-gnu/pkgconfig - - - echo -e "\e[0Ksection_start:`date +%s`:make\r\e[0KCompiling SRB2" + - - echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 NONX86=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 NONX86=1 - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" @@ -208,10 +194,9 @@ build-x86_64-w64-mingw32: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win64" script: - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - - *aptcache - apt-get install gcc-mingw-w64-x86-64-win32 - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" - - - echo -e "\e[0Ksection_start:`date +%s`:make\r\e[0KCompiling SRB2" + - - echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW64=1 PREFIX=x86_64-w64-mingw32 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW64=1 PREFIX=x86_64-w64-mingw32 - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" From 49041773124b8e1c7fa1be5fe6ca9e91df551ffc Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sun, 15 Oct 2023 04:34:39 +0000 Subject: [PATCH 111/142] Update .gitlab-ci.yml file Move the exports to variables section --- .gitlab-ci.yml | 50 +++++++++++++++++++++++++++++--------------------- 1 file changed, 29 insertions(+), 21 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 206d1d888..eb0c60a54 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -10,6 +10,8 @@ default: GIT_STRATEGY: clone GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_CONCURRENT_ID/$CI_PROJECT_PATH DEBIAN_FRONTEND: noninteractive + CCACHE: 1 + ERRORMODE: 1 cache: - key: ccache-$CI_PROJECT_PATH_SLUG-$CI_JOB_NAME_SLUG fallback_keys: @@ -86,6 +88,8 @@ build-testing: paths: - "bin/lsdl2srb2*" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-testing" + variables: + CC: gcc script: - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - apt-get install gcc @@ -96,7 +100,7 @@ build-testing: - echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" - - echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 + - make --directory=src --keep-going NONX86=1 || make --directory=src --keep-going NONX86=1 - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" build-i686-w64-mingw32: @@ -105,13 +109,15 @@ build-i686-w64-mingw32: paths: - "bin/srb2win.exe*" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win32" + variables: + PREFIX: i686-w64-mingw32 script: - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - apt-get install gcc-mingw-w64-i686-win32 - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" - - echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW=1 PREFIX=i686-w64-mingw32 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW=1 PREFIX=i686-w64-mingw32 + - make --directory=src --keep-going MINGW=1 || make --directory=src --keep-going MINGW=1 - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" build-x86_64-linux-gnu: @@ -120,6 +126,11 @@ build-x86_64-linux-gnu: paths: - "bin/lsdl2srb2*" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-x86-64" + variables: + CC: x86_64-linux-gnu-gcc + OBJCOPY: x86_64-linux-gnu-objcopy + OBJDUMP: x86_64-linux-gnu-objdump + PKG_CONFIG_PATH: /usr/lib/x86_64-linux-gnu/pkgconfig script: - - 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 @@ -129,13 +140,8 @@ build-x86_64-linux-gnu: - apt-get install libsdl2-mixer-dev:amd64 libpng-dev:amd64 libcurl4-openssl-dev:amd64 libgme-dev:amd64 libopenmpt-dev:amd64 - echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" - - export CC=x86_64-linux-gnu-gcc - - export OBJCOPY=x86_64-linux-gnu-objcopy - - export OBJDUMP=x86_64-linux-gnu-objdump - - export PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig - - - echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 + - make --directory=src --keep-going LINUX64=1 || make --directory=src --keep-going LINUX64=1 - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" build-i686-linux-gnu: @@ -144,6 +150,11 @@ build-i686-linux-gnu: paths: - "bin/lsdl2srb2*" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-i686" + variables: + CC: i686-linux-gnu-gcc + OBJCOPY: i686-linux-gnu-objcopy + OBJDUMP: i686-linux-gnu-objdump + PKG_CONFIG_PATH: /usr/lib/i386-linux-gnu/pkgconfig script: - - 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 @@ -153,13 +164,8 @@ build-i686-linux-gnu: - apt-get install libsdl2-mixer-dev:i386 libpng-dev:i386 libcurl4-openssl-dev:i386 libgme-dev:i386 libopenmpt-dev:i386 - echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" - - export CC=i686-linux-gnu-gcc - - export OBJCOPY=i686-linux-gnu-objcopy - - export OBJDUMP=i686-linux-gnu-objdump - - export PKG_CONFIG_PATH=/usr/lib/i386-linux-gnu/pkgconfig - - - echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX=1 + - make --directory=src --keep-going LINUX=1 || make --directory=src --keep-going LINUX=1 - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" build-aarch64-linux-gnu: @@ -168,6 +174,11 @@ build-aarch64-linux-gnu: paths: - "bin/lsdl2srb2*" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-aarch64" + variables: + CC: aarch64-linux-gnu-gcc + OBJCOPY: aarch64-linux-gnu-objcopy + OBJDUMP: aarch64-linux-gnu-objdump + PKG_CONFIG_PATH: /usr/lib/aarch64-linux-gnu/pkgconfig script: - - 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 @@ -177,13 +188,8 @@ build-aarch64-linux-gnu: - apt-get install libsdl2-mixer-dev:arm64 libpng-dev:arm64 libcurl4-openssl-dev:arm64 libgme-dev:arm64 libopenmpt-dev:arm64 - echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" - - export CC=aarch64-linux-gnu-gcc - - export OBJCOPY=aarch64-linux-gnu-objcopy - - export OBJDUMP=aarch64-linux-gnu-objdump - - export PKG_CONFIG_PATH=/usr/lib/aarch64-linux-gnu/pkgconfig - - - echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 NONX86=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 NONX86=1 + - make --directory=src --keep-going LINUX64=1 NONX86=1 || make --directory=src --keep-going LINUX64=1 NONX86=1 - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" build-x86_64-w64-mingw32: @@ -192,11 +198,13 @@ build-x86_64-w64-mingw32: paths: - "bin/srb2win64.exe*" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win64" + variables: + PREFIX: x86_64-w64-mingw32 script: - - 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 - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" - - echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW64=1 PREFIX=x86_64-w64-mingw32 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW64=1 PREFIX=x86_64-w64-mingw32 + - make --directory=src --keep-going MINGW64=1 || make --directory=src --keep-going MINGW64=1 - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" From de7f0cba1b82e6c9ad575fa7b350f5a6ca210f2a Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sun, 15 Oct 2023 04:55:29 +0000 Subject: [PATCH 112/142] Update .gitlab-ci.yml file Can not set CCACHE=1 in shell env --- .gitlab-ci.yml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index eb0c60a54..306c6942a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -10,7 +10,6 @@ default: GIT_STRATEGY: clone GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_CONCURRENT_ID/$CI_PROJECT_PATH DEBIAN_FRONTEND: noninteractive - CCACHE: 1 ERRORMODE: 1 cache: - key: ccache-$CI_PROJECT_PATH_SLUG-$CI_JOB_NAME_SLUG @@ -100,7 +99,7 @@ build-testing: - echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" - - echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - - make --directory=src --keep-going NONX86=1 || make --directory=src --keep-going NONX86=1 + - make --directory=src --keep-going CCACHE=1 NONX86=1 || make --directory=src --keep-going CCACHE=1 NONX86=1 - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" build-i686-w64-mingw32: @@ -117,7 +116,7 @@ build-i686-w64-mingw32: - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" - - echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - - make --directory=src --keep-going MINGW=1 || make --directory=src --keep-going MINGW=1 + - make --directory=src --keep-going CCACHE=1 MINGW=1 || make --directory=src --keep-going CCACHE=1 MINGW=1 - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" build-x86_64-linux-gnu: @@ -141,7 +140,7 @@ build-x86_64-linux-gnu: - echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" - - echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - - make --directory=src --keep-going LINUX64=1 || make --directory=src --keep-going LINUX64=1 + - make --directory=src --keep-going CCACHE=1 LINUX64=1 || make --directory=src --keep-going CCACHE=1 LINUX64=1 - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" build-i686-linux-gnu: @@ -165,7 +164,7 @@ build-i686-linux-gnu: - echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" - - echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - - make --directory=src --keep-going LINUX=1 || make --directory=src --keep-going LINUX=1 + - make --directory=src --keep-going CCACHE=1 LINUX=1 || make --directory=src --keep-going CCACHE=1 LINUX=1 - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" build-aarch64-linux-gnu: @@ -189,7 +188,7 @@ build-aarch64-linux-gnu: - echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" - - echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - - make --directory=src --keep-going LINUX64=1 NONX86=1 || make --directory=src --keep-going LINUX64=1 NONX86=1 + - make --directory=src --keep-going CCACHE=1 LINUX64=1 NONX86=1 || make --directory=src --keep-going CCACHE=1 LINUX64=1 NONX86=1 - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" build-x86_64-w64-mingw32: @@ -206,5 +205,5 @@ build-x86_64-w64-mingw32: - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" - - echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - - make --directory=src --keep-going MINGW64=1 || make --directory=src --keep-going MINGW64=1 + - make --directory=src --keep-going CCACHE=1 MINGW64=1 || make --directory=src --keep-going CCACHE=1 MINGW64=1 - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" From 8ace36efbf6477617bfa0a572df3a0d789e52d09 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sun, 15 Oct 2023 14:44:17 +0000 Subject: [PATCH 113/142] Update .gitlab-ci.yml file Try to list packages that can be upgraded --- .gitlab-ci.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 306c6942a..f7fdc1826 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -9,7 +9,10 @@ default: variables: GIT_STRATEGY: clone GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_CONCURRENT_ID/$CI_PROJECT_PATH - DEBIAN_FRONTEND: noninteractive + DEBIAN_FRONTEND: "noninteractive" + DEBIAN_PRIORITY: "low" + DEBCONF_NOWARNINGS: "yes" + DEBCONF_NONINTERACTIVE_SEEN: "true" ERRORMODE: 1 cache: - key: ccache-$CI_PROJECT_PATH_SLUG-$CI_JOB_NAME_SLUG @@ -49,6 +52,10 @@ default: - apt-get install apt-utils - echo -e "\e[0Ksection_end:`date +%s`:apt_pre\r\e[0K" + - - echo -e "\e[0Ksection_start:`date +%s`:apt_upgrade[collapsed=true]\r\e[0KUpdating existing packages (dry-run)" + - apt-get upgrade --simulate + - echo -e "\e[0Ksection_end:`date +%s`:apt_upgraden\r\e[0K" + - - echo -e "\e[0Ksection_start:`date +%s`:apt_common[collapsed=true]\r\e[0KInstalling common packages" - apt-get install make git ccache - echo -e "\e[0Ksection_end:`date +%s`:apt_common\r\e[0K" From 595ce3e22534b097d22077fc0a4f1e23d6267177 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sun, 15 Oct 2023 16:08:15 +0000 Subject: [PATCH 114/142] Update .gitlab-ci.yml file Update Debian image --- .gitlab-ci.yml | 54 ++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 41 insertions(+), 13 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f7fdc1826..2582d0cd3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,16 +4,16 @@ stages: # List of stages for jobs, and their order of execution default: image: debian:stable-slim +.debconf: &debconf + export DEBIAN_FRONTEND="noninteractive"; + export DEBIAN_PRIORITY="low"; + export DEBCONF_NONINTERACTIVE_SEEN="true"; + .job_template: &job_build # This job runs in the build stage, which runs first. stage: build variables: GIT_STRATEGY: clone GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_CONCURRENT_ID/$CI_PROJECT_PATH - DEBIAN_FRONTEND: "noninteractive" - DEBIAN_PRIORITY: "low" - DEBCONF_NOWARNINGS: "yes" - DEBCONF_NONINTERACTIVE_SEEN: "true" - ERRORMODE: 1 cache: - key: ccache-$CI_PROJECT_PATH_SLUG-$CI_JOB_NAME_SLUG fallback_keys: @@ -27,6 +27,10 @@ default: - apt-cache unprotect: true before_script: + - - echo -e "\e[0Ksection_start:`date +%s`:debconf_pre[collapsed=true]\r\e[0KSetup debconf's environment" + - *debconf + - echo -e "\e[0Ksection_end:`date +%s`:debconf_pre\r\e[0K" + - - echo -e "\e[0Ksection_start:`date +%s`:dpkg_aa[collapsed=true]\r\e[0KAdding architectures to dpkg" - dpkg --add-architecture i386 - dpkg --add-architecture amd64 @@ -52,8 +56,8 @@ default: - apt-get install apt-utils - echo -e "\e[0Ksection_end:`date +%s`:apt_pre\r\e[0K" - - - echo -e "\e[0Ksection_start:`date +%s`:apt_upgrade[collapsed=true]\r\e[0KUpdating existing packages (dry-run)" - - apt-get upgrade --simulate + - - echo -e "\e[0Ksection_start:`date +%s`:apt_upgrade[collapsed=true]\r\e[0KUpdating existing packages" + - apt-get upgrade - echo -e "\e[0Ksection_end:`date +%s`:apt_upgraden\r\e[0K" - - echo -e "\e[0Ksection_start:`date +%s`:apt_common[collapsed=true]\r\e[0KInstalling common packages" @@ -97,6 +101,10 @@ build-testing: variables: CC: gcc script: + - - echo -e "\e[0Ksection_start:`date +%s`:debconf[collapsed=true]\r\e[0KSetup debconf's environment" + - *debconf + - echo -e "\e[0Ksection_end:`date +%s`:debconf\r\e[0K" + - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - apt-get install gcc - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" @@ -106,7 +114,7 @@ build-testing: - echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" - - echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - - make --directory=src --keep-going CCACHE=1 NONX86=1 || make --directory=src --keep-going CCACHE=1 NONX86=1 + - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" build-i686-w64-mingw32: @@ -118,12 +126,16 @@ build-i686-w64-mingw32: variables: PREFIX: i686-w64-mingw32 script: + - - echo -e "\e[0Ksection_start:`date +%s`:debconf[collapsed=true]\r\e[0KSetup debconf's environment" + - *debconf + - echo -e "\e[0Ksection_end:`date +%s`:debconf\r\e[0K" + - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - apt-get install gcc-mingw-w64-i686-win32 - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" - - echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - - make --directory=src --keep-going CCACHE=1 MINGW=1 || make --directory=src --keep-going CCACHE=1 MINGW=1 + - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW=1 - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" build-x86_64-linux-gnu: @@ -138,6 +150,10 @@ build-x86_64-linux-gnu: OBJDUMP: x86_64-linux-gnu-objdump PKG_CONFIG_PATH: /usr/lib/x86_64-linux-gnu/pkgconfig script: + - - echo -e "\e[0Ksection_start:`date +%s`:debconf[collapsed=true]\r\e[0KSetup debconf's environment" + - *debconf + - echo -e "\e[0Ksection_end:`date +%s`:debconf\r\e[0K" + - - 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 - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" @@ -147,7 +163,7 @@ build-x86_64-linux-gnu: - echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" - - echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - - make --directory=src --keep-going CCACHE=1 LINUX64=1 || make --directory=src --keep-going CCACHE=1 LINUX64=1 + - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" build-i686-linux-gnu: @@ -162,6 +178,10 @@ build-i686-linux-gnu: OBJDUMP: i686-linux-gnu-objdump PKG_CONFIG_PATH: /usr/lib/i386-linux-gnu/pkgconfig script: + - - echo -e "\e[0Ksection_start:`date +%s`:debconf[collapsed=true]\r\e[0KSetup debconf's environment" + - *debconf + - echo -e "\e[0Ksection_end:`date +%s`:debconf\r\e[0K" + - - 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 - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" @@ -171,7 +191,7 @@ build-i686-linux-gnu: - echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" - - echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - - make --directory=src --keep-going CCACHE=1 LINUX=1 || make --directory=src --keep-going CCACHE=1 LINUX=1 + - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX=1 - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" build-aarch64-linux-gnu: @@ -186,6 +206,10 @@ build-aarch64-linux-gnu: OBJDUMP: aarch64-linux-gnu-objdump PKG_CONFIG_PATH: /usr/lib/aarch64-linux-gnu/pkgconfig script: + - - echo -e "\e[0Ksection_start:`date +%s`:debconf[collapsed=true]\r\e[0KSetup debconf's environment" + - *debconf + - echo -e "\e[0Ksection_end:`date +%s`:debconf\r\e[0K" + - - 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 - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" @@ -195,7 +219,7 @@ build-aarch64-linux-gnu: - echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" - - echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - - make --directory=src --keep-going CCACHE=1 LINUX64=1 NONX86=1 || make --directory=src --keep-going CCACHE=1 LINUX64=1 NONX86=1 + - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 ERRORMODE=1 NONX86=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 NONX86=1 - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" build-x86_64-w64-mingw32: @@ -207,10 +231,14 @@ build-x86_64-w64-mingw32: variables: PREFIX: x86_64-w64-mingw32 script: + - - echo -e "\e[0Ksection_start:`date +%s`:debconf[collapsed=true]\r\e[0KSetup debconf's environment" + - *debconf + - echo -e "\e[0Ksection_end:`date +%s`:debconf\r\e[0K" + - - 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 - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" - - echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - - make --directory=src --keep-going CCACHE=1 MINGW64=1 || make --directory=src --keep-going CCACHE=1 MINGW64=1 + - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW64=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW64=1 - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" From b8861b19127dabd54b0aed9032bf32975c85a50d Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sun, 15 Oct 2023 17:11:44 +0000 Subject: [PATCH 115/142] Update .gitlab-ci.yml file Let see if I need to need to run export again in the main build script --- .gitlab-ci.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2582d0cd3..abd769f03 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -101,10 +101,6 @@ build-testing: variables: CC: gcc script: - - - echo -e "\e[0Ksection_start:`date +%s`:debconf[collapsed=true]\r\e[0KSetup debconf's environment" - - *debconf - - echo -e "\e[0Ksection_end:`date +%s`:debconf\r\e[0K" - - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - apt-get install gcc - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" From 3adc15d5214b86fb87c959b85ce551db8c37d9ab Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sun, 15 Oct 2023 17:30:07 +0000 Subject: [PATCH 116/142] Update .gitlab-ci.yml file Only need to setup debconf in before_script --- .gitlab-ci.yml | 50 ++++++++++++++++---------------------------------- 1 file changed, 16 insertions(+), 34 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index abd769f03..27d95d6fe 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,19 +1,17 @@ -stages: # List of stages for jobs, and their order of execution - - build - default: image: debian:stable-slim -.debconf: &debconf - export DEBIAN_FRONTEND="noninteractive"; - export DEBIAN_PRIORITY="low"; - export DEBCONF_NONINTERACTIVE_SEEN="true"; - +stages: # List of stages for jobs, and their order of execution + - build + +variables: + GIT_STRATEGY: clone + GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_CONCURRENT_ID/$CI_PROJECT_PATH + .job_template: &job_build # This job runs in the build stage, which runs first. + stage: build - variables: - GIT_STRATEGY: clone - GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_CONCURRENT_ID/$CI_PROJECT_PATH + cache: - key: ccache-$CI_PROJECT_PATH_SLUG-$CI_JOB_NAME_SLUG fallback_keys: @@ -22,14 +20,18 @@ default: paths: - ccache - ccache_statslog + - key: apt-$CI_JOB_IMAGE paths: - apt-cache unprotect: true + before_script: - - - echo -e "\e[0Ksection_start:`date +%s`:debconf_pre[collapsed=true]\r\e[0KSetup debconf's environment" - - *debconf - - echo -e "\e[0Ksection_end:`date +%s`:debconf_pre\r\e[0K" + - - echo -e "\e[0Ksection_start:`date +%s`:debconf[collapsed=true]\r\e[0KSetup debconf's environment" + - export DEBIAN_FRONTEND="noninteractive" + - export DEBIAN_PRIORITY="low" + - export DEBCONF_NONINTERACTIVE_SEEN="true" + - echo -e "\e[0Ksection_end:`date +%s`:debconf\r\e[0K" - - echo -e "\e[0Ksection_start:`date +%s`:dpkg_aa[collapsed=true]\r\e[0KAdding architectures to dpkg" - dpkg --add-architecture i386 @@ -122,10 +124,6 @@ build-i686-w64-mingw32: variables: PREFIX: i686-w64-mingw32 script: - - - echo -e "\e[0Ksection_start:`date +%s`:debconf[collapsed=true]\r\e[0KSetup debconf's environment" - - *debconf - - echo -e "\e[0Ksection_end:`date +%s`:debconf\r\e[0K" - - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - apt-get install gcc-mingw-w64-i686-win32 - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" @@ -146,10 +144,6 @@ build-x86_64-linux-gnu: OBJDUMP: x86_64-linux-gnu-objdump PKG_CONFIG_PATH: /usr/lib/x86_64-linux-gnu/pkgconfig script: - - - echo -e "\e[0Ksection_start:`date +%s`:debconf[collapsed=true]\r\e[0KSetup debconf's environment" - - *debconf - - echo -e "\e[0Ksection_end:`date +%s`:debconf\r\e[0K" - - - 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 - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" @@ -174,10 +168,6 @@ build-i686-linux-gnu: OBJDUMP: i686-linux-gnu-objdump PKG_CONFIG_PATH: /usr/lib/i386-linux-gnu/pkgconfig script: - - - echo -e "\e[0Ksection_start:`date +%s`:debconf[collapsed=true]\r\e[0KSetup debconf's environment" - - *debconf - - echo -e "\e[0Ksection_end:`date +%s`:debconf\r\e[0K" - - - 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 - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" @@ -202,10 +192,6 @@ build-aarch64-linux-gnu: OBJDUMP: aarch64-linux-gnu-objdump PKG_CONFIG_PATH: /usr/lib/aarch64-linux-gnu/pkgconfig script: - - - echo -e "\e[0Ksection_start:`date +%s`:debconf[collapsed=true]\r\e[0KSetup debconf's environment" - - *debconf - - echo -e "\e[0Ksection_end:`date +%s`:debconf\r\e[0K" - - - 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 - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" @@ -227,10 +213,6 @@ build-x86_64-w64-mingw32: variables: PREFIX: x86_64-w64-mingw32 script: - - - echo -e "\e[0Ksection_start:`date +%s`:debconf[collapsed=true]\r\e[0KSetup debconf's environment" - - *debconf - - echo -e "\e[0Ksection_end:`date +%s`:debconf\r\e[0K" - - - 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 - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" From aa21dcad33857980e6203fe67da2954c26beff5a Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sun, 15 Oct 2023 17:50:45 +0000 Subject: [PATCH 117/142] Update .gitlab-ci.yml file Try to hide echos --- .gitlab-ci.yml | 197 ++++++++++++++++++++++++++++++++----------------- 1 file changed, 131 insertions(+), 66 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 27d95d6fe..c1d983e53 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -27,70 +27,103 @@ variables: unprotect: true before_script: - - - echo -e "\e[0Ksection_start:`date +%s`:debconf[collapsed=true]\r\e[0KSetup debconf's environment" + - - | + echo -e "\e[0Ksection_start:`date +%s`:debconf[collapsed=true]\r\e[0KSetup debconf's environment" - export DEBIAN_FRONTEND="noninteractive" - export DEBIAN_PRIORITY="low" - export DEBCONF_NONINTERACTIVE_SEEN="true" - - echo -e "\e[0Ksection_end:`date +%s`:debconf\r\e[0K" + - | + echo -e "\e[0Ksection_end:`date +%s`:debconf\r\e[0K" - - - echo -e "\e[0Ksection_start:`date +%s`:dpkg_aa[collapsed=true]\r\e[0KAdding architectures to dpkg" + - - | + echo -e "\e[0Ksection_start:`date +%s`:dpkg_aa[collapsed=true]\r\e[0KAdding architectures to dpkg" - dpkg --add-architecture i386 - dpkg --add-architecture amd64 - dpkg --add-architecture arm64 - - echo -e "\e[0Ksection_end:`date +%s`:dpkg_aa\r\e[0K" + - | + echo -e "\e[0Ksection_end:`date +%s`:dpkg_aa\r\e[0K" - - - echo -e "\e[0Ksection_start:`date +%s`:apt_conf[collapsed=true]\r\e[0KSetting up APT conf" + - - | + echo -e "\e[0Ksection_start:`date +%s`:apt_conf[collapsed=true]\r\e[0KSetting up APT conf" - export APT_CACHE_DIR=`pwd`/apt-cache - - touch /etc/apt/apt.conf.d/99build - - echo Adding options to apt.conf':' - - echo APT::Install-Recommends "false"\; | tee --append /etc/apt/apt.conf.d/99build - - echo quiet "1"\; | tee --append /etc/apt/apt.conf.d/99build - - echo APT::Get::Assume-Yes "true"\; | tee --append /etc/apt/apt.conf.d/99build - - echo Dir::Cache::Archives "$APT_CACHE_DIR"\; | tee --append /etc/apt/apt.conf.d/99build - mkdir --parents --verbose $APT_CACHE_DIR/partial/ - - echo -e "\e[0Ksection_end:`date +%s`:apt_conf\r\e[0K" + - touch /etc/apt/apt.conf.d/99build + - | + echo Adding options to apt.conf':' + - | + echo APT::Install-Recommends "false"\; | tee --append /etc/apt/apt.conf.d/99build + - | + echo quiet "1"\; | tee --append /etc/apt/apt.conf.d/99build + - | + echo APT::Get::Assume-Yes "true"\; | tee --append /etc/apt/apt.conf.d/99build + - | + echo Dir::Cache::Archives "$APT_CACHE_DIR"\; | tee --append /etc/apt/apt.conf.d/99build + - | + echo -e "\e[0Ksection_end:`date +%s`:apt_conf\r\e[0K" - - - echo -e "\e[0Ksection_start:`date +%s`:apt_update[collapsed=true]\r\e[0KUpdating APT listing" + - - | + echo -e "\e[0Ksection_start:`date +%s`:apt_update[collapsed=true]\r\e[0KUpdating APT listing" - apt-get update - - echo -e "\e[0Ksection_end:`date +%s`:apt_update\r\e[0K" + - | + echo -e "\e[0Ksection_end:`date +%s`:apt_update\r\e[0K" - - - echo -e "\e[0Ksection_start:`date +%s`:apt_pre[collapsed=true]\r\e[0KInstalling pre packages" + - - | + echo -e "\e[0Ksection_start:`date +%s`:apt_pre[collapsed=true]\r\e[0KInstalling pre packages" - apt-get install apt-utils - - echo -e "\e[0Ksection_end:`date +%s`:apt_pre\r\e[0K" + - | + echo -e "\e[0Ksection_end:`date +%s`:apt_pre\r\e[0K" - - - echo -e "\e[0Ksection_start:`date +%s`:apt_upgrade[collapsed=true]\r\e[0KUpdating existing packages" + - - | + echo -e "\e[0Ksection_start:`date +%s`:apt_upgrade[collapsed=true]\r\e[0KUpdating existing packages" - apt-get upgrade - - echo -e "\e[0Ksection_end:`date +%s`:apt_upgraden\r\e[0K" + - | + echo -e "\e[0Ksection_end:`date +%s`:apt_upgraden\r\e[0K" - - - echo -e "\e[0Ksection_start:`date +%s`:apt_common[collapsed=true]\r\e[0KInstalling common packages" + - - | + echo -e "\e[0Ksection_start:`date +%s`:apt_common[collapsed=true]\r\e[0KInstalling common packages" - apt-get install make git ccache - - echo -e "\e[0Ksection_end:`date +%s`:apt_common\r\e[0K" + - | + echo -e "\e[0Ksection_end:`date +%s`:apt_common\r\e[0K" - - - echo -e "\e[0Ksection_start:`date +%s`:ccache_config[collapsed=true]\r\e[0KSetting up ccache config" - - echo Adding ccache configution option + - - | + 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 - - echo base_dir = $PWD | tee --append ~/.ccache/ccache.conf - - echo cache_dir = $PWD/ccache | tee --append ~/.ccache/ccache.conf - - echo compiler_check = content | tee --append ~/.ccache/ccache.conf - - echo stats_log = $PWD/ccache_statslog | tee --append ~/.ccache/ccache.conf - - echo max_size = 50M | tee --append ~/.ccache/ccache.conf - - echo -e "\e[0Ksection_end:`date +%s`:ccache_config\r\e[0K" + - | + echo Adding ccache configution option + - | + echo base_dir = $PWD | tee --append ~/.ccache/ccache.conf + - | + echo cache_dir = $PWD/ccache | tee --append ~/.ccache/ccache.conf + - | + echo compiler_check = content | tee --append ~/.ccache/ccache.conf + - | + echo stats_log = $PWD/ccache_statslog | tee --append ~/.ccache/ccache.conf + - | + echo max_size = 50M | tee --append ~/.ccache/ccache.conf + - | + echo -e "\e[0Ksection_end:`date +%s`:ccache_config\r\e[0K" - - - echo -e "\e[0Ksection_start:`date +%s`:ccache_reset[collapsed=true]\r\e[0KResetting ccache statistics" + - - | + echo -e "\e[0Ksection_start:`date +%s`:ccache_reset[collapsed=true]\r\e[0KResetting ccache statistics" - ccache --zero-stats - ccache --show-stats - - echo -e "\e[0Ksection_end:`date +%s`:ccache_reset\r\e[0K" + - | + echo -e "\e[0Ksection_end:`date +%s`:ccache_reset\r\e[0K" after_script: - - - echo -e "\e[0Ksection_start:`date +%s`:apt_clean[collapsed=true]\r\e[0KCleaning of unneeded APT packages" + - - | + echo -e "\e[0Ksection_start:`date +%s`:apt_clean[collapsed=true]\r\e[0KCleaning of unneeded APT packages" - apt-get autoclean - - echo -e "\e[0Ksection_end:`date +%s`:apt_clean\r\e[0K" + - | + echo -e "\e[0Ksection_end:`date +%s`:apt_clean\r\e[0K" - - - echo -e "\e[0Ksection_start:`date +%s`:ccache_stats[collapsed=true]\r\e[0Kccache statistics:" + - - | + echo -e "\e[0Ksection_start:`date +%s`:ccache_stats[collapsed=true]\r\e[0Kccache statistics:" - ccache --show-stats --verbose - ccache --show-log-stats --verbose - - echo -e "\e[0Ksection_end:`date +%s`:ccache_stats\r\e[0K" + - | + echo -e "\e[0Ksection_end:`date +%s`:ccache_stats\r\e[0K" build-testing: <<: *job_build @@ -103,17 +136,23 @@ build-testing: variables: CC: gcc script: - - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" + - - | + echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - apt-get install gcc - - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" + - | + echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" - - - echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages" + - - | + echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages" - apt-get install libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev libopenmpt-dev - - echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" + - | + echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" - - - echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" + - - | + echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 - - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" + - | + echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" build-i686-w64-mingw32: <<: *job_build @@ -124,13 +163,17 @@ build-i686-w64-mingw32: variables: PREFIX: i686-w64-mingw32 script: - - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" + - - | + echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - apt-get install gcc-mingw-w64-i686-win32 - - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" + - | + echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" - - - echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" + - - | + echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW=1 - - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" + - | + echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" build-x86_64-linux-gnu: <<: *job_build @@ -144,17 +187,23 @@ build-x86_64-linux-gnu: OBJDUMP: x86_64-linux-gnu-objdump PKG_CONFIG_PATH: /usr/lib/x86_64-linux-gnu/pkgconfig script: - - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" + - - | + 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 - - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" + - | + echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" - - - echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages" + - - | + echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages" - apt-get install libsdl2-mixer-dev:amd64 libpng-dev:amd64 libcurl4-openssl-dev:amd64 libgme-dev:amd64 libopenmpt-dev:amd64 - - echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" + - | + echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" - - - echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" + - - | + echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 - - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" + - | + echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" build-i686-linux-gnu: <<: *job_build @@ -168,17 +217,23 @@ build-i686-linux-gnu: OBJDUMP: i686-linux-gnu-objdump PKG_CONFIG_PATH: /usr/lib/i386-linux-gnu/pkgconfig script: - - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" + - - | + 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 - - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" + - | + echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" - - - echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages" + - - | + echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages" - apt-get install libsdl2-mixer-dev:i386 libpng-dev:i386 libcurl4-openssl-dev:i386 libgme-dev:i386 libopenmpt-dev:i386 - - echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" + - | + echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" - - - echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" + - - | + echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX=1 - - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" + - | + echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" build-aarch64-linux-gnu: <<: *job_build @@ -192,17 +247,23 @@ build-aarch64-linux-gnu: OBJDUMP: aarch64-linux-gnu-objdump PKG_CONFIG_PATH: /usr/lib/aarch64-linux-gnu/pkgconfig script: - - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" + - - | + 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 - - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" + - | + echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" - - - echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages" + - - | + echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages" - apt-get install libsdl2-mixer-dev:arm64 libpng-dev:arm64 libcurl4-openssl-dev:arm64 libgme-dev:arm64 libopenmpt-dev:arm64 - - echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" + - | + echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" - - - echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" + - - | + echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 ERRORMODE=1 NONX86=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 NONX86=1 - - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" + - | + echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" build-x86_64-w64-mingw32: <<: *job_build @@ -213,10 +274,14 @@ build-x86_64-w64-mingw32: variables: PREFIX: x86_64-w64-mingw32 script: - - - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" + - - | + 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 - - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" + - | + echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" - - - echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" + - - | + echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW64=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW64=1 - - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" + - | + echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" From 35f57882e47c1206076567ac9e078d46b91a355a Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sun, 15 Oct 2023 14:16:13 -0400 Subject: [PATCH 118/142] signalhandlers are function of NORETURN --- src/sdl/i_system.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sdl/i_system.c b/src/sdl/i_system.c index be46cd804..98e036130 100644 --- a/src/sdl/i_system.c +++ b/src/sdl/i_system.c @@ -2265,7 +2265,7 @@ void I_Sleep(UINT32 ms) } #ifdef NEWSIGNALHANDLER -static void newsignalhandler_Warn(const char *pr) +ATTRNORETURN static FUNCNORETURN void newsignalhandler_Warn(const char *pr) { char text[128]; From aaebcc6ce1b442589a352e0568a40407cd86c4f3 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sun, 15 Oct 2023 14:24:20 -0400 Subject: [PATCH 119/142] Update src/hardware/hw_batching.c fix misleading indentation --- src/hardware/hw_batching.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/hardware/hw_batching.c b/src/hardware/hw_batching.c index d1b84a5ee..dc0b5ee5b 100644 --- a/src/hardware/hw_batching.c +++ b/src/hardware/hw_batching.c @@ -42,10 +42,10 @@ int unsortedVertexArrayAllocSize = 65536; // Call HWR_RenderBatches to render all the collected geometry. void HWR_StartBatching(void) { - if (currently_batching) - I_Error("Repeat call to HWR_StartBatching without HWR_RenderBatches"); + if (currently_batching) + I_Error("Repeat call to HWR_StartBatching without HWR_RenderBatches"); - // init arrays if that has not been done yet + // init arrays if that has not been done yet if (!finalVertexArray) { finalVertexArray = malloc(finalVertexArrayAllocSize * sizeof(FOutVector)); @@ -55,7 +55,7 @@ void HWR_StartBatching(void) unsortedVertexArray = malloc(unsortedVertexArrayAllocSize * sizeof(FOutVector)); } - currently_batching = true; + currently_batching = true; } // This replaces the direct calls to pfnSetTexture in cases where batching is available. From bc852fa099ffcaa345b1230cc094e8989a098721 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sun, 15 Oct 2023 14:34:53 -0400 Subject: [PATCH 120/142] remove unused variables that was only set --- src/hardware/hw_main.c | 3 --- src/hardware/hw_model.c | 3 --- 2 files changed, 6 deletions(-) diff --git a/src/hardware/hw_main.c b/src/hardware/hw_main.c index f2022bcea..8260271bd 100644 --- a/src/hardware/hw_main.c +++ b/src/hardware/hw_main.c @@ -4141,14 +4141,11 @@ static void HWR_DrawSprite(gl_vissprite_t *spr) float xscale, yscale; float xoffset, yoffset; float leftoffset, topoffset; - float scale = spr->scale; float zoffset = (P_MobjFlip(spr->mobj) * 0.05f); pslope_t *splatslope = NULL; INT32 i; renderflags_t renderflags = spr->renderflags; - if (renderflags & RF_SHADOWEFFECTS) - scale *= spr->shadowscale; if (spr->rotateflags & SRF_3D || renderflags & RF_NOSPLATBILLBOARD) angle = spr->mobj->angle; diff --git a/src/hardware/hw_model.c b/src/hardware/hw_model.c index b69bce0e2..9319939c0 100644 --- a/src/hardware/hw_model.c +++ b/src/hardware/hw_model.c @@ -663,7 +663,6 @@ void GeneratePolygonNormals(model_t *model, int ztag) { int k; mdlframe_t *frame = &mesh->frames[j]; - const float *vertices = frame->vertices; vector_t *polyNormals; frame->polyNormals = (vector_t*)Z_Malloc(sizeof(vector_t) * mesh->numTriangles, ztag, 0); @@ -672,8 +671,6 @@ void GeneratePolygonNormals(model_t *model, int ztag) for (k = 0; k < mesh->numTriangles; k++) { -// Vector::Normal(vertices, polyNormals); - vertices += 3 * 3; polyNormals++; } } From 6c19fcc607534c2fd9bc79453cc08cd31b7c4782 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sun, 15 Oct 2023 18:56:06 +0000 Subject: [PATCH 121/142] Update .gitlab-ci.yml file Try compiling with clang --- .gitlab-ci.yml | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c1d983e53..ed75730fd 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -128,13 +128,17 @@ variables: build-testing: <<: *job_build image: debian:testing-slim + allow_failure: true + artifacts: paths: - "bin/lsdl2srb2*" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-testing" + variables: CC: gcc + script: - - | echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" @@ -156,12 +160,15 @@ build-testing: build-i686-w64-mingw32: <<: *job_build + artifacts: paths: - "bin/srb2win.exe*" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win32" + variables: PREFIX: i686-w64-mingw32 + script: - - | echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" @@ -177,15 +184,18 @@ build-i686-w64-mingw32: build-x86_64-linux-gnu: <<: *job_build + artifacts: paths: - "bin/lsdl2srb2*" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-x86-64" + variables: CC: x86_64-linux-gnu-gcc OBJCOPY: x86_64-linux-gnu-objcopy OBJDUMP: x86_64-linux-gnu-objdump PKG_CONFIG_PATH: /usr/lib/x86_64-linux-gnu/pkgconfig + script: - - | echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" @@ -207,15 +217,18 @@ build-x86_64-linux-gnu: build-i686-linux-gnu: <<: *job_build + artifacts: paths: - "bin/lsdl2srb2*" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-i686" + variables: CC: i686-linux-gnu-gcc OBJCOPY: i686-linux-gnu-objcopy OBJDUMP: i686-linux-gnu-objdump PKG_CONFIG_PATH: /usr/lib/i386-linux-gnu/pkgconfig + script: - - | echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" @@ -237,15 +250,18 @@ build-i686-linux-gnu: build-aarch64-linux-gnu: <<: *job_build + artifacts: paths: - "bin/lsdl2srb2*" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-aarch64" + variables: CC: aarch64-linux-gnu-gcc OBJCOPY: aarch64-linux-gnu-objcopy OBJDUMP: aarch64-linux-gnu-objdump PKG_CONFIG_PATH: /usr/lib/aarch64-linux-gnu/pkgconfig + script: - - | echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" @@ -267,12 +283,15 @@ build-aarch64-linux-gnu: build-x86_64-w64-mingw32: <<: *job_build + artifacts: paths: - "bin/srb2win64.exe*" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win64" + variables: PREFIX: x86_64-w64-mingw32 + script: - - | echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" @@ -285,3 +304,37 @@ build-x86_64-w64-mingw32: - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW64=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW64=1 - | echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" + +build-clang: + <<: *job_build + + allow_failure: true + + artifacts: + paths: + - "bin/lsdl2srb2*" + name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-testing" + + variables: + CC: clang + CFLAGS: -Wno-cast-align + + script: + - - | + echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" + - apt-get install clang + - | + echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" + + - - | + echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages" + - apt-get install libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev libopenmpt-dev + - | + echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" + + - - | + echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" + - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 + - | + echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" + From b6aaf582d12c745c542a71c3c75df741fded1bf2 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sun, 15 Oct 2023 15:29:20 -0400 Subject: [PATCH 122/142] Update src/hardware/mw_md2.c fscanf need 26 chars in the name buffer --- src/hardware/hw_md2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hardware/hw_md2.c b/src/hardware/hw_md2.c index 6123eb9a9..914683db7 100644 --- a/src/hardware/hw_md2.c +++ b/src/hardware/hw_md2.c @@ -486,7 +486,7 @@ void HWR_InitModels(void) size_t i; INT32 s; FILE *f; - char name[24], filename[32]; + char name[26], filename[32]; float scale, offset; size_t prefixlen; From 1372b60db9912288121a980709e38c186189b9f0 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sun, 15 Oct 2023 16:00:25 -0400 Subject: [PATCH 123/142] Update src/hardware/mw_md2.c there are 2 more name buffers that need to be bigger --- src/hardware/hw_md2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hardware/hw_md2.c b/src/hardware/hw_md2.c index 914683db7..0f8342135 100644 --- a/src/hardware/hw_md2.c +++ b/src/hardware/hw_md2.c @@ -585,7 +585,7 @@ modelfound: void HWR_AddPlayerModel(int skin) // For skins that were added after startup { FILE *f; - char name[24], filename[32]; + char name[26], filename[32]; float scale, offset; size_t prefixlen; @@ -644,7 +644,7 @@ void HWR_AddSpriteModel(size_t spritenum) // For sprites that were added after s // name[24] is used to check for names in the models.dat file that match with sprites or player skins // sprite names are always 4 characters long, and names is for player skins can be up to 19 characters long // PLAYERMODELPREFIX is 6 characters long - char name[24], filename[32]; + char name[26], filename[32]; float scale, offset; if (nomd2s) From 976a2850af54c0abcff0fab991e5a3b66bea8636 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sun, 15 Oct 2023 16:02:27 -0400 Subject: [PATCH 124/142] Update .gitlab-ci.yml file change name of artifact for clang build --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ed75730fd..7db8198d3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -313,7 +313,7 @@ build-clang: artifacts: paths: - "bin/lsdl2srb2*" - name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-testing" + name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-clang" variables: CC: clang From b27de309a87051160903035a565f65c9cfd13a60 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sun, 15 Oct 2023 20:32:11 +0000 Subject: [PATCH 125/142] Update .gitlab-ci.yml file Testing compiling with Debian's testing clang package --- .gitlab-ci.yml | 38 +++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7db8198d3..890b4b94a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -134,7 +134,7 @@ build-testing: artifacts: paths: - "bin/lsdl2srb2*" - name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-testing" + name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-testing-gcc" variables: CC: gcc @@ -338,3 +338,39 @@ build-clang: - | echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" + +build-clang-testing: + <<: *job_build + + image: debian:testing-slim + + allow_failure: true + + artifacts: + paths: + - "bin/lsdl2srb2*" + name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-testing-clang" + + variables: + CC: clang + CFLAGS: -Wno-cast-align + + script: + - - | + echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" + - apt-get install clang + - | + echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" + + - - | + echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages" + - apt-get install libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev libopenmpt-dev + - | + echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" + + - - | + echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" + - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 + - | + echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" + From 4bec14342760a5f6b547d0e80a4581a5e8e992a1 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sun, 15 Oct 2023 23:42:27 +0000 Subject: [PATCH 126/142] Update .gitlab-ci.yml file Do not care for non-prototypes for clang-testing job --- .gitlab-ci.yml | 26 +++----------------------- 1 file changed, 3 insertions(+), 23 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 890b4b94a..527dc1804 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -342,9 +342,9 @@ build-clang: build-clang-testing: <<: *job_build - image: debian:testing-slim + extends: build-clang - allow_failure: true + image: debian:testing-slim artifacts: paths: @@ -353,24 +353,4 @@ build-clang-testing: variables: CC: clang - CFLAGS: -Wno-cast-align - - script: - - - | - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - - apt-get install clang - - | - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" - - - - | - echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages" - - apt-get install libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev libopenmpt-dev - - | - echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" - - - - | - echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 - - | - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" - + CFLAGS: -Wno-cast-align -Wno-deprecated-non-prototype From 6a37b3c0c66ee30ecdcc67b8bad793d97c12c70d Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sun, 15 Oct 2023 20:30:06 -0400 Subject: [PATCH 127/142] Update src/hardware/mw_model.c Restore old code in GeneratePolygonNormals(), add TODO --- src/hardware/hw_model.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/hardware/hw_model.c b/src/hardware/hw_model.c index 9319939c0..4b6bce6f7 100644 --- a/src/hardware/hw_model.c +++ b/src/hardware/hw_model.c @@ -663,6 +663,7 @@ void GeneratePolygonNormals(model_t *model, int ztag) { int k; mdlframe_t *frame = &mesh->frames[j]; + const float *vertices = frame->vertices; vector_t *polyNormals; frame->polyNormals = (vector_t*)Z_Malloc(sizeof(vector_t) * mesh->numTriangles, ztag, 0); @@ -671,6 +672,11 @@ void GeneratePolygonNormals(model_t *model, int ztag) for (k = 0; k < mesh->numTriangles; k++) { + /// TODO: normalize vectors + (void)vertices; + (void)polyNormals; +// Vector::Normal(vertices, polyNormals); + vertices += 3 * 3; polyNormals++; } } From de4a8a193bc56eb6b1e3cf936cdec89407cdb0c9 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sun, 15 Oct 2023 20:31:57 -0400 Subject: [PATCH 128/142] Update src/d_clisrv.c Remove unused i var in Ban_Load_File() --- src/d_clisrv.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/d_clisrv.c b/src/d_clisrv.c index 83482b527..1ec9cf1e9 100755 --- a/src/d_clisrv.c +++ b/src/d_clisrv.c @@ -2743,7 +2743,6 @@ static void Command_ClearBans(void) static void Ban_Load_File(boolean warning) { FILE *f; - size_t i; const char *address, *mask; char buffer[MAX_WADPATH]; @@ -2761,7 +2760,7 @@ static void Ban_Load_File(boolean warning) Ban_Clear(); - for (i=0; fgets(buffer, (int)sizeof(buffer), f); i++) + for (; fgets(buffer, (int)sizeof(buffer), f);) { address = strtok(buffer, " \t\r\n"); mask = strtok(NULL, " \t\r\n"); From 2865873e7040222632a6d3aa1573c4ea44d704d5 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sun, 15 Oct 2023 20:35:04 -0400 Subject: [PATCH 129/142] Update src/lua_baselib.c No need of counting bots. --- src/lua_baselib.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/lua_baselib.c b/src/lua_baselib.c index 4af5066ae..1d183cdec 100644 --- a/src/lua_baselib.c +++ b/src/lua_baselib.c @@ -3544,7 +3544,7 @@ static int lib_gAddGametype(lua_State *L) // Partly lifted from Got_AddPlayer static int lib_gAddPlayer(lua_State *L) { - INT16 i, newplayernum, botcount = 1; + INT16 i, newplayernum; player_t *newplayer; SINT8 skinnum = 0, bot; @@ -3552,10 +3552,8 @@ static int lib_gAddPlayer(lua_State *L) { if (!playeringame[i]) break; - - if (players[i].bot) - botcount++; // How many of us are there already? } + if (i >= MAXPLAYERS) { lua_pushnil(L); From 33f6deb7f02e4f7f88a6e4903af24fe42473e89a Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sun, 15 Oct 2023 23:57:00 -0400 Subject: [PATCH 130/142] Update sc/netcode/commands.c 'i' variable is set but unused in Ban_Load_File() --- src/netcode/commands.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/netcode/commands.c b/src/netcode/commands.c index 4228027d2..4b67198ba 100644 --- a/src/netcode/commands.c +++ b/src/netcode/commands.c @@ -96,7 +96,7 @@ void Ban_Load_File(boolean warning) Ban_Clear(); - for (size_t i=0; fgets(buffer, (int)sizeof(buffer), f); i++) + for (; fgets(buffer, (int)sizeof(buffer), f);) { address = strtok(buffer, " \t\r\n"); mask = strtok(NULL, " \t\r\n"); From 330b10cbb593bf859726334b7435b7a8d114cfdf Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Tue, 17 Oct 2023 01:41:43 +0000 Subject: [PATCH 131/142] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 263 ++++++++++++++++++++++++++++++++----------------- 1 file changed, 170 insertions(+), 93 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 527dc1804..a849aea28 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -28,104 +28,134 @@ variables: before_script: - - | - echo -e "\e[0Ksection_start:`date +%s`:debconf[collapsed=true]\r\e[0KSetup debconf's environment" + # debconf + echo -e "\e[0Ksection_start:`date +%s`:debconf[collapsed=true]\r\e[0KSetup debconf's environment" - export DEBIAN_FRONTEND="noninteractive" - export DEBIAN_PRIORITY="low" - export DEBCONF_NONINTERACTIVE_SEEN="true" - | - echo -e "\e[0Ksection_end:`date +%s`:debconf\r\e[0K" - + # debconf + echo -e "\e[0Ksection_end:`date +%s`:debconf\r\e[0K" - - | - echo -e "\e[0Ksection_start:`date +%s`:dpkg_aa[collapsed=true]\r\e[0KAdding architectures to dpkg" + # dpkg_aa + echo -e "\e[0Ksection_start:`date +%s`:dpkg_aa[collapsed=true]\r\e[0KAdding architectures to dpkg" - dpkg --add-architecture i386 - dpkg --add-architecture amd64 - dpkg --add-architecture arm64 - | - echo -e "\e[0Ksection_end:`date +%s`:dpkg_aa\r\e[0K" - + # dpkg_aa + echo -e "\e[0Ksection_end:`date +%s`:dpkg_aa\r\e[0K" - - | - echo -e "\e[0Ksection_start:`date +%s`:apt_conf[collapsed=true]\r\e[0KSetting up APT conf" + # apt_conf + echo -e "\e[0Ksection_start:`date +%s`:apt_conf[collapsed=true]\r\e[0KSetting up APT conf" - export APT_CACHE_DIR=`pwd`/apt-cache - mkdir --parents --verbose $APT_CACHE_DIR/partial/ - touch /etc/apt/apt.conf.d/99build - | - echo Adding options to apt.conf':' + # apt.conf + echo Adding options to apt.conf':' - | - echo APT::Install-Recommends "false"\; | tee --append /etc/apt/apt.conf.d/99build + # APT::Install-Recommends + echo APT::Install-Recommends "false"\; | tee --append /etc/apt/apt.conf.d/99build - | - echo quiet "1"\; | tee --append /etc/apt/apt.conf.d/99build + # quit + echo quiet "1"\; | tee --append /etc/apt/apt.conf.d/99build - | - echo APT::Get::Assume-Yes "true"\; | tee --append /etc/apt/apt.conf.d/99build + # APT::Get::Assume-Yes + echo APT::Get::Assume-Yes "true"\; | tee --append /etc/apt/apt.conf.d/99build - | - echo Dir::Cache::Archives "$APT_CACHE_DIR"\; | tee --append /etc/apt/apt.conf.d/99build + # Dir::Cache::Archives + echo Dir::Cache::Archives "$APT_CACHE_DIR"\; | tee --append /etc/apt/apt.conf.d/99build - | - echo -e "\e[0Ksection_end:`date +%s`:apt_conf\r\e[0K" - + # apt_conf + echo -e "\e[0Ksection_end:`date +%s`:apt_conf\r\e[0K" - - | - echo -e "\e[0Ksection_start:`date +%s`:apt_update[collapsed=true]\r\e[0KUpdating APT listing" + # apt_update + echo -e "\e[0Ksection_start:`date +%s`:apt_update[collapsed=true]\r\e[0KUpdating APT listing" - apt-get update - | - echo -e "\e[0Ksection_end:`date +%s`:apt_update\r\e[0K" + # apt_update + echo -e "\e[0Ksection_end:`date +%s`:apt_update\r\e[0K" - - | - echo -e "\e[0Ksection_start:`date +%s`:apt_pre[collapsed=true]\r\e[0KInstalling pre packages" + # apt_pre + echo -e "\e[0Ksection_start:`date +%s`:apt_pre[collapsed=true]\r\e[0KInstalling pre packages" - apt-get install apt-utils - | - echo -e "\e[0Ksection_end:`date +%s`:apt_pre\r\e[0K" + # apt_pre + echo -e "\e[0Ksection_end:`date +%s`:apt_pre\r\e[0K" - - | - echo -e "\e[0Ksection_start:`date +%s`:apt_upgrade[collapsed=true]\r\e[0KUpdating existing packages" + # apt_upgrade + echo -e "\e[0Ksection_start:`date +%s`:apt_upgrade[collapsed=true]\r\e[0KUpdating existing packages" - apt-get upgrade - | - echo -e "\e[0Ksection_end:`date +%s`:apt_upgraden\r\e[0K" + # apt_update + echo -e "\e[0Ksection_end:`date +%s`:apt_upgrade\r\e[0K" - - | - echo -e "\e[0Ksection_start:`date +%s`:apt_common[collapsed=true]\r\e[0KInstalling common packages" + # apt_common + echo -e "\e[0Ksection_start:`date +%s`:apt_common[collapsed=true]\r\e[0KInstalling common packages" - apt-get install make git ccache - | - echo -e "\e[0Ksection_end:`date +%s`:apt_common\r\e[0K" + # apt_common + echo -e "\e[0Ksection_end:`date +%s`:apt_common\r\e[0K" - - | - echo -e "\e[0Ksection_start:`date +%s`:ccache_config[collapsed=true]\r\e[0KSetting up ccache config" + # 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 - | - echo Adding ccache configution option + # cache.conf + echo Adding ccache configution option - | - echo base_dir = $PWD | tee --append ~/.ccache/ccache.conf + # base_dir + echo base_dir = $PWD | tee --append ~/.ccache/ccache.conf - | - echo cache_dir = $PWD/ccache | tee --append ~/.ccache/ccache.conf + # cache_dir + echo cache_dir = $PWD/ccache | tee --append ~/.ccache/ccache.conf - | - echo compiler_check = content | tee --append ~/.ccache/ccache.conf + # compiler_check + echo compiler_check = content | tee --append ~/.ccache/ccache.conf - | - echo stats_log = $PWD/ccache_statslog | tee --append ~/.ccache/ccache.conf + # stats_log + echo stats_log = $PWD/ccache_statslog | tee --append ~/.ccache/ccache.conf - | - echo max_size = 50M | tee --append ~/.ccache/ccache.conf + # max_size + echo max_size = 50M | tee --append ~/.ccache/ccache.conf - | - echo -e "\e[0Ksection_end:`date +%s`:ccache_config\r\e[0K" + # ccache_config + echo -e "\e[0Ksection_end:`date +%s`:ccache_config\r\e[0K" - - | - echo -e "\e[0Ksection_start:`date +%s`:ccache_reset[collapsed=true]\r\e[0KResetting ccache statistics" + # cache_reset + echo -e "\e[0Ksection_start:`date +%s`:ccache_reset[collapsed=true]\r\e[0KResetting ccache statistics" - ccache --zero-stats - ccache --show-stats - | - echo -e "\e[0Ksection_end:`date +%s`:ccache_reset\r\e[0K" + # ccache_reset + echo -e "\e[0Ksection_end:`date +%s`:ccache_reset\r\e[0K" after_script: - - | - echo -e "\e[0Ksection_start:`date +%s`:apt_clean[collapsed=true]\r\e[0KCleaning of unneeded APT packages" + # apt_clean + echo -e "\e[0Ksection_start:`date +%s`:apt_clean[collapsed=true]\r\e[0KCleaning of unneeded APT packages" - apt-get autoclean - | - echo -e "\e[0Ksection_end:`date +%s`:apt_clean\r\e[0K" + # apt_clean + echo -e "\e[0Ksection_end:`date +%s`:apt_clean\r\e[0K" - - | - echo -e "\e[0Ksection_start:`date +%s`:ccache_stats[collapsed=true]\r\e[0Kccache statistics:" + # ccache_stats + echo -e "\e[0Ksection_start:`date +%s`:ccache_stats[collapsed=true]\r\e[0Kccache statistics:" - ccache --show-stats --verbose - ccache --show-log-stats --verbose - | - echo -e "\e[0Ksection_end:`date +%s`:ccache_stats\r\e[0K" + # ccahe_stats + echo -e "\e[0Ksection_end:`date +%s`:ccache_stats\r\e[0K" -build-testing: +Debian testing GCC: <<: *job_build image: debian:testing-slim @@ -133,7 +163,8 @@ build-testing: artifacts: paths: - - "bin/lsdl2srb2*" + - "bin/" + - "src/comptime.h" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-testing-gcc" variables: @@ -141,29 +172,36 @@ build-testing: script: - - | - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" + # apt_toolchain + echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - apt-get install gcc - | - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" + # apt_toolchain + echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" - - | - echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages" + # apt_development + echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages" - apt-get install libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev libopenmpt-dev - | - echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" + # apt_development + echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" - - | - echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" + # make + echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 - | - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" + # make + echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" -build-i686-w64-mingw32: +Windows x86: <<: *job_build artifacts: paths: - - "bin/srb2win.exe*" + - "bin/" + - "src/comptime.h" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win32" variables: @@ -171,23 +209,28 @@ build-i686-w64-mingw32: script: - - | - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" + # 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 - | - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" + # apt_toolchain + echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" - - | - echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" + # make + echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW=1 - | - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" + # make + echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" -build-x86_64-linux-gnu: +Debian stable:amd64: <<: *job_build artifacts: paths: - - "bin/lsdl2srb2*" + - "bin/" + - "src/comptime.h" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-x86-64" variables: @@ -198,29 +241,36 @@ build-x86_64-linux-gnu: script: - - | - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" + # 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 - | - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" + # apt_toolchain + echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" - - | - echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages" + # apt_development + echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages" - apt-get install libsdl2-mixer-dev:amd64 libpng-dev:amd64 libcurl4-openssl-dev:amd64 libgme-dev:amd64 libopenmpt-dev:amd64 - | - echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" + # apt_development + echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" - - | - echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" + # make + echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 - | - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" + # make + echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" -build-i686-linux-gnu: +Debian stable:i386: <<: *job_build artifacts: paths: - - "bin/lsdl2srb2*" + - "bin/" + - "src/comptime.h" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-i686" variables: @@ -231,29 +281,36 @@ build-i686-linux-gnu: script: - - | - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" + # 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 - | - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" + # apt_toolchain + echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" - - | - echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages" + # apt_development + echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages" - apt-get install libsdl2-mixer-dev:i386 libpng-dev:i386 libcurl4-openssl-dev:i386 libgme-dev:i386 libopenmpt-dev:i386 - | - echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" + # apt_development + echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" - - | - echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" + # make + echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX=1 - | - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" + # make + echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" -build-aarch64-linux-gnu: +Debian stable:arm64: <<: *job_build artifacts: paths: - - "bin/lsdl2srb2*" + - "bin/" + - "src/comptime.h" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-aarch64" variables: @@ -264,29 +321,37 @@ build-aarch64-linux-gnu: script: - - | - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" + # 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 - | - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" + # apt_toolchain + echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" - - | - echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages" + # apt_development + echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages" - apt-get install libsdl2-mixer-dev:arm64 libpng-dev:arm64 libcurl4-openssl-dev:arm64 libgme-dev:arm64 libopenmpt-dev:arm64 - | - echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" + # apt_development + echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" - - | - echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" + # make + echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 ERRORMODE=1 NONX86=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 NONX86=1 - | - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" + # make + echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" -build-x86_64-w64-mingw32: +Windows x64: <<: *job_build artifacts: paths: - - "bin/srb2win64.exe*" + - "bin/" + - "src/comptime.h" + expose_as: "Win64" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win64" variables: @@ -294,25 +359,31 @@ build-x86_64-w64-mingw32: script: - - | - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" + # 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 - | - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" + # apt_toolchain + echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" - - | - echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" + # make + echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW64=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW64=1 - | - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" + # make + echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" -build-clang: +Debian stable Clang: <<: *job_build allow_failure: true artifacts: paths: - - "bin/lsdl2srb2*" + - "bin/" + - "src/comptime.h" + expose_as: "Debian with clang" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-clang" variables: @@ -321,34 +392,40 @@ build-clang: script: - - | - echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" + # apt_toolchain + echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" - apt-get install clang - | - echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" + # apt_toolchain + echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" - - | - echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages" + # apt_development + echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages" - apt-get install libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev libopenmpt-dev - | - echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" + # apt_development + echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" - - | - echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" + # make + echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 - | - echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" + # make + echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" -build-clang-testing: - <<: *job_build - - extends: build-clang +Debian testing Clang: + extends: Debian stable Clang image: debian:testing-slim artifacts: paths: - - "bin/lsdl2srb2*" + - "bin/" + - "src/comptime.h" + expose_as: "Debian testing with clang" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-testing-clang" variables: From 265c1ac0c8dd57a689962d72b7c103710f7bb1a7 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Tue, 17 Oct 2023 13:11:17 +0000 Subject: [PATCH 132/142] Update .gitlib-ci.yml --- .gitlab-ci.yml | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a849aea28..f13dac2f8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -34,7 +34,7 @@ variables: - export DEBIAN_PRIORITY="low" - export DEBCONF_NONINTERACTIVE_SEEN="true" - | - # debconf + # debconf echo -e "\e[0Ksection_end:`date +%s`:debconf\r\e[0K" - - | # dpkg_aa @@ -67,7 +67,7 @@ variables: # Dir::Cache::Archives echo Dir::Cache::Archives "$APT_CACHE_DIR"\; | tee --append /etc/apt/apt.conf.d/99build - | - # apt_conf + # apt_conf echo -e "\e[0Ksection_end:`date +%s`:apt_conf\r\e[0K" - - | # apt_update @@ -110,7 +110,7 @@ variables: # cache.conf echo Adding ccache configution option - | - # base_dir + # base_dir echo base_dir = $PWD | tee --append ~/.ccache/ccache.conf - | # cache_dir @@ -165,6 +165,7 @@ Debian testing GCC: paths: - "bin/" - "src/comptime.h" + expose_as: "Debian GCC testing" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-testing-gcc" variables: @@ -231,6 +232,7 @@ Debian stable:amd64: paths: - "bin/" - "src/comptime.h" + expose_as: "Debian amd64" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-x86-64" variables: @@ -271,6 +273,7 @@ Debian stable:i386: paths: - "bin/" - "src/comptime.h" + expose_as: "Debian i386" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-i686" variables: @@ -311,6 +314,7 @@ Debian stable:arm64: paths: - "bin/" - "src/comptime.h" + expose_as: "Debian arm64" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-aarch64" variables: @@ -383,7 +387,7 @@ Debian stable Clang: paths: - "bin/" - "src/comptime.h" - expose_as: "Debian with clang" + expose_as: "Debian Clang" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-clang" variables: @@ -412,10 +416,9 @@ Debian stable Clang: echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 - | - # make + # make echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" - Debian testing Clang: extends: Debian stable Clang @@ -425,7 +428,7 @@ Debian testing Clang: paths: - "bin/" - "src/comptime.h" - expose_as: "Debian testing with clang" + expose_as: "Debina Clang testing" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-testing-clang" variables: From eb3826782303f8a9edd22727dfacd353e8e706b0 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Fri, 20 Oct 2023 13:03:52 +0000 Subject: [PATCH 133/142] GitLab CI: More work --- .gitlab-ci.yml | 60 ++++++++++++++++++++++++-------------------------- 1 file changed, 29 insertions(+), 31 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f13dac2f8..b292bfc06 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,16 +1,9 @@ -default: - image: debian:stable-slim - -stages: # List of stages for jobs, and their order of execution - - build - variables: GIT_STRATEGY: clone GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_CONCURRENT_ID/$CI_PROJECT_PATH -.job_template: &job_build # This job runs in the build stage, which runs first. - - stage: build +default: + image: debian:stable-slim cache: - key: ccache-$CI_PROJECT_PATH_SLUG-$CI_JOB_NAME_SLUG @@ -96,7 +89,7 @@ variables: - - | # apt_common echo -e "\e[0Ksection_start:`date +%s`:apt_common[collapsed=true]\r\e[0KInstalling common packages" - - apt-get install make git ccache + - apt-get install make git ccache nasm - | # apt_common echo -e "\e[0Ksection_end:`date +%s`:apt_common\r\e[0K" @@ -137,6 +130,12 @@ variables: # ccache_reset echo -e "\e[0Ksection_end:`date +%s`:ccache_reset\r\e[0K" + artifacts: + paths: + - "bin/" + - "src/comptime.h" + name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-$CI_JOB_NAME_SLUG" + after_script: - - | # apt_clean @@ -155,21 +154,21 @@ variables: # ccahe_stats echo -e "\e[0Ksection_end:`date +%s`:ccache_stats\r\e[0K" +stages: + - build + Debian testing GCC: - <<: *job_build + stage: build image: debian:testing-slim allow_failure: true artifacts: - paths: - - "bin/" - - "src/comptime.h" - expose_as: "Debian GCC testing" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-testing-gcc" variables: CC: gcc + LDFLAGS: -Wl,-fuse-ld=gold script: - - | @@ -197,12 +196,13 @@ Debian testing GCC: echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" Windows x86: - <<: *job_build + stage: build artifacts: paths: - "bin/" - "src/comptime.h" + expose_as: "Win32" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win32" variables: @@ -220,13 +220,13 @@ Windows x86: - - | # make echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW=1 + - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW=1 SDL=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW=1 SDL=1 - | # make echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" Debian stable:amd64: - <<: *job_build + stage: build artifacts: paths: @@ -237,6 +237,7 @@ Debian stable:amd64: variables: CC: x86_64-linux-gnu-gcc + 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 @@ -267,7 +268,7 @@ Debian stable:amd64: echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" Debian stable:i386: - <<: *job_build + stage: build artifacts: paths: @@ -308,7 +309,7 @@ Debian stable:i386: echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" Debian stable:arm64: - <<: *job_build + stage: build artifacts: paths: @@ -319,6 +320,7 @@ Debian stable:arm64: variables: CC: aarch64-linux-gnu-gcc + LDFLAGS: -Wl,-fuse-ld=gold OBJCOPY: aarch64-linux-gnu-objcopy OBJDUMP: aarch64-linux-gnu-objdump PKG_CONFIG_PATH: /usr/lib/aarch64-linux-gnu/pkgconfig @@ -349,7 +351,7 @@ Debian stable:arm64: echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" Windows x64: - <<: *job_build + stage: build artifacts: paths: @@ -373,26 +375,24 @@ Windows x64: - - | # make echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW64=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW64=1 + - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW64=1 SDL=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW64=1 SDL=1 - | # make echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" Debian stable Clang: - <<: *job_build + stage: build allow_failure: true artifacts: - paths: - - "bin/" - - "src/comptime.h" - expose_as: "Debian Clang" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-clang" variables: CC: clang + WFLAGS: -Wno-cast-align CFLAGS: -Wno-cast-align + LDFLAGS: -Wl,-fuse-ld=gold script: - - | @@ -425,12 +425,10 @@ Debian testing Clang: image: debian:testing-slim artifacts: - paths: - - "bin/" - - "src/comptime.h" - expose_as: "Debina Clang testing" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-testing-clang" variables: CC: clang + WFLAGS: -Wno-cast-align -Wno-deprecated-non-prototype CFLAGS: -Wno-cast-align -Wno-deprecated-non-prototype + LDFLAGS: -Wl,-fuse-ld=gold From b544c4202ad6dd5a1ecb3a86f707bace4919b9ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustaf=20Alh=C3=A4ll?= Date: Thu, 19 Oct 2023 18:05:16 +0200 Subject: [PATCH 134/142] Fix FreeBSD build errors (again) --- src/sdl/i_system.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/sdl/i_system.c b/src/sdl/i_system.c index 98e036130..2a26f3f50 100644 --- a/src/sdl/i_system.c +++ b/src/sdl/i_system.c @@ -3038,11 +3038,11 @@ size_t I_GetFreeMem(size_t *total) #ifdef FREEBSD u_int v_free_count, v_page_size, v_page_count; size_t size = sizeof(v_free_count); - sysctlbyname("vm.stat.vm.v_free_count", &v_free_count, &size, NULL, 0); - size_t size = sizeof(v_page_size); - sysctlbyname("vm.stat.vm.v_page_size", &v_page_size, &size, NULL, 0); - size_t size = sizeof(v_page_count); - sysctlbyname("vm.stat.vm.v_page_count", &v_page_count, &size, NULL, 0); + sysctlbyname("vm.stats.vm.v_free_count", &v_free_count, &size, NULL, 0); + size = sizeof(v_page_size); + sysctlbyname("vm.stats.vm.v_page_size", &v_page_size, &size, NULL, 0); + size = sizeof(v_page_count); + sysctlbyname("vm.stats.vm.v_page_count", &v_page_count, &size, NULL, 0); if (total) *total = v_page_count * v_page_size; From 610fd76edb2a79bab3a9dbb243b05f6e1f4a9561 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sun, 22 Oct 2023 11:09:58 -0400 Subject: [PATCH 135/142] dummy: fixup warnings --- src/dummy/i_system.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/dummy/i_system.c b/src/dummy/i_system.c index 125d2e8ae..70e1ef4ec 100644 --- a/src/dummy/i_system.c +++ b/src/dummy/i_system.c @@ -14,13 +14,18 @@ size_t I_GetFreeMem(size_t *total) return 0; } -void I_Sleep(UINT32 ms){} +void I_Sleep(UINT32 ms) +{ + (void)ms; +} -precise_t I_GetPreciseTime(void) { +precise_t I_GetPreciseTime(void) +{ return 0; } -UINT64 I_GetPrecisePrecision(void) { +UINT64 I_GetPrecisePrecision(void) +{ return 1000000; } @@ -182,10 +187,12 @@ const char *I_ClipboardPaste(void) size_t I_GetRandomBytes(char *destination, size_t amount) { + (void)destination; + (void)amount; return 0; } -void I_RegisterSysCommands(void) {} +void I_RegisterSysCommands(void){} void I_GetCursorPosition(INT32 *x, INT32 *y) { From 6fac101cbeee6fe278c910047e32fb936720b699 Mon Sep 17 00:00:00 2001 From: Logan Arias Date: Sun, 22 Oct 2023 11:49:23 -0400 Subject: [PATCH 136/142] Disable libcurl when building without network support --- src/Makefile.d/features.mk | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Makefile.d/features.mk b/src/Makefile.d/features.mk index 653100cb5..a66779c07 100644 --- a/src/Makefile.d/features.mk +++ b/src/Makefile.d/features.mk @@ -18,6 +18,10 @@ opts+=-DHWRENDER sources+=$(call List,hardware/Sourcefile) endif +ifdef NONET +NOCURL=1 +endif + ifndef NOMD5 sources+=md5.c endif From f705e53826d80b7c46a10712a55294b290de6c17 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sat, 28 Oct 2023 11:49:26 -0400 Subject: [PATCH 137/142] GitLab CI: try compiling with dummy interface with musl --- .gitlab-ci.yml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b292bfc06..19391e80c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -419,6 +419,43 @@ Debian stable Clang: # make echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" +Debian stable musl: + stage: build + + allow_failure: true + + artifacts: + name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-musl" + + variables: + CC: musl-gcc + LDD: musl-ldd + + script: + - - | + # apt_toolchain + echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages" + - apt-get install gcc + - | + # apt_toolchain + echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K" + + - - | + # apt_development + echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages" + - apt-get install musl-tools + - | + # apt_development + echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K" + + - - | + # make + echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" + - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 SDL=0 NOHW=1 NOZLIB=1 NOCURL=1 NOGME=1 NOOPENMPT=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 SDL=0 NOHW=1 NOZLIB=1 NOCURL=1 NOGME=1 NOOPENMPT=1 + - | + # make + echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" + Debian testing Clang: extends: Debian stable Clang From 86d7c9862c053acf7ab7f6b81108b568f53aa041 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sat, 28 Oct 2023 16:20:49 +0000 Subject: [PATCH 138/142] Update .gitlab-ci.yml file Now, try compiling with musl on Debian testing --- .gitlab-ci.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 19391e80c..3de507d61 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -469,3 +469,16 @@ Debian testing Clang: WFLAGS: -Wno-cast-align -Wno-deprecated-non-prototype CFLAGS: -Wno-cast-align -Wno-deprecated-non-prototype LDFLAGS: -Wl,-fuse-ld=gold + +Debian testing musl: + extends: Debian stable musl + + image: debian:testing-slim + + artifacts: + name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-testing-musl" + + variables: + CC: musl-gcc + LDD: musl-ldd + LDFLAGS: -Wl,-fuse-ld=gold From b658a9629ebd4799bb971fd4ba8c05fdee04f101 Mon Sep 17 00:00:00 2001 From: katsy Date: Sat, 28 Oct 2023 16:16:17 -0500 Subject: [PATCH 139/142] Revert "Merge branch 'master' into next" This reverts commit b26cf5248feef9bee90fd889e2c086667e5f69fd, reversing changes made to a68440c4dba18990e92c836cd01e4caa0abcde3a. --- src/Makefile.d/features.mk | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/Makefile.d/features.mk b/src/Makefile.d/features.mk index 887e511fa..8b713718c 100644 --- a/src/Makefile.d/features.mk +++ b/src/Makefile.d/features.mk @@ -18,10 +18,6 @@ opts+=-DHWRENDER sources+=$(call List,hardware/Sourcefile) endif -ifdef NONET -NOCURL=1 -endif - ifndef NOMD5 sources+=md5.c endif From 18f61ab90cf5003c38dfc8bcdcaeb50a25849811 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sun, 29 Oct 2023 05:14:48 +0000 Subject: [PATCH 140/142] Update .gitlab-ci.yml file Add ARM64=1 for arm build --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3de507d61..c61e181a5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -345,7 +345,7 @@ Debian stable:arm64: - - | # make echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 ERRORMODE=1 NONX86=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 NONX86=1 + - make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 ERRORMODE=1 NONX86=1C || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 NONX86=1 ARM64=1 - | # make echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" From 340d515754197d2f54570760440740b25b25e12b Mon Sep 17 00:00:00 2001 From: katsy <205-katsy@users.noreply.git.do.srb2.org> Date: Sun, 29 Oct 2023 17:43:40 +0000 Subject: [PATCH 141/142] Fix for "Leader of the Chaotix" name change bug (credit Zwip Zwap Zapony) --- src/netcode/d_netcmd.c | 2 +- src/p_saveg.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/netcode/d_netcmd.c b/src/netcode/d_netcmd.c index 5afa95561..52df53b5a 100644 --- a/src/netcode/d_netcmd.c +++ b/src/netcode/d_netcmd.c @@ -1241,7 +1241,7 @@ static void SetColorLocal(INT32 playernum, UINT16 color) // static void SendNameAndColor(void) { - char buf[MAXPLAYERNAME+6]; + char buf[MAXPLAYERNAME+7]; char *p; p = buf; diff --git a/src/p_saveg.c b/src/p_saveg.c index faecd1377..4aa2318fd 100644 --- a/src/p_saveg.c +++ b/src/p_saveg.c @@ -175,7 +175,7 @@ static void P_NetArchivePlayers(void) WRITEUINT16(save_p, players[i].flashpal); WRITEUINT16(save_p, players[i].flashcount); - WRITEUINT8(save_p, players[i].skincolor); + WRITEUINT16(save_p, players[i].skincolor); WRITEINT32(save_p, players[i].skin); WRITEUINT32(save_p, players[i].availabilities); WRITEUINT32(save_p, players[i].score); @@ -404,7 +404,7 @@ static void P_NetUnArchivePlayers(void) players[i].flashpal = READUINT16(save_p); players[i].flashcount = READUINT16(save_p); - players[i].skincolor = READUINT8(save_p); + players[i].skincolor = READUINT16(save_p); players[i].skin = READINT32(save_p); players[i].availabilities = READUINT32(save_p); players[i].score = READUINT32(save_p); From cd6cd5395930a51ae5b62e4737480b9219a769ae Mon Sep 17 00:00:00 2001 From: Zwip-Zwap Zapony Date: Mon, 30 Oct 2023 04:38:51 +0000 Subject: [PATCH 142/142] Combine vid.dupx and vid.dupy --- src/console.c | 12 +- src/f_finale.c | 23 +- src/hardware/hw_draw.c | 218 ++++++++---------- src/lua_hudlib.c | 18 +- src/m_anigif.c | 2 +- src/m_menu.c | 61 +++-- src/m_misc.c | 4 +- src/r_sky.c | 4 +- src/screen.c | 10 +- src/screen.h | 12 +- src/st_stuff.c | 4 +- src/v_video.c | 507 +++++++++++++++++++---------------------- src/v_video.h | 2 +- src/y_inter.c | 6 +- 14 files changed, 408 insertions(+), 475 deletions(-) diff --git a/src/console.c b/src/console.c index 21b608ce4..dbd7c938a 100644 --- a/src/console.c +++ b/src/console.c @@ -543,13 +543,13 @@ static void CON_RecalcSize(void) con_scalefactor = 1; break; case V_SMALLSCALEPATCH: - con_scalefactor = vid.smalldupx; + con_scalefactor = vid.smalldup; break; case V_MEDSCALEPATCH: - con_scalefactor = vid.meddupx; + con_scalefactor = vid.meddup; break; default: // Full scaling - con_scalefactor = vid.dupx; + con_scalefactor = vid.dup; break; } @@ -667,7 +667,7 @@ static void CON_MoveConsole(void) } // Not instant - Increment fracmovement fractionally - fracmovement += FixedMul(cons_speed.value*vid.fdupy, renderdeltatics); + fracmovement += FixedMul(cons_speed.value*vid.fdup, renderdeltatics); if (con_curlines < con_destlines) // Move the console downwards { @@ -1764,9 +1764,9 @@ static void CON_DrawBackpic(void) con_backpic = W_CachePatchNum(piclump, PU_PATCH); // Center the backpic, and draw a vertically cropped patch. - w = (con_backpic->width * vid.dupx); + w = con_backpic->width * vid.dup; x = (vid.width / 2) - (w / 2); - h = con_curlines/vid.dupy; + h = con_curlines/vid.dup; // If the patch doesn't fill the entire screen, // then fill the sides with a solid color. diff --git a/src/f_finale.c b/src/f_finale.c index 7afed27d0..68e9c3216 100644 --- a/src/f_finale.c +++ b/src/f_finale.c @@ -1327,7 +1327,7 @@ void F_CreditDrawer(void) y += 12< vid.height) + if (FixedMul(y,vid.dup) > vid.height) break; } } @@ -1362,7 +1362,7 @@ void F_CreditTicker(void) case 1: y += 30< vid.height) + if (FixedMul(y,vid.dup) > vid.height) break; } @@ -2082,7 +2082,7 @@ void F_EndingDrawer(void) if (goodending && finalecount >= TICRATE && finalecount < INFLECTIONPOINT) { INT32 workingtime = finalecount - TICRATE; - fixed_t radius = ((vid.width/vid.dupx)*(INFLECTIONPOINT - TICRATE - workingtime))/(INFLECTIONPOINT - TICRATE); + fixed_t radius = ((vid.width/vid.dup)*(INFLECTIONPOINT - TICRATE - workingtime))/(INFLECTIONPOINT - TICRATE); angle_t fa; INT32 eemeralds_cur[4]; char patchname[7] = "CEMGx0"; @@ -2287,7 +2287,6 @@ void F_InitMenuPresValues(void) void F_SkyScroll(const char *patchname) { INT32 x, basey = 0; - INT32 dupz = (vid.dupx < vid.dupy ? vid.dupx : vid.dupy); patch_t *pat; if (rendermode == render_none) @@ -2315,17 +2314,17 @@ void F_SkyScroll(const char *patchname) curbgy %= pat->height * 16; // Ooh, fancy frame interpolation - x = ((curbgx*dupz) + FixedInt((rendertimefrac-FRACUNIT) * curbgxspeed*dupz)) / 16; - basey = ((curbgy*dupz) + FixedInt((rendertimefrac-FRACUNIT) * curbgyspeed*dupz)) / 16; + x = ((curbgx*vid.dup) + FixedInt((rendertimefrac-FRACUNIT) * curbgxspeed*vid.dup)) / 16; + basey = ((curbgy*vid.dup) + FixedInt((rendertimefrac-FRACUNIT) * curbgyspeed*vid.dup)) / 16; if (x > 0) // Make sure that we don't leave the left or top sides empty - x -= pat->width * dupz; + x -= pat->width * vid.dup; if (basey > 0) - basey -= pat->height * dupz; + basey -= pat->height * vid.dup; - for (; x < vid.width; x += pat->width * dupz) + for (; x < vid.width; x += pat->width * vid.dup) { - for (INT32 y = basey; y < vid.height; y += pat->height * dupz) + for (INT32 y = basey; y < vid.height; y += pat->height * vid.dup) V_DrawScaledPatch(x, y, V_NOSCALESTART, pat); } @@ -2603,7 +2602,7 @@ static void F_LoadAlacroixGraphics(SINT8 newttscale) static void F_FigureActiveTtScale(void) { - SINT8 newttscale = max(1, min(6, vid.dupx)); + SINT8 newttscale = max(1, min(6, vid.dup)); SINT8 oldttscale = activettscale; if (newttscale == testttscale) @@ -4095,7 +4094,7 @@ static fixed_t F_GetPromptHideHudBound(void) F_GetPageTextGeometry(&pagelines, &rightside, &boxh, &texth, &texty, &namey, &chevrony, &textx, &textr); // calc boxheight (see V_DrawPromptBack) - boxh *= vid.dupy; + boxh *= vid.dup; boxh = (boxh * 4) + (boxh/2)*5; // 4 lines of space plus gaps between and some leeway // return a coordinate to check diff --git a/src/hardware/hw_draw.c b/src/hardware/hw_draw.c index eb0b9e332..ec9dc7613 100644 --- a/src/hardware/hw_draw.c +++ b/src/hardware/hw_draw.c @@ -78,10 +78,8 @@ void HWR_DrawPatch(patch_t *gpatch, INT32 x, INT32 y, INT32 option) // | /| // |/ | // 0--1 - float sdupx = FIXED_TO_FLOAT(vid.fdupx)*2.0f; - float sdupy = FIXED_TO_FLOAT(vid.fdupy)*2.0f; - float pdupx = FIXED_TO_FLOAT(vid.fdupx)*2.0f; - float pdupy = FIXED_TO_FLOAT(vid.fdupy)*2.0f; + float sdup = FIXED_TO_FLOAT(vid.fdup)*2.0f; + float pdup = FIXED_TO_FLOAT(vid.fdup)*2.0f; // make patch ready in hardware cache HWR_GetPatch(gpatch); @@ -90,25 +88,23 @@ void HWR_DrawPatch(patch_t *gpatch, INT32 x, INT32 y, INT32 option) switch (option & V_SCALEPATCHMASK) { case V_NOSCALEPATCH: - pdupx = pdupy = 2.0f; + pdup = 2.0f; break; case V_SMALLSCALEPATCH: - pdupx = 2.0f * FIXED_TO_FLOAT(vid.fsmalldupx); - pdupy = 2.0f * FIXED_TO_FLOAT(vid.fsmalldupy); + pdup = 2.0f * FIXED_TO_FLOAT(vid.fsmalldup); break; case V_MEDSCALEPATCH: - pdupx = 2.0f * FIXED_TO_FLOAT(vid.fmeddupx); - pdupy = 2.0f * FIXED_TO_FLOAT(vid.fmeddupy); + pdup = 2.0f * FIXED_TO_FLOAT(vid.fmeddup); break; } if (option & V_NOSCALESTART) - sdupx = sdupy = 2.0f; + sdup = 2.0f; - v[0].x = v[3].x = (x*sdupx-(gpatch->leftoffset)*pdupx)/vid.width - 1; - v[2].x = v[1].x = (x*sdupx+(gpatch->width-gpatch->leftoffset)*pdupx)/vid.width - 1; - v[0].y = v[1].y = 1-(y*sdupy-(gpatch->topoffset)*pdupy)/vid.height; - v[2].y = v[3].y = 1-(y*sdupy+(gpatch->height-gpatch->topoffset)*pdupy)/vid.height; + v[0].x = v[3].x = (x*sdup-(gpatch->leftoffset)*pdup)/vid.width - 1; + v[2].x = v[1].x = (x*sdup+(gpatch->width-gpatch->leftoffset)*pdup)/vid.width - 1; + v[0].y = v[1].y = 1-(y*sdup-(gpatch->topoffset)*pdup)/vid.height; + v[2].y = v[3].y = 1-(y*sdup+(gpatch->height-gpatch->topoffset)*pdup)/vid.height; v[0].z = v[1].z = v[2].z = v[3].z = 1.0f; @@ -137,7 +133,7 @@ void HWR_DrawStretchyFixedPatch(patch_t *gpatch, fixed_t x, fixed_t y, fixed_t p // | /| // |/ | // 0--1 - float dupx, dupy, fscalew, fscaleh, fwidth, fheight; + float dup, fscalew, fscaleh, fwidth, fheight; UINT8 perplayershuffle = 0; @@ -149,25 +145,21 @@ void HWR_DrawStretchyFixedPatch(patch_t *gpatch, fixed_t x, fixed_t y, fixed_t p hwrPatch = ((GLPatch_t *)gpatch->hardware); - dupx = (float)vid.dupx; - dupy = (float)vid.dupy; + dup = (float)vid.dup; switch (option & V_SCALEPATCHMASK) { case V_NOSCALEPATCH: - dupx = dupy = 1.0f; + dup = 1.0f; break; case V_SMALLSCALEPATCH: - dupx = (float)vid.smalldupx; - dupy = (float)vid.smalldupy; + dup = (float)vid.smalldup; break; case V_MEDSCALEPATCH: - dupx = (float)vid.meddupx; - dupy = (float)vid.meddupy; + dup = (float)vid.meddup; break; } - dupx = dupy = (dupx < dupy ? dupx : dupy); fscalew = fscaleh = FIXED_TO_FLOAT(pscale); if (vscale != pscale) fscaleh = FIXED_TO_FLOAT(vscale); @@ -261,8 +253,8 @@ void HWR_DrawStretchyFixedPatch(patch_t *gpatch, fixed_t x, fixed_t y, fixed_t p if (!(option & V_NOSCALESTART)) { - cx = cx * dupx; - cy = cy * dupy; + cx = cx * dup; + cy = cy * dup; if (!(option & V_SCALEPATCHMASK)) { @@ -279,40 +271,40 @@ void HWR_DrawStretchyFixedPatch(patch_t *gpatch, fixed_t x, fixed_t y, fixed_t p } } // centre screen - if (fabsf((float)vid.width - (float)BASEVIDWIDTH * dupx) > 1.0E-36f) + if (fabsf((float)vid.width - (float)BASEVIDWIDTH * dup) > 1.0E-36f) { if (option & V_SNAPTORIGHT) - cx += ((float)vid.width - ((float)BASEVIDWIDTH * dupx)); + cx += ((float)vid.width - ((float)BASEVIDWIDTH * dup)); else if (!(option & V_SNAPTOLEFT)) - cx += ((float)vid.width - ((float)BASEVIDWIDTH * dupx))/2; + cx += ((float)vid.width - ((float)BASEVIDWIDTH * dup))/2; if (perplayershuffle & 4) - cx -= ((float)vid.width - ((float)BASEVIDWIDTH * dupx))/4; + cx -= ((float)vid.width - ((float)BASEVIDWIDTH * dup))/4; else if (perplayershuffle & 8) - cx += ((float)vid.width - ((float)BASEVIDWIDTH * dupx))/4; + cx += ((float)vid.width - ((float)BASEVIDWIDTH * dup))/4; } - if (fabsf((float)vid.height - (float)BASEVIDHEIGHT * dupy) > 1.0E-36f) + if (fabsf((float)vid.height - (float)BASEVIDHEIGHT * dup) > 1.0E-36f) { if (option & V_SNAPTOBOTTOM) - cy += ((float)vid.height - ((float)BASEVIDHEIGHT * dupy)); + cy += ((float)vid.height - ((float)BASEVIDHEIGHT * dup)); else if (!(option & V_SNAPTOTOP)) - cy += ((float)vid.height - ((float)BASEVIDHEIGHT * dupy))/2; + cy += ((float)vid.height - ((float)BASEVIDHEIGHT * dup))/2; if (perplayershuffle & 1) - cy -= ((float)vid.height - ((float)BASEVIDHEIGHT * dupy))/4; + cy -= ((float)vid.height - ((float)BASEVIDHEIGHT * dup))/4; else if (perplayershuffle & 2) - cy += ((float)vid.height - ((float)BASEVIDHEIGHT * dupy))/4; + cy += ((float)vid.height - ((float)BASEVIDHEIGHT * dup))/4; } } } if (pscale != FRACUNIT || vscale != FRACUNIT || (splitscreen && option & V_PERPLAYER)) { - fwidth = (float)(gpatch->width) * fscalew * dupx; - fheight = (float)(gpatch->height) * fscaleh * dupy; + fwidth = (float)(gpatch->width) * fscalew * dup; + fheight = (float)(gpatch->height) * fscaleh * dup; } else { - fwidth = (float)(gpatch->width) * dupx; - fheight = (float)(gpatch->height) * dupy; + fwidth = (float)(gpatch->width) * dup; + fheight = (float)(gpatch->height) * dup; } // positions of the cx, cy, are between 0 and vid.width/vid.height now, we need them to be between -1 and 1 @@ -379,7 +371,7 @@ void HWR_DrawCroppedPatch(patch_t *gpatch, fixed_t x, fixed_t y, fixed_t pscale, // | /| // |/ | // 0--1 - float dupx, dupy, fscalew, fscaleh, fwidth, fheight; + float dup, fscalew, fscaleh, fwidth, fheight; UINT8 perplayershuffle = 0; @@ -391,25 +383,21 @@ void HWR_DrawCroppedPatch(patch_t *gpatch, fixed_t x, fixed_t y, fixed_t pscale, hwrPatch = ((GLPatch_t *)gpatch->hardware); - dupx = (float)vid.dupx; - dupy = (float)vid.dupy; + dup = (float)vid.dup; switch (option & V_SCALEPATCHMASK) { case V_NOSCALEPATCH: - dupx = dupy = 1.0f; + dup = 1.0f; break; case V_SMALLSCALEPATCH: - dupx = (float)vid.smalldupx; - dupy = (float)vid.smalldupy; + dup = (float)vid.smalldup; break; case V_MEDSCALEPATCH: - dupx = (float)vid.meddupx; - dupy = (float)vid.meddupy; + dup = (float)vid.meddup; break; } - dupx = dupy = (dupx < dupy ? dupx : dupy); fscalew = fscaleh = FIXED_TO_FLOAT(pscale); if (vscale != pscale) fscaleh = FIXED_TO_FLOAT(vscale); @@ -487,8 +475,8 @@ void HWR_DrawCroppedPatch(patch_t *gpatch, fixed_t x, fixed_t y, fixed_t pscale, if (!(option & V_NOSCALESTART)) { - cx = cx * dupx; - cy = cy * dupy; + cx = cx * dup; + cy = cy * dup; if (!(option & V_SCALEPATCHMASK)) { @@ -496,27 +484,27 @@ void HWR_DrawCroppedPatch(patch_t *gpatch, fixed_t x, fixed_t y, fixed_t pscale, // no the patch is cropped do not do this ever // centre screen - if (fabsf((float)vid.width - (float)BASEVIDWIDTH * dupx) > 1.0E-36f) + if (fabsf((float)vid.width - (float)BASEVIDWIDTH * dup) > 1.0E-36f) { if (option & V_SNAPTORIGHT) - cx += ((float)vid.width - ((float)BASEVIDWIDTH * dupx)); + cx += ((float)vid.width - ((float)BASEVIDWIDTH * dup)); else if (!(option & V_SNAPTOLEFT)) - cx += ((float)vid.width - ((float)BASEVIDWIDTH * dupx))/2; + cx += ((float)vid.width - ((float)BASEVIDWIDTH * dup))/2; if (perplayershuffle & 4) - cx -= ((float)vid.width - ((float)BASEVIDWIDTH * dupx))/4; + cx -= ((float)vid.width - ((float)BASEVIDWIDTH * dup))/4; else if (perplayershuffle & 8) - cx += ((float)vid.width - ((float)BASEVIDWIDTH * dupx))/4; + cx += ((float)vid.width - ((float)BASEVIDWIDTH * dup))/4; } - if (fabsf((float)vid.height - (float)BASEVIDHEIGHT * dupy) > 1.0E-36f) + if (fabsf((float)vid.height - (float)BASEVIDHEIGHT * dup) > 1.0E-36f) { if (option & V_SNAPTOBOTTOM) - cy += ((float)vid.height - ((float)BASEVIDHEIGHT * dupy)); + cy += ((float)vid.height - ((float)BASEVIDHEIGHT * dup)); else if (!(option & V_SNAPTOTOP)) - cy += ((float)vid.height - ((float)BASEVIDHEIGHT * dupy))/2; + cy += ((float)vid.height - ((float)BASEVIDHEIGHT * dup))/2; if (perplayershuffle & 1) - cy -= ((float)vid.height - ((float)BASEVIDHEIGHT * dupy))/4; + cy -= ((float)vid.height - ((float)BASEVIDHEIGHT * dup))/4; else if (perplayershuffle & 2) - cy += ((float)vid.height - ((float)BASEVIDHEIGHT * dupy))/4; + cy += ((float)vid.height - ((float)BASEVIDHEIGHT * dup))/4; } } } @@ -532,13 +520,13 @@ void HWR_DrawCroppedPatch(patch_t *gpatch, fixed_t x, fixed_t y, fixed_t pscale, if (pscale != FRACUNIT || vscale != FRACUNIT || (splitscreen && option & V_PERPLAYER)) { - fwidth *= fscalew * dupx; - fheight *= fscaleh * dupy; + fwidth *= fscalew * dup; + fheight *= fscaleh * dup; } else { - fwidth *= dupx; - fheight *= dupy; + fwidth *= dup; + fheight *= dup; } // positions of the cx, cy, are between 0 and vid.width/vid.height now, we need them to be between -1 and 1 @@ -674,9 +662,9 @@ void HWR_DrawPic(INT32 x, INT32 y, lumpnum_t lumpnum) // 0--1 v[0].x = v[3].x = 2.0f * (float)x/vid.width - 1; - v[2].x = v[1].x = 2.0f * (float)(x + patch->width*FIXED_TO_FLOAT(vid.fdupx))/vid.width - 1; + v[2].x = v[1].x = 2.0f * (float)(x + patch->width*FIXED_TO_FLOAT(vid.fdup))/vid.width - 1; v[0].y = v[1].y = 1.0f - 2.0f * (float)y/vid.height; - v[2].y = v[3].y = 1.0f - 2.0f * (float)(y + patch->height*FIXED_TO_FLOAT(vid.fdupy))/vid.height; + v[2].y = v[3].y = 1.0f - 2.0f * (float)(y + patch->height*FIXED_TO_FLOAT(vid.fdup))/vid.height; v[0].z = v[1].z = v[2].z = v[3].z = 1.0f; @@ -866,35 +854,33 @@ void HWR_DrawFadeFill(INT32 x, INT32 y, INT32 w, INT32 h, INT32 color, UINT16 ac if (!(color & V_NOSCALESTART)) { - float dupx = (float)vid.dupx, dupy = (float)vid.dupy; + fx *= vid.dup; + fy *= vid.dup; + fw *= vid.dup; + fh *= vid.dup; - fx *= dupx; - fy *= dupy; - fw *= dupx; - fh *= dupy; - - if (fabsf((float)vid.width - (float)BASEVIDWIDTH * dupx) > 1.0E-36f) + if (fabsf((float)vid.width - (float)BASEVIDWIDTH * vid.dup) > 1.0E-36f) { if (color & V_SNAPTORIGHT) - fx += ((float)vid.width - ((float)BASEVIDWIDTH * dupx)); + fx += ((float)vid.width - ((float)BASEVIDWIDTH * vid.dup)); else if (!(color & V_SNAPTOLEFT)) - fx += ((float)vid.width - ((float)BASEVIDWIDTH * dupx)) / 2; + fx += ((float)vid.width - ((float)BASEVIDWIDTH * vid.dup)) / 2; if (perplayershuffle & 4) - fx -= ((float)vid.width - ((float)BASEVIDWIDTH * dupx)) / 4; + fx -= ((float)vid.width - ((float)BASEVIDWIDTH * vid.dup)) / 4; else if (perplayershuffle & 8) - fx += ((float)vid.width - ((float)BASEVIDWIDTH * dupx)) / 4; + fx += ((float)vid.width - ((float)BASEVIDWIDTH * vid.dup)) / 4; } - if (fabsf((float)vid.height - (float)BASEVIDHEIGHT * dupy) > 1.0E-36f) + if (fabsf((float)vid.height - (float)BASEVIDHEIGHT * vid.dup) > 1.0E-36f) { // same thing here if (color & V_SNAPTOBOTTOM) - fy += ((float)vid.height - ((float)BASEVIDHEIGHT * dupy)); + fy += ((float)vid.height - ((float)BASEVIDHEIGHT * vid.dup)); else if (!(color & V_SNAPTOTOP)) - fy += ((float)vid.height - ((float)BASEVIDHEIGHT * dupy)) / 2; + fy += ((float)vid.height - ((float)BASEVIDHEIGHT * vid.dup)) / 2; if (perplayershuffle & 1) - fy -= ((float)vid.height - ((float)BASEVIDHEIGHT * dupy)) / 4; + fy -= ((float)vid.height - ((float)BASEVIDHEIGHT * vid.dup)) / 4; else if (perplayershuffle & 2) - fy += ((float)vid.height - ((float)BASEVIDHEIGHT * dupy)) / 4; + fy += ((float)vid.height - ((float)BASEVIDHEIGHT * vid.dup)) / 4; } } @@ -1032,10 +1018,10 @@ void HWR_DrawViewBorder(INT32 clearlines) clearlines = BASEVIDHEIGHT; // refresh all // calc view size based on original game resolution - baseviewwidth = FixedInt(FixedDiv(FLOAT_TO_FIXED(gl_viewwidth), vid.fdupx)); //(cv_viewsize.value * BASEVIDWIDTH/10)&~7; - baseviewheight = FixedInt(FixedDiv(FLOAT_TO_FIXED(gl_viewheight), vid.fdupy)); - top = FixedInt(FixedDiv(FLOAT_TO_FIXED(gl_baseviewwindowy), vid.fdupy)); - side = FixedInt(FixedDiv(FLOAT_TO_FIXED(gl_viewwindowx), vid.fdupx)); + baseviewwidth = FixedInt(FixedDiv(FLOAT_TO_FIXED(gl_viewwidth), vid.fdup)); //(cv_viewsize.value * BASEVIDWIDTH/10)&~7; + baseviewheight = FixedInt(FixedDiv(FLOAT_TO_FIXED(gl_viewheight), vid.fdup)); + top = FixedInt(FixedDiv(FLOAT_TO_FIXED(gl_baseviewwindowy), vid.fdup)); + side = FixedInt(FixedDiv(FLOAT_TO_FIXED(gl_viewwindowx), vid.fdup)); // top HWR_DrawFlatFill(0, 0, @@ -1250,35 +1236,35 @@ void HWR_DrawConsoleFill(INT32 x, INT32 y, INT32 w, INT32 h, INT32 color, UINT32 if (!(color & V_NOSCALESTART)) { - float dupx = (float)vid.dupx, dupy = (float)vid.dupy; + float dup = (float)vid.dup; - fx *= dupx; - fy *= dupy; - fw *= dupx; - fh *= dupy; + fx *= dup; + fy *= dup; + fw *= dup; + fh *= dup; - if (fabsf((float)vid.width - (float)BASEVIDWIDTH * dupx) > 1.0E-36f) + if (fabsf((float)vid.width - (float)BASEVIDWIDTH * dup) > 1.0E-36f) { if (color & V_SNAPTORIGHT) - fx += ((float)vid.width - ((float)BASEVIDWIDTH * dupx)); + fx += ((float)vid.width - ((float)BASEVIDWIDTH * dup)); else if (!(color & V_SNAPTOLEFT)) - fx += ((float)vid.width - ((float)BASEVIDWIDTH * dupx)) / 2; + fx += ((float)vid.width - ((float)BASEVIDWIDTH * dup)) / 2; if (perplayershuffle & 4) - fx -= ((float)vid.width - ((float)BASEVIDWIDTH * dupx)) / 4; + fx -= ((float)vid.width - ((float)BASEVIDWIDTH * dup)) / 4; else if (perplayershuffle & 8) - fx += ((float)vid.width - ((float)BASEVIDWIDTH * dupx)) / 4; + fx += ((float)vid.width - ((float)BASEVIDWIDTH * dup)) / 4; } - if (fabsf((float)vid.height - (float)BASEVIDHEIGHT * dupy) > 1.0E-36f) + if (fabsf((float)vid.height - (float)BASEVIDHEIGHT * dup) > 1.0E-36f) { // same thing here if (color & V_SNAPTOBOTTOM) - fy += ((float)vid.height - ((float)BASEVIDHEIGHT * dupy)); + fy += ((float)vid.height - ((float)BASEVIDHEIGHT * dup)); else if (!(color & V_SNAPTOTOP)) - fy += ((float)vid.height - ((float)BASEVIDHEIGHT * dupy)) / 2; + fy += ((float)vid.height - ((float)BASEVIDHEIGHT * dup)) / 2; if (perplayershuffle & 1) - fy -= ((float)vid.height - ((float)BASEVIDHEIGHT * dupy)) / 4; + fy -= ((float)vid.height - ((float)BASEVIDHEIGHT * dup)) / 4; else if (perplayershuffle & 2) - fy += ((float)vid.height - ((float)BASEVIDHEIGHT * dupy)) / 4; + fy += ((float)vid.height - ((float)BASEVIDHEIGHT * dup)) / 4; } } @@ -1416,8 +1402,6 @@ void HWR_DrawFill(INT32 x, INT32 y, INT32 w, INT32 h, INT32 color) if (!(color & V_NOSCALESTART)) { - float dupx = (float)vid.dupx, dupy = (float)vid.dupy; - if (x == 0 && y == 0 && w == BASEVIDWIDTH && h == BASEVIDHEIGHT) { RGBA_t rgbaColour = V_GetColor(color); @@ -1430,33 +1414,33 @@ void HWR_DrawFill(INT32 x, INT32 y, INT32 w, INT32 h, INT32 color) return; } - fx *= dupx; - fy *= dupy; - fw *= dupx; - fh *= dupy; + fx *= vid.dup; + fy *= vid.dup; + fw *= vid.dup; + fh *= vid.dup; - if (fabsf((float)vid.width - (float)BASEVIDWIDTH * dupx) > 1.0E-36f) + if (fabsf((float)vid.width - (float)BASEVIDWIDTH * vid.dup) > 1.0E-36f) { if (color & V_SNAPTORIGHT) - fx += ((float)vid.width - ((float)BASEVIDWIDTH * dupx)); + fx += ((float)vid.width - ((float)BASEVIDWIDTH * vid.dup)); else if (!(color & V_SNAPTOLEFT)) - fx += ((float)vid.width - ((float)BASEVIDWIDTH * dupx)) / 2; + fx += ((float)vid.width - ((float)BASEVIDWIDTH * vid.dup)) / 2; if (perplayershuffle & 4) - fx -= ((float)vid.width - ((float)BASEVIDWIDTH * dupx)) / 4; + fx -= ((float)vid.width - ((float)BASEVIDWIDTH * vid.dup)) / 4; else if (perplayershuffle & 8) - fx += ((float)vid.width - ((float)BASEVIDWIDTH * dupx)) / 4; + fx += ((float)vid.width - ((float)BASEVIDWIDTH * vid.dup)) / 4; } - if (fabsf((float)vid.height - (float)BASEVIDHEIGHT * dupy) > 1.0E-36f) + if (fabsf((float)vid.height - (float)BASEVIDHEIGHT * vid.dup) > 1.0E-36f) { // same thing here if (color & V_SNAPTOBOTTOM) - fy += ((float)vid.height - ((float)BASEVIDHEIGHT * dupy)); + fy += ((float)vid.height - ((float)BASEVIDHEIGHT * vid.dup)); else if (!(color & V_SNAPTOTOP)) - fy += ((float)vid.height - ((float)BASEVIDHEIGHT * dupy)) / 2; + fy += ((float)vid.height - ((float)BASEVIDHEIGHT * vid.dup)) / 2; if (perplayershuffle & 1) - fy -= ((float)vid.height - ((float)BASEVIDHEIGHT * dupy)) / 4; + fy -= ((float)vid.height - ((float)BASEVIDHEIGHT * vid.dup)) / 4; else if (perplayershuffle & 2) - fy += ((float)vid.height - ((float)BASEVIDHEIGHT * dupy)) / 4; + fy += ((float)vid.height - ((float)BASEVIDHEIGHT * vid.dup)) / 4; } } diff --git a/src/lua_hudlib.c b/src/lua_hudlib.c index 6eec91273..159344faa 100644 --- a/src/lua_hudlib.c +++ b/src/lua_hudlib.c @@ -1206,19 +1206,11 @@ static int libd_height(lua_State *L) return 1; } -static int libd_dupx(lua_State *L) +static int libd_dup(lua_State *L) { HUDONLY - lua_pushinteger(L, vid.dupx); // push integral scale (patch scale) - lua_pushfixed(L, vid.fdupx); // push fixed point scale (position scale) - return 2; -} - -static int libd_dupy(lua_State *L) -{ - HUDONLY - lua_pushinteger(L, vid.dupy); // push integral scale (patch scale) - lua_pushfixed(L, vid.fdupy); // push fixed point scale (position scale) + lua_pushinteger(L, vid.dup); // push integral scale (patch scale) + lua_pushfixed(L, vid.fdup); // push fixed point scale (position scale) return 2; } @@ -1338,8 +1330,8 @@ static luaL_Reg lib_draw[] = { // properties {"width", libd_width}, {"height", libd_height}, - {"dupx", libd_dupx}, - {"dupy", libd_dupy}, + {"dupx", libd_dup}, + {"dupy", libd_dup}, {"renderer", libd_renderer}, {"localTransFlag", libd_getlocaltransflag}, {"userTransFlag", libd_getusertransflag}, diff --git a/src/m_anigif.c b/src/m_anigif.c index 90e4c69ce..5bc7717e0 100644 --- a/src/m_anigif.c +++ b/src/m_anigif.c @@ -462,7 +462,7 @@ static void GIF_headwrite(void) // Image width/height if (gif_downscale) { - scrbuf_downscaleamt = vid.dupx; + scrbuf_downscaleamt = vid.dup; rwidth = (vid.width / scrbuf_downscaleamt); rheight = (vid.height / scrbuf_downscaleamt); } diff --git a/src/m_menu.c b/src/m_menu.c index 523430ed8..629f53d24 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -214,7 +214,7 @@ static fixed_t lsoffs[2]; #define lshli levelselectselect[2] #define lshseperation 101 -#define lsbasevseperation ((62*vid.height)/(BASEVIDHEIGHT*vid.dupy)) //62 +#define lsbasevseperation ((62*vid.height)/(BASEVIDHEIGHT*vid.dup)) //62 #define lsheadingheight 16 #define getheadingoffset(row) (levelselect.rows[row].header[0] ? lsheadingheight : 0) #define lsvseperation(row) (lsbasevseperation + getheadingoffset(row)) @@ -3574,16 +3574,16 @@ void M_Drawer(void) { if (customversionstring[0] != '\0') { - V_DrawThinString(vid.dupx, vid.height - 17*vid.dupy, V_NOSCALESTART|V_TRANSLUCENT, "Mod version:"); - V_DrawThinString(vid.dupx, vid.height - 9*vid.dupy, V_NOSCALESTART|V_TRANSLUCENT|V_ALLOWLOWERCASE, customversionstring); + V_DrawThinString(vid.dup, vid.height - 17*vid.dup, V_NOSCALESTART|V_TRANSLUCENT, "Mod version:"); + V_DrawThinString(vid.dup, vid.height - 9*vid.dup, V_NOSCALESTART|V_TRANSLUCENT|V_ALLOWLOWERCASE, customversionstring); } else { #ifdef DEVELOP // Development -- show revision / branch info - V_DrawThinString(vid.dupx, vid.height - 17*vid.dupy, V_NOSCALESTART|V_TRANSLUCENT|V_ALLOWLOWERCASE, compbranch); - V_DrawThinString(vid.dupx, vid.height - 9*vid.dupy, V_NOSCALESTART|V_TRANSLUCENT|V_ALLOWLOWERCASE, comprevision); + V_DrawThinString(vid.dup, vid.height - 17*vid.dup, V_NOSCALESTART|V_TRANSLUCENT|V_ALLOWLOWERCASE, compbranch); + V_DrawThinString(vid.dup, vid.height - 9*vid.dup, V_NOSCALESTART|V_TRANSLUCENT|V_ALLOWLOWERCASE, comprevision); #else // Regular build - V_DrawThinString(vid.dupx, vid.height - 9*vid.dupy, V_NOSCALESTART|V_TRANSLUCENT|V_ALLOWLOWERCASE, va("%s", VERSIONSTRING)); + V_DrawThinString(vid.dup, vid.height - 9*vid.dup, V_NOSCALESTART|V_TRANSLUCENT|V_ALLOWLOWERCASE, va("%s", VERSIONSTRING)); #endif } } @@ -5757,16 +5757,15 @@ static void M_DrawRecordAttackForeground(void) INT32 i; INT32 height = (fg->height / 2); - INT32 dupz = (vid.dupx < vid.dupy ? vid.dupx : vid.dupy); for (i = -12; i < (BASEVIDHEIGHT/height) + 12; i++) { INT32 y = ((i*height) - (height - ((FixedInt(recatkdrawtimer*2))%height))); // don't draw above the screen { - INT32 sy = FixedMul(y, dupz<> FRACBITS; - if (vid.height != BASEVIDHEIGHT * dupz) - sy += (vid.height - (BASEVIDHEIGHT * dupz)) / 2; + INT32 sy = FixedMul(y, vid.dup<> FRACBITS; + if (vid.height != BASEVIDHEIGHT * vid.dup) + sy += (vid.height - (BASEVIDHEIGHT * vid.dup)) / 2; if ((sy+height) < 0) continue; } @@ -5790,13 +5789,12 @@ static void M_DrawRecordAttackForeground(void) static void M_DrawNightsAttackMountains(void) { static fixed_t bgscrollx; - INT32 dupz = (vid.dupx < vid.dupy ? vid.dupx : vid.dupy); patch_t *background = W_CachePatchName(curbgname, PU_PATCH); INT16 w = background->width; INT32 x = FixedInt(-bgscrollx) % w; INT32 y = BASEVIDHEIGHT - (background->height * 2); - if (vid.height != BASEVIDHEIGHT * dupz) + if (vid.height != BASEVIDHEIGHT * vid.dup) V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, 158); V_DrawFill(0, y+50, vid.width, BASEVIDHEIGHT, V_SNAPTOLEFT|31); @@ -5952,7 +5950,7 @@ static void M_DrawLevelPlatterMenu(void) } // draw from top to bottom - while (y < (vid.height/vid.dupy)) + while (y < (vid.height/vid.dup)) { M_DrawLevelPlatterRow(iter, y); y += lsvseperation(iter); @@ -7799,9 +7797,9 @@ static void M_DrawSoundTest(void) } } - y = (BASEVIDWIDTH-(vid.width/vid.dupx))/2; + y = (BASEVIDWIDTH-(vid.width/vid.dup))/2; - V_DrawFill(y, 20, vid.width/vid.dupx, 24, 159); + V_DrawFill(y, 20, vid.width/vid.dup, 24, 159); { static fixed_t st_scroll = -FRACUNIT; const char* titl; @@ -8371,8 +8369,8 @@ static void M_DrawLoadGameData(void) INT32 i, prev_i = 1, savetodraw, x, y, hsep = 90; skin_t *charskin = NULL; - if (vid.width != BASEVIDWIDTH*vid.dupx) - hsep = (hsep*vid.width)/(BASEVIDWIDTH*vid.dupx); + if (vid.width != BASEVIDWIDTH*vid.dup) + hsep = (hsep*vid.width)/(BASEVIDWIDTH*vid.dup); for (i = 2; prev_i; i = -(i + ((UINT32)i >> 31))) // draws from outwards in; 2, -2, 1, -1, 0 { @@ -9357,7 +9355,7 @@ static void M_DrawSetupChoosePlayerMenu(void) INT16 bgwidth = charbg->width; INT16 fgwidth = charfg->width; INT32 x, y; - INT32 w = (vid.width/vid.dupx); + INT32 w = (vid.width/vid.dup); if (abs(char_scroll) > FRACUNIT/4) char_scroll -= FixedMul((char_scroll>>2), renderdeltatics); @@ -9393,7 +9391,7 @@ static void M_DrawSetupChoosePlayerMenu(void) // Background and borders V_DrawFill(0, 0, bgwidth, vid.height, V_SNAPTOTOP|colormap[101]); { - INT32 sw = (BASEVIDWIDTH * vid.dupx); + INT32 sw = (BASEVIDWIDTH * vid.dup); INT32 bw = (vid.width - sw) / 2; col = colormap[106]; if (bw) @@ -10815,7 +10813,7 @@ void M_DrawMarathon(void) const char *cvstring; char *work; angle_t fa; - INT32 dupz = (vid.dupx < vid.dupy ? vid.dupx : vid.dupy), xspan = (vid.width/dupz), yspan = (vid.height/dupz), diffx = (xspan - BASEVIDWIDTH)/2, diffy = (yspan - BASEVIDHEIGHT)/2, maxy = BASEVIDHEIGHT + diffy; + INT32 xspan = (vid.width/vid.dup), yspan = (vid.height/vid.dup), diffx = (xspan - BASEVIDWIDTH)/2, diffy = (yspan - BASEVIDHEIGHT)/2, maxy = BASEVIDHEIGHT + diffy; curbgxspeed = 0; curbgyspeed = 18; @@ -10888,16 +10886,17 @@ void M_DrawMarathon(void) INT32 trans = V_60TRANS+((cnt&~3)<<(V_ALPHASHIFT-2)); INT32 height = fg->height / 2; char patchname[7] = "CEMGx0"; + INT32 dup; - dupz = (w*7)/6; //(w*42*120)/(360*6); -- I don't know why this works but I'm not going to complain. - dupz = ((dupz>>FRACBITS) % height); + dup = (w*7)/6; //(w*42*120)/(360*6); -- I don't know why this works but I'm not going to complain. + dup = ((dup>>FRACBITS) % height); y = height/2; - while (y+dupz >= -diffy) + while (y+dup >= -diffy) y -= height; - while (y-2-dupz < maxy) + while (y-2-dup < maxy) { - V_DrawFixedPatch(((BASEVIDWIDTH-190)<<(FRACBITS-1)), (y-2-dupz)<>FRACBITS) % height); - y = dupz+(height/4); - x = 105+dupz; + //dup = (w*height)/18; + dup = ((w>>FRACBITS) % height); + y = dup+(height/4); + x = 105+dup; while (y >= -diffy) { x -= height; y -= height; } - while (y-dupz < maxy && x < (xspan/2)) + while (y-dup < maxy && x < (xspan/2)) { V_DrawFill((BASEVIDWIDTH/2)-x-height, -diffy, height, diffy+y+height, 153); V_DrawFill((BASEVIDWIDTH/2)+x, (maxy-y)-height, height, height+y, 153); diff --git a/src/m_misc.c b/src/m_misc.c index f547f5c41..d4b272f1d 100644 --- a/src/m_misc.c +++ b/src/m_misc.c @@ -989,7 +989,7 @@ static inline boolean M_PNGLib(void) static void M_PNGFrame(png_structp png_ptr, png_infop png_info_ptr, png_bytep png_buf) { - png_uint_16 downscale = apng_downscale ? vid.dupx : 1; + png_uint_16 downscale = apng_downscale ? vid.dup : 1; png_uint_32 pitch = png_get_rowbytes(png_ptr, png_info_ptr); PNG_CONST png_uint_32 width = vid.width / downscale; @@ -1055,7 +1055,7 @@ static boolean M_SetupaPNG(png_const_charp filename, png_bytep pal) apng_downscale = (!!cv_apng_downscale.value); - downscale = apng_downscale ? vid.dupx : 1; + downscale = apng_downscale ? vid.dup : 1; apng_FILE = fopen(filename,"wb+"); // + mode for reading if (!apng_FILE) diff --git a/src/r_sky.c b/src/r_sky.c index c47029f0b..edde4c218 100644 --- a/src/r_sky.c +++ b/src/r_sky.c @@ -75,6 +75,6 @@ void R_SetupSkyDraw(void) */ void R_SetSkyScale(void) { - fixed_t difference = vid.fdupx-(vid.dupx<> V_BLENDSHIFT); fixed_t col, ofs, colfrac, rowfrac, fdup, vdup; - INT32 dupx, dupy; + INT32 dup; const column_t *column; UINT8 *desttop, *dest, *deststart, *destend; const UINT8 *source, *deststop; @@ -555,30 +555,23 @@ void V_DrawStretchyFixedPatch(fixed_t x, fixed_t y, fixed_t pscale, fixed_t vsca patchdrawfunc = (v_translevel) ? transmappedpdraw : mappedpdraw; } - dupx = vid.dupx; - dupy = vid.dupy; - if (scrn & V_SCALEPATCHMASK) switch ((scrn & V_SCALEPATCHMASK) >> V_SCALEPATCHSHIFT) + dup = vid.dup; + if (scrn & V_SCALEPATCHMASK) switch (scrn & V_SCALEPATCHMASK) { - case 1: // V_NOSCALEPATCH - dupx = dupy = 1; + case V_NOSCALEPATCH: + dup = 1; break; - case 2: // V_SMALLSCALEPATCH - dupx = vid.smalldupx; - dupy = vid.smalldupy; + case V_SMALLSCALEPATCH: + dup = vid.smalldup; break; - case 3: // V_MEDSCALEPATCH - dupx = vid.meddupx; - dupy = vid.meddupy; - break; - default: + case V_MEDSCALEPATCH: + dup = vid.meddup; break; } - // only use one dup, to avoid stretching (har har) - dupx = dupy = (dupx < dupy ? dupx : dupy); - fdup = vdup = FixedMul(dupx<>= FRACBITS; y >>= FRACBITS; @@ -703,30 +696,30 @@ void V_DrawStretchyFixedPatch(fixed_t x, fixed_t y, fixed_t pscale, fixed_t vsca } } - if (vid.width != BASEVIDWIDTH * dupx) + if (vid.width != BASEVIDWIDTH * dup) { - // dupx adjustments pretend that screen width is BASEVIDWIDTH * dupx, + // dup adjustments pretend that screen width is BASEVIDWIDTH * dup, // so center this imaginary screen if (scrn & V_SNAPTORIGHT) - x += (vid.width - (BASEVIDWIDTH * dupx)); + x += (vid.width - (BASEVIDWIDTH * dup)); else if (!(scrn & V_SNAPTOLEFT)) - x += (vid.width - (BASEVIDWIDTH * dupx)) / 2; + x += (vid.width - (BASEVIDWIDTH * dup)) / 2; if (perplayershuffle & 4) - x -= (vid.width - (BASEVIDWIDTH * dupx)) / 4; + x -= (vid.width - (BASEVIDWIDTH * dup)) / 4; else if (perplayershuffle & 8) - x += (vid.width - (BASEVIDWIDTH * dupx)) / 4; + x += (vid.width - (BASEVIDWIDTH * dup)) / 4; } - if (vid.height != BASEVIDHEIGHT * dupy) + if (vid.height != BASEVIDHEIGHT * dup) { // same thing here if (scrn & V_SNAPTOBOTTOM) - y += (vid.height - (BASEVIDHEIGHT * dupy)); + y += (vid.height - (BASEVIDHEIGHT * dup)); else if (!(scrn & V_SNAPTOTOP)) - y += (vid.height - (BASEVIDHEIGHT * dupy)) / 2; + y += (vid.height - (BASEVIDHEIGHT * dup)) / 2; if (perplayershuffle & 1) - y -= (vid.height - (BASEVIDHEIGHT * dupy)) / 4; + y -= (vid.height - (BASEVIDHEIGHT * dup)) / 4; else if (perplayershuffle & 2) - y += (vid.height - (BASEVIDHEIGHT * dupy)) / 4; + y += (vid.height - (BASEVIDHEIGHT * dup)) / 4; } } @@ -737,11 +730,11 @@ void V_DrawStretchyFixedPatch(fixed_t x, fixed_t y, fixed_t pscale, fixed_t vsca { pwidth = patch->width<>= FRACBITS; } else - pwidth = patch->width * dupx; + pwidth = patch->width * dup; deststart = desttop; destend = desttop + pwidth; @@ -797,7 +790,7 @@ void V_DrawCroppedPatch(fixed_t x, fixed_t y, fixed_t pscale, fixed_t vscale, IN // boolean flip = false; fixed_t col, ofs, colfrac, rowfrac, fdup, vdup; - INT32 dupx, dupy; + INT32 dup; const column_t *column; UINT8 *desttop, *dest; const UINT8 *source, *deststop; @@ -845,30 +838,23 @@ void V_DrawCroppedPatch(fixed_t x, fixed_t y, fixed_t pscale, fixed_t vscale, IN patchdrawfunc = (v_translevel) ? transmappedpdraw : mappedpdraw; } - dupx = vid.dupx; - dupy = vid.dupy; - if (scrn & V_SCALEPATCHMASK) switch ((scrn & V_SCALEPATCHMASK) >> V_SCALEPATCHSHIFT) + dup = vid.dup; + if (scrn & V_SCALEPATCHMASK) switch (scrn & V_SCALEPATCHMASK) { - case 1: // V_NOSCALEPATCH - dupx = dupy = 1; + case V_NOSCALEPATCH: + dup = 1; break; - case 2: // V_SMALLSCALEPATCH - dupx = vid.smalldupx; - dupy = vid.smalldupy; + case V_SMALLSCALEPATCH: + dup = vid.smalldup; break; - case 3: // V_MEDSCALEPATCH - dupx = vid.meddupx; - dupy = vid.meddupy; - break; - default: + case V_MEDSCALEPATCH: + dup = vid.meddup; break; } - // only use one dup, to avoid stretching (har har) - dupx = dupy = (dupx < dupy ? dupx : dupy); - fdup = vdup = FixedMul(dupx<>= FRACBITS; y >>= FRACBITS; @@ -971,30 +957,30 @@ void V_DrawCroppedPatch(fixed_t x, fixed_t y, fixed_t pscale, fixed_t vscale, IN // if it's meant to cover the whole screen, black out the rest // no the patch is cropped do not do this ever - if (vid.width != BASEVIDWIDTH * dupx) + if (vid.width != BASEVIDWIDTH * dup) { - // dupx adjustments pretend that screen width is BASEVIDWIDTH * dupx, + // dup adjustments pretend that screen width is BASEVIDWIDTH * dup, // so center this imaginary screen if (scrn & V_SNAPTORIGHT) - x += (vid.width - (BASEVIDWIDTH * dupx)); + x += (vid.width - (BASEVIDWIDTH * dup)); else if (!(scrn & V_SNAPTOLEFT)) - x += (vid.width - (BASEVIDWIDTH * dupx)) / 2; + x += (vid.width - (BASEVIDWIDTH * dup)) / 2; if (perplayershuffle & 4) - x -= (vid.width - (BASEVIDWIDTH * dupx)) / 4; + x -= (vid.width - (BASEVIDWIDTH * dup)) / 4; else if (perplayershuffle & 8) - x += (vid.width - (BASEVIDWIDTH * dupx)) / 4; + x += (vid.width - (BASEVIDWIDTH * dup)) / 4; } - if (vid.height != BASEVIDHEIGHT * dupy) + if (vid.height != BASEVIDHEIGHT * dup) { // same thing here if (scrn & V_SNAPTOBOTTOM) - y += (vid.height - (BASEVIDHEIGHT * dupy)); + y += (vid.height - (BASEVIDHEIGHT * dup)); else if (!(scrn & V_SNAPTOTOP)) - y += (vid.height - (BASEVIDHEIGHT * dupy)) / 2; + y += (vid.height - (BASEVIDHEIGHT * dup)) / 2; if (perplayershuffle & 1) - y -= (vid.height - (BASEVIDHEIGHT * dupy)) / 4; + y -= (vid.height - (BASEVIDHEIGHT * dup)) / 4; else if (perplayershuffle & 2) - y += (vid.height - (BASEVIDHEIGHT * dupy)) / 4; + y += (vid.height - (BASEVIDHEIGHT * dup)) / 4; } } @@ -1150,22 +1136,22 @@ static void V_BlitScaledPic(INT32 rx1, INT32 ry1, INT32 scrn, pic_t * pic) dest = screens[scrn] + max(0, ry1 * vid.width) + max(0, rx1); // y cliping to the screen - if (ry1 + height * vid.dupy >= vid.width) - height = (vid.width - ry1) / vid.dupy - 1; + if (ry1 + height * vid.dup >= vid.width) + height = (vid.width - ry1) / vid.dup - 1; // WARNING no x clipping (not needed for the moment) - for (y = max(0, -ry1 / vid.dupy); y < height; y++) + for (y = max(0, -ry1 / vid.dup); y < height; y++) { - for (dupy = vid.dupy; dupy; dupy--) + for (dupy = vid.dup; dupy; dupy--) { src = pic->data + y * width; for (x = 0; x < width; x++) { - for (dupx = vid.dupx; dupx; dupx--) + for (dupx = vid.dup; dupx; dupx--) *dest++ = *src; src++; } - dest += vid.width - vid.dupx * width; + dest += vid.width - vid.dup * width; } } } @@ -1262,44 +1248,42 @@ void V_DrawFill(INT32 x, INT32 y, INT32 w, INT32 h, INT32 c) if (!(c & V_NOSCALESTART)) { - INT32 dupx = vid.dupx, dupy = vid.dupy; - if (x == 0 && y == 0 && w == BASEVIDWIDTH && h == BASEVIDHEIGHT) { // Clear the entire screen, from dest to deststop. Yes, this really works. memset(screens[0], (c&255), vid.width * vid.height * vid.bpp); return; } - x *= dupx; - y *= dupy; - w *= dupx; - h *= dupy; + x *= vid.dup; + y *= vid.dup; + w *= vid.dup; + h *= vid.dup; // Center it if necessary - if (vid.width != BASEVIDWIDTH * dupx) + if (vid.width != BASEVIDWIDTH * vid.dup) { - // dupx adjustments pretend that screen width is BASEVIDWIDTH * dupx, + // dup adjustments pretend that screen width is BASEVIDWIDTH * dup, // so center this imaginary screen if (c & V_SNAPTORIGHT) - x += (vid.width - (BASEVIDWIDTH * dupx)); + x += (vid.width - (BASEVIDWIDTH * vid.dup)); else if (!(c & V_SNAPTOLEFT)) - x += (vid.width - (BASEVIDWIDTH * dupx)) / 2; + x += (vid.width - (BASEVIDWIDTH * vid.dup)) / 2; if (perplayershuffle & 4) - x -= (vid.width - (BASEVIDWIDTH * dupx)) / 4; + x -= (vid.width - (BASEVIDWIDTH * vid.dup)) / 4; else if (perplayershuffle & 8) - x += (vid.width - (BASEVIDWIDTH * dupx)) / 4; + x += (vid.width - (BASEVIDWIDTH * vid.dup)) / 4; } - if (vid.height != BASEVIDHEIGHT * dupy) + if (vid.height != BASEVIDHEIGHT * vid.dup) { // same thing here if (c & V_SNAPTOBOTTOM) - y += (vid.height - (BASEVIDHEIGHT * dupy)); + y += (vid.height - (BASEVIDHEIGHT * vid.dup)); else if (!(c & V_SNAPTOTOP)) - y += (vid.height - (BASEVIDHEIGHT * dupy)) / 2; + y += (vid.height - (BASEVIDHEIGHT * vid.dup)) / 2; if (perplayershuffle & 1) - y -= (vid.height - (BASEVIDHEIGHT * dupy)) / 4; + y -= (vid.height - (BASEVIDHEIGHT * vid.dup)) / 4; else if (perplayershuffle & 2) - y += (vid.height - (BASEVIDHEIGHT * dupy)) / 4; + y += (vid.height - (BASEVIDHEIGHT * vid.dup)) / 4; } } @@ -1474,38 +1458,36 @@ void V_DrawFillConsoleMap(INT32 x, INT32 y, INT32 w, INT32 h, INT32 c) if (!(c & V_NOSCALESTART)) { - INT32 dupx = vid.dupx, dupy = vid.dupy; - - x *= dupx; - y *= dupy; - w *= dupx; - h *= dupy; + x *= vid.dup; + y *= vid.dup; + w *= vid.dup; + h *= vid.dup; // Center it if necessary - if (vid.width != BASEVIDWIDTH * dupx) + if (vid.width != BASEVIDWIDTH * vid.dup) { - // dupx adjustments pretend that screen width is BASEVIDWIDTH * dupx, + // dup adjustments pretend that screen width is BASEVIDWIDTH * dup, // so center this imaginary screen if (c & V_SNAPTORIGHT) - x += (vid.width - (BASEVIDWIDTH * dupx)); + x += (vid.width - (BASEVIDWIDTH * vid.dup)); else if (!(c & V_SNAPTOLEFT)) - x += (vid.width - (BASEVIDWIDTH * dupx)) / 2; + x += (vid.width - (BASEVIDWIDTH * vid.dup)) / 2; if (perplayershuffle & 4) - x -= (vid.width - (BASEVIDWIDTH * dupx)) / 4; + x -= (vid.width - (BASEVIDWIDTH * vid.dup)) / 4; else if (perplayershuffle & 8) - x += (vid.width - (BASEVIDWIDTH * dupx)) / 4; + x += (vid.width - (BASEVIDWIDTH * vid.dup)) / 4; } - if (vid.height != BASEVIDHEIGHT * dupy) + if (vid.height != BASEVIDHEIGHT * vid.dup) { // same thing here if (c & V_SNAPTOBOTTOM) - y += (vid.height - (BASEVIDHEIGHT * dupy)); + y += (vid.height - (BASEVIDHEIGHT * vid.dup)); else if (!(c & V_SNAPTOTOP)) - y += (vid.height - (BASEVIDHEIGHT * dupy)) / 2; + y += (vid.height - (BASEVIDHEIGHT * vid.dup)) / 2; if (perplayershuffle & 1) - y -= (vid.height - (BASEVIDHEIGHT * dupy)) / 4; + y -= (vid.height - (BASEVIDHEIGHT * vid.dup)) / 4; else if (perplayershuffle & 2) - y += (vid.height - (BASEVIDHEIGHT * dupy)) / 4; + y += (vid.height - (BASEVIDHEIGHT * vid.dup)) / 4; } } @@ -1658,38 +1640,36 @@ void V_DrawFadeFill(INT32 x, INT32 y, INT32 w, INT32 h, INT32 c, UINT16 color, U if (!(c & V_NOSCALESTART)) { - INT32 dupx = vid.dupx, dupy = vid.dupy; - - x *= dupx; - y *= dupy; - w *= dupx; - h *= dupy; + x *= vid.dup; + y *= vid.dup; + w *= vid.dup; + h *= vid.dup; // Center it if necessary - if (vid.width != BASEVIDWIDTH * dupx) + if (vid.width != BASEVIDWIDTH * vid.dup) { - // dupx adjustments pretend that screen width is BASEVIDWIDTH * dupx, + // dup adjustments pretend that screen width is BASEVIDWIDTH * dup, // so center this imaginary screen if (c & V_SNAPTORIGHT) - x += (vid.width - (BASEVIDWIDTH * dupx)); + x += (vid.width - (BASEVIDWIDTH * vid.dup)); else if (!(c & V_SNAPTOLEFT)) - x += (vid.width - (BASEVIDWIDTH * dupx)) / 2; + x += (vid.width - (BASEVIDWIDTH * vid.dup)) / 2; if (perplayershuffle & 4) - x -= (vid.width - (BASEVIDWIDTH * dupx)) / 4; + x -= (vid.width - (BASEVIDWIDTH * vid.dup)) / 4; else if (perplayershuffle & 8) - x += (vid.width - (BASEVIDWIDTH * dupx)) / 4; + x += (vid.width - (BASEVIDWIDTH * vid.dup)) / 4; } - if (vid.height != BASEVIDHEIGHT * dupy) + if (vid.height != BASEVIDHEIGHT * vid.dup) { // same thing here if (c & V_SNAPTOBOTTOM) - y += (vid.height - (BASEVIDHEIGHT * dupy)); + y += (vid.height - (BASEVIDHEIGHT * vid.dup)); else if (!(c & V_SNAPTOTOP)) - y += (vid.height - (BASEVIDHEIGHT * dupy)) / 2; + y += (vid.height - (BASEVIDHEIGHT * vid.dup)) / 2; if (perplayershuffle & 1) - y -= (vid.height - (BASEVIDHEIGHT * dupy)) / 4; + y -= (vid.height - (BASEVIDHEIGHT * vid.dup)) / 4; else if (perplayershuffle & 2) - y += (vid.height - (BASEVIDHEIGHT * dupy)) / 4; + y += (vid.height - (BASEVIDHEIGHT * vid.dup)) / 4; } } @@ -1735,7 +1715,7 @@ void V_DrawFadeFill(INT32 x, INT32 y, INT32 w, INT32 h, INT32 c, UINT16 color, U // void V_DrawFlatFill(INT32 x, INT32 y, INT32 w, INT32 h, lumpnum_t flatnum) { - INT32 u, v, dupx, dupy; + INT32 u, v; fixed_t dx, dy, xfrac, yfrac; const UINT8 *src, *deststop; UINT8 *flat, *dest; @@ -1754,29 +1734,27 @@ void V_DrawFlatFill(INT32 x, INT32 y, INT32 w, INT32 h, lumpnum_t flatnum) flat = W_CacheLumpNum(flatnum, PU_CACHE); - dupx = dupy = (vid.dupx < vid.dupy ? vid.dupx : vid.dupy); - - dest = screens[0] + y*dupy*vid.width + x*dupx; + dest = screens[0] + y*vid.dup*vid.width + x*vid.dup; deststop = screens[0] + vid.rowbytes * vid.height; // from V_DrawScaledPatch - if (vid.width != BASEVIDWIDTH * dupx) + if (vid.width != BASEVIDWIDTH * vid.dup) { - // dupx adjustments pretend that screen width is BASEVIDWIDTH * dupx, + // dup adjustments pretend that screen width is BASEVIDWIDTH * dup, // so center this imaginary screen - dest += (vid.width - (BASEVIDWIDTH * dupx)) / 2; + dest += (vid.width - (BASEVIDWIDTH * vid.dup)) / 2; } - if (vid.height != BASEVIDHEIGHT * dupy) + if (vid.height != BASEVIDHEIGHT * vid.dup) { // same thing here - dest += (vid.height - (BASEVIDHEIGHT * dupy)) * vid.width / 2; + dest += (vid.height - (BASEVIDHEIGHT * vid.dup)) * vid.width / 2; } - w *= dupx; - h *= dupy; + w *= vid.dup; + h *= vid.dup; - dx = FixedDiv(FRACUNIT, dupx<<(FRACBITS-2)); - dy = FixedDiv(FRACUNIT, dupy<<(FRACBITS-2)); + dx = FixedDiv(FRACUNIT, vid.dup<<(FRACBITS-2)); + dy = FixedDiv(FRACUNIT, vid.dup<<(FRACBITS-2)); yfrac = 0; for (v = 0; v < h; v++, dest += vid.width) @@ -1799,8 +1777,7 @@ void V_DrawFlatFill(INT32 x, INT32 y, INT32 w, INT32 h, lumpnum_t flatnum) // void V_DrawPatchFill(patch_t *pat) { - INT32 dupz = (vid.dupx < vid.dupy ? vid.dupx : vid.dupy); - INT32 x, y, pw = pat->width * dupz, ph = pat->height * dupz; + INT32 x, y, pw = pat->width * vid.dup, ph = pat->height * vid.dup; for (x = 0; x < vid.width; x += pw) { @@ -1876,11 +1853,11 @@ void V_DrawPromptBack(INT32 boxheight, INT32 color) boxheight = -boxheight; else // 4 lines of space plus gaps between and some leeway boxheight = ((boxheight * 4) + (boxheight/2)*5); - V_DrawFill((BASEVIDWIDTH-(vid.width/vid.dupx))/2, BASEVIDHEIGHT-boxheight, (vid.width/vid.dupx),boxheight, (color-256)|V_SNAPTOBOTTOM); + V_DrawFill((BASEVIDWIDTH-(vid.width/vid.dup))/2, BASEVIDHEIGHT-boxheight, (vid.width/vid.dup),boxheight, (color-256)|V_SNAPTOBOTTOM); return; } - boxheight *= vid.dupy; + boxheight *= vid.dup; if (color == INT32_MAX) color = cons_backcolor.value; @@ -2099,7 +2076,7 @@ char *V_WordWrap(INT32 x, INT32 w, INT32 option, const char *string) // void V_DrawString(INT32 x, INT32 y, INT32 option, const char *string) { - INT32 w, c, cx = x, cy = y, dupx, dupy, scrwidth, center = 0, left = 0; + INT32 w, c, cx = x, cy = y, dup, scrwidth, center = 0, left = 0; const char *ch = string; INT32 charflags = (option & V_CHARCOLORMASK); const UINT8 *colormap = NULL; @@ -2110,20 +2087,19 @@ void V_DrawString(INT32 x, INT32 y, INT32 option, const char *string) if (option & V_NOSCALESTART) { - dupx = vid.dupx; - dupy = vid.dupy; + dup = vid.dup; scrwidth = vid.width; } else { - dupx = dupy = 1; - scrwidth = vid.width/vid.dupx; + dup = 1; + scrwidth = vid.width/vid.dup; left = (scrwidth - BASEVIDWIDTH)/2; scrwidth -= left; } if (option & V_NOSCALEPATCH) - scrwidth *= vid.dupx; + scrwidth *= vid.dup; switch (option & V_SPACINGMASK) { @@ -2155,9 +2131,9 @@ void V_DrawString(INT32 x, INT32 y, INT32 option, const char *string) cx = x; if (option & V_RETURN8) - cy += 8*dupy; + cy += 8*dup; else - cy += 12*dupy; + cy += 12*dup; continue; } @@ -2170,17 +2146,17 @@ void V_DrawString(INT32 x, INT32 y, INT32 option, const char *string) // character does not exist or is a space if (c < 0 || c >= HU_FONTSIZE || !hu_font[c]) { - cx += spacewidth * dupx; + cx += spacewidth * dup; continue; } if (charwidth) { - w = charwidth * dupx; - center = w/2 - hu_font[c]->width*dupx/2; + w = charwidth * dup; + center = w/2 - hu_font[c]->width*dup/2; } else - w = hu_font[c]->width * dupx; + w = hu_font[c]->width * dup; if (cx > scrwidth) continue; @@ -2215,7 +2191,7 @@ void V_DrawRightAlignedString(INT32 x, INT32 y, INT32 option, const char *string // void V_DrawSmallString(INT32 x, INT32 y, INT32 option, const char *string) { - INT32 w, c, cx = x, cy = y, dupx, dupy, scrwidth, center = 0, left = 0; + INT32 w, c, cx = x, cy = y, dup, scrwidth, center = 0, left = 0; const char *ch = string; INT32 charflags = 0; const UINT8 *colormap = NULL; @@ -2226,20 +2202,19 @@ void V_DrawSmallString(INT32 x, INT32 y, INT32 option, const char *string) if (option & V_NOSCALESTART) { - dupx = vid.dupx; - dupy = vid.dupy; + dup = vid.dup; scrwidth = vid.width; } else { - dupx = dupy = 1; - scrwidth = vid.width/vid.dupx; + dup = 1; + scrwidth = vid.width/vid.dup; left = (scrwidth - BASEVIDWIDTH)/2; scrwidth -= left; } if (option & V_NOSCALEPATCH) - scrwidth *= vid.dupx; + scrwidth *= vid.dup; charflags = (option & V_CHARCOLORMASK); @@ -2273,9 +2248,9 @@ void V_DrawSmallString(INT32 x, INT32 y, INT32 option, const char *string) cx = x; if (option & V_RETURN8) - cy += 4*dupy; + cy += 4*dup; else - cy += 6*dupy; + cy += 6*dup; continue; } @@ -2287,17 +2262,17 @@ void V_DrawSmallString(INT32 x, INT32 y, INT32 option, const char *string) if (c < 0 || c >= HU_FONTSIZE || !hu_font[c]) { - cx += spacewidth * dupx; + cx += spacewidth * dup; continue; } if (charwidth) { - w = charwidth * dupx; - center = w/2 - hu_font[c]->width*dupx/4; + w = charwidth * dup; + center = w/2 - hu_font[c]->width*dup/4; } else - w = hu_font[c]->width * dupx / 2; + w = hu_font[c]->width * dup / 2; if (cx > scrwidth) continue; @@ -2333,7 +2308,7 @@ void V_DrawRightAlignedSmallString(INT32 x, INT32 y, INT32 option, const char *s // void V_DrawThinString(INT32 x, INT32 y, INT32 option, const char *string) { - INT32 w, c, cx = x, cy = y, dupx, dupy, scrwidth, left = 0; + INT32 w, c, cx = x, cy = y, dup, scrwidth, left = 0; const char *ch = string; INT32 charflags = 0; const UINT8 *colormap = NULL; @@ -2344,20 +2319,19 @@ void V_DrawThinString(INT32 x, INT32 y, INT32 option, const char *string) if (option & V_NOSCALESTART) { - dupx = vid.dupx; - dupy = vid.dupy; + dup = vid.dup; scrwidth = vid.width; } else { - dupx = dupy = 1; - scrwidth = vid.width/vid.dupx; + dup = 1; + scrwidth = vid.width/vid.dup; left = (scrwidth - BASEVIDWIDTH)/2; scrwidth -= left; } if (option & V_NOSCALEPATCH) - scrwidth *= vid.dupx; + scrwidth *= vid.dup; charflags = (option & V_CHARCOLORMASK); @@ -2391,9 +2365,9 @@ void V_DrawThinString(INT32 x, INT32 y, INT32 option, const char *string) cx = x; if (option & V_RETURN8) - cy += 8*dupy; + cy += 8*dup; else - cy += 12*dupy; + cy += 12*dup; continue; } @@ -2405,14 +2379,14 @@ void V_DrawThinString(INT32 x, INT32 y, INT32 option, const char *string) if (c < 0 || c >= HU_FONTSIZE || !tny_font[c]) { - cx += spacewidth * dupx; + cx += spacewidth * dup; continue; } if (charwidth) - w = charwidth * dupx; + w = charwidth * dup; else - w = tny_font[c]->width * dupx; + w = tny_font[c]->width * dup; if (cx > scrwidth) continue; @@ -2471,7 +2445,7 @@ void V_DrawRightAlignedSmallThinString(INT32 x, INT32 y, INT32 option, const cha void V_DrawStringAtFixed(fixed_t x, fixed_t y, INT32 option, const char *string) { fixed_t cx = x, cy = y; - INT32 w, c, dupx, dupy, scrwidth, center = 0, left = 0; + INT32 w, c, dup, scrwidth, center = 0, left = 0; const char *ch = string; INT32 charflags = 0; const UINT8 *colormap = NULL; @@ -2482,20 +2456,19 @@ void V_DrawStringAtFixed(fixed_t x, fixed_t y, INT32 option, const char *string) if (option & V_NOSCALESTART) { - dupx = vid.dupx; - dupy = vid.dupy; + dup = vid.dup; scrwidth = vid.width; } else { - dupx = dupy = 1; - scrwidth = vid.width/vid.dupx; + dup = 1; + scrwidth = vid.width/vid.dup; left = (scrwidth - BASEVIDWIDTH)/2; scrwidth -= left; } if (option & V_NOSCALEPATCH) - scrwidth *= vid.dupx; + scrwidth *= vid.dup; charflags = (option & V_CHARCOLORMASK); @@ -2529,9 +2502,9 @@ void V_DrawStringAtFixed(fixed_t x, fixed_t y, INT32 option, const char *string) cx = x; if (option & V_RETURN8) - cy += (8*dupy)<= HU_FONTSIZE || !hu_font[c]) { - cx += (spacewidth * dupx)<width*(dupx/2); + w = charwidth * dup; + center = w/2 - hu_font[c]->width*(dup/2); } else - w = hu_font[c]->width * dupx; + w = hu_font[c]->width * dup; if ((cx>>FRACBITS) > scrwidth) continue; @@ -2587,7 +2560,7 @@ void V_DrawRightAlignedStringAtFixed(fixed_t x, fixed_t y, INT32 option, const c void V_DrawSmallStringAtFixed(fixed_t x, fixed_t y, INT32 option, const char *string) { fixed_t cx = x, cy = y; - INT32 w, c, dupx, dupy, scrwidth, center = 0, left = 0; + INT32 w, c, dup, scrwidth, center = 0, left = 0; const char *ch = string; INT32 charflags = 0; const UINT8 *colormap = NULL; @@ -2598,20 +2571,19 @@ void V_DrawSmallStringAtFixed(fixed_t x, fixed_t y, INT32 option, const char *st if (option & V_NOSCALESTART) { - dupx = vid.dupx; - dupy = vid.dupy; + dup = vid.dup; scrwidth = vid.width; } else { - dupx = dupy = 1; - scrwidth = vid.width/vid.dupx; + dup = 1; + scrwidth = vid.width/vid.dup; left = (scrwidth - BASEVIDWIDTH)/2; scrwidth -= left; } if (option & V_NOSCALEPATCH) - scrwidth *= vid.dupx; + scrwidth *= vid.dup; charflags = (option & V_CHARCOLORMASK); @@ -2645,9 +2617,9 @@ void V_DrawSmallStringAtFixed(fixed_t x, fixed_t y, INT32 option, const char *st cx = x; if (option & V_RETURN8) - cy += (4*dupy)<= HU_FONTSIZE || !hu_font[c]) { - cx += (spacewidth * dupx)<width*(dupx/4); + w = charwidth * dup; + center = w/2 - hu_font[c]->width*(dup/4); } else - w = hu_font[c]->width * dupx / 2; + w = hu_font[c]->width * dup / 2; if ((cx>>FRACBITS) > scrwidth) break; @@ -2704,7 +2676,7 @@ void V_DrawRightAlignedSmallStringAtFixed(fixed_t x, fixed_t y, INT32 option, co void V_DrawThinStringAtFixed(fixed_t x, fixed_t y, INT32 option, const char *string) { fixed_t cx = x, cy = y; - INT32 w, c, dupx, dupy, scrwidth, center = 0, left = 0; + INT32 w, c, dup, scrwidth, center = 0, left = 0; const char *ch = string; INT32 charflags = 0; const UINT8 *colormap = NULL; @@ -2715,20 +2687,19 @@ void V_DrawThinStringAtFixed(fixed_t x, fixed_t y, INT32 option, const char *str if (option & V_NOSCALESTART) { - dupx = vid.dupx; - dupy = vid.dupy; + dup = vid.dup; scrwidth = vid.width; } else { - dupx = dupy = 1; - scrwidth = vid.width/vid.dupx; + dup = 1; + scrwidth = vid.width/vid.dup; left = (scrwidth - BASEVIDWIDTH)/2; scrwidth -= left; } if (option & V_NOSCALEPATCH) - scrwidth *= vid.dupx; + scrwidth *= vid.dup; charflags = (option & V_CHARCOLORMASK); @@ -2762,9 +2733,9 @@ void V_DrawThinStringAtFixed(fixed_t x, fixed_t y, INT32 option, const char *str cx = x; if (option & V_RETURN8) - cy += (8*dupy)<= HU_FONTSIZE || !tny_font[c]) { - cx += (spacewidth * dupx)<width*(dupx/2); + w = charwidth * dup; + center = w/2 - tny_font[c]->width*(dup/2); } else - w = tny_font[c]->width * dupx; + w = tny_font[c]->width * dup; if ((cx>>FRACBITS) > scrwidth) break; @@ -2821,7 +2792,7 @@ void V_DrawRightAlignedThinStringAtFixed(fixed_t x, fixed_t y, INT32 option, con void V_DrawSmallThinStringAtFixed(fixed_t x, fixed_t y, INT32 option, const char *string) { fixed_t cx = x, cy = y; - INT32 w, c, dupx, dupy, scrwidth, center = 0, left = 0; + INT32 w, c, dup, scrwidth, center = 0, left = 0; const char *ch = string; INT32 charflags = 0; const UINT8 *colormap = NULL; @@ -2832,20 +2803,19 @@ void V_DrawSmallThinStringAtFixed(fixed_t x, fixed_t y, INT32 option, const char if (option & V_NOSCALESTART) { - dupx = vid.dupx<= HU_FONTSIZE || !tny_font[c]) { - cx += FixedMul(spacewidth, dupx); + cx += FixedMul(spacewidth, dup); continue; } if (charwidth) { - w = FixedMul(charwidth, dupx); - center = w/2 - tny_font[c]->width*(dupx/4); + w = FixedMul(charwidth, dup); + center = w/2 - tny_font[c]->width*(dup/4); } else - w = tny_font[c]->width * dupx / 2; + w = tny_font[c]->width * dup / 2; if (cx > scrwidth) break; @@ -2941,7 +2911,7 @@ void V_DrawTallNum(INT32 x, INT32 y, INT32 flags, INT32 num) boolean neg; if (flags & (V_NOSCALESTART|V_NOSCALEPATCH)) - w *= vid.dupx; + w *= vid.dup; if ((neg = num < 0)) num = -num; @@ -2966,7 +2936,7 @@ void V_DrawPaddedTallNum(INT32 x, INT32 y, INT32 flags, INT32 num, INT32 digits) INT32 w = tallnum[0]->width; if (flags & (V_NOSCALESTART|V_NOSCALEPATCH)) - w *= vid.dupx; + w *= vid.dup; if (num < 0) num = -num; @@ -3001,7 +2971,7 @@ void V_DrawLevelActNum(INT32 x, INT32 y, INT32 flags, UINT8 num) // void V_DrawCreditString(fixed_t x, fixed_t y, INT32 option, const char *string) { - INT32 w, c, dupx, dupy, scrwidth = BASEVIDWIDTH; + INT32 w, c, dup, scrwidth = BASEVIDWIDTH; fixed_t cx = x, cy = y; const char *ch = string; @@ -3011,15 +2981,14 @@ void V_DrawCreditString(fixed_t x, fixed_t y, INT32 option, const char *string) if (option & V_NOSCALESTART) { - dupx = vid.dupx; - dupy = vid.dupy; + dup = vid.dup; scrwidth = vid.width; } else - dupx = dupy = 1; + dup = 1; if (option & V_NOSCALEPATCH) - scrwidth *= vid.dupx; + scrwidth *= vid.dup; for (;;) { @@ -3029,18 +2998,18 @@ void V_DrawCreditString(fixed_t x, fixed_t y, INT32 option, const char *string) if (c == '\n') { cx = x; - cy += (12*dupy)<= CRED_FONTSIZE) { - cx += (16*dupx)<width * dupx; + w = cred_font[c]->width * dup; if ((cx>>FRACBITS) > scrwidth) continue; @@ -3054,7 +3023,7 @@ void V_DrawCreditString(fixed_t x, fixed_t y, INT32 option, const char *string) static void V_DrawNameTagLine(INT32 x, INT32 y, INT32 option, fixed_t scale, UINT8 *basecolormap, UINT8 *outlinecolormap, const char *string) { fixed_t cx, cy, w; - INT32 c, dupx, dupy, scrwidth, left = 0; + INT32 c, dup, scrwidth, left = 0; const char *ch = string; if (option & V_CENTERNAMETAG) @@ -3066,20 +3035,19 @@ static void V_DrawNameTagLine(INT32 x, INT32 y, INT32 option, fixed_t scale, UIN if (option & V_NOSCALESTART) { - dupx = vid.dupx; - dupy = vid.dupy; + dup = vid.dup; scrwidth = vid.width; } else { - dupx = dupy = 1; - scrwidth = vid.width/vid.dupx; + dup = 1; + scrwidth = vid.width/vid.dup; left = (scrwidth - BASEVIDWIDTH)/2; scrwidth -= left; } if (option & V_NOSCALEPATCH) - scrwidth *= vid.dupx; + scrwidth *= vid.dup; for (;;ch++) { @@ -3088,7 +3056,7 @@ static void V_DrawNameTagLine(INT32 x, INT32 y, INT32 option, fixed_t scale, UIN if (*ch == '\n') { cx = x<= NT_FONTSIZE || !ntb_font[c] || !nto_font[c]) { - cx += FixedMul((4 * dupx)*FRACUNIT, scale); + cx += FixedMul((4 * dup)*FRACUNIT, scale); continue; } - w = FixedMul(((ntb_font[c]->width)+2 * dupx) * FRACUNIT, scale); + w = FixedMul(((ntb_font[c]->width)+2 * dup) * FRACUNIT, scale); if (FixedInt(cx) > scrwidth) continue; @@ -3277,27 +3245,26 @@ INT32 V_CreditStringWidth(const char *string) // void V_DrawLevelTitle(INT32 x, INT32 y, INT32 option, const char *string) { - INT32 w, c, cx = x, cy = y, dupx, dupy, scrwidth, left = 0; + INT32 w, c, cx = x, cy = y, dup, scrwidth, left = 0; const char *ch = string; INT32 charflags = (option & V_CHARCOLORMASK); const UINT8 *colormap = NULL; if (option & V_NOSCALESTART) { - dupx = vid.dupx; - dupy = vid.dupy; + dup = vid.dup; scrwidth = vid.width; } else { - dupx = dupy = 1; - scrwidth = vid.width/vid.dupx; + dup = 1; + scrwidth = vid.width/vid.dup; left = (scrwidth - BASEVIDWIDTH)/2; scrwidth -= left; } if (option & V_NOSCALEPATCH) - scrwidth *= vid.dupx; + scrwidth *= vid.dup; for (;;ch++) { @@ -3313,18 +3280,18 @@ void V_DrawLevelTitle(INT32 x, INT32 y, INT32 option, const char *string) if (*ch == '\n') { cx = x; - cy += 12*dupy; + cy += 12*dup; continue; } c = *ch - LT_FONTSTART; if (c < 0 || c >= LT_FONTSIZE || !lt_font[c]) { - cx += 16*dupx; + cx += 16*dup; continue; } - w = lt_font[c]->width * dupx; + w = lt_font[c]->width * dup; if (cx > scrwidth) continue; @@ -3435,7 +3402,7 @@ INT32 V_StringWidth(const char *string, INT32 option) } if (option & (V_NOSCALESTART|V_NOSCALEPATCH)) - w *= vid.dupx; + w *= vid.dup; return w; } @@ -3682,7 +3649,7 @@ Unoptimized version { // Shift this row of pixels to the right by 2 tmpscr[y*vid.width] = srcscr[y*vid.width]; - M_Memcpy(&tmpscr[y*vid.width+vid.dupx], &srcscr[y*vid.width], vid.width-vid.dupx); + M_Memcpy(&tmpscr[y*vid.width+vid.dup], &srcscr[y*vid.width], vid.width-vid.dup); } else M_Memcpy(&tmpscr[y*vid.width], &srcscr[y*vid.width], vid.width); @@ -3783,31 +3750,23 @@ void V_Recalc(void) { // scale 1,2,3 times in x and y the patches for the menus and overlays... // calculated once and for all, used by routines in v_video.c and v_draw.c - vid.dupx = vid.width / BASEVIDWIDTH; - vid.dupy = vid.height / BASEVIDHEIGHT; - vid.dupx = vid.dupy = (vid.dupx < vid.dupy ? vid.dupx : vid.dupy); - vid.fdupx = FixedDiv(vid.width*FRACUNIT, BASEVIDWIDTH*FRACUNIT); - vid.fdupy = FixedDiv(vid.height*FRACUNIT, BASEVIDHEIGHT*FRACUNIT); -#ifdef HWRENDER - //if (rendermode != render_opengl && rendermode != render_none) // This was just placing it incorrectly at non aspect correct resolutions in opengl - // 13/11/18: - // The above is no longer necessary, since we want OpenGL to be just like software now - // -- Monster Iestyn -#endif - vid.fdupx = vid.fdupy = (vid.fdupx < vid.fdupy ? vid.fdupx : vid.fdupy); + // Set dup based on width or height, whichever is less + if (((vid.width*FRACUNIT) / BASEVIDWIDTH) < ((vid.height*FRACUNIT) / BASEVIDHEIGHT)) + { + vid.dup = vid.width / BASEVIDWIDTH; + vid.fdup = (vid.width*FRACUNIT) / BASEVIDWIDTH; + } + else + { + vid.dup = vid.height / BASEVIDHEIGHT; + vid.fdup = (vid.height*FRACUNIT) / BASEVIDHEIGHT; + } - vid.meddupx = (UINT8)(vid.dupx >> 1) + 1; - vid.meddupy = (UINT8)(vid.dupy >> 1) + 1; + vid.meddup = (UINT8)(vid.dup >> 1) + 1; + vid.smalldup = (UINT8)(vid.dup / 3) + 1; #ifdef HWRENDER - vid.fmeddupx = vid.meddupx*FRACUNIT; - vid.fmeddupy = vid.meddupy*FRACUNIT; -#endif - - vid.smalldupx = (UINT8)(vid.dupx / 3) + 1; - vid.smalldupy = (UINT8)(vid.dupy / 3) + 1; -#ifdef HWRENDER - vid.fsmalldupx = vid.smalldupx*FRACUNIT; - vid.fsmalldupy = vid.smalldupy*FRACUNIT; + vid.fmeddup = vid.meddup*FRACUNIT; + vid.fsmalldup = vid.smalldup*FRACUNIT; #endif } diff --git a/src/v_video.h b/src/v_video.h index ff03836b5..80936f3ee 100644 --- a/src/v_video.h +++ b/src/v_video.h @@ -36,7 +36,7 @@ cv_rsaturation, cv_ysaturation, cv_gsaturation, cv_csaturation, cv_bsaturation, // Allocates buffer screens, call before R_Init. void V_Init(void); -// Recalculates the viddef (dupx, dupy, etc.) according to the current screen resolution. +// Recalculates the viddef (dup, fdup, etc.) according to the current screen resolution. void V_Recalc(void); // Color look-up table diff --git a/src/y_inter.c b/src/y_inter.c index 69dc931ba..369ec3904 100644 --- a/src/y_inter.c +++ b/src/y_inter.c @@ -536,7 +536,7 @@ void Y_IntermissionDrawer(void) if (animatetic && (tic_t)intertic >= animatetic) { - const INT32 scradjust = (vid.width/vid.dupx)>>3; // 40 for BASEVIDWIDTH + const INT32 scradjust = (vid.width/vid.dup)>>3; // 40 for BASEVIDWIDTH INT32 animatetimer = (intertic - animatetic); if (animatetimer <= 16) { @@ -687,7 +687,7 @@ void Y_IntermissionDrawer(void) if (intertic > 1) { - if (stagefailed && data.spec.emeraldy < (vid.height/vid.dupy)+16) + if (stagefailed && data.spec.emeraldy < (vid.height/vid.dup)+16) { emeraldx += intertic - 6; } @@ -1163,7 +1163,7 @@ void Y_Ticker(void) } else { - if (data.spec.emeraldy < (vid.height/vid.dupy)+16) + if (data.spec.emeraldy < (vid.height/vid.dup)+16) { data.spec.emeraldy += (++data.spec.emeraldmomy); }