From 641383f1e529e45a4b02ced7466d1d9c6955ebf9 Mon Sep 17 00:00:00 2001 From: nulano Date: Thu, 7 Nov 2019 20:58:12 +0000 Subject: [PATCH] add lcms2 bulid script upgrade patch to gha --- .github/workflows/test-windows.yml | 3 +-- winbuild/lcms2_patch.ps1 | 9 +++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 winbuild/lcms2_patch.ps1 diff --git a/.github/workflows/test-windows.yml b/.github/workflows/test-windows.yml index 6419e0517..cb712562b 100644 --- a/.github/workflows/test-windows.yml +++ b/.github/workflows/test-windows.yml @@ -185,7 +185,6 @@ jobs: shell: cmd - name: Build dependencies / LCMS2 - if: false run: | set INCLUDE=C:\Program Files (x86)\Microsoft SDKs\Windows\V7.1A\Include set INCLIB=%GITHUB_WORKSPACE%\winbuild\depends\msvcr10-x32 @@ -197,7 +196,7 @@ jobs: rmdir /S /Q Projects\VC2015\Release set VCTargetsPath=C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\VC\v160\ set MSBUILD="C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\MSBuild.exe" - powershell -Command "(gc Projects\VC2015\lcms2_static\lcms2_static.vcxproj) -replace 'MultiThreaded<', 'MultiThreadedDLL<' | Out-File -encoding ASCII Projects\VC2015\lcms2_static\lcms2_static.vcxproj" + powershell %GITHUB_WORKSPACE%\winbuild\lcms2_patch.ps1 %MSBUILD% Projects\VC2015\lcms2.sln /t:Clean;lcms2_static /p:Configuration="Release" /p:Platform=${{ matrix.platform-msbuild }} /m xcopy /Y /E /Q include %INCLIB% copy /Y /B Lib\MS\*.lib %INCLIB% diff --git a/winbuild/lcms2_patch.ps1 b/winbuild/lcms2_patch.ps1 new file mode 100644 index 000000000..7fc48c034 --- /dev/null +++ b/winbuild/lcms2_patch.ps1 @@ -0,0 +1,9 @@ + +Get-ChildItem .\Projects\VC2015\ *.vcxproj -recurse | + Foreach-Object { + $c = ($_ | Get-Content) + $c = $c -replace 'MultiThreaded<','MultiThreadedDLL<' + $c = $c -replace '8.1','10' + $c = $c -replace 'v140','v142' + [IO.File]::WriteAllText($_.FullName, ($c -join "`r`n")) + }