From 5f143a73a3f07a90651a1318d1a9a2330c369fd1 Mon Sep 17 00:00:00 2001 From: wiredfool Date: Fri, 19 Jun 2015 15:32:08 -0700 Subject: [PATCH 1/2] lcms2 for everything but VC2008/64 --- winbuild/build_dep.py | 36 +++++++++++++++++++++++++++++------- 1 file changed, 29 insertions(+), 7 deletions(-) diff --git a/winbuild/build_dep.py b/winbuild/build_dep.py index 48927e4ea..adc27b073 100644 --- a/winbuild/build_dep.py +++ b/winbuild/build_dep.py @@ -237,15 +237,36 @@ endlocal """ %compiler def build_lcms2(compiler): + if compiler['env_version'] == 'v7.1': + return build_lcms_71(compiler) + return build_lcms_70(compiler) + +def build_lcms_70(compiler): + """Link error here on x64""" + if compiler['platform'] == 'x64': return '' + + """Build LCMS on VC2008. This version is only 32bit/Win32""" return r""" rem Build lcms2 setlocal rd /S /Q %%LCMS%%\Lib 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=%(platform)s /m -%%MSBUILD%% %%LCMS%%\Projects\VC%(vc_version)s\lcms2.sln /t:lcms2_static /p:Configuration="Release" /p:Platform=%(platform)s /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 xcopy /Y /E /Q %%LCMS%%\include %%INCLIB%% copy /Y /B %%LCMS%%\Projects\VC%(vc_version)s\Release\*.lib %%INCLIB%% +endlocal +""" % compiler + +def build_lcms_71(compiler): + return r""" +rem Build lcms2 +setlocal +rd /S /Q %%LCMS%%\Lib +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=%(platform)s /m +%%MSBUILD%% %%LCMS%%\Projects\VC%(vc_version)s\lcms2.sln /t:lcms2_static /p:Configuration="Release" /p:Platform=%(platform)s /m +xcopy /Y /E /Q %%LCMS%%\include %%INCLIB%% copy /Y /B %%LCMS%%\Lib\MS\*.lib %%INCLIB%% endlocal """ % compiler @@ -258,7 +279,7 @@ def add_compiler(compiler): #script.append(extract_openjpeg(compiler)) script.append(msbuild_freetype(compiler)) - #script.append(build_lcms2(compiler)) + script.append(build_lcms2(compiler)) #script.append(nmake_openjpeg(compiler)) script.append(end_compiler()) @@ -267,16 +288,17 @@ def add_compiler(compiler): mkdirs() fetch_libs() #extract_binlib() -script = [header()] #, cp_tk()] +script = [header(), cp_tk()] if 'PYTHON' in os.environ: add_compiler(compiler_fromEnv()) else: - for compiler in compilers.values(): - add_compiler(compiler) - #add_compiler(compilers[(7,32)]) + #for compiler in compilers.values(): + #add_compiler(compiler) + add_compiler(compilers[(7.1,32)]) + #add_compiler(compilers[(7.1,64)]) with open('build_deps.cmd', 'w') as f: f.write("\n".join(script)) From 4aa925d749f5377cbb42112e7153eaa333c5f183 Mon Sep 17 00:00:00 2001 From: wiredfool Date: Fri, 19 Jun 2015 16:27:42 -0700 Subject: [PATCH 2/2] tcl support --- winbuild/build.py | 7 ++++++- winbuild/build_dep.py | 7 ++++++- winbuild/config.py | 14 ++++++++++++-- 3 files changed, 24 insertions(+), 4 deletions(-) diff --git a/winbuild/build.py b/winbuild/build.py index 817d70467..eee4a4b07 100644 --- a/winbuild/build.py +++ b/winbuild/build.py @@ -67,12 +67,17 @@ def build_one(py_ver, compiler): else: args['python_path'] = "%s%s\\Scripts" % (VIRT_BASE, py_ver) args['py_ver'] = py_ver + if '34' in py_ver: + args['tcl_ver'] = '86' + else: + args['tcl_ver'] = '85' + return r""" setlocal EnableDelayedExpansion call "%%ProgramFiles%%\Microsoft SDKs\Windows\%(env_version)s\Bin\SetEnv.Cmd" /Release %(env_flags)s set DISTUTILS_USE_SDK=1 set LIB=%%LIB%%;%%INCLIB%%\%(inc_dir)s -set INCLUDE=%%INCLUDE%%;%%INCLIB%%\%(inc_dir)s;%%INCLIB%%\tcl85\include +set INCLUDE=%%INCLUDE%%;%%INCLIB%%\%(inc_dir)s;%%INCLIB%%\tcl%(tcl_ver)s\include setlocal set LIB=%%LIB%%;C:\Python%(py_ver)s\tcl diff --git a/winbuild/build_dep.py b/winbuild/build_dep.py index adc27b073..7a35066ce 100644 --- a/winbuild/build_dep.py +++ b/winbuild/build_dep.py @@ -95,6 +95,11 @@ mkdir %INCLIB%\tcl85\include\X11 copy /Y /B %BUILD%\tcl8.5.13\generic\*.h %INCLIB%\tcl85\include\ copy /Y /B %BUILD%\tk8.5.13\generic\*.h %INCLIB%\tcl85\include\ copy /Y /B %BUILD%\tk8.5.13\xlib\X11\* %INCLIB%\tcl85\include\X11\ + +mkdir %INCLIB%\tcl86\include\X11 +copy /Y /B %BUILD%\tcl8.6.4\generic\*.h %INCLIB%\tcl86\include\ +copy /Y /B %BUILD%\tk8.6.4\generic\*.h %INCLIB%\tcl86\include\ +copy /Y /B %BUILD%\tk8.6.4\xlib\X11\* %INCLIB%\tcl86\include\X11\ """ def header(): @@ -297,7 +302,7 @@ if 'PYTHON' in os.environ: else: #for compiler in compilers.values(): #add_compiler(compiler) - add_compiler(compilers[(7.1,32)]) + add_compiler(compilers[(7.0,32)]) #add_compiler(compilers[(7.1,64)]) with open('build_deps.cmd', 'w') as f: diff --git a/winbuild/config.py b/winbuild/config.py index 4cc68e49e..08d8920e9 100644 --- a/winbuild/config.py +++ b/winbuild/config.py @@ -36,15 +36,25 @@ libs = { 'zlib':{ 'hash': 'sha1:7ff1a5b721ca719760ba6eb4ec6f38d5e65381cf', 'dir': 'lcms2-2.7', }, - 'tcl':{ + 'tcl-8.5':{ 'url':SF_MIRROR+'/project/tcl/Tcl/8.5.13/tcl8513-src.zip', 'hash': 'sha1:3e01585c91293c532a3cd594ec59deca92153a5e', 'dir': '', }, - 'tk':{ + 'tk-8.5':{ 'url':SF_MIRROR+'/project/tcl/Tcl/8.5.13/tk8513-src.zip', 'hash': 'sha1:23a1d7ddd416e11e06dfdb9f86111d4bab9420b4', 'dir': '', + }, + 'tcl-8.6':{ + 'url':SF_MIRROR+'/project/tcl/Tcl/8.6.4/tcl864-src.zip', + 'hash': 'md5:35748d2fc61e08a2fdb23b85c6f8c4a0', + 'dir': '', + }, + 'tk-8.6':{ + 'url':SF_MIRROR+'/project/tcl/Tcl/8.6.4/tk864-src.zip', + 'hash': 'md5:111d45061a69e7f5250b6ec8ca7c4f35', + 'dir': '', }, 'webp':{ 'url':'http://downloads.webmproject.org/releases/webp/libwebp-0.4.3.tar.gz',