From ec4cef7937671f91d4c751059828323be44fe358 Mon Sep 17 00:00:00 2001 From: STAM Date: Sat, 19 Jul 2025 23:54:27 +0300 Subject: [PATCH 1/2] CHANGELOG.md update --- CHANGELOG.md | 69 ++++++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 2 +- 2 files changed, 70 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 98091b1..90e570b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,75 @@ Along with reverse engineering, a lot of defects and (potential) bugs were found --- +## [`3.14.0.857`](https://github.com/rehlds/rehlds/releases/tag/3.14.0.857) - 2025-03-27 + +### Added +- Added cvarhook from latest HLDS build. Making `mapcyclefile`/`sv_cheats` work in realtime (resolve #868) by @s1lentq in https://github.com/rehlds/ReHLDS/commit/6f031901cfa85d86c6028086bc9335db1e867a03 +- Added forgotten CVar `sys_timescale` by @s1lentq +- Add support cheats commands: `god`, `notarget`, `noclip` by @s1lentq (https://github.com/rehlds/ReHLDS/commit/7fcec97af4c6598ab6a65d60cf424b7775a11729); +- engine: add `sv_allow_autoaim` cvar for `HL25` DLL compatibility by @a1batross in #1000; +- Added new CVar: `r_cachestudio` by @s1lentq in https://github.com/rehlds/ReHLDS/commit/0af97d98bbe31af26395ba616d4be6a089f691b6; +- Implement commands `rcon_adduser`, `rcon_deluser`, `rcon_users` to allow use RCON only by known user IPs (Resolves https://github.com/rehlds/ReHLDS/pull/796) +SV_Rcon: Minor refactoring by @s1lentq in https://github.com/rehlds/ReHLDS/commit/62407e0dd63542f0da8438ebb22b33d3bcab3b9d; +- Implemented optional CVar `sv_tags` for sets a string defining the "gametags" for this server to allows users/scripts to filter in the matchmaking/server-browser interfaces based on the value by @s1lentq in https://github.com/rehlds/ReHLDS/commit/76cbd2c14025b3e54bc14b8fcfe17ce5fa273195; +- Add `SV_SendResources` hook by @ShadowsAdi in #1024; +- Implement API interface game message manager by @s1lentq in https://github.com/rehlds/ReHLDS/commit/c9f9bbfff98cdb6e8ca45b9ab626f40d0c7bb22b; +- CalcSurfaceExtents: MAX_SURFACE_TEXTURE_SIZE limit increased from 256 to 512 by @s1lentq in https://github.com/rehlds/ReHLDS/commit/b29740c19e8cfe7a1ee0605cadccd05b35e8678e; +- Added new CVars for improved handling of decompression failures by @s1lentq in https://github.com/rehlds/ReHLDS/commit/64c684af4a8e6030b9e06a59a774d6efd92db352; +- Added codesign and resources by @stamepicmorg in https://github.com/rehlds/ReHLDS/pull/1069; + + +### Fixed +- Fixed reversing mistake, missing checking string for null by @s1lentq in https://github.com/rehlds/ReHLDS/commit/2ba27d409c364d12c01b6b72813ac4b991a6e224; +- Host_Motd_f: Fixed viewing motd when motdfile is not specified by @s1lentq in https://github.com/rehlds/ReHLDS/commit/de3679f0391f1452532c820f07a8c4042b1c4281; +- FIX: Don't exec config file when exceed limit text buffer by @s1lentq in https://github.com/rehlds/ReHLDS/commit/32857e77859789275daeb353a278cd6632c2b6bf; +- Prevent crash `Cache_UnlinkLRU: NULL link` on client-side if aiment with sprite model will be to render as a studio model by @s1lentq in https://github.com/rehlds/ReHLDS/commit/5002ff9abe86e9573952e2dc45ec9229d0044a3b; +- RCON: Fixes redirect print and minor refactoring by @s1lentq in https://github.com/rehlds/ReHLDS/commit/41c5186b2c8c00f49101ed2c5d81a47cf79449c4; +- Host_Status_f: Fixed incorrect player index to output by @s1lentq in https://github.com/rehlds/ReHLDS/commit/9b0dbe8dd2ced5f0ead251116f5b9ebd61f6d6a4; +- MSG_WriteBitAngle: Cap the precision check from 32 to 22 to avoid overflow issues when representing angles with more than 22 bits because the multiply by 'shift' may result in overflow by @s1lentq in https://github.com/rehlds/ReHLDS/commit/63fde229c98f7e1bb8f7ea9b8358027414ed26ac; +- Fix reversing mistake in `TEX_InitFromWad` (Don't add file handle before check) by @s1lentq in https://github.com/rehlds/ReHLDS/commit/a7b60451f33e076ba04e4ae38312c2f691540a2d +- Fix crash when the entity with aiment doesn't have a model by @s1lentq in https://github.com/rehlds/ReHLDS/commit/498d7e0d18060f53a65286fcbf91e772f42c5611; +- SV_WriteEntitiesToClient: Reset movetype if the aiment index is invalid by @s1lentq in https://github.com/rehlds/ReHLDS/commit/58391b6ee5e5faefcf84349443a2a36066ed8246; +- SV_ParseResourceList: Do not uploading according to `sv_allowupload` CVar by @s1lentq in https://github.com/rehlds/ReHLDS/commit/59ed3f6867b1b3cba69cd7650887841da8e76d42; +- Do not send customizations list on duplicate or missing resource by @s1lentq in https://github.com/rehlds/ReHLDS/commit/f26ad71aba6a596602245c64af71cd196196859f; +- Do not propagate custom logos according to sv_send_logos cvar by @s1lentq in https://github.com/rehlds/ReHLDS/commit/ec47e4d97834c35f8667684f15a372c85505ce55; +- Draw_ValidateCustomLogo: Fixed incorrect offset to palette size by @s1lentq in https://github.com/rehlds/ReHLDS/commit/3c282b435c7d0508d72104d26a0c9171f7feea71; +- Netchan_CreateFileFragments: Fixed a hang connection on verifying resource stage, when precached file exists but is absolutely empty by @s1lentq in https://github.com/rehlds/ReHLDS/commit/61ee4f926938b1894bedfd9f139d45db48d89903; +- Implemented reduction of impact caused by zip-bomb exploit by @s1lentq in https://github.com/rehlds/ReHLDS/pull/994; +- Improved behavior of `sv_filterban 0`. Fixes https://github.com/rehlds/ReHLDS/issues/1027 by @s1lentq in https://github.com/rehlds/ReHLDS/commit/693b51c8839847270048be40b62fb1d37f9954ae; +- Fixed GCC compilation warnings/errors. Fixes https://github.com/rehlds/ReHLDS/issues/1032 by @s1lentq in https://github.com/rehlds/ReHLDS/commit/9c1e84328ebcdb47ea83c157dd8c7e493dda28a6; +- [HLTV]: Fix reverse-engineering mistake in `ObjectDictionary::RemoveIndex` by @s1lentq in https://github.com/rehlds/ReHLDS/commit/ed954a710fb0888328db1bd9b2c916cf9fc63062; +- [HLTV]: Fix reverse-engineering mistake in `World::WritePacketEntities` by @s1lentq in https://github.com/rehlds/ReHLDS/commit/c8308a2c60d34e4f735b3404f86701109e85f73b; +- fix setting ucmd in `sv_user.cpp` related to https://github.com/rehlds/ReHLDS/issues/1041 by @overl4y in https://github.com/rehlds/ReHLDS/pull/1042; +- SV_ProcessFile: Ignore customization file uploads if upload is disabled by @s1lentq in https://github.com/rehlds/ReHLDS/commit/fe184a82e0a361b9e8bd1625ca93fac948467be1; +- CI Workflow Improvements and Fixes by @SergeyShorokhov in #1056; +- Improved movevars sync logic for clients, allowing independent sync of movement props for each client, regardless of global movevars by @s1lentq in https://github.com/rehlds/ReHLDS/commit/df862d9bb6069084ee17b23135152c57b748e40e; +- FIX: potential crash in `PrecacheModelSounds` by @s1lentq in https://github.com/rehlds/ReHLDS/commit/18b173d5c6715eaf052a979984622f867661cd7b; +- FIX: crash due fakeclient by @s1lentq in https://github.com/rehlds/ReHLDS/commit/e54adb089c816425bac43c7eaf6fc5b898401fb4; +- Netchan_CopyFileFragments: fix typo by @s1lentq in https://github.com/rehlds/ReHLDS/commit/1a684077109023f86cfe9b70d6a1bba92a35c5f6; + + +### Changed +- Improve `pfnShouldCollide` condition on `SV_ClipToLinks` by @dystopm in #985 +- Minor refactor (add `BoundsIntersect` function) by @Hamdi #986 +- Reworked AlertMessage by @s1lentq in https://github.com/rehlds/ReHLDS/commit/93f5775ac26240782981f47ee8e052fb53d30877 +- CI/CD update: +- Draw_ValidateCustomLogo: Minor refactoring & cleanup by @s1lentq in https://github.com/rehlds/ReHLDS/commit/174414db81116b3647e7bb1b906417d6a38ed3a3; +- HPAK_ResourceForHash: Remove message with missing custom.hpk by @s1lentq in https://github.com/rehlds/ReHLDS/commit/516bb936271b1cf8523d6f97a421370128a7c964; +- SV_CreateCustomizationList: spew logs in only dev mode by @s1lentq in https://github.com/rehlds/ReHLDS/commit/462fe55fb832209270118b6def6034f8eec6efbf; +- CalcSurfaceExtents: more info in extents error message by @s1lentq in https://github.com/rehlds/ReHLDS/commit/6e6368da300f7d024076e6272faa135280cf3bda; +- Move SV_CheckMovingGround into SV_Physics by @dystopm in #1045; +- `IP` and `IPX` allocation warnings move under `-dev` arg by @SergeyShorokhov in #1071; + +## New Contributors +* @dystopm made their first contribution in https://github.com/rehlds/ReHLDS/pull/985 +* @anzz1 made their first contribution in https://github.com/rehlds/ReHLDS/pull/1021 +* @jonathan-up made their first contribution in https://github.com/rehlds/ReHLDS/pull/1040 +* @overl4y made their first contribution in https://github.com/rehlds/ReHLDS/pull/1042 +* @stamepicmorg made their first contribution in https://github.com/rehlds/ReHLDS/pull/1058 + +**Full Changelog**: [3.13.0.788...3.14.0.857](https://github.com/rehlds/rehlds/compare/3.13.0.788...3.14.0.857) + ## [`3.13.0.788`](https://github.com/ReHLDS/ReHLDS/releases/tag/3.13.0.788) - 2023-07-12 ### Added diff --git a/README.md b/README.md index 61d9c5c..5c75b11 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# ReHLDS [![C/C++ CI](https://github.com/rehlds/ReHLDS/actions/workflows/build.yml/badge.svg)](https://github.com/rehlds/ReHLDS/actions/workflows/build.yml) [![GitHub release (by tag)](https://img.shields.io/github/downloads/rehlds/ReHLDS/latest/total)](https://github.com/rehlds/ReHLDS/releases/latest) ![GitHub all releases](https://img.shields.io/github/downloads/rehlds/ReHLDS/total) [![Percentage of issues still open](http://isitmaintained.com/badge/open/rehlds/ReHLDS.svg)](http://isitmaintained.com/project/rehlds/ReHLDS "Percentage of issues still open") [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://www.gnu.org/licenses/gpl-3.0) ReHLDS +# ReHLDS [![C/C++ CI](https://github.com/rehlds/ReHLDS/actions/workflows/build.yml/badge.svg)](https://github.com/rehlds/ReHLDS/actions/workflows/build.yml) [![GitHub release (by tag)](https://img.shields.io/github/downloads/rehlds/ReHLDS/latest/total)](https://github.com/rehlds/ReHLDS/releases/latest) ![GitHub all releases](https://img.shields.io/github/downloads/rehlds/ReHLDS/total) [![Percentage of issues still open](http://isitmaintained.com/badge/open/rehlds/ReHLDS.svg)](http://isitmaintained.com/project/rehlds/ReHLDS "Percentage of issues still open") [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://www.gnu.org/licenses/gpl-3.0) [![CII Best Practices](https://bestpractices.dev/projects/10929/badge)](https://www.bestpractices.dev/en/projects/10929) ReHLDS Reverse-engineered (and bugfixed) HLDS ## What is this? From c69fd54580f6ee13e70490fb286b949155b3bbcc Mon Sep 17 00:00:00 2001 From: STAM Date: Mon, 21 Jul 2025 12:19:53 +0300 Subject: [PATCH 2/2] ci-build updated + added signing + migrated to windows-2025 runner + wmic deprecated and migrated to ps --- .github/workflows/build.yml | 123 ++++++++++++++++++++++++++-------- rehlds/version/appversion.bat | 33 +++++++-- 2 files changed, 122 insertions(+), 34 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fecffe8..d241ce0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,6 +5,7 @@ on: branches: [master] paths-ignore: - '**.md' + - '.github/**' pull_request: types: [opened, reopened, synchronize] @@ -15,7 +16,7 @@ on: jobs: windows: name: 'Windows' - runs-on: windows-2019 + runs-on: windows-2025 env: solution: 'msvc/ReHLDS.sln' @@ -36,24 +37,64 @@ jobs: - name: Setup MSBuild uses: microsoft/setup-msbuild@v2 - - name: Build and Run unittests +# TODO: add support of 141_xp toolchain at VS2022+ +# - name: Install v140, v141 and v142 toolsets +# shell: cmd +# run: | +# "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vs_installer.exe" modify ^ +# --installPath "C:\Program Files\Microsoft Visual Studio\2022\Enterprise" ^ +# --add Microsoft.VisualStudio.Component.WindowsXP ^ +# --add Microsoft.VisualStudio.Component.VC.v140 ^ +# --add Microsoft.VisualStudio.Component.VC.v140.x86.x64 ^ +# --add Microsoft.VisualStudio.Component.VC.v140.xp ^ +# --add Microsoft.VisualStudio.Component.VC.140.CRT ^ +# --add Microsoft.VisualStudio.Component.VC.v141 ^ +# --add Microsoft.VisualStudio.Component.VC.v141.x86.x64 ^ +# --add Microsoft.VisualStudio.Component.VC.v141.xp ^ +# --add Microsoft.VisualStudio.Component.VC.v142 ^ +# --add Microsoft.VisualStudio.Component.VC.v142.x86.x64 ^ +# --quiet --norestart + + - name: Select PlatformToolset + id: select_toolset + shell: pwsh run: | - msbuild ${{ env.solution }} -p:Configuration="${{ env.buildTest }}" /t:Clean,Build /p:Platform=${{ env.buildPlatform }} /p:PlatformToolset=v140_xp /p:XPDeprecationWarning=false + $vswhere = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" + $vs2019 = & $vswhere -products * -version "[16.0,17.0)" -property installationPath -latest + $vs2022 = & $vswhere -products * -version "[17.0,)" -property installationPath -latest + + if ($vs2019) { + "toolset=v140_xp" >> $env:GITHUB_OUTPUT + Write-Host "Selected v140_xp toolset" + } elseif ($vs2022) { + "toolset=v143" >> $env:GITHUB_OUTPUT + Write-Host "Selected v143 toolset" + } else { + Write-Error "No suitable Visual Studio installation found" + exit 1 + } + + - name: Build and Run unittests + shell: pwsh + run: | + $toolset = '${{ steps.select_toolset.outputs.toolset }}' + msbuild ${{ env.solution }} -p:Configuration="${{ env.buildTest }}" /t:Clean,Build /p:Platform=${{ env.buildPlatform }} /p:PlatformToolset=$toolset /p:XPDeprecationWarning=false .\"msvc\Test Fixes\swds.exe" If ($LASTEXITCODE -ne 0 -And $LASTEXITCODE -ne 3) {[Environment]::Exit(1)} - shell: "pwsh" - name: Build + shell: pwsh run: | - msbuild ${{ env.solution }} -p:Configuration="${{ env.buildRelease }}" /t:Clean,Build /p:Platform=${{ env.buildPlatform }} /p:PlatformToolset=v140_xp /p:XPDeprecationWarning=false - msbuild ${{ env.solution }} -p:Configuration="${{ env.buildReleasePlay }}" /t:Clean,Build /p:Platform=${{ env.buildPlatform }} /p:PlatformToolset=v140_xp /p:XPDeprecationWarning=false + $toolset = '${{ steps.select_toolset.outputs.toolset }}' + msbuild ${{ env.solution }} -p:Configuration="${{ env.buildRelease }}" /t:Clean,Build /p:Platform=${{ env.buildPlatform }} /p:PlatformToolset=$toolset /p:XPDeprecationWarning=false + msbuild ${{ env.solution }} -p:Configuration="${{ env.buildReleasePlay }}" /t:Clean,Build /p:Platform=${{ env.buildPlatform }} /p:PlatformToolset=$toolset /p:XPDeprecationWarning=false - name: Get rcedit from chocolatey + shell: pwsh run: | choco install rcedit -y - shell: "pwsh" - name: Move files run: | @@ -61,6 +102,7 @@ jobs: mkdir publish\tests mkdir publish\bin\win32\valve\dlls move "msvc\${{ env.buildReleasePlay }}\swds.dll" publish\tests\swds.dll + move msvc\${{ env.buildRelease }}\hlds.exe publish\bin\win32\hlds.exe move msvc\${{ env.buildRelease }}\hltv.exe publish\bin\win32\hltv.exe move msvc\${{ env.buildRelease }}\swds.dll publish\bin\win32\swds.dll @@ -78,37 +120,63 @@ jobs: move msvc\${{ env.buildRelease }}\filesystem_stdio.pdb publish\debug\filesystem_stdio.pdb move msvc\${{ env.buildRelease }}\director.pdb publish\debug\director.pdb - # TODO: Set version to exe dynamicly: 0.0.0.0 to normal version such as at linux + - name: Get app version + id: get_version + shell: pwsh + run: | + $versionFile = "rehlds/version/appversion.h" + if (-not (Test-Path $versionFile)) { + Write-Error "Version file not found: $versionFile" + exit 1 + } + + $content = Get-Content $versionFile + foreach ($line in $content) { + if ($line -match '^\s*#define\s+APP_VERSION\s+"([^"]+)"') { + $version = $matches[1] + "version=$version" >> $env:GITHUB_OUTPUT + Write-Host "Found version: $version" + exit 0 + } + } + Write-Error "APP_VERSION not found in file" + exit 1 + + - name: Show version + run: echo "Version is ${{ steps.get_version.outputs.version }}" - name: Edit resources at windows binaries run: | - rcedit ${{ github.workspace }}\publish\bin\win32\hlds.exe --set-version-string ProductName "ReHLDS" --set-file-version "0.0.0.0" --set-product-version "0.0.0.0" --set-version-string FileDescription "The Half-Life Dedicated Server, Commit: $env:GITHUB_SHA" --set-version-string "Comments" "Commit: $env:GITHUB_SHA" --set-version-string CompanyName "ReHLDS Dev Team" --set-version-string LegalCopyright "Copyright 2025 Valve, ReHLDS DevTeam" - rcedit ${{ github.workspace }}\publish\bin\win32\hltv.exe --set-version-string ProductName "ReHLTV" --set-file-version "0.0.0.0" --set-product-version "0.0.0.0" --set-version-string FileDescription "The Half-Life TV, Commit: $env:GITHUB_SHA" --set-version-string "Comments" "Commit: $env:GITHUB_SHA" --set-version-string CompanyName "ReHLDS Dev Team" --set-version-string LegalCopyright "Copyright 2025 Valve, ReHLDS DevTeam" - rcedit ${{ github.workspace }}\publish\tests\swds.dll --set-version-string ProductName "swds.dll" --set-file-version "0.0.0.0" --set-product-version "0.0.0.0" --set-version-string FileDescription "A dll used by Steamworks Dedicated Servers, Commit: $env:GITHUB_SHA" --set-version-string "Comments" "Commit: $env:GITHUB_SHA" --set-version-string CompanyName "ReHLDS Dev Team" --set-version-string LegalCopyright "Copyright 2025 Valve, ReHLDS DevTeam" --set-icon rehlds/dedicated/msvc/icon.ico - rcedit ${{ github.workspace }}\publish\bin\win32\swds.dll --set-version-string ProductName "swds.dll" --set-file-version "0.0.0.0" --set-product-version "0.0.0.0" --set-version-string FileDescription "A ddll used by Steamworks Dedicated Servers, Commit: $env:GITHUB_SHA" --set-version-string "Comments" "Commit: $env:GITHUB_SHA" --set-version-string CompanyName "ReHLDS Dev Team" --set-version-string LegalCopyright "Copyright 2025 Valve, ReHLDS DevTeam" --set-icon rehlds/dedicated/msvc/icon.ico - rcedit ${{ github.workspace }}\publish\bin\win32\core.dll --set-version-string ProductName "core.dll" --set-file-version "0.0.0.0" --set-product-version "0.0.0.0" --set-version-string FileDescription " A dll, it is a core of game engine, Commit: $env:GITHUB_SHA" --set-version-string "Comments" "Commit: $env:GITHUB_SHA" --set-version-string CompanyName "ReHLDS Dev Team" --set-version-string LegalCopyright "Copyright 2025 Valve, ReHLDS DevTeam" --set-icon rehlds/dedicated/msvc/icon.ico - rcedit ${{ github.workspace }}\publish\bin\win32\proxy.dll --set-version-string ProductName "proxy.dll" --set-file-version "0.0.0.0" --set-product-version "0.0.0.0" --set-version-string FileDescription "A dll for proxying network connections, Commit: $env:GITHUB_SHA" --set-version-string "Comments" "Commit: $env:GITHUB_SHA" --set-version-string CompanyName "ReHLDS Dev Team" --set-version-string LegalCopyright "Copyright 2025 Valve, ReHLDS DevTeam" --set-icon rehlds/dedicated/msvc/icon.ico - rcedit ${{ github.workspace }}\publish\bin\win32\demoplayer.dll --set-version-string ProductName "demoplayer.dll" --set-file-version "0.0.0.0" --set-product-version "0.0.0.0" --set-version-string FileDescription "A dll for demoplayer functionality, Commit: $env:GITHUB_SHA" --set-version-string "Comments" "Commit: $env:GITHUB_SHA" --set-version-string CompanyName "ReHLDS Dev Team" --set-version-string LegalCopyright "Copyright 2025 Valve, ReHLDS DevTeam" --set-icon rehlds/dedicated/msvc/icon.ico - rcedit ${{ github.workspace }}\publish\bin\win32\filesystem_stdio.dll --set-version-string ProductName "filesystem_stdio.dll" --set-file-version "0.0.0.0" --set-product-version "0.0.0.0" --set-version-string FileDescription "A dll that manages file input/output operations, Commit: $env:GITHUB_SHA" --set-version-string "Comments" "Commit: $env:GITHUB_SHA" --set-version-string CompanyName "ReHLDS Dev Team" --set-version-string LegalCopyright "Copyright 2025 Valve, ReHLDS DevTeam" --set-icon rehlds/dedicated/msvc/icon.ico - rcedit ${{ github.workspace }}\publish\bin\win32\valve\dlls\director.dll --set-version-string ProductName "director.dll" --set-file-version "0.0.0.0" --set-product-version "0.0.0.0" --set-version-string FileDescription "A dll used for Director functionality in Half-Life 1, Commit: $env:GITHUB_SHA" --set-version-string "Comments" "Commit: $env:GITHUB_SHA" --set-version-string CompanyName "ReHLDS Dev Team" --set-version-string LegalCopyright "Copyright 2025 Valve, ReHLDS DevTeam" --set-icon rehlds/dedicated/msvc/icon.ico + + rcedit ${{ github.workspace }}\publish\bin\win32\hlds.exe --set-version-string ProductName "ReHLDS" --set-file-version "${{ steps.get_version.outputs.version }}" --set-product-version "${{ steps.get_version.outputs.version }}" --set-version-string FileDescription "The Half-Life Dedicated Server, Commit: $env:GITHUB_SHA" --set-version-string "Comments" "Commit: $env:GITHUB_SHA" --set-version-string CompanyName "ReHLDS Dev Team" --set-version-string LegalCopyright "Copyright 2025 Valve, ReHLDS DevTeam" + rcedit ${{ github.workspace }}\publish\bin\win32\hltv.exe --set-version-string ProductName "ReHLTV" --set-file-version "${{ steps.get_version.outputs.version }}" --set-product-version "${{ steps.get_version.outputs.version }}" --set-version-string FileDescription "The Half-Life TV, Commit: $env:GITHUB_SHA" --set-version-string "Comments" "Commit: $env:GITHUB_SHA" --set-version-string CompanyName "ReHLDS Dev Team" --set-version-string LegalCopyright "Copyright 2025 Valve, ReHLDS DevTeam" + rcedit ${{ github.workspace }}\publish\tests\swds.dll --set-version-string ProductName "swds.dll" --set-file-version "${{ steps.get_version.outputs.version }}" --set-product-version "${{ steps.get_version.outputs.version }}" --set-version-string FileDescription "A dll used by Steamworks Dedicated Servers, Commit: $env:GITHUB_SHA" --set-version-string "Comments" "Commit: $env:GITHUB_SHA" --set-version-string CompanyName "ReHLDS Dev Team" --set-version-string LegalCopyright "Copyright 2025 Valve, ReHLDS DevTeam" --set-icon rehlds/dedicated/msvc/icon.ico + rcedit ${{ github.workspace }}\publish\bin\win32\swds.dll --set-version-string ProductName "swds.dll" --set-file-version "${{ steps.get_version.outputs.version }}" --set-product-version "${{ steps.get_version.outputs.version }}" --set-version-string FileDescription "A ddll used by Steamworks Dedicated Servers, Commit: $env:GITHUB_SHA" --set-version-string "Comments" "Commit: $env:GITHUB_SHA" --set-version-string CompanyName "ReHLDS Dev Team" --set-version-string LegalCopyright "Copyright 2025 Valve, ReHLDS DevTeam" --set-icon rehlds/dedicated/msvc/icon.ico + rcedit ${{ github.workspace }}\publish\bin\win32\core.dll --set-version-string ProductName "core.dll" --set-file-version "${{ steps.get_version.outputs.version }}" --set-product-version "${{ steps.get_version.outputs.version }}" --set-version-string FileDescription " A dll, it is a core of game engine, Commit: $env:GITHUB_SHA" --set-version-string "Comments" "Commit: $env:GITHUB_SHA" --set-version-string CompanyName "ReHLDS Dev Team" --set-version-string LegalCopyright "Copyright 2025 Valve, ReHLDS DevTeam" --set-icon rehlds/dedicated/msvc/icon.ico + rcedit ${{ github.workspace }}\publish\bin\win32\proxy.dll --set-version-string ProductName "proxy.dll" --set-file-version "${{ steps.get_version.outputs.version }}" --set-product-version "${{ steps.get_version.outputs.version }}" --set-version-string FileDescription "A dll for proxying network connections, Commit: $env:GITHUB_SHA" --set-version-string "Comments" "Commit: $env:GITHUB_SHA" --set-version-string CompanyName "ReHLDS Dev Team" --set-version-string LegalCopyright "Copyright 2025 Valve, ReHLDS DevTeam" --set-icon rehlds/dedicated/msvc/icon.ico + rcedit ${{ github.workspace }}\publish\bin\win32\demoplayer.dll --set-version-string ProductName "demoplayer.dll" --set-file-version "${{ steps.get_version.outputs.version }}" --set-product-version "${{ steps.get_version.outputs.version }}" --set-version-string FileDescription "A dll for demoplayer functionality, Commit: $env:GITHUB_SHA" --set-version-string "Comments" "Commit: $env:GITHUB_SHA" --set-version-string CompanyName "ReHLDS Dev Team" --set-version-string LegalCopyright "Copyright 2025 Valve, ReHLDS DevTeam" --set-icon rehlds/dedicated/msvc/icon.ico + rcedit ${{ github.workspace }}\publish\bin\win32\filesystem_stdio.dll --set-version-string ProductName "filesystem_stdio.dll" --set-file-version "${{ steps.get_version.outputs.version }}" --set-product-version "${{ steps.get_version.outputs.version }}" --set-version-string FileDescription "A dll that manages file input/output operations, Commit: $env:GITHUB_SHA" --set-version-string "Comments" "Commit: $env:GITHUB_SHA" --set-version-string CompanyName "ReHLDS Dev Team" --set-version-string LegalCopyright "Copyright 2025 Valve, ReHLDS DevTeam" --set-icon rehlds/dedicated/msvc/icon.ico + rcedit ${{ github.workspace }}\publish\bin\win32\valve\dlls\director.dll --set-version-string ProductName "director.dll" --set-file-version "${{ steps.get_version.outputs.version }}" --set-product-version "${{ steps.get_version.outputs.version }}" --set-version-string FileDescription "A dll used for Director functionality in Half-Life 1, Commit: $env:GITHUB_SHA" --set-version-string "Comments" "Commit: $env:GITHUB_SHA" --set-version-string CompanyName "ReHLDS Dev Team" --set-version-string LegalCopyright "Copyright 2025 Valve, ReHLDS DevTeam" --set-icon rehlds/dedicated/msvc/icon.ico shell: "pwsh" - name: Import PFX and sign if: github.event_name != 'pull_request' env: KEY_PFX_PASS: ${{ secrets.KEY_PFX_PASS }} + # https://github.com/actions/runner-images/blob/main/images/windows/Windows2025-Readme.md run: | $pfxBase64 = "${{ secrets.KEY_PFX_B64 }}" [IO.File]::WriteAllBytes("${{ github.workspace }}\signing-cert.pfx", [Convert]::FromBase64String($pfxBase64)) certutil -f -p "${{ secrets.KEY_PFX_PASS }}" -importPFX "${{ github.workspace }}\signing-cert.pfx" - & 'C:\Program Files (x86)\Windows Kits\10\bin\10.0.22621.0\x86\signtool.exe' sign /a /f "${{ github.workspace }}\signing-cert.pfx" /p $env:KEY_PFX_PASS /d "ReHLDS" /du "https://rehlds.dev/" /tr "http://timestamp.digicert.com" /td sha512 /fd sha512 /v ${{ github.workspace }}\publish\bin\win32\hlds.exe - & 'C:\Program Files (x86)\Windows Kits\10\bin\10.0.22621.0\x86\signtool.exe' sign /a /f "${{ github.workspace }}\signing-cert.pfx" /p $env:KEY_PFX_PASS /d "reHLTV" /du "https://rehlds.dev/" /tr "http://timestamp.digicert.com" /td sha512 /fd sha512 /v ${{ github.workspace }}\publish\bin\win32\hltv.exe - & 'C:\Program Files (x86)\Windows Kits\10\bin\10.0.22621.0\x86\signtool.exe' sign /a /f "${{ github.workspace }}\signing-cert.pfx" /p $env:KEY_PFX_PASS /d "ReHLDS - swds.dll" /du "https://rehlds.dev/" /tr "http://timestamp.digicert.com" /td sha512 /fd sha512 /v ${{ github.workspace }}\publish\tests\swds.dll - & 'C:\Program Files (x86)\Windows Kits\10\bin\10.0.22621.0\x86\signtool.exe' sign /a /f "${{ github.workspace }}\signing-cert.pfx" /p $env:KEY_PFX_PASS /d "ReHLDS - swds.dll" /du "https://rehlds.dev/" /tr "http://timestamp.digicert.com" /td sha512 /fd sha512 /v ${{ github.workspace }}\publish\bin\win32\swds.dll - & 'C:\Program Files (x86)\Windows Kits\10\bin\10.0.22621.0\x86\signtool.exe' sign /a /f "${{ github.workspace }}\signing-cert.pfx" /p $env:KEY_PFX_PASS /d "ReHLDS - core.dll" /du "https://rehlds.dev/" /tr "http://timestamp.digicert.com" /td sha512 /fd sha512 /v ${{ github.workspace }}\publish\bin\win32\core.dll - & 'C:\Program Files (x86)\Windows Kits\10\bin\10.0.22621.0\x86\signtool.exe' sign /a /f "${{ github.workspace }}\signing-cert.pfx" /p $env:KEY_PFX_PASS /d "ReHLDS - proxy.dll" /du "https://rehlds.dev/" /tr "http://timestamp.digicert.com" /td sha512 /fd sha512 /v ${{ github.workspace }}\publish\bin\win32\proxy.dll - & 'C:\Program Files (x86)\Windows Kits\10\bin\10.0.22621.0\x86\signtool.exe' sign /a /f "${{ github.workspace }}\signing-cert.pfx" /p $env:KEY_PFX_PASS /d "ReHLDS - demoplayer.dll" /du "https://rehlds.dev/" /tr "http://timestamp.digicert.com" /td sha512 /fd sha512 /v ${{ github.workspace }}\publish\bin\win32\demoplayer.dll - & 'C:\Program Files (x86)\Windows Kits\10\bin\10.0.22621.0\x86\signtool.exe' sign /a /f "${{ github.workspace }}\signing-cert.pfx" /p $env:KEY_PFX_PASS /d "ReHLDS - filesystem_stdio.dll" /du "https://rehlds.dev/" /tr "http://timestamp.digicert.com" /td sha512 /fd sha512 /v ${{ github.workspace }}\publish\bin\win32\filesystem_stdio.dll - & 'C:\Program Files (x86)\Windows Kits\10\bin\10.0.22621.0\x86\signtool.exe' sign /a /f "${{ github.workspace }}\signing-cert.pfx" /p $env:KEY_PFX_PASS /d "ReHLDS - director.dll" /du "https://rehlds.dev/" /tr "http://timestamp.digicert.com" /td sha512 /fd sha512 /v ${{ github.workspace }}\publish\bin\win32\valve\dlls\director.dll + + & 'C:\Program Files (x86)\Windows Kits\10\bin\10.0.26100.0\x86\signtool.exe' sign /a /f "${{ github.workspace }}\signing-cert.pfx" /p $env:KEY_PFX_PASS /d "ReHLDS" /du "https://rehlds.dev/" /tr "http://timestamp.digicert.com" /td sha256 /fd sha256 /v ${{ github.workspace }}\publish\bin\win32\hlds.exe + & 'C:\Program Files (x86)\Windows Kits\10\bin\10.0.26100.0\x86\signtool.exe' sign /a /f "${{ github.workspace }}\signing-cert.pfx" /p $env:KEY_PFX_PASS /d "reHLTV" /du "https://rehlds.dev/" /tr "http://timestamp.digicert.com" /td sha256 /fd sha256 /v ${{ github.workspace }}\publish\bin\win32\hltv.exe + & 'C:\Program Files (x86)\Windows Kits\10\bin\10.0.26100.0\x86\signtool.exe' sign /a /f "${{ github.workspace }}\signing-cert.pfx" /p $env:KEY_PFX_PASS /d "ReHLDS - swds.dll" /du "https://rehlds.dev/" /tr "http://timestamp.digicert.com" /td sha256 /fd sha256 /v ${{ github.workspace }}\publish\tests\swds.dll + & 'C:\Program Files (x86)\Windows Kits\10\bin\10.0.26100.0\x86\signtool.exe' sign /a /f "${{ github.workspace }}\signing-cert.pfx" /p $env:KEY_PFX_PASS /d "ReHLDS - swds.dll" /du "https://rehlds.dev/" /tr "http://timestamp.digicert.com" /td sha256 /fd sha256 /v ${{ github.workspace }}\publish\bin\win32\swds.dll + & 'C:\Program Files (x86)\Windows Kits\10\bin\10.0.26100.0\x86\signtool.exe' sign /a /f "${{ github.workspace }}\signing-cert.pfx" /p $env:KEY_PFX_PASS /d "ReHLDS - core.dll" /du "https://rehlds.dev/" /tr "http://timestamp.digicert.com" /td sha256 /fd sha256 /v ${{ github.workspace }}\publish\bin\win32\core.dll + & 'C:\Program Files (x86)\Windows Kits\10\bin\10.0.26100.0\x86\signtool.exe' sign /a /f "${{ github.workspace }}\signing-cert.pfx" /p $env:KEY_PFX_PASS /d "ReHLDS - proxy.dll" /du "https://rehlds.dev/" /tr "http://timestamp.digicert.com" /td sha256 /fd sha256 /v ${{ github.workspace }}\publish\bin\win32\proxy.dll + & 'C:\Program Files (x86)\Windows Kits\10\bin\10.0.26100.0\x86\signtool.exe' sign /a /f "${{ github.workspace }}\signing-cert.pfx" /p $env:KEY_PFX_PASS /d "ReHLDS - demoplayer.dll" /du "https://rehlds.dev/" /tr "http://timestamp.digicert.com" /td sha256 /fd sha256 /v ${{ github.workspace }}\publish\bin\win32\demoplayer.dll + & 'C:\Program Files (x86)\Windows Kits\10\bin\10.0.26100.0\x86\signtool.exe' sign /a /f "${{ github.workspace }}\signing-cert.pfx" /p $env:KEY_PFX_PASS /d "ReHLDS - filesystem_stdio.dll" /du "https://rehlds.dev/" /tr "http://timestamp.digicert.com" /td sha256 /fd sha256 /v ${{ github.workspace }}\publish\bin\win32\filesystem_stdio.dll + & 'C:\Program Files (x86)\Windows Kits\10\bin\10.0.26100.0\x86\signtool.exe' sign /a /f "${{ github.workspace }}\signing-cert.pfx" /p $env:KEY_PFX_PASS /d "ReHLDS - director.dll" /du "https://rehlds.dev/" /tr "http://timestamp.digicert.com" /td sha256 /fd sha256 /v ${{ github.workspace }}\publish\bin\win32\valve\dlls\director.dll Remove-Item -Recurse -Force "${{ github.workspace }}\signing-cert.pfx" shell: "pwsh" @@ -263,7 +331,8 @@ jobs: - name: Move files run: | - mkdir -p publish/bin/linux32/valve/dlls + mkdir -p publish/bin/linux32/valve/dlls + mv build/rehlds/engine_i486.so publish/bin/linux32/engine_i486.so mv rehlds/version/appversion.h publish/appversion.h mv build/rehlds/dedicated/hlds_linux publish/bin/linux32/hlds_linux diff --git a/rehlds/version/appversion.bat b/rehlds/version/appversion.bat index b2d4bdb..3696fea 100644 --- a/rehlds/version/appversion.bat +++ b/rehlds/version/appversion.bat @@ -20,13 +20,32 @@ set commitURL= set commitCount=0 set branch_name=master -for /f "delims=" %%a in ('wmic OS Get localdatetime ^| find "."') do set "dt=%%a" -set "YYYY=%dt:~0,4%" -set "MM=%dt:~4,2%" -set "DD=%dt:~6,2%" -set "hour=%dt:~8,2%" -set "min=%dt:~10,2%" -set "sec=%dt:~12,2%" +for /f "tokens=*" %%i in ('powershell -NoProfile -Command ^ + "$now = Get-Date; Write-Output ('{0:yyyy}|{0:MM}|{0:dd}|{0:HH}|{0:mm}|{0:ss}' -f $now)"') do ( + for /f "tokens=1-6 delims=|" %%a in ("%%i") do ( + set "YYYY=%%a" + set "MM=%%b" + set "DD=%%c" + set "hour=%%d" + set "min=%%e" + set "sec=%%f" + ) +) + +echo YYYY=%YYYY% +echo MM=%MM% +echo DD=%DD% +echo hour=%hour% +echo min=%min% +echo sec=%sec% + +:: for /f "delims=" %%a in ('wmic OS Get localdatetime ^| find "."') do set "dt=%%a" +:: set "YYYY=%dt:~0,4%" +:: set "MM=%dt:~4,2%" +:: set "DD=%dt:~6,2%" +:: set "hour=%dt:~8,2%" +:: set "min=%dt:~10,2%" +:: set "sec=%dt:~12,2%" :: :: Remove leading zero from MM (e.g 09 > 9)