mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-25 01:16:16 +03:00
Merge pull request #4077 from nulano/winbuild-improve
AppVeyor build improvements
This commit is contained in:
commit
79a9981a63
|
@ -84,7 +84,8 @@ def vc_setup(compiler, bit):
|
||||||
arch = "x86" if bit == 32 else "x86_amd64"
|
arch = "x86" if bit == 32 else "x86_amd64"
|
||||||
script = (
|
script = (
|
||||||
r"""
|
r"""
|
||||||
call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %s"""
|
call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %s
|
||||||
|
echo on"""
|
||||||
% arch
|
% arch
|
||||||
)
|
)
|
||||||
return script
|
return script
|
||||||
|
|
|
@ -67,7 +67,6 @@ def extract_openjpeg(compiler):
|
||||||
r"""
|
r"""
|
||||||
rem build openjpeg
|
rem build openjpeg
|
||||||
setlocal
|
setlocal
|
||||||
@echo on
|
|
||||||
cd %%BUILD%%
|
cd %%BUILD%%
|
||||||
mkdir %%INCLIB%%\openjpeg-2.0
|
mkdir %%INCLIB%%\openjpeg-2.0
|
||||||
copy /Y /B openjpeg-2.0.0-win32-x86\include\openjpeg-2.0 %%INCLIB%%\openjpeg-2.0
|
copy /Y /B openjpeg-2.0.0-win32-x86\include\openjpeg-2.0 %%INCLIB%%\openjpeg-2.0
|
||||||
|
@ -114,6 +113,7 @@ def setup_compiler(compiler):
|
||||||
return (
|
return (
|
||||||
r"""setlocal EnableDelayedExpansion
|
r"""setlocal EnableDelayedExpansion
|
||||||
call "%%ProgramFiles%%\Microsoft SDKs\Windows\%(env_version)s\Bin\SetEnv.Cmd" /Release %(env_flags)s
|
call "%%ProgramFiles%%\Microsoft SDKs\Windows\%(env_version)s\Bin\SetEnv.Cmd" /Release %(env_flags)s
|
||||||
|
echo on
|
||||||
set INCLIB=%%INCLIB%%\%(inc_dir)s
|
set INCLIB=%%INCLIB%%\%(inc_dir)s
|
||||||
""" # noqa: E501
|
""" # noqa: E501
|
||||||
% compiler
|
% compiler
|
||||||
|
@ -139,12 +139,11 @@ setlocal
|
||||||
"""
|
"""
|
||||||
+ vc_setup(compiler, bit)
|
+ vc_setup(compiler, bit)
|
||||||
+ r"""
|
+ r"""
|
||||||
@echo on
|
|
||||||
cd /D %%OPENJPEG%%%(inc_dir)s
|
cd /D %%OPENJPEG%%%(inc_dir)s
|
||||||
|
|
||||||
%%CMAKE%% -DBUILD_THIRDPARTY:BOOL=OFF -DBUILD_SHARED_LIBS:BOOL=OFF -G "NMake Makefiles" .
|
%%CMAKE%% -DBUILD_THIRDPARTY:BOOL=OFF -DBUILD_SHARED_LIBS:BOOL=OFF -DCMAKE_BUILD_TYPE=Release -G "NMake Makefiles" .
|
||||||
nmake -f Makefile clean
|
nmake -nologo -f Makefile clean
|
||||||
nmake -f Makefile
|
nmake -nologo -f Makefile
|
||||||
copy /Y /B bin\* %%INCLIB%%
|
copy /Y /B bin\* %%INCLIB%%
|
||||||
mkdir %%INCLIB%%\openjpeg-%(op_ver)s
|
mkdir %%INCLIB%%\openjpeg-%(op_ver)s
|
||||||
copy /Y /B src\lib\openjp2\*.h %%INCLIB%%\openjpeg-%(op_ver)s
|
copy /Y /B src\lib\openjp2\*.h %%INCLIB%%\openjpeg-%(op_ver)s
|
||||||
|
@ -164,9 +163,9 @@ setlocal
|
||||||
+ vc_setup(compiler, bit)
|
+ vc_setup(compiler, bit)
|
||||||
+ r"""
|
+ r"""
|
||||||
cd /D %%JPEG%%
|
cd /D %%JPEG%%
|
||||||
nmake -f makefile.vc setup-vc6
|
nmake -nologo -f makefile.vc setup-vc6
|
||||||
nmake -f makefile.vc clean
|
nmake -nologo -f makefile.vc clean
|
||||||
nmake -f makefile.vc libjpeg.lib
|
nmake -nologo -f makefile.vc nodebug=1 libjpeg.lib
|
||||||
copy /Y /B *.dll %%INCLIB%%
|
copy /Y /B *.dll %%INCLIB%%
|
||||||
copy /Y /B *.lib %%INCLIB%%
|
copy /Y /B *.lib %%INCLIB%%
|
||||||
copy /Y /B j*.h %%INCLIB%%
|
copy /Y /B j*.h %%INCLIB%%
|
||||||
|
@ -175,8 +174,8 @@ endlocal
|
||||||
rem Build zlib
|
rem Build zlib
|
||||||
setlocal
|
setlocal
|
||||||
cd /D %%ZLIB%%
|
cd /D %%ZLIB%%
|
||||||
nmake -f win32\Makefile.msc clean
|
nmake -nologo -f win32\Makefile.msc clean
|
||||||
nmake -f win32\Makefile.msc zlib.lib
|
nmake -nologo -f win32\Makefile.msc zlib.lib
|
||||||
copy /Y /B *.dll %%INCLIB%%
|
copy /Y /B *.dll %%INCLIB%%
|
||||||
copy /Y /B *.lib %%INCLIB%%
|
copy /Y /B *.lib %%INCLIB%%
|
||||||
copy /Y /B zlib.lib %%INCLIB%%\z.lib
|
copy /Y /B zlib.lib %%INCLIB%%\z.lib
|
||||||
|
@ -191,7 +190,7 @@ setlocal
|
||||||
+ r"""
|
+ r"""
|
||||||
cd /D %%WEBP%%
|
cd /D %%WEBP%%
|
||||||
rd /S /Q %%WEBP%%\output\release-static
|
rd /S /Q %%WEBP%%\output\release-static
|
||||||
nmake -f Makefile.vc CFG=release-static RTLIBCFG=static OBJDIR=output all
|
nmake -nologo -f Makefile.vc CFG=release-static RTLIBCFG=static OBJDIR=output all
|
||||||
copy /Y /B output\release-static\%(webp_platform)s\lib\* %%INCLIB%%
|
copy /Y /B output\release-static\%(webp_platform)s\lib\* %%INCLIB%%
|
||||||
mkdir %%INCLIB%%\webp
|
mkdir %%INCLIB%%\webp
|
||||||
copy /Y /B src\webp\*.h %%INCLIB%%\\webp
|
copy /Y /B src\webp\*.h %%INCLIB%%\\webp
|
||||||
|
@ -206,8 +205,8 @@ rem do after building jpeg and zlib
|
||||||
copy %%~dp0\nmake.opt %%TIFF%%
|
copy %%~dp0\nmake.opt %%TIFF%%
|
||||||
|
|
||||||
cd /D %%TIFF%%
|
cd /D %%TIFF%%
|
||||||
nmake -f makefile.vc clean
|
nmake -nologo -f makefile.vc clean
|
||||||
nmake -f makefile.vc lib
|
nmake -nologo -f makefile.vc lib
|
||||||
copy /Y /B libtiff\*.dll %%INCLIB%%
|
copy /Y /B libtiff\*.dll %%INCLIB%%
|
||||||
copy /Y /B libtiff\*.lib %%INCLIB%%
|
copy /Y /B libtiff\*.lib %%INCLIB%%
|
||||||
copy /Y /B libtiff\tiff*.h %%INCLIB%%
|
copy /Y /B libtiff\tiff*.h %%INCLIB%%
|
||||||
|
@ -320,7 +319,7 @@ cd /D %%GHOSTSCRIPT%%
|
||||||
set WIN64=""
|
set WIN64=""
|
||||||
"""
|
"""
|
||||||
script += r"""
|
script += r"""
|
||||||
nmake -f psi/msvc.mak
|
nmake -nologo -f psi/msvc.mak
|
||||||
copy /Y /B bin\ C:\Python27\
|
copy /Y /B bin\ C:\Python27\
|
||||||
endlocal
|
endlocal
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in New Issue
Block a user