diff --git a/winbuild/build_dep.py b/winbuild/build_dep.py index 5cd5cb14d..2264aef71 100644 --- a/winbuild/build_dep.py +++ b/winbuild/build_dep.py @@ -258,6 +258,29 @@ copy /Y /B %%LCMS%%\Lib\MS\*.lib %%INCLIB%% endlocal """ % compiler # noqa: E501 +def build_ghostscript(compiler, bit): + script = r""" +rem Build gs +setlocal +""" + vc_setup(compiler, bit) + r""" +set MSVC_VERSION=""" + { + "2008": "9", + "2010": "10", + "2015": "14" +}[compiler['vc_version']] + r""" +set RCOMP="C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Bin\RC.Exe" +cd /D %%GHOSTSCRIPT%% +""" + if bit == 64: + script += r""" +set WIN64="" +""" + script += r""" +nmake -f psi/msvc.mak +copy /Y /B bin\ C:\Python27\ +endlocal +""" + return script % compiler # noqa: E501 def add_compiler(compiler, bit): script.append(setup_compiler(compiler)) @@ -268,6 +291,7 @@ def add_compiler(compiler, bit): script.append(msbuild_freetype(compiler)) script.append(build_lcms2(compiler)) # script.append(nmake_openjpeg(compiler)) + script.append(build_ghostscript(compiler, bit)) script.append(end_compiler()) diff --git a/winbuild/config.py b/winbuild/config.py index 3ac78724c..380cb718f 100644 --- a/winbuild/config.py +++ b/winbuild/config.py @@ -43,6 +43,11 @@ libs = { 'filename': PILLOW_DEPENDS_DIR + 'lcms2-2.7.zip', 'dir': 'lcms2-2.7', }, + 'ghostscript': { + 'url': 'https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs926/ghostscript-9.26.tar.gz', # noqa: E501 + 'filename': PILLOW_DEPENDS_DIR + 'ghostscript-9.26.tar.gz', + 'dir': 'ghostscript-9.26', + }, 'tcl-8.5': { 'url': SF_MIRROR+'/project/tcl/Tcl/8.5.19/tcl8519-src.zip', 'filename': PILLOW_DEPENDS_DIR + 'tcl8519-src.zip',