From 06cc38febba95ce24ee1dce071b2a305d4fd483d Mon Sep 17 00:00:00 2001 From: kitsune Date: Sun, 29 Mar 2026 07:59:05 +0200 Subject: [PATCH 01/12] build: add FORCE and ON-DEMAND modes Introduce explicit full recompilation (-force) and change-driven rebuild behavior. Refactors argument construction, normalizes parameter types, and adds compilation timing and summary output. --- src/devtools/bin/process_shaders.ps1 | 42 ++++++++++++++++++++++------ 1 file changed, 34 insertions(+), 8 deletions(-) diff --git a/src/devtools/bin/process_shaders.ps1 b/src/devtools/bin/process_shaders.ps1 index 5f9531194..fcd430c9e 100644 --- a/src/devtools/bin/process_shaders.ps1 +++ b/src/devtools/bin/process_shaders.ps1 @@ -2,23 +2,49 @@ param ( [Parameter(Mandatory=$true, ValueFromPipeline=$true)][System.IO.FileInfo]$File, [Parameter(Mandatory=$true)][string]$Version, + [Parameter(Mandatory=$false)][switch]$Force, [Parameter(Mandatory=$false)][switch]$Dynamic, - [Parameter(Mandatory=$false)][System.UInt32]$Threads = 0, - [Parameter(Mandatory=$false)][System.UInt32]$Optimize = 3 + [Parameter(Mandatory=$false)][int]$Threads = 0, + [Parameter(Mandatory=$false)][int]$Optimize = 3 ) if ($Version -notin @("20b","30","40","41","50","51")) { return } +$ShaderStart = Get-Date foreach ($line in Get-Content $File) { if ($line -match '^\s*$' -or $line -match '^\s*//') { continue } $args = @() - if ($Dynamic) { $args += "-dynamic" } - if ($Threads -ne 0) { $args += "-threads"; $args += $Threads } - $args += "-ver"; $args += $Version - $args += "-shaderpath"; $args += $File.DirectoryName - if (-not $Dynamic) { $args += "-optimize"; $args += $Optimize } - $args += $line + if ($Force) { $args += "-force" } + $args += "-force" + + if ($Threads -gt 0) { $args += "-threads", $Threads } + + $args += "-ver", $Version + $args += "-shaderpath", $File.DirectoryName + + if ($Dynamic) { + $args += "-dynamic" + } else { + $args += "-optimize", $Optimize + } + + $args += $line + $ShaderStart = Get-Date & "$PSScriptRoot\ShaderCompile" $args } +$TotalTime = (Get-Date) - $ShaderStart + +if ($Force) { + $modeText = "FORCE (full recompilation)" + $modeColor = "Magenta" +} else { + $modeText = "ON-DEMAND (recompile changed shaders only)" + $modeColor = "Cyan" +} +Write-Host "" +Write-Host "Shader compilation pass for '$($File.Name)' finished." -ForegroundColor Green +Write-Host "Mode: $modeText" -ForegroundColor $modeColor +Write-Host ("Time elapsed: {0}h:{1:mm}m:{1:ss}s:{1:ff}ms" -f [int]$TotalTime.TotalHours, $TotalTime) -ForegroundColor Cyan +Write-Host "" From 9fc8d49714f8796f3645ddac864bb16a35806e96 Mon Sep 17 00:00:00 2001 From: kitsune Date: Sun, 29 Mar 2026 08:06:26 +0200 Subject: [PATCH 02/12] build: refactor buildsdkshaders.bat Clean up comments, unify path configuration sections, and document THREADS/OPTIMIZE/FORCE parameters. --- .../stdshaders/buildsdkshaders.bat | 83 ++++++++----------- 1 file changed, 34 insertions(+), 49 deletions(-) diff --git a/src/materialsystem/stdshaders/buildsdkshaders.bat b/src/materialsystem/stdshaders/buildsdkshaders.bat index a187f3351..fd5da1a32 100644 --- a/src/materialsystem/stdshaders/buildsdkshaders.bat +++ b/src/materialsystem/stdshaders/buildsdkshaders.bat @@ -1,66 +1,51 @@ @echo off setlocal -rem Use dynamic shaders to build .inc files only -rem set dynamic_shaders=1 -rem == Setup path to nmake.exe, from vc 2005 common tools directory == -call "%VS80COMNTOOLS%vsvars32.bat" +rem ====================================== +rem === PATH CONFIGURATIONS -rem ================================ -rem ==== MOD PATH CONFIGURATIONS === +rem == Setup path to nmake.exe, from vc common tools directory +call "G:\Program Files\Microsoft Visual Studio\18\Community\Common7\Tools\VsDevCmd.bat" -rem == Set the absolute path to your mod's game directory here == -rem == Note that this path needs does not support long file/directory names == -rem == So instead of a path such as "C:\Program Files\Steam\steamapps\mymod" == -rem == you need to find the 8.3 abbreviation for the directory name using 'dir /x' == -rem == and set the directory to something like C:\PROGRA~2\Steam\steamapps\sourcemods\mymod == -set GAMEDIR=D:\Games\Steam\steamapps\common\asrdsymlink\reactivedrop +rem == Set the absolute path to your mod's game directory here +set GAMEDIR="G:\PENDRIVE\Steam\steamapps\common\Alien Swarm Reactive Drop\reactivedrop" -rem == Set the relative path to steamapps\common\Alien Swarm\bin == -rem == As above, this path does not support long directory names or spaces == -rem == e.g. ..\..\..\..\..\PROGRA~2\Steam\steamapps\common\ALIENS~1\bin == -set SDKBINDIR=..\..\..\..\STEAME~1\steamapps\common\ALIENS~1\bin - -rem == Set the Path to your mods root source code == -rem this should already be correct, accepts relative paths only! +rem == Set the Path to your mods root source code +rem == "..\.." should already be correct, accepts relative paths only! set SOURCEDIR=..\.. -rem ==== MOD PATH CONFIGURATIONS END === -rem ==================================== - - +rem === PATH CONFIGURATIONS END +rem ====================================== +rem ====================================== +rem === SHADER BUILD CONFIGURATION +rem == Set force=1 to force shader (re)compilation +REM set FORCE=1 +rem == Set dynamic_shaders=1 to build .inc files only +REM set dynamic_shaders=1 -set TTEXE=..\..\devtools\bin\timeprecise.exe -if not exist %TTEXE% goto no_ttexe -goto no_ttexe_end +rem == Number of threads used by ShaderCompile: +rem == N <= 0 or unset = all threads (default) +rem == N > 0 = force specific number of threads +rem == Set to override the default behavior. +REM set THREADS= -:no_ttexe -set TTEXE=time /t -:no_ttexe_end +rem Optimization level used by ShaderCompile: +rem 0 = no optimization +rem 1–2 = intermediate optimization +rem 3 or unset = full optimization (default) +rem Set to override the default behavior. +REM set OPTIMIZE=3 +rem === SHADER BUILD CONFIGURATION END +rem ====================================== -rem echo. -rem echo ~~~~~~ buildsdkshaders %* ~~~~~~ -%TTEXE% -cur-Q -set tt_all_start=%ERRORLEVEL% -set tt_all_chkpt=%tt_start% +rem ====================================== +rem === RUN set BUILD_SHADER=call buildshaders.bat -set ARG_EXTRA= - -%BUILD_SHADER% stdshader_dx9_20b -game %GAMEDIR% -source %SOURCEDIR% -%BUILD_SHADER% stdshader_dx9_20b_new -game %GAMEDIR% -source %SOURCEDIR% -%BUILD_SHADER% stdshader_dx9_30 -game %GAMEDIR% -source %SOURCEDIR% -force30 - - -rem echo. -if not "%dynamic_shaders%" == "1" ( - rem echo Finished full buildallshaders %* -) else ( - rem echo Finished dynamic buildallshaders %* -) -rem %TTEXE% -diff %tt_all_start% -cur -rem echo. +%BUILD_SHADER% stdshader_dx9_20b -game %GAMEDIR% -source %SOURCEDIR% +%BUILD_SHADER% stdshader_dx9_20b_new -game %GAMEDIR% -source %SOURCEDIR% +%BUILD_SHADER% stdshader_dx9_30 -game %GAMEDIR% -source %SOURCEDIR% -force30 From eda1084fe85b004abbdbfba3b2a4d7719383613a Mon Sep 17 00:00:00 2001 From: kitsune Date: Sun, 29 Mar 2026 10:01:19 +0200 Subject: [PATCH 03/12] build: refactor --- .../stdshaders/buildsdkshaders.bat | 53 ++++++++++--------- 1 file changed, 27 insertions(+), 26 deletions(-) diff --git a/src/materialsystem/stdshaders/buildsdkshaders.bat b/src/materialsystem/stdshaders/buildsdkshaders.bat index fd5da1a32..155e3295a 100644 --- a/src/materialsystem/stdshaders/buildsdkshaders.bat +++ b/src/materialsystem/stdshaders/buildsdkshaders.bat @@ -1,48 +1,49 @@ @echo off setlocal -rem ====================================== -rem === PATH CONFIGURATIONS +REM ====================================== +REM ==== PATH CONFIGURATIONS -rem == Setup path to nmake.exe, from vc common tools directory +REM == Setup path to nmake.exe, from vc common tools directory call "G:\Program Files\Microsoft Visual Studio\18\Community\Common7\Tools\VsDevCmd.bat" rem == Set the absolute path to your mod's game directory here set GAMEDIR="G:\PENDRIVE\Steam\steamapps\common\Alien Swarm Reactive Drop\reactivedrop" -rem == Set the Path to your mods root source code -rem == "..\.." should already be correct, accepts relative paths only! +REM == Set the Path to your mods root source code +REM == "..\.." should already be correct, accepts relative paths only! set SOURCEDIR=..\.. -rem === PATH CONFIGURATIONS END -rem ====================================== -rem ====================================== -rem === SHADER BUILD CONFIGURATION +REM ==== PATH CONFIGURATIONS END +REM ====================================== -rem == Set force=1 to force shader (re)compilation +REM ====================================== +REM ==== SHADER BUILD CONFIGURATION + +REM == Set force=1 to force shader recompilation REM set FORCE=1 -rem == Set dynamic_shaders=1 to build .inc files only +REM == Set dynamic_shaders=1 to build .inc files only REM set dynamic_shaders=1 -rem == Number of threads used by ShaderCompile: -rem == N <= 0 or unset = all threads (default) -rem == N > 0 = force specific number of threads -rem == Set to override the default behavior. -REM set THREADS= - -rem Optimization level used by ShaderCompile: -rem 0 = no optimization -rem 1–2 = intermediate optimization -rem 3 or unset = full optimization (default) -rem Set to override the default behavior. +REM == Number of threads used by ShaderCompile: +REM == <= 0 or unset = all threads (default) +REM == > 0 = force specific number of threads +REM == Set to override the default behavior. +REM set THREADS=-1 + +REM == Optimization level used by ShaderCompile: +REM == <= 0 = no optimization +REM == 1–2 = intermediate optimization +REM == >= 3 or unset = full optimization (default) +REM == Set to override the default behavior. REM set OPTIMIZE=3 -rem === SHADER BUILD CONFIGURATION END -rem ====================================== +REM ==== SHADER BUILD CONFIGURATION END +REM ====================================== -rem ====================================== -rem === RUN +REM ====================================== +REM ==== RUN set BUILD_SHADER=call buildshaders.bat From 9fa30dcf5734d92e787088c63a9bb5e3ebaa5cc8 Mon Sep 17 00:00:00 2001 From: kitsune Date: Sun, 29 Mar 2026 10:03:30 +0200 Subject: [PATCH 04/12] build: refactor buildshaders.bat Forward Force/Dynamic/Threads/Optimize to process_shaders.ps1 --- .../stdshaders/buildshaders.bat | 36 ++++++++++++++----- 1 file changed, 28 insertions(+), 8 deletions(-) diff --git a/src/materialsystem/stdshaders/buildshaders.bat b/src/materialsystem/stdshaders/buildshaders.bat index e300b832c..1ec3b5e92 100644 --- a/src/materialsystem/stdshaders/buildshaders.bat +++ b/src/materialsystem/stdshaders/buildshaders.bat @@ -9,7 +9,9 @@ set TTEXE=time /t :no_ttexe_end echo. -echo ==================== buildshaders %* ================== +echo ====================================== +echo buildshaders.bat %* +echo. %TTEXE% -cur-Q set tt_start=%ERRORLEVEL% set tt_chkpt=%tt_start% @@ -48,7 +50,7 @@ REM USAGE REM **************** :usage echo. -echo "usage: buildshaders [-game] [gameDir if -game was specified] [-source sourceDir]" +echo "usage: buildshaders [-game gameDir] [-source sourceDir]" echo " gameDir is where gameinfo.txt is (where it will store the compiled shaders)." echo " sourceDir is where the source code is (where it will find scripts and compilers)." echo "ex : buildshaders myshaders" @@ -120,9 +122,26 @@ title %1 %SHVER% echo Building inc files and worklist for %inputbase%... -set DYNAMIC= -if "%dynamic_shaders%" == "1" set DYNAMIC=-Dynamic -powershell -NoLogo -ExecutionPolicy Bypass -Command "%SrcDirBase%\devtools\bin\process_shaders.ps1 %DYNAMIC% -Version %SHVER% '%inputbase%.txt'" + +set PS_EXTRA_ARGS= + +if defined FORCE ( + set PS_EXTRA_ARGS=%PS_EXTRA_ARGS% -Force +) + +if defined dynamic_shaders ( + set PS_EXTRA_ARGS=%PS_EXTRA_ARGS% -Dynamic +) + +if defined THREADS ( + set PS_EXTRA_ARGS=%PS_EXTRA_ARGS% -Threads %THREADS% +) + +if defined OPTIMIZE ( + set PS_EXTRA_ARGS=%PS_EXTRA_ARGS% -Optimize %OPTIMIZE% +) + +powershell -NoLogo -ExecutionPolicy Bypass -Command "%SrcDirBase%\devtools\bin\process_shaders.ps1 %PS_EXTRA_ARGS% -Version %SHVER% '%inputbase%.txt'" REM **************** REM PC Shader copy @@ -131,8 +150,9 @@ REM This batch file may have been invoked standalone or slaved (master does fina REM **************** :DoXCopy if not "%dynamic_shaders%" == "1" ( -if not exist "%targetdir%" md "%targetdir%" -if not "%targetdir%"=="%shaderDir%" xcopy %shaderDir%\*.* "%targetdir%" /e /y + echo Coping compiled shaders.. + if not exist "%targetdir%" md "%targetdir%" + if not "%targetdir%"=="%shaderDir%" xcopy %shaderDir%\*.* "%targetdir%" /e /y ) goto end @@ -143,4 +163,4 @@ REM **************** %TTEXE% -diff %tt_start% -echo. \ No newline at end of file +echo. From 1ef082059bff77af56d31db0b34d397101148e99 Mon Sep 17 00:00:00 2001 From: kitsune Date: Sun, 29 Mar 2026 10:09:31 +0200 Subject: [PATCH 05/12] build: refactor process_shaders.ps1 - Extract parameter resolution outside main loop - Clamp threads to max available processors - Clamp optimize between 0-3 - Improve mode logging with FORCE/DYNAMIC/ON-DEMAND --- src/devtools/bin/process_shaders.ps1 | 78 ++++++++++++++++++---------- 1 file changed, 50 insertions(+), 28 deletions(-) diff --git a/src/devtools/bin/process_shaders.ps1 b/src/devtools/bin/process_shaders.ps1 index fcd430c9e..649c75792 100644 --- a/src/devtools/bin/process_shaders.ps1 +++ b/src/devtools/bin/process_shaders.ps1 @@ -8,43 +8,65 @@ param ( [Parameter(Mandatory=$false)][int]$Optimize = 3 ) -if ($Version -notin @("20b","30","40","41","50","51")) { return } +# ===================================== +# Validate input +# ===================================== +if ($Version -notin @("20b","30","40","41","50","51")) { + return +} -$ShaderStart = Get-Date -foreach ($line in Get-Content $File) { - if ($line -match '^\s*$' -or $line -match '^\s*//') { continue } +# ===================================== +# Resolve compilation parameters +# ===================================== +$argsBase = @() +if ($Force) { $argsBase += "-force" } - $args = @() +if ($Threads -is [int] -and $Threads -gt 0) { + $ThreadsToUse = [Math]::Min($Threads, [int]$env:NUMBER_OF_PROCESSORS) + $argsBase += "-threads", $ThreadsToUse +} + +$argsBase += "-ver", $Version +$argsBase += "-shaderpath", $File.DirectoryName - if ($Force) { $args += "-force" } - $args += "-force" +if ($Dynamic) { + $argsBase += "-dynamic" +} elseif ($Optimize -is [int]) { + $optVal = [Math]::Min([Math]::Max($Optimize, 0), 3) + $argsBase += "-optimize", $optVal +} - if ($Threads -gt 0) { $args += "-threads", $Threads } +# ===================================== +# Logging 1 +# ===================================== +$modeParts = @() +if ($Force) { $modeParts += "FORCE" } +if ($Dynamic) { $modeParts += "DYNAMIC" } +if (-not $Force -and -not $Dynamic) { $modeParts += "ON-DEMAND" } - $args += "-ver", $Version - $args += "-shaderpath", $File.DirectoryName +$modeText = $modeParts -join " + " +$modeColor = if ($Force -or $Dynamic) { "Magenta" } else { "White" } - if ($Dynamic) { - $args += "-dynamic" - } else { - $args += "-optimize", $Optimize - } +Write-Host "`nMode: $modeText`n" -ForegroundColor $modeColor +# ===================================== +# Main shader compilation loop +# ===================================== +$ShaderStart = Get-Date +foreach ($line in Get-Content $File) { + if ($line -match '^\s*$' -or $line -match '^\s*//') { continue } + + # Build full args for this shader line + $args = @($argsBase) $args += $line - $ShaderStart = Get-Date + + # Invoke ShaderCompile & "$PSScriptRoot\ShaderCompile" $args } $TotalTime = (Get-Date) - $ShaderStart -if ($Force) { - $modeText = "FORCE (full recompilation)" - $modeColor = "Magenta" -} else { - $modeText = "ON-DEMAND (recompile changed shaders only)" - $modeColor = "Cyan" -} -Write-Host "" -Write-Host "Shader compilation pass for '$($File.Name)' finished." -ForegroundColor Green -Write-Host "Mode: $modeText" -ForegroundColor $modeColor -Write-Host ("Time elapsed: {0}h:{1:mm}m:{1:ss}s:{1:ff}ms" -f [int]$TotalTime.TotalHours, $TotalTime) -ForegroundColor Cyan -Write-Host "" +# ===================================== +# Logging 2 +# ===================================== +Write-Host "`nShader compilation pass for $($File.Name) finished." +Write-Host ("Time elapsed: {0}h:{1:mm}m:{1:ss}s:{1:ff}ms`n" -f [int]$TotalTime.TotalHours, $TotalTime) -ForegroundColor Cyan From 2999df33fbe0f09b24d4202a92f0980c11015ccf Mon Sep 17 00:00:00 2001 From: kitsune Date: Sun, 29 Mar 2026 10:12:44 +0200 Subject: [PATCH 06/12] build: adjust VC++ project flags - Disable IntelJCCErratum - Add /IGNORE:4099 to linker additional options --- src/game/client/swarm_sdk_client.vcxproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/game/client/swarm_sdk_client.vcxproj b/src/game/client/swarm_sdk_client.vcxproj index 456227731..e54591b90 100644 --- a/src/game/client/swarm_sdk_client.vcxproj +++ b/src/game/client/swarm_sdk_client.vcxproj @@ -227,7 +227,7 @@ if ERRORLEVEL 1 exit 1 26495;26812 true true - true + false true @@ -253,7 +253,7 @@ if ERRORLEVEL 1 exit 1 MachineX86 PromptImmediately false - /Brepro /SOURCELINK:..\..\sourcelink.json %(AdditionalOptions) + /Brepro /SOURCELINK:..\..\sourcelink.json /IGNORE:4099 %(AdditionalOptions) UseLinkTimeCodeGeneration true true From 48fcf05c3f9884f7e29435f2dcbe3e5af6035ad9 Mon Sep 17 00:00:00 2001 From: kitsune Date: Sun, 29 Mar 2026 10:14:16 +0200 Subject: [PATCH 07/12] build: adjust VC++ project flags - Disable IntelJCCErratum --- src/game/server/swarm_sdk_server.vcxproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/game/server/swarm_sdk_server.vcxproj b/src/game/server/swarm_sdk_server.vcxproj index bf1b77c22..ff7cf098e 100644 --- a/src/game/server/swarm_sdk_server.vcxproj +++ b/src/game/server/swarm_sdk_server.vcxproj @@ -223,7 +223,7 @@ if ERRORLEVEL 1 exit 1 true true true - true + false NDEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) From c4dd7813939375dcd55204728ee155cf43f3cced Mon Sep 17 00:00:00 2001 From: kitsune Date: Sun, 29 Mar 2026 10:14:59 +0200 Subject: [PATCH 08/12] build: adjust VC++ project flags - Disable IntelJCCErratum --- src/game/missionchooser/swarm_sdk_missionchooser.vcxproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/game/missionchooser/swarm_sdk_missionchooser.vcxproj b/src/game/missionchooser/swarm_sdk_missionchooser.vcxproj index 909e28e5e..7bd334182 100644 --- a/src/game/missionchooser/swarm_sdk_missionchooser.vcxproj +++ b/src/game/missionchooser/swarm_sdk_missionchooser.vcxproj @@ -218,7 +218,7 @@ if ERRORLEVEL 1 exit 1 true true true - true + false NDEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) From 075a189a1850fe5b956048b30bc45f520dd62e69 Mon Sep 17 00:00:00 2001 From: kitsune Date: Sun, 29 Mar 2026 10:21:51 +0200 Subject: [PATCH 09/12] build: modernize shaderlib_sdk.vcxproj build process - Enable WholeProgramOptimization, MultiProcessorCompilation, OmitFramePointers - Unify OutputFile paths using - Consolidate pre/post-build events for consistent publishing to lib\public - Remove /MP from AdditionalOptions in favor of MultiProcessorCompilation - Set TargetName for consistency across configurations --- .../shaderlib/shaderlib_sdk.vcxproj | 50 +++++++++++++++++-- 1 file changed, 45 insertions(+), 5 deletions(-) diff --git a/src/materialsystem/shaderlib/shaderlib_sdk.vcxproj b/src/materialsystem/shaderlib/shaderlib_sdk.vcxproj index 67cf0da48..4a18d91ff 100644 --- a/src/materialsystem/shaderlib/shaderlib_sdk.vcxproj +++ b/src/materialsystem/shaderlib/shaderlib_sdk.vcxproj @@ -14,12 +14,14 @@ 17.0 shaderlib {1A1149D9-CB1B-BF85-19CA-C9C2996BFDE8} + 10.0 StaticLibrary v143 MultiByte + true StaticLibrary @@ -45,6 +47,7 @@ true true true + shaderlib .\Release\.\ @@ -52,6 +55,7 @@ true true true + shaderlib @@ -89,11 +93,11 @@ Prompt - if exist ..\..\lib\public\shaderlib.lib attrib -r ..\..\lib\public\shaderlib.lib + if exist "$(TargetPath)" attrib -R "$(TargetPath)" false - ..\..\lib\public\.\shaderlib.lib + $(TargetPath) true @@ -103,13 +107,25 @@ true $(OutDir)shaderlib.bsc + + setlocal enabledelayedexpansion + +set DestDir=..\..\lib\public + +if not exist !DestDir! mkdir !DestDir! +if exist !DestDir!\$(TargetFileName) attrib -R !DestDir!\$(TargetFileName) +copy /Y $(TargetPath) !DestDir!\ + + + + Publishing to target directory (..\..\lib\public\)... + - /MP %(AdditionalOptions) MaxSpeed AnySuitable true @@ -140,13 +156,16 @@ OldStyle CompileAsCpp Prompt + true + true - if exist ..\..\lib\public\shaderlib.lib attrib -r ..\..\lib\public\shaderlib.lib + if exist "$(TargetPath)" attrib -R "$(TargetPath)" + false - ..\..\lib\public\.\shaderlib.lib + $(TargetPath) true @@ -156,6 +175,27 @@ true $(OutDir)shaderlib.bsc + + + + + + + + + + setlocal enabledelayedexpansion + +set DestDir=..\..\lib\public + +if not exist !DestDir! mkdir !DestDir! +if exist !DestDir!\$(TargetFileName) attrib -R !DestDir!\$(TargetFileName) +copy /Y $(TargetPath) !DestDir!\ + + + + Publishing to target directory (..\..\lib\public\)... + From e2a8b606a780aa3e69cb9334e83097ff7d7dddf1 Mon Sep 17 00:00:00 2001 From: kitsune Date: Sun, 29 Mar 2026 10:34:54 +0200 Subject: [PATCH 10/12] build: modernize stdshader_dx9_sdk.vcxproj build process - Enable WholeProgramOptimization, MultiProcessorCompilation, OmitFramePointers - Unify OutputFile paths using $(TargetPath) - Consolidate pre/post-build events for consistent publishing to game\swarm\bin - Remove /MP from AdditionalOptions in favor of MultiProcessorCompilation - Set TargetName for consistency across configurations --- .../stdshaders/stdshader_dx9_sdk.vcxproj | 62 ++++++++++++++----- 1 file changed, 47 insertions(+), 15 deletions(-) diff --git a/src/materialsystem/stdshaders/stdshader_dx9_sdk.vcxproj b/src/materialsystem/stdshaders/stdshader_dx9_sdk.vcxproj index ab90f8401..f60fa0921 100644 --- a/src/materialsystem/stdshaders/stdshader_dx9_sdk.vcxproj +++ b/src/materialsystem/stdshaders/stdshader_dx9_sdk.vcxproj @@ -14,12 +14,14 @@ 17.0 stdshader_dx9 {C8D2DC83-E117-7576-7B43-10C844264C51} + 10.0 DynamicLibrary v143 MultiByte + true DynamicLibrary @@ -46,7 +48,8 @@ true true false - true + false + game_shader_dx9 Release_dx9\ @@ -55,17 +58,20 @@ true false false - true + false + game_shader_dx9 - Publishing to target directory (..\..\game\swarm\bin\)... - if exist "..\..\game\swarm\bin\game_shader_dx9.dll" attrib -r "..\..\game\swarm\bin\game_shader_dx9.dll" - - ..\..\game\swarm\bin\game_shader_dx9.dll;%(Outputs) + + + + + + /MP %(AdditionalOptions) @@ -101,7 +107,7 @@ version.lib;winmm.lib;legacy_stdio_definitions.lib;%(AdditionalDependencies) NotSet - $(OutDir)game_shader_dx9.dll + $(TargetPath) true ..\..\lib\common\.;..\..\lib\public\.;%(AdditionalLibraryDirectories) libc;libcd;libcmtd;%(IgnoreSpecificDefaultLibraries) @@ -124,21 +130,33 @@ $(OutDir)stdshader_dx9.bsc - + setlocal enabledelayedexpansion + +set DestDir=..\..\game\swarm\bin + +if not exist !DestDir! mkdir !DestDir! +if exist !DestDir!\$(TargetFileName) attrib -R !DestDir!\$(TargetFileName) +copy /Y $(TargetPath) !DestDir!\ + + Publishing to target directory (..\..\game\swarm\bin)... + + if exist "$(TargetPath)" attrib -R "$(TargetPath)" + - Publishing to target directory (..\..\game\swarm\bin\)... - if exist "..\..\game\swarm\bin\game_shader_dx9.dll" attrib -r "..\..\game\swarm\bin\game_shader_dx9.dll" - - ..\..\game\swarm\bin\game_shader_dx9.dll;%(Outputs) + + + + + + - /MP %(AdditionalOptions) MaxSpeed AnySuitable true @@ -165,6 +183,8 @@ ProgramDatabase CompileAsCpp Prompt + true + true NDEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) @@ -173,7 +193,7 @@ version.lib;winmm.lib;legacy_stdio_definitions.lib;%(AdditionalDependencies) NotSet - $(OutDir)game_shader_dx9.dll + $(TargetPath) true ..\..\lib\common\.;..\..\lib\public\.;%(AdditionalLibraryDirectories) libc;libcd;libcmtd;%(IgnoreSpecificDefaultLibraries) @@ -188,6 +208,7 @@ MachineX86 PromptImmediately + UseLinkTimeCodeGeneration true @@ -197,8 +218,19 @@ $(OutDir)stdshader_dx9.bsc - + setlocal enabledelayedexpansion + +set DestDir=..\..\game\swarm\bin + +if not exist !DestDir! mkdir !DestDir! +if exist !DestDir!\$(TargetFileName) attrib -R !DestDir!\$(TargetFileName) +copy /Y $(TargetPath) !DestDir!\ + + Publishing to target directory (..\..\game\swarm\bin)... + + if exist "$(TargetPath)" attrib -R "$(TargetPath)" + From a5239f2783814641478eb39d9be7fa4c8427dbd8 Mon Sep 17 00:00:00 2001 From: kitsune Date: Sun, 29 Mar 2026 10:37:52 +0200 Subject: [PATCH 11/12] chore: update solution version for Visual Studio 18 - No functional changes; VS auto-updated from 17 to 18 --- src/materialsystem/stdshaders/stdshader_dx9_sdk.sln | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/materialsystem/stdshaders/stdshader_dx9_sdk.sln b/src/materialsystem/stdshaders/stdshader_dx9_sdk.sln index 43a54a487..58b85d8a2 100644 --- a/src/materialsystem/stdshaders/stdshader_dx9_sdk.sln +++ b/src/materialsystem/stdshaders/stdshader_dx9_sdk.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.7.33808.371 +# Visual Studio Version 18 +VisualStudioVersion = 18.1.11312.151 MinimumVisualStudioVersion = 10.0.40219.1 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "stdshader_dx9", "stdshader_dx9_sdk.vcxproj", "{C8D2DC83-E117-7576-7B43-10C844264C51}" EndProject From 227248dfbb73ccf4c5bb7b933812a9e9ee29068c Mon Sep 17 00:00:00 2001 From: kitsune Date: Sun, 29 Mar 2026 10:40:29 +0200 Subject: [PATCH 12/12] fix: rd_reset_level_and_promotion usable by clients - Change FCVAR_DEVELOPMENTONLY to FCVAR_NOT_CONNECTED --- src/game/client/swarm/c_asw_concommands.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/game/client/swarm/c_asw_concommands.cpp b/src/game/client/swarm/c_asw_concommands.cpp index 1f4043716..4f941f702 100644 --- a/src/game/client/swarm/c_asw_concommands.cpp +++ b/src/game/client/swarm/c_asw_concommands.cpp @@ -862,7 +862,7 @@ void rd_reset_level_and_promotion_f() Msg( "All done, your level and promotion have been reset!\n" ); } -ConCommand rd_reset_level_and_promotion( "rd_reset_level_and_promotion", rd_reset_level_and_promotion_f, "Resets promotion (rank, level etc.)", FCVAR_DEVELOPMENTONLY ); +ConCommand rd_reset_level_and_promotion( "rd_reset_level_and_promotion", rd_reset_level_and_promotion_f, "Resets promotion (rank, level etc.)", FCVAR_NOT_CONNECTED ); void asw_show_xp_f() {