fix(ci): use x86/x64 solution platform names for RDPWrapOffsetFinder.sln

The solution GlobalSection only declares Release|x86 and Release|x64.
Passing Platform=Win32 to msbuild with a .sln target is invalid and causes:
  MSB4126: The specified solution configuration 'Release|Win32' is invalid.

Add sln_platform (x86/x64) used only for the .sln invocation; keep
Platform=Win32 for the Zydis vcxproj build and the output path lookup
(vcxproj maps x86->Win32 for its OutDir so finder_plat=Win32 stays correct).

Affects both build-offsetfinder.yml and build-and-release.yml.
pull/4062/head
Simon Jackson 1 month ago
parent 3e0f39c7b3
commit 32c9200216

@ -109,8 +109,8 @@ jobs:
Write-Host "Submodule version: $version"
foreach ($cfg in @(
@{ Platform = 'x64'; ZydisCfg = 'Release MD DLL'; ZydisBin = 'ReleaseX64'; Arch = 'x64' }
@{ Platform = 'Win32'; ZydisCfg = 'Release MD DLL'; ZydisBin = 'ReleaseX86'; Arch = 'x86' }
@{ Platform = 'x64'; SlnPlatform = 'x64'; ZydisCfg = 'Release MD DLL'; ZydisBin = 'ReleaseX64'; Arch = 'x64' }
@{ Platform = 'Win32'; SlnPlatform = 'x86'; ZydisCfg = 'Release MD DLL'; ZydisBin = 'ReleaseX86'; Arch = 'x86' }
)) {
# Build Zydis DLL
msbuild src-csharp/RDPOffsetFinder/zydis/msvc/zydis/Zydis.vcxproj `
@ -123,10 +123,11 @@ jobs:
# where zydis/ lives - vcxproj AdditionalIncludeDirectories and
# AdditionalDependencies both use $(SolutionDir)\zydis\... and
# fail with C1083 when the vcxproj is targeted directly.
# NB: the solution uses x86/x64 platform names (not Win32) - use SlnPlatform.
msbuild src-csharp/RDPOffsetFinder/RDPWrapOffsetFinder.sln `
/t:RDPWrapOffsetFinder `
/p:Configuration=Release `
/p:Platform="$($cfg.Platform)" `
/p:Platform="$($cfg.SlnPlatform)" `
/p:PlatformToolset=v143 `
/v:minimal

@ -26,10 +26,12 @@ jobs:
matrix:
include:
- platform: x64
sln_platform: x64
zydis_cfg: "Release MD DLL"
zydis_bin: ReleaseX64
finder_plat: x64
- platform: Win32
sln_platform: x86
zydis_cfg: "Release MD DLL"
zydis_bin: ReleaseX86
finder_plat: Win32
@ -55,13 +57,14 @@ jobs:
# Build via .sln so $(SolutionDir) resolves to the submodule root where
# AdditionalIncludeDirectories and AdditionalDependencies reference zydis/
# NB: the solution uses x86/x64 platform names (not Win32) - use sln_platform.
- name: Build RDPWrapOffsetFinder (${{ matrix.platform }})
working-directory: src-csharp/RDPOffsetFinder
run: |
msbuild RDPWrapOffsetFinder.sln `
/t:RDPWrapOffsetFinder `
/p:Configuration=Release `
/p:Platform="${{ matrix.platform }}" `
/p:Platform="${{ matrix.sln_platform }}" `
/p:PlatformToolset=v143 `
/v:minimal

Loading…
Cancel
Save