1717 FBSDK_VERSION : 2025-03-07
1818
1919 SOL_FILE : foo_opensubsonic.sln
20- MSBUILD_CMD_X86 : /maxcpucount /p :RestorePackagesConfig=true /p: Configuration=Release /p: Platform=Win32 /t :restore,build
21- MSBUILD_CMD_X64 : /maxcpucount /p :RestorePackagesConfig=true /p: Configuration=Release /p: Platform=x64 /t :restore,build
22- MSBUILD_CMD_ARM64EC : /maxcpucount /p :RestorePackagesConfig=true /p: Configuration=Release /p: Platform=ARM64EC /t :restore,build
20+ MSBUILD_CMD_X86 : /maxcpucount /property :RestorePackagesConfig=true, Configuration=Release, Platform=Win32,UseOfAtl=Static /target :restore,build
21+ MSBUILD_CMD_X64 : /maxcpucount /property :RestorePackagesConfig=true, Configuration=Release, Platform=x64,UseOfAtl=Static /target :restore,build
22+ MSBUILD_CMD_ARM64EC : /maxcpucount /property :RestorePackagesConfig=true, Configuration=Release, Platform=ARM64EC,UseOfAtl=Static /target :restore,build
2323
2424 steps :
2525 - name : Checkout repository
@@ -40,22 +40,38 @@ jobs:
4040
4141 dir lib
4242
43- - name : Inject Global MSBuild Properties (ATL & WTL)
43+ - name : Patch SDK
4444 shell : pwsh
4545 run : |
46- $targets = @'
47- <Project>
48- <PropertyGroup>
49- <UseOfAtl>Static</UseOfAtl>
50- </PropertyGroup>
51- <ItemDefinitionGroup>
52- <ClCompile>
53- <AdditionalIncludeDirectories>$(MSBuildThisFileDirectory)lib\wtl\Include;$(VC_ATLMFC_IncludePath);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
54- </ClCompile>
55- </ItemDefinitionGroup>
56- </Project>
57- '@
58- Set-Content -Path "Directory.Build.targets" -Value $targets -Encoding utf8
46+ $projectPatches = @{
47+ "lib\foobar2000_sdk\libPPUI\libPPUI.vcxproj" = "../..;..;..\..\wtl\Include;%(AdditionalIncludeDirectories)"
48+ "lib\foobar2000_sdk\foobar2000\helpers\foobar2000_sdk_helpers.vcxproj" = "..;..\..;..\..\..\wtl\Include;%(AdditionalIncludeDirectories)"
49+ }
50+
51+ foreach ($project in $projectPatches.GetEnumerator()) {
52+ $filePath = Resolve-Path $project.Key
53+
54+ [xml]$x = Get-Content $filePath
55+ $ns = New-Object System.Xml.XmlNamespaceManager($x.NameTable)
56+ $ns.AddNamespace("msb", "http://schemas.microsoft.com/developer/msbuild/2003")
57+ $msbuildNs = $ns.LookupNamespace("msb")
58+
59+ $x.SelectNodes("//msb:ClCompile/msb:AdditionalIncludeDirectories", $ns) | ForEach-Object {
60+ $_.InnerText = $project.Value
61+ }
62+
63+ $x.SelectNodes("//msb:PropertyGroup[@Label='Configuration']", $ns) | ForEach-Object {
64+ $useOfAtl = $_.SelectSingleNode("msb:UseOfAtl", $ns)
65+ if ($null -eq $useOfAtl) {
66+ $useOfAtl = $x.CreateElement("UseOfAtl", $msbuildNs)
67+ [void]$_.AppendChild($useOfAtl)
68+ }
69+
70+ $useOfAtl.InnerText = "Static"
71+ }
72+
73+ $x.Save($filePath)
74+ }
5975
6076 - name : Setup devcmd
6177 uses : ilammy/msvc-dev-cmd@v1
0 commit comments