Skip to content

Commit 81c15dd

Browse files
committed
modernize build system and toolchain
- unified MSVC toolchain migration (v143 → v145) with solution/tooling normalization - Visual Studio solution alignment and project system cleanup (vcxproj/vcxproj.filters across client/server/missionchooser) - artifact and output model standardization (intermediate/output layout, naming, linker path consistency) - build pipeline modernization (robocopy-based deployment, structured pre/post build execution, normalized error handling) - CI toolchain alignment (GitHub Actions upgrade: runner image, MSBuild integration, checkout/action modernization) - client video subsystem dependency graph migration (VPX/WebM library replacement, legacy lib removal, vpx_tpl integration) - ABI boundary stabilization for debug builds (conditional thunk resolution for MSVC debug symbol indirection to preserve legacy callsite assumptions under toolchain upgrade) - cross-configuration library set segregation validation (Debug/Release/Profile VPX/WebM linking correctness enforcement)
1 parent 8cabfc9 commit 81c15dd

23 files changed

Lines changed: 800 additions & 451 deletions

.github/workflows/build.yaml

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,30 +16,38 @@ on:
1616
jobs:
1717
release:
1818
name: build release
19-
runs-on: windows-2022
19+
runs-on: windows-2025-vs2026
2020
timeout-minutes: 30
2121
steps:
2222
#checkout project
23-
- uses: actions/checkout@v3
23+
- uses: actions/checkout@v4
24+
25+
- name: Install MSVC Toolset version 14.50
26+
shell: cmd
27+
run: |
28+
"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vs_installer.exe" modify ^
29+
--installPath "C:\Program Files\Microsoft Visual Studio\18\Enterprise" ^
30+
--add Microsoft.VisualStudio.Component.VC.14.50.x86.x64 ^
31+
--passive --norestart
2432
2533
# setup msbuild
2634
- name: Add msbuild to PATH
27-
uses: microsoft/setup-msbuild@v1.1
35+
uses: microsoft/setup-msbuild@v2
2836

2937
# missionchooser.dll
3038
- name: Build missionchooser.dll
3139
working-directory: src/game/missionchooser
32-
run: MSBuild.exe swarm_sdk_missionchooser.vcxproj -property:Configuration=Release
40+
run: MSBuild.exe swarm_sdk_missionchooser.vcxproj -property:Configuration=Release -property:Platform=Win32
3341

3442
# server.dll
3543
- name: Build server.dll
3644
working-directory: src/game/server
37-
run: MSBuild.exe swarm_sdk_server.vcxproj -property:Configuration=Release
45+
run: MSBuild.exe swarm_sdk_server.vcxproj -property:Configuration=Release -property:Platform=Win32
3846

3947
# client.dll
4048
- name: Build client.dll
4149
working-directory: src/game/client
42-
run: MSBuild.exe swarm_sdk_client.vcxproj -property:Configuration=Release
50+
run: MSBuild.exe swarm_sdk_client.vcxproj -property:Configuration=Release -property:Platform=Win32
4351

4452
# store artifacts
4553
# make sure retention is low, this can become huge otherwise
@@ -54,30 +62,30 @@ jobs:
5462
5563
debug:
5664
name: build debug
57-
runs-on: windows-2022
65+
runs-on: windows-2025-vs2026
5866
timeout-minutes: 30
5967
steps:
6068
#checkout project
61-
- uses: actions/checkout@v3
69+
- uses: actions/checkout@v4
6270

6371
# setup msbuild
6472
- name: Add msbuild to PATH
65-
uses: microsoft/setup-msbuild@v1.1
73+
uses: microsoft/setup-msbuild@v2
6674

6775
# missionchooser.dll
6876
- name: Build missionchooser.dll
6977
working-directory: src/game/missionchooser
70-
run: MSBuild.exe swarm_sdk_missionchooser.vcxproj -property:Configuration=Debug
78+
run: MSBuild.exe swarm_sdk_missionchooser.vcxproj -property:Configuration=Debug -property:Platform=Win32
7179

7280
# server.dll
7381
- name: Build server.dll
7482
working-directory: src/game/server
75-
run: MSBuild.exe swarm_sdk_server.vcxproj -property:Configuration=Debug
83+
run: MSBuild.exe swarm_sdk_server.vcxproj -property:Configuration=Debug -property:Platform=Win32
7684

7785
# client.dll
7886
- name: Build client.dll
7987
working-directory: src/game/client
80-
run: MSBuild.exe swarm_sdk_client.vcxproj -property:Configuration=Debug
88+
run: MSBuild.exe swarm_sdk_client.vcxproj -property:Configuration=Debug -property:Platform=Win32
8189

8290
# store artifacts
8391
# make sure retention is low, this can become huge otherwise

src/game/client/swarm/rd_tooltip_fix.cpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,15 @@ static class CRD_Tooltip_Fix final : public CAutoGameSystem
2626
// There's only one method in the vtable, so let's just grab it.
2727
auto pApplySchemeSettings = **reinterpret_cast< void( vgui::Tooltip:: *const *const * )( vgui::IScheme * ) >( pTooltip );
2828

29-
byte *pRealFunc = *reinterpret_cast< byte *const * >( &pApplySchemeSettings );
29+
#ifdef _DEBUG
30+
// This is a thunk, so we need to grab the real one.
31+
byte *pThunk = *reinterpret_cast<byte *const *>( &pApplySchemeSettings );
32+
Assert( *pThunk == 0xE9 );
33+
byte *pRealFunc = pThunk + 5 + *reinterpret_cast<const intptr_t *>( pThunk + 1 );
34+
#else
35+
// ...except in release builds, where it's not a thunk.
36+
byte *pRealFunc = *reinterpret_cast<byte *const *>( &pApplySchemeSettings );
37+
#endif
3038
Assert( *pRealFunc == 0xB9 );
3139

3240
// Grab the TextEntry handle that is read at the start of the method.

src/game/client/swarm/vgui/rd_vgui_settings_video.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,12 @@ static class CRD_VideoConfigVariableListHack : public CAutoGameSystem
9292
// Instead, we have to do this garbage:
9393
const byte *pUpdateCurrentVideoConfig = reinterpret_cast< const byte * >( &UpdateCurrentVideoConfig );
9494

95+
#ifdef _DEBUG
96+
// Gotta deal with thunks on debug builds.
97+
Assert( *pUpdateCurrentVideoConfig == 0xE9 );
98+
pUpdateCurrentVideoConfig += 5 + *reinterpret_cast<const intptr_t *>( pUpdateCurrentVideoConfig + 1 );
99+
#endif
100+
95101
struct VideoConfigSetting_t
96102
{
97103
const char *m_szName;

0 commit comments

Comments
 (0)