mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-28 02:46:18 +03:00
commit
f6e8cf729f
|
@ -52,7 +52,7 @@ install:
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
c:\python34\python.exe c:\pillow\winbuild\build_dep.py
|
c:\python37\python.exe c:\pillow\winbuild\build_dep.py
|
||||||
c:\pillow\winbuild\build_deps.cmd
|
c:\pillow\winbuild\build_deps.cmd
|
||||||
$host.SetShouldExit(0)
|
$host.SetShouldExit(0)
|
||||||
}
|
}
|
||||||
|
|
|
@ -109,6 +109,7 @@ set INCLUDE=%%INCLUDE%%;%%INCLIB%%\%(inc_dir)s;%%INCLIB%%\tcl%(tcl_ver)s\include
|
||||||
setlocal
|
setlocal
|
||||||
set LIB=%%LIB%%;C:\Python%(py_ver)s\tcl%(vc_setup)s
|
set LIB=%%LIB%%;C:\Python%(py_ver)s\tcl%(vc_setup)s
|
||||||
call %(python_path)s\%(executable)s setup.py %(imaging_libs)s %%BLDOPT%%
|
call %(python_path)s\%(executable)s setup.py %(imaging_libs)s %%BLDOPT%%
|
||||||
|
call %(python_path)s\%(executable)s -c "from PIL import _webp;import os, shutil;shutil.copy('%%INCLIB%%\\freetype.dll', os.path.dirname(_webp.__file__));"
|
||||||
endlocal
|
endlocal
|
||||||
|
|
||||||
endlocal
|
endlocal
|
||||||
|
|
|
@ -187,37 +187,30 @@ endlocal
|
||||||
return script % compiler
|
return script % compiler
|
||||||
|
|
||||||
|
|
||||||
def msbuild_freetype(compiler):
|
def msbuild_freetype(compiler, bit):
|
||||||
if compiler['env_version'] == 'v7.1':
|
script = r"""
|
||||||
return msbuild_freetype_71(compiler)
|
|
||||||
return msbuild_freetype_70(compiler)
|
|
||||||
|
|
||||||
|
|
||||||
def msbuild_freetype_71(compiler):
|
|
||||||
return r"""
|
|
||||||
rem Build freetype
|
rem Build freetype
|
||||||
setlocal
|
setlocal
|
||||||
rd /S /Q %%FREETYPE%%\objs
|
rd /S /Q %%FREETYPE%%\objs
|
||||||
%%MSBUILD%% %%FREETYPE%%\builds\windows\vc%(vc_version)s\freetype.sln /t:Clean;Build /p:Configuration="Release" /p:Platform=%(platform)s /m
|
set DefaultPlatformToolset=v100
|
||||||
|
"""
|
||||||
|
properties = r"""/p:Configuration="Release" /p:Platform=%(platform)s"""
|
||||||
|
if bit == 64:
|
||||||
|
script += r'copy /Y /B ' +\
|
||||||
|
r'"C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Lib\x64\*.Lib" ' +\
|
||||||
|
r'%%FREETYPE%%\builds\windows\vc2010'
|
||||||
|
properties += r" /p:_IsNativeEnvironment=false"
|
||||||
|
script += r"""
|
||||||
|
%%MSBUILD%% %%FREETYPE%%\builds\windows\vc2010\freetype.sln /t:Clean;Build """+properties+r""" /m
|
||||||
xcopy /Y /E /Q %%FREETYPE%%\include %%INCLIB%%
|
xcopy /Y /E /Q %%FREETYPE%%\include %%INCLIB%%
|
||||||
copy /Y /B %%FREETYPE%%\objs\vc%(vc_version)s\%(platform)s\*.lib %%INCLIB%%\freetype.lib
|
"""
|
||||||
|
freetypeReleaseDir = r"%%FREETYPE%%\objs\%(platform)s\Release"
|
||||||
|
script += r"""
|
||||||
|
copy /Y /B """+freetypeReleaseDir+r"""\freetype.lib %%INCLIB%%\freetype.lib
|
||||||
|
copy /Y /B """+freetypeReleaseDir+r"""\freetype.dll %%INCLIB%%\..\freetype.dll
|
||||||
endlocal
|
endlocal
|
||||||
""" % compiler # noqa: E501
|
"""
|
||||||
|
return script % compiler # noqa: E501
|
||||||
|
|
||||||
def msbuild_freetype_70(compiler):
|
|
||||||
return r"""
|
|
||||||
rem Build freetype
|
|
||||||
setlocal
|
|
||||||
py -3 %%~dp0\fixproj.py %%FREETYPE%%\builds\windows\vc%(vc_version)s\freetype.sln %(platform)s
|
|
||||||
py -3 %%~dp0\fixproj.py %%FREETYPE%%\builds\windows\vc%(vc_version)s\freetype.vcproj %(platform)s
|
|
||||||
rd /S /Q %%FREETYPE%%\objs
|
|
||||||
%%MSBUILD%% %%FREETYPE%%\builds\windows\vc%(vc_version)s\freetype.sln /t:Clean;Build /p:Configuration="LIB Release";Platform=%(platform)s /m
|
|
||||||
xcopy /Y /E /Q %%FREETYPE%%\include %%INCLIB%%
|
|
||||||
xcopy /Y /E /Q %%FREETYPE%%\objs\win32\vc%(vc_version)s %%INCLIB%%
|
|
||||||
copy /Y /B %%FREETYPE%%\objs\win32\vc%(vc_version)s\*.lib %%INCLIB%%\freetype.lib
|
|
||||||
endlocal
|
|
||||||
""" % compiler # noqa: E501
|
|
||||||
|
|
||||||
|
|
||||||
def build_lcms2(compiler):
|
def build_lcms2(compiler):
|
||||||
|
@ -238,9 +231,9 @@ setlocal
|
||||||
rd /S /Q %%LCMS%%\Lib
|
rd /S /Q %%LCMS%%\Lib
|
||||||
rd /S /Q %%LCMS%%\Projects\VC%(vc_version)s\Release
|
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
|
%%MSBUILD%% %%LCMS%%\Projects\VC%(vc_version)s\lcms2.sln /t:Clean /p:Configuration="Release" /p:Platform=Win32 /m
|
||||||
%%MSBUILD%% %%LCMS%%\Projects\VC%(vc_version)s\lcms2.sln /t:lcms2_static /p:Configuration="Release" /p:Platform=Win32 /m
|
%%MSBUILD%% %%LCMS%%\Projects\VC%(vc_version)s\lcms2.sln /t:lcms2_static /p:Configuration="Release" /p:Platform=Win32 /p:PlatformToolset=v90 /m
|
||||||
xcopy /Y /E /Q %%LCMS%%\include %%INCLIB%%
|
xcopy /Y /E /Q %%LCMS%%\include %%INCLIB%%
|
||||||
copy /Y /B %%LCMS%%\Projects\VC%(vc_version)s\Release\*.lib %%INCLIB%%
|
copy /Y /B %%LCMS%%\Lib\MS\*.lib %%INCLIB%%
|
||||||
endlocal
|
endlocal
|
||||||
""" % compiler # noqa: E501
|
""" % compiler # noqa: E501
|
||||||
|
|
||||||
|
@ -265,7 +258,7 @@ rem Build gs
|
||||||
setlocal
|
setlocal
|
||||||
""" + vc_setup(compiler, bit) + r"""
|
""" + vc_setup(compiler, bit) + r"""
|
||||||
set MSVC_VERSION=""" + {
|
set MSVC_VERSION=""" + {
|
||||||
"2008": "9",
|
"2010": "90",
|
||||||
"2015": "14"
|
"2015": "14"
|
||||||
}[compiler['vc_version']] + r"""
|
}[compiler['vc_version']] + r"""
|
||||||
set RCOMP="C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Bin\RC.Exe"
|
set RCOMP="C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Bin\RC.Exe"
|
||||||
|
@ -289,7 +282,7 @@ def add_compiler(compiler, bit):
|
||||||
|
|
||||||
# script.append(extract_openjpeg(compiler))
|
# script.append(extract_openjpeg(compiler))
|
||||||
|
|
||||||
script.append(msbuild_freetype(compiler))
|
script.append(msbuild_freetype(compiler, bit))
|
||||||
script.append(build_lcms2(compiler))
|
script.append(build_lcms2(compiler))
|
||||||
# script.append(nmake_openjpeg(compiler))
|
# script.append(nmake_openjpeg(compiler))
|
||||||
script.append(build_ghostscript(compiler, bit))
|
script.append(build_ghostscript(compiler, bit))
|
||||||
|
@ -308,7 +301,7 @@ if 'PYTHON' in os.environ:
|
||||||
else:
|
else:
|
||||||
# for compiler in all_compilers():
|
# for compiler in all_compilers():
|
||||||
# add_compiler(compiler)
|
# add_compiler(compiler)
|
||||||
add_compiler(compilers[7.0][2008][32], 32)
|
add_compiler(compilers[7.0][2010][32], 32)
|
||||||
|
|
||||||
with open('build_deps.cmd', 'w') as f:
|
with open('build_deps.cmd', 'w') as f:
|
||||||
f.write("\n".join(script))
|
f.write("\n".join(script))
|
||||||
|
|
|
@ -3,8 +3,8 @@ import os
|
||||||
SF_MIRROR = 'http://iweb.dl.sourceforge.net'
|
SF_MIRROR = 'http://iweb.dl.sourceforge.net'
|
||||||
PILLOW_DEPENDS_DIR = 'C:\\pillow-depends\\'
|
PILLOW_DEPENDS_DIR = 'C:\\pillow-depends\\'
|
||||||
|
|
||||||
pythons = {'27': {'compiler': 7, 'vc': 2008},
|
pythons = {'27': {'compiler': 7, 'vc': 2010},
|
||||||
'pypy2': {'compiler': 7, 'vc': 2008},
|
'pypy2': {'compiler': 7, 'vc': 2010},
|
||||||
'35': {'compiler': 7.1, 'vc': 2015},
|
'35': {'compiler': 7.1, 'vc': 2015},
|
||||||
'36': {'compiler': 7.1, 'vc': 2015},
|
'36': {'compiler': 7.1, 'vc': 2015},
|
||||||
'37': {'compiler': 7.1, 'vc': 2015}}
|
'37': {'compiler': 7.1, 'vc': 2015}}
|
||||||
|
@ -43,9 +43,9 @@ libs = {
|
||||||
'dir': 'lcms2-2.7',
|
'dir': 'lcms2-2.7',
|
||||||
},
|
},
|
||||||
'ghostscript': {
|
'ghostscript': {
|
||||||
'url': 'https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs926/ghostscript-9.26.tar.gz', # noqa: E501
|
'url': 'https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs927/ghostscript-9.27.tar.gz', # noqa: E501
|
||||||
'filename': PILLOW_DEPENDS_DIR + 'ghostscript-9.26.tar.gz',
|
'filename': PILLOW_DEPENDS_DIR + 'ghostscript-9.27.tar.gz',
|
||||||
'dir': 'ghostscript-9.26',
|
'dir': 'ghostscript-9.27',
|
||||||
},
|
},
|
||||||
'tcl-8.5': {
|
'tcl-8.5': {
|
||||||
'url': SF_MIRROR+'/project/tcl/Tcl/8.5.19/tcl8519-src.zip',
|
'url': SF_MIRROR+'/project/tcl/Tcl/8.5.19/tcl8519-src.zip',
|
||||||
|
@ -83,10 +83,10 @@ libs = {
|
||||||
|
|
||||||
compilers = {
|
compilers = {
|
||||||
7: {
|
7: {
|
||||||
2008: {
|
2010: {
|
||||||
64: {
|
64: {
|
||||||
'env_version': 'v7.0',
|
'env_version': 'v7.0',
|
||||||
'vc_version': '2008',
|
'vc_version': '2010',
|
||||||
'env_flags': '/x64 /xp',
|
'env_flags': '/x64 /xp',
|
||||||
'inc_dir': 'msvcr90-x64',
|
'inc_dir': 'msvcr90-x64',
|
||||||
'platform': 'x64',
|
'platform': 'x64',
|
||||||
|
@ -94,7 +94,7 @@ compilers = {
|
||||||
},
|
},
|
||||||
32: {
|
32: {
|
||||||
'env_version': 'v7.0',
|
'env_version': 'v7.0',
|
||||||
'vc_version': '2008',
|
'vc_version': '2010',
|
||||||
'env_flags': '/x86 /xp',
|
'env_flags': '/x86 /xp',
|
||||||
'inc_dir': 'msvcr90-x32',
|
'inc_dir': 'msvcr90-x32',
|
||||||
'platform': 'Win32',
|
'platform': 'Win32',
|
||||||
|
|
Loading…
Reference in New Issue
Block a user