From 04868c9e51e781601e0c4fc5f5d26f684c69a909 Mon Sep 17 00:00:00 2001 From: nulano Date: Thu, 26 Sep 2019 10:10:37 +0200 Subject: [PATCH] winbuild use lcms2-2.8 for python3.x; use static freetype on GHA --- .github/workflows/test-windows.yml | 11 ++++------- winbuild/build_dep.py | 3 +++ winbuild/config.py | 7 ++++++- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test-windows.yml b/.github/workflows/test-windows.yml index 33123b178..9faec2c56 100644 --- a/.github/workflows/test-windows.yml +++ b/.github/workflows/test-windows.yml @@ -147,26 +147,23 @@ jobs: set DefaultPlatformToolset=v140 set VCTargetsPath=C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\VC\VCTargets set MSBUILD="C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\MSBuild.exe" - %MSBUILD% builds\windows\vc2010\freetype.sln /t:Build /p:Configuration="Release" /p:Platform=${{ matrix.platform-msbuild }} /m + %MSBUILD% builds\windows\vc2010\freetype.sln /t:Build /p:Configuration="Release Static" /p:Platform=${{ matrix.platform-msbuild }} /m xcopy /Y /E /Q include %INCLIB% - copy /Y /B objs\${{ matrix.platform-msbuild }}\Release\freetype.dll %INCLIB% - copy /Y /B objs\${{ matrix.platform-msbuild }}\Release\freetype.lib %INCLIB% + copy /Y /B "objs\${{ matrix.platform-msbuild }}\Release Static\freetype.lib" %INCLIB% - name: Build dependencies / LCMS2 - if: false run: | - REM Projects\VC2015\lcms2.sln is not available in lcms2-2.7 - set INCLUDE=C:\Program Files (x86)\Microsoft SDKs\Windows\V7.1A\Include set INCLIB=%GITHUB_WORKSPACE%\winbuild\depends\msvcr10-x32 set BUILD=%GITHUB_WORKSPACE%\winbuild\build - cd /D %BUILD%\lcms2-2.7 + cd /D %BUILD%\lcms2-2.8 call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" ${{ matrix.platform-vcvars }} 8.1 echo on rmdir /S /Q Lib rmdir /S /Q Projects\VC2015\Release set VCTargetsPath=C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\VC\VCTargets set MSBUILD="C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\MSBuild.exe" + powershell -Command "(gc Projects\VC2015\lcms2_static\lcms2_static.vcxproj) -replace 'MultiThreadedDLL', 'MultiThreaded' | Out-File -encoding ASCII Projects\VC2015\lcms2_static\lcms2_static.vcxproj" %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/build_dep.py b/winbuild/build_dep.py index 487329db8..3ed727ef8 100644 --- a/winbuild/build_dep.py +++ b/winbuild/build_dep.py @@ -270,6 +270,7 @@ def build_lcms_70(compiler): r""" rem Build lcms2 setlocal +set LCMS=%%LCMS-2.7%% rd /S /Q %%LCMS%%\Lib rd /S /Q %%LCMS%%\Projects\VC%(vc_version)s\Release %%MSBUILD%% %%LCMS%%\Projects\VC%(vc_version)s\lcms2.sln /t:Clean /p:Configuration="Release" /p:Platform=Win32 /m @@ -287,8 +288,10 @@ def build_lcms_71(compiler): r""" rem Build lcms2 setlocal +set LCMS=%%LCMS-2.8%% rd /S /Q %%LCMS%%\Lib rd /S /Q %%LCMS%%\Projects\VC%(vc_version)s\Release +powershell -Command "(gc Projects\VC2015\lcms2_static\lcms2_static.vcxproj) -replace 'MultiThreadedDLL', 'MultiThreaded' | Out-File -encoding ASCII Projects\VC2015\lcms2_static\lcms2_static.vcxproj" %%MSBUILD%% %%LCMS%%\Projects\VC%(vc_version)s\lcms2.sln /t:Clean /p:Configuration="Release" /p:Platform=%(platform)s /m %%MSBUILD%% %%LCMS%%\Projects\VC%(vc_version)s\lcms2.sln /t:lcms2_static /p:Configuration="Release" /p:Platform=%(platform)s /m xcopy /Y /E /Q %%LCMS%%\include %%INCLIB%% diff --git a/winbuild/config.py b/winbuild/config.py index 77be97769..a8fce3005 100644 --- a/winbuild/config.py +++ b/winbuild/config.py @@ -44,11 +44,16 @@ libs = { "filename": PILLOW_DEPENDS_DIR + "freetype-2.10.1.tar.gz", "dir": "freetype-2.10.1", }, - "lcms": { + "lcms-2.7": { "url": SF_MIRROR + "/project/lcms/lcms/2.7/lcms2-2.7.zip", "filename": PILLOW_DEPENDS_DIR + "lcms2-2.7.zip", "dir": "lcms2-2.7", }, + "lcms-2.8": { + "url": SF_MIRROR + "/project/lcms/lcms/2.8/lcms2-2.8.zip", + "filename": PILLOW_DEPENDS_DIR + "lcms2-2.8.zip", + "dir": "lcms2-2.8", + }, "ghostscript": { "url": "https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs927/ghostscript-9.27.tar.gz", # noqa: E501 "filename": PILLOW_DEPENDS_DIR + "ghostscript-9.27.tar.gz",