From 2e1add7f30a871d2a6bb3c8bd72d6881c2aa8999 Mon Sep 17 00:00:00 2001 From: Simon Jackson Date: Thu, 2 Apr 2026 20:17:28 +0100 Subject: [PATCH] fix(ci): use correct OutDir for OffsetFinder exe path Confirmed by local build (linker /OUT: argument): - Win32: OutDir = Release\ (no platform prefix - MSVC default for Win32) - x64: OutDir = x64\Release\ Replace finder_plat/SlnPlatform guesses with explicit out_dir field: Win32 -> out_dir: Release x64 -> out_dir: x64/Release Also remove the temporary diagnostic step. --- .github/workflows/build-and-release.yml | 9 ++++----- .github/workflows/build-offsetfinder.yml | 18 ++++-------------- 2 files changed, 8 insertions(+), 19 deletions(-) diff --git a/.github/workflows/build-and-release.yml b/.github/workflows/build-and-release.yml index adfd873..253c358 100644 --- a/.github/workflows/build-and-release.yml +++ b/.github/workflows/build-and-release.yml @@ -109,8 +109,8 @@ jobs: Write-Host "Submodule version: $version" foreach ($cfg in @( - @{ Platform = 'x64'; SlnPlatform = 'x64'; ZydisCfg = 'Release MD DLL'; ZydisBin = 'ReleaseX64'; Arch = 'x64' } - @{ Platform = 'Win32'; SlnPlatform = 'x86'; ZydisCfg = 'Release MD DLL'; ZydisBin = 'ReleaseX86'; Arch = 'x86' } + @{ Platform = 'x64'; SlnPlatform = 'x64'; OutDir = 'x64/Release'; ZydisCfg = 'Release MD DLL'; ZydisBin = 'ReleaseX64'; Arch = 'x64' } + @{ Platform = 'Win32'; SlnPlatform = 'x86'; OutDir = 'Release'; ZydisCfg = 'Release MD DLL'; ZydisBin = 'ReleaseX86'; Arch = 'x86' } )) { # Build Zydis DLL msbuild src-csharp/RDPOffsetFinder/zydis/msvc/zydis/Zydis.vcxproj ` @@ -132,9 +132,8 @@ jobs: /v:minimal $arch = $cfg.Arch - # .sln build outputs to SolutionDir//Release/ where SlnPlatform is x86/x64 - # (solution GlobalSection maps x86->Win32 internally, but $(Platform) seen by vcxproj is x86) - $exeSrc = "src-csharp/RDPOffsetFinder/$($cfg.SlnPlatform)/Release/RDPWrapOffsetFinder.exe" + # Win32 OutDir = Release\ (no platform prefix); x64 OutDir = x64\Release\ + $exeSrc = "src-csharp/RDPOffsetFinder/$($cfg.OutDir)/RDPWrapOffsetFinder.exe" $dllSrc = "src-csharp/RDPOffsetFinder/zydis/msvc/bin/$($cfg.ZydisBin)/Zydis.dll" Copy-Item $exeSrc ".\RDPWrapOffsetFinder_$arch.exe" Copy-Item $dllSrc ".\Zydis_$arch.dll" diff --git a/.github/workflows/build-offsetfinder.yml b/.github/workflows/build-offsetfinder.yml index 3f4f785..6dbd10c 100644 --- a/.github/workflows/build-offsetfinder.yml +++ b/.github/workflows/build-offsetfinder.yml @@ -29,12 +29,12 @@ jobs: sln_platform: x64 zydis_cfg: "Release MD DLL" zydis_bin: ReleaseX64 - finder_plat: x64 + out_dir: x64/Release - platform: Win32 sln_platform: x86 zydis_cfg: "Release MD DLL" zydis_bin: ReleaseX86 - finder_plat: x86 + out_dir: Release steps: - name: Checkout repository (with submodules) @@ -68,23 +68,13 @@ jobs: /p:PlatformToolset=v143 ` /v:minimal - - name: Locate build outputs (diagnostic) - shell: pwsh - run: | - Write-Host "=== RDPWrapOffsetFinder.exe candidates ===" - Get-ChildItem -Recurse -Filter "RDPWrapOffsetFinder.exe" -Path "src-csharp/RDPOffsetFinder" -ErrorAction SilentlyContinue | - Select-Object FullName, Length | Format-Table -AutoSize - Write-Host "=== Directory tree (Release folders only) ===" - Get-ChildItem -Recurse -Directory -Filter "Release" -Path "src-csharp/RDPOffsetFinder" -ErrorAction SilentlyContinue | - Select-Object FullName | Format-Table -AutoSize - - name: Collect outputs shell: pwsh run: | $arch = if ("${{ matrix.platform }}" -eq "Win32") { "x86" } else { "x64" } $root = "src-csharp/RDPOffsetFinder" - # .sln build outputs to SolutionDir//Release/ (not //Release/) - $exe = "$root/${{ matrix.finder_plat }}/Release/RDPWrapOffsetFinder.exe" + # Win32 OutDir = Release\ (no platform prefix); x64 OutDir = x64\Release\ + $exe = "$root/${{ matrix.out_dir }}/RDPWrapOffsetFinder.exe" $dll = "$root/zydis/msvc/bin/${{ matrix.zydis_bin }}/Zydis.dll" Write-Host "Exe: $(Get-Item $exe | Select-Object -Exp Length) bytes"