Merge pull request #4077 from nulano/winbuild-improve

AppVeyor build improvements
This commit is contained in:
Hugo van Kemenade 2019-09-22 20:16:32 +03:00 committed by GitHub
commit 79a9981a63
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 15 deletions

View File

@ -84,7 +84,8 @@ def vc_setup(compiler, bit):
arch = "x86" if bit == 32 else "x86_amd64"
script = (
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
)
return script

View File

@ -67,7 +67,6 @@ def extract_openjpeg(compiler):
r"""
rem build openjpeg
setlocal
@echo on
cd %%BUILD%%
mkdir %%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 (
r"""setlocal EnableDelayedExpansion
call "%%ProgramFiles%%\Microsoft SDKs\Windows\%(env_version)s\Bin\SetEnv.Cmd" /Release %(env_flags)s
echo on
set INCLIB=%%INCLIB%%\%(inc_dir)s
""" # noqa: E501
% compiler
@ -139,12 +139,11 @@ setlocal
"""
+ vc_setup(compiler, bit)
+ r"""
@echo on
cd /D %%OPENJPEG%%%(inc_dir)s
%%CMAKE%% -DBUILD_THIRDPARTY:BOOL=OFF -DBUILD_SHARED_LIBS:BOOL=OFF -G "NMake Makefiles" .
nmake -f Makefile clean
nmake -f Makefile
%%CMAKE%% -DBUILD_THIRDPARTY:BOOL=OFF -DBUILD_SHARED_LIBS:BOOL=OFF -DCMAKE_BUILD_TYPE=Release -G "NMake Makefiles" .
nmake -nologo -f Makefile clean
nmake -nologo -f Makefile
copy /Y /B bin\* %%INCLIB%%
mkdir %%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)
+ r"""
cd /D %%JPEG%%
nmake -f makefile.vc setup-vc6
nmake -f makefile.vc clean
nmake -f makefile.vc libjpeg.lib
nmake -nologo -f makefile.vc setup-vc6
nmake -nologo -f makefile.vc clean
nmake -nologo -f makefile.vc nodebug=1 libjpeg.lib
copy /Y /B *.dll %%INCLIB%%
copy /Y /B *.lib %%INCLIB%%
copy /Y /B j*.h %%INCLIB%%
@ -175,8 +174,8 @@ endlocal
rem Build zlib
setlocal
cd /D %%ZLIB%%
nmake -f win32\Makefile.msc clean
nmake -f win32\Makefile.msc zlib.lib
nmake -nologo -f win32\Makefile.msc clean
nmake -nologo -f win32\Makefile.msc zlib.lib
copy /Y /B *.dll %%INCLIB%%
copy /Y /B *.lib %%INCLIB%%
copy /Y /B zlib.lib %%INCLIB%%\z.lib
@ -191,7 +190,7 @@ setlocal
+ r"""
cd /D %%WEBP%%
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%%
mkdir %%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%%
cd /D %%TIFF%%
nmake -f makefile.vc clean
nmake -f makefile.vc lib
nmake -nologo -f makefile.vc clean
nmake -nologo -f makefile.vc lib
copy /Y /B libtiff\*.dll %%INCLIB%%
copy /Y /B libtiff\*.lib %%INCLIB%%
copy /Y /B libtiff\tiff*.h %%INCLIB%%
@ -320,7 +319,7 @@ cd /D %%GHOSTSCRIPT%%
set WIN64=""
"""
script += r"""
nmake -f psi/msvc.mak
nmake -nologo -f psi/msvc.mak
copy /Y /B bin\ C:\Python27\
endlocal
"""