Skip to content

Commit

Permalink
Merge pull request #4077 from nulano/winbuild-improve
Browse files Browse the repository at this point in the history
AppVeyor build improvements
  • Loading branch information
hugovk committed Sep 22, 2019
2 parents c984ace + 768a6cb commit 79a9981
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
3 changes: 2 additions & 1 deletion winbuild/build.py
Expand Up @@ -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
Expand Down
27 changes: 13 additions & 14 deletions winbuild/build_dep.py
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -139,12 +139,11 @@ def nmake_openjpeg(compiler, bit):
"""
+ 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
Expand All @@ -164,9 +163,9 @@ def nmake_libs(compiler, bit):
+ 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%%
Expand All @@ -175,8 +174,8 @@ def nmake_libs(compiler, bit):
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
Expand All @@ -191,7 +190,7 @@ def nmake_libs(compiler, bit):
+ 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
Expand All @@ -206,8 +205,8 @@ def nmake_libs(compiler, bit):
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%%
Expand Down Expand Up @@ -320,7 +319,7 @@ def build_ghostscript(compiler, bit):
set WIN64=""
"""
script += r"""
nmake -f psi/msvc.mak
nmake -nologo -f psi/msvc.mak
copy /Y /B bin\ C:\Python27\
endlocal
"""
Expand Down

0 comments on commit 79a9981

Please sign in to comment.