diff options
Diffstat (limited to 'PCbuild')
-rw-r--r-- | PCbuild/_tkinter.vcxproj | 32 | ||||
-rw-r--r-- | PCbuild/build_ssl.py | 253 | ||||
-rw-r--r-- | PCbuild/build_tkinter.py | 78 | ||||
-rw-r--r-- | PCbuild/debug.props | 4 | ||||
-rw-r--r-- | PCbuild/kill_python.c | 14 | ||||
-rw-r--r-- | PCbuild/pcbuild.sln | 54 | ||||
-rw-r--r-- | PCbuild/prepare_ssl.bat (renamed from PCbuild/build_ssl.bat) | 8 | ||||
-rw-r--r-- | PCbuild/prepare_ssl.py | 217 | ||||
-rw-r--r-- | PCbuild/pyproject.props | 36 | ||||
-rw-r--r-- | PCbuild/python.vcxproj | 162 | ||||
-rw-r--r-- | PCbuild/readme.txt | 76 | ||||
-rw-r--r-- | PCbuild/release.props | 4 | ||||
-rw-r--r-- | PCbuild/ssl.vcxproj | 82 | ||||
-rw-r--r-- | PCbuild/tcl.vcxproj | 175 | ||||
-rw-r--r-- | PCbuild/tcltk.props | 30 | ||||
-rw-r--r-- | PCbuild/tix.vcxproj | 171 | ||||
-rw-r--r-- | PCbuild/tk.vcxproj | 178 | ||||
-rw-r--r-- | PCbuild/x64.props | 8 |
18 files changed, 1128 insertions, 454 deletions
diff --git a/PCbuild/_tkinter.vcxproj b/PCbuild/_tkinter.vcxproj index 67f72fe..9218d63 100644 --- a/PCbuild/_tkinter.vcxproj +++ b/PCbuild/_tkinter.vcxproj @@ -85,41 +85,49 @@ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="pyd.props" /> <Import Project="pgupdate.props" /> + <Import Project="tcltk.props" /> </ImportGroup> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" Label="PropertySheets"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="pyd.props" /> <Import Project="pginstrument.props" /> + <Import Project="tcltk.props" /> </ImportGroup> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="pyd.props" /> + <Import Project="tcltk.props" /> </ImportGroup> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="pyd_d.props" /> + <Import Project="tcltk.props" /> </ImportGroup> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" Label="PropertySheets"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="pyd.props" /> <Import Project="x64.props" /> <Import Project="pgupdate.props" /> + <Import Project="tcltk.props" /> </ImportGroup> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" Label="PropertySheets"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="pyd.props" /> <Import Project="x64.props" /> <Import Project="pginstrument.props" /> + <Import Project="tcltk.props" /> </ImportGroup> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="pyd.props" /> <Import Project="x64.props" /> + <Import Project="tcltk.props" /> </ImportGroup> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="pyd_d.props" /> <Import Project="x64.props" /> + <Import Project="tcltk.props" /> </ImportGroup> <PropertyGroup Label="UserMacros" /> <PropertyGroup> @@ -155,7 +163,7 @@ <PreprocessorDefinitions>WITH_APPINIT;%(PreprocessorDefinitions)</PreprocessorDefinitions> </ClCompile> <Link> - <AdditionalDependencies>$(tcltkLibDebug);%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>$(tcltkLib);%(AdditionalDependencies)</AdditionalDependencies> </Link> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> @@ -163,11 +171,11 @@ <TargetEnvironment>X64</TargetEnvironment> </Midl> <ClCompile> - <AdditionalIncludeDirectories>$(tcltk64Dir)\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>$(tcltkDir)\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions>WITH_APPINIT;%(PreprocessorDefinitions)</PreprocessorDefinitions> </ClCompile> <Link> - <AdditionalDependencies>$(tcltk64LibDebug);%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>$(tcltkLib);%(AdditionalDependencies)</AdditionalDependencies> </Link> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> @@ -184,11 +192,11 @@ <TargetEnvironment>X64</TargetEnvironment> </Midl> <ClCompile> - <AdditionalIncludeDirectories>$(tcltk64Dir)\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>$(tcltkDir)\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions>WITH_APPINIT;%(PreprocessorDefinitions)</PreprocessorDefinitions> </ClCompile> <Link> - <AdditionalDependencies>$(tcltk64Lib);%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>$(tcltkLib);%(AdditionalDependencies)</AdditionalDependencies> </Link> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'"> @@ -205,11 +213,11 @@ <TargetEnvironment>X64</TargetEnvironment> </Midl> <ClCompile> - <AdditionalIncludeDirectories>$(tcltk64Dir)\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>$(tcltkDir)\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions>WITH_APPINIT;%(PreprocessorDefinitions)</PreprocessorDefinitions> </ClCompile> <Link> - <AdditionalDependencies>$(tcltk64Lib);%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>$(tcltkLib);%(AdditionalDependencies)</AdditionalDependencies> <TargetMachine>MachineX64</TargetMachine> </Link> </ItemDefinitionGroup> @@ -227,11 +235,11 @@ <TargetEnvironment>X64</TargetEnvironment> </Midl> <ClCompile> - <AdditionalIncludeDirectories>$(tcltk64Dir)\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>$(tcltkDir)\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions>WITH_APPINIT;%(PreprocessorDefinitions)</PreprocessorDefinitions> </ClCompile> <Link> - <AdditionalDependencies>$(tcltk64Lib);%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>$(tcltkLib);%(AdditionalDependencies)</AdditionalDependencies> <TargetMachine>MachineX64</TargetMachine> </Link> </ItemDefinitionGroup> @@ -244,6 +252,12 @@ <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project> <ReferenceOutputAssembly>false</ReferenceOutputAssembly> </ProjectReference> + <ProjectReference Include="tcl.vcxproj"> + <Project>{b5fd6f1d-129e-4bff-9340-03606fac7283}</Project> + </ProjectReference> + <ProjectReference Include="tk.vcxproj"> + <Project>{7e85eccf-a72c-4da4-9e52-884508e80ba1}</Project> + </ProjectReference> </ItemGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <ImportGroup Label="ExtensionTargets"> diff --git a/PCbuild/build_ssl.py b/PCbuild/build_ssl.py deleted file mode 100644 index 260cbf3..0000000 --- a/PCbuild/build_ssl.py +++ /dev/null @@ -1,253 +0,0 @@ -# Script for building the _ssl and _hashlib modules for Windows. -# Uses Perl to setup the OpenSSL environment correctly -# and build OpenSSL, then invokes a simple nmake session -# for the actual _ssl.pyd and _hashlib.pyd DLLs. - -# THEORETICALLY, you can: -# * Unpack the latest SSL release one level above your main Python source -# directory. It is likely you will already find the zlib library and -# any other external packages there. -# * Install ActivePerl and ensure it is somewhere on your path. -# * Run this script from the PCBuild directory. -# -# it should configure and build SSL, then build the _ssl and _hashlib -# Python extensions without intervention. - -# Modified by Christian Heimes -# Now this script supports pre-generated makefiles and assembly files. -# Developers don't need an installation of Perl anymore to build Python. A svn -# checkout from our svn repository is enough. -# -# In Order to create the files in the case of an update you still need Perl. -# Run build_ssl in this order: -# python.exe build_ssl.py Release x64 -# python.exe build_ssl.py Release Win32 - -import os, sys, re, shutil -import subprocess - -# Find all "foo.exe" files on the PATH. -def find_all_on_path(filename, extras = None): - entries = os.environ["PATH"].split(os.pathsep) - ret = [] - for p in entries: - fname = os.path.abspath(os.path.join(p, filename)) - if os.path.isfile(fname) and fname not in ret: - ret.append(fname) - if extras: - for p in extras: - fname = os.path.abspath(os.path.join(p, filename)) - if os.path.isfile(fname) and fname not in ret: - ret.append(fname) - return ret - -# Find a suitable Perl installation for OpenSSL. -# cygwin perl does *not* work. ActivePerl does. -# Being a Perl dummy, the simplest way I can check is if the "Win32" package -# is available. -def find_working_perl(perls): - for perl in perls: - try: - subprocess.check_output([perl, "-e", "use Win32;"]) - except subprocess.CalledProcessError: - continue - else: - return perl - - if perls: - print("The following perl interpreters were found:") - for p in perls: - print(" ", p) - print(" None of these versions appear suitable for building OpenSSL") - else: - print("NO perl interpreters were found on this machine at all!") - print(" Please install ActivePerl and ensure it appears on your path") - -# Fetch SSL directory from VC properties -def get_ssl_dir(): - propfile = (os.path.join(os.path.dirname(__file__), 'pyproject.props')) - with open(propfile, encoding='utf-8-sig') as f: - m = re.search('openssl-([^<]+)<', f.read()) - return "..\..\openssl-"+m.group(1) - - -def create_makefile64(makefile, m32): - """Create and fix makefile for 64bit - - Replace 32 with 64bit directories - """ - if not os.path.isfile(m32): - return - with open(m32) as fin: - with open(makefile, 'w') as fout: - for line in fin: - line = line.replace("=tmp32", "=tmp64") - line = line.replace("=out32", "=out64") - line = line.replace("=inc32", "=inc64") - # force 64 bit machine - line = line.replace("MKLIB=lib", "MKLIB=lib /MACHINE:X64") - line = line.replace("LFLAGS=", "LFLAGS=/MACHINE:X64 ") - # don't link against the lib on 64bit systems - line = line.replace("bufferoverflowu.lib", "") - fout.write(line) - os.unlink(m32) - -def fix_makefile(makefile): - """Fix some stuff in all makefiles - """ - if not os.path.isfile(makefile): - return - with open(makefile) as fin: - lines = fin.readlines() - with open(makefile, 'w') as fout: - for line in lines: - if line.startswith("PERL="): - continue - if line.startswith("CP="): - line = "CP=copy\n" - if line.startswith("MKDIR="): - line = "MKDIR=mkdir\n" - if line.startswith("CFLAG="): - line = line.strip() - for algo in ("RC5", "MDC2", "IDEA"): - noalgo = " -DOPENSSL_NO_%s" % algo - if noalgo not in line: - line = line + noalgo - line = line + '\n' - fout.write(line) - -def run_configure(configure, do_script): - print("perl Configure "+configure+" no-idea no-mdc2") - os.system("perl Configure "+configure+" no-idea no-mdc2") - print(do_script) - os.system(do_script) - -def cmp(f1, f2): - bufsize = 1024 * 8 - with open(f1, 'rb') as fp1, open(f2, 'rb') as fp2: - while True: - b1 = fp1.read(bufsize) - b2 = fp2.read(bufsize) - if b1 != b2: - return False - if not b1: - return True - -def copy(src, dst): - if os.path.isfile(dst) and cmp(src, dst): - return - shutil.copy(src, dst) - -def main(): - build_all = "-a" in sys.argv - if sys.argv[1] == "Release": - debug = False - elif sys.argv[1] == "Debug": - debug = True - else: - raise ValueError(str(sys.argv)) - - if sys.argv[2] == "Win32": - arch = "x86" - configure = "VC-WIN32" - do_script = "ms\\do_nasm" - makefile="ms\\nt.mak" - m32 = makefile - dirsuffix = "32" - elif sys.argv[2] == "x64": - arch="amd64" - configure = "VC-WIN64A" - do_script = "ms\\do_win64a" - makefile = "ms\\nt64.mak" - m32 = makefile.replace('64', '') - dirsuffix = "64" - #os.environ["VSEXTCOMP_USECL"] = "MS_OPTERON" - else: - raise ValueError(str(sys.argv)) - - make_flags = "" - if build_all: - make_flags = "-a" - # perl should be on the path, but we also look in "\perl" and "c:\\perl" - # as "well known" locations - perls = find_all_on_path("perl.exe", ["\\perl\\bin", "C:\\perl\\bin"]) - perl = find_working_perl(perls) - if perl: - print("Found a working perl at '%s'" % (perl,)) - else: - print("No Perl installation was found. Existing Makefiles are used.") - sys.stdout.flush() - # Look for SSL 2 levels up from pcbuild - ie, same place zlib etc all live. - ssl_dir = get_ssl_dir() - if ssl_dir is None: - sys.exit(1) - - old_cd = os.getcwd() - try: - os.chdir(ssl_dir) - # rebuild makefile when we do the role over from 32 to 64 build - if arch == "amd64" and os.path.isfile(m32) and not os.path.isfile(makefile): - os.unlink(m32) - - # If the ssl makefiles do not exist, we invoke Perl to generate them. - # Due to a bug in this script, the makefile sometimes ended up empty - # Force a regeneration if it is. - if not os.path.isfile(makefile) or os.path.getsize(makefile)==0: - if perl is None: - print("Perl is required to build the makefiles!") - sys.exit(1) - - print("Creating the makefiles...") - sys.stdout.flush() - # Put our working Perl at the front of our path - os.environ["PATH"] = os.path.dirname(perl) + \ - os.pathsep + \ - os.environ["PATH"] - run_configure(configure, do_script) - if debug: - print("OpenSSL debug builds aren't supported.") - #if arch=="x86" and debug: - # # the do_masm script in openssl doesn't generate a debug - # # build makefile so we generate it here: - # os.system("perl util\mk1mf.pl debug "+configure+" >"+makefile) - - if arch == "amd64": - create_makefile64(makefile, m32) - fix_makefile(makefile) - copy(r"crypto\buildinf.h", r"crypto\buildinf_%s.h" % arch) - copy(r"crypto\opensslconf.h", r"crypto\opensslconf_%s.h" % arch) - - # If the assembler files don't exist in tmpXX, copy them there - if perl is None and os.path.exists("asm"+dirsuffix): - if not os.path.exists("tmp"+dirsuffix): - os.mkdir("tmp"+dirsuffix) - for f in os.listdir("asm"+dirsuffix): - if not f.endswith(".asm"): continue - if os.path.isfile(r"tmp%s\%s" % (dirsuffix, f)): continue - shutil.copy(r"asm%s\%s" % (dirsuffix, f), "tmp"+dirsuffix) - - # Now run make. - if arch == "amd64": - rc = os.system("nasm -f win64 -DNEAR -Ox -g ms\\uptable.asm") - if rc: - print("nasm assembler has failed.") - sys.exit(rc) - - copy(r"crypto\buildinf_%s.h" % arch, r"crypto\buildinf.h") - copy(r"crypto\opensslconf_%s.h" % arch, r"crypto\opensslconf.h") - - #makeCommand = "nmake /nologo PERL=\"%s\" -f \"%s\"" %(perl, makefile) - makeCommand = "nmake /nologo -f \"%s\"" % makefile - print("Executing ssl makefiles:", makeCommand) - sys.stdout.flush() - rc = os.system(makeCommand) - if rc: - print("Executing "+makefile+" failed") - print(rc) - sys.exit(rc) - finally: - os.chdir(old_cd) - sys.exit(rc) - -if __name__=='__main__': - main() diff --git a/PCbuild/build_tkinter.py b/PCbuild/build_tkinter.py deleted file mode 100644 index c807e7b..0000000 --- a/PCbuild/build_tkinter.py +++ /dev/null @@ -1,78 +0,0 @@ -"""Script to compile the dependencies of _tkinter - -Copyright (c) 2007 by Christian Heimes <christian@cheimes.de> - -Licensed to PSF under a Contributor Agreement. -""" - -import os -import sys - -here = os.path.abspath(os.path.dirname(__file__)) -par = os.path.pardir - -TCL = "tcl8.6.1" -TK = "tk8.6.1" -TIX = "tix-8.4.3.3" - -ROOT = os.path.abspath(os.path.join(here, par, par)) -NMAKE = ('nmake /nologo /f %s %s %s') - -def nmake(makefile, command="", **kw): - defines = ' '.join(k+'='+str(v) for k, v in kw.items()) - cmd = NMAKE % (makefile, defines, command) - print("\n\n"+cmd+"\n") - if os.system(cmd) != 0: - raise RuntimeError(cmd) - -def build(platform, clean): - if platform == "Win32": - dest = os.path.join(ROOT, "tcltk") - machine = "IX86" - elif platform == "AMD64": - dest = os.path.join(ROOT, "tcltk64") - machine = "AMD64" - else: - raise ValueError(platform) - - # TCL - tcldir = os.path.join(ROOT, TCL) - if 1: - os.chdir(os.path.join(tcldir, "win")) - if clean: - nmake("makefile.vc", "clean") - nmake("makefile.vc", MACHINE=machine) - nmake("makefile.vc", "install", INSTALLDIR=dest, MACHINE=machine) - - # TK - if 1: - os.chdir(os.path.join(ROOT, TK, "win")) - if clean: - nmake("makefile.vc", "clean", DEBUG=0, TCLDIR=tcldir) - nmake("makefile.vc", DEBUG=0, MACHINE=machine, TCLDIR=tcldir) - nmake("makefile.vc", "install", DEBUG=0, INSTALLDIR=dest, MACHINE=machine, TCLDIR=tcldir) - - # TIX - if 1: - # python9.mak is available at http://svn.python.org - os.chdir(os.path.join(ROOT, TIX, "win")) - if clean: - nmake("python.mak", "clean") - nmake("python.mak", MACHINE=machine, INSTALL_DIR=dest) - nmake("python.mak", "install", MACHINE=machine, INSTALL_DIR=dest) - -def main(): - if len(sys.argv) < 2 or sys.argv[1] not in ("Win32", "AMD64"): - print("%s Win32|AMD64" % sys.argv[0]) - sys.exit(1) - - if "-c" in sys.argv: - clean = True - else: - clean = False - - build(sys.argv[1], clean) - - -if __name__ == '__main__': - main() diff --git a/PCbuild/debug.props b/PCbuild/debug.props index 9b7a65a..54f3c32 100644 --- a/PCbuild/debug.props +++ b/PCbuild/debug.props @@ -3,6 +3,7 @@ <PropertyGroup Label="UserMacros"> <PyDebugExt>_d</PyDebugExt> <KillPythonExe>$(OutDir)kill_python_d.exe</KillPythonExe> + <TclDebugExt>g</TclDebugExt> </PropertyGroup> <PropertyGroup> <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion> @@ -23,5 +24,8 @@ <BuildMacro Include="KillPythonExe"> <Value>$(KillPythonExe)</Value> </BuildMacro> + <BuildMacro Include="TclDebugExt"> + <Value>$(TclDebugExt)</Value> + </BuildMacro> </ItemGroup> </Project>
\ No newline at end of file diff --git a/PCbuild/kill_python.c b/PCbuild/kill_python.c index 604731f..dbc9425 100644 --- a/PCbuild/kill_python.c +++ b/PCbuild/kill_python.c @@ -62,7 +62,7 @@ main(int argc, char **argv) continue; len = wcsnlen_s(me.szExePath, MAX_PATH) - KILL_PYTHON_EXE_LEN; - wcsncpy_s(path, MAX_PATH+1, me.szExePath, len); + wcsncpy_s(path, MAX_PATH+1, me.szExePath, len); break; @@ -80,8 +80,8 @@ main(int argc, char **argv) * looking for python processes. When we find one, verify it lives * in the same directory we live in. If it does, kill it. If we're * unable to kill it, treat this as a fatal error and return 1. - * - * The rationale behind this is that we're called at the start of the + * + * The rationale behind this is that we're called at the start of the * build process on the basis that we'll take care of killing any * running instances, such that the build won't encounter permission * denied errors during linking. If we can't kill one of the processes, @@ -104,11 +104,11 @@ main(int argc, char **argv) do { /* - * XXX TODO: if we really wanted to be fancy, we could check the + * XXX TODO: if we really wanted to be fancy, we could check the * modules for all processes (not just the python[_d].exe ones) - * and see if any of our DLLs are loaded (i.e. python34[_d].dll), + * and see if any of our DLLs are loaded (i.e. python35[_d].dll), * as that would also inhibit our ability to rebuild the solution. - * Not worth loosing sleep over though; for now, a simple check + * Not worth loosing sleep over though; for now, a simple check * for just the python executable should be sufficient. */ @@ -119,7 +119,7 @@ main(int argc, char **argv) /* It's a python process, so figure out which directory it's in... */ hsm = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, pe.th32ProcessID); if (hsm == INVALID_HANDLE_VALUE) - /* + /* * If our module snapshot fails (which will happen if we don't own * the process), just ignore it and continue. (It seems different * versions of Windows return different values for GetLastError() diff --git a/PCbuild/pcbuild.sln b/PCbuild/pcbuild.sln index a346e10..2c3127b 100644 --- a/PCbuild/pcbuild.sln +++ b/PCbuild/pcbuild.sln @@ -78,6 +78,12 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_overlapped", "_overlapped. EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_testembed", "_testembed.vcxproj", "{6DAC66D9-E703-4624-BE03-49112AB5AA62}"
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tcl", "tcl.vcxproj", "{B5FD6F1D-129E-4BFF-9340-03606FAC7283}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tk", "tk.vcxproj", "{7E85ECCF-A72C-4DA4-9E52-884508E80BA1}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tix", "tix.vcxproj", "{C5A3E7FB-9695-4B2E-960B-1D9F43F1E555}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
@@ -645,6 +651,54 @@ Global {6DAC66D9-E703-4624-BE03-49112AB5AA62}.Release|Win32.Build.0 = Release|Win32
{6DAC66D9-E703-4624-BE03-49112AB5AA62}.Release|x64.ActiveCfg = Release|x64
{6DAC66D9-E703-4624-BE03-49112AB5AA62}.Release|x64.Build.0 = Release|x64
+ {B5FD6F1D-129E-4BFF-9340-03606FAC7283}.Debug|Win32.ActiveCfg = Debug|Win32
+ {B5FD6F1D-129E-4BFF-9340-03606FAC7283}.Debug|Win32.Build.0 = Debug|Win32
+ {B5FD6F1D-129E-4BFF-9340-03606FAC7283}.Debug|x64.ActiveCfg = Debug|x64
+ {B5FD6F1D-129E-4BFF-9340-03606FAC7283}.Debug|x64.Build.0 = Debug|x64
+ {B5FD6F1D-129E-4BFF-9340-03606FAC7283}.PGInstrument|Win32.ActiveCfg = Release|Win32
+ {B5FD6F1D-129E-4BFF-9340-03606FAC7283}.PGInstrument|Win32.Build.0 = Release|Win32
+ {B5FD6F1D-129E-4BFF-9340-03606FAC7283}.PGInstrument|x64.ActiveCfg = PGInstrument|x64
+ {B5FD6F1D-129E-4BFF-9340-03606FAC7283}.PGInstrument|x64.Build.0 = PGInstrument|x64
+ {B5FD6F1D-129E-4BFF-9340-03606FAC7283}.PGUpdate|Win32.ActiveCfg = Release|Win32
+ {B5FD6F1D-129E-4BFF-9340-03606FAC7283}.PGUpdate|Win32.Build.0 = Release|Win32
+ {B5FD6F1D-129E-4BFF-9340-03606FAC7283}.PGUpdate|x64.ActiveCfg = PGUpdate|x64
+ {B5FD6F1D-129E-4BFF-9340-03606FAC7283}.PGUpdate|x64.Build.0 = PGUpdate|x64
+ {B5FD6F1D-129E-4BFF-9340-03606FAC7283}.Release|Win32.ActiveCfg = Release|Win32
+ {B5FD6F1D-129E-4BFF-9340-03606FAC7283}.Release|Win32.Build.0 = Release|Win32
+ {B5FD6F1D-129E-4BFF-9340-03606FAC7283}.Release|x64.ActiveCfg = Release|x64
+ {B5FD6F1D-129E-4BFF-9340-03606FAC7283}.Release|x64.Build.0 = Release|x64
+ {7E85ECCF-A72C-4DA4-9E52-884508E80BA1}.Debug|Win32.ActiveCfg = Debug|Win32
+ {7E85ECCF-A72C-4DA4-9E52-884508E80BA1}.Debug|Win32.Build.0 = Debug|Win32
+ {7E85ECCF-A72C-4DA4-9E52-884508E80BA1}.Debug|x64.ActiveCfg = Debug|x64
+ {7E85ECCF-A72C-4DA4-9E52-884508E80BA1}.Debug|x64.Build.0 = Debug|x64
+ {7E85ECCF-A72C-4DA4-9E52-884508E80BA1}.PGInstrument|Win32.ActiveCfg = Release|Win32
+ {7E85ECCF-A72C-4DA4-9E52-884508E80BA1}.PGInstrument|Win32.Build.0 = Release|Win32
+ {7E85ECCF-A72C-4DA4-9E52-884508E80BA1}.PGInstrument|x64.ActiveCfg = PGInstrument|x64
+ {7E85ECCF-A72C-4DA4-9E52-884508E80BA1}.PGInstrument|x64.Build.0 = PGInstrument|x64
+ {7E85ECCF-A72C-4DA4-9E52-884508E80BA1}.PGUpdate|Win32.ActiveCfg = Release|Win32
+ {7E85ECCF-A72C-4DA4-9E52-884508E80BA1}.PGUpdate|Win32.Build.0 = Release|Win32
+ {7E85ECCF-A72C-4DA4-9E52-884508E80BA1}.PGUpdate|x64.ActiveCfg = PGUpdate|x64
+ {7E85ECCF-A72C-4DA4-9E52-884508E80BA1}.PGUpdate|x64.Build.0 = PGUpdate|x64
+ {7E85ECCF-A72C-4DA4-9E52-884508E80BA1}.Release|Win32.ActiveCfg = Release|Win32
+ {7E85ECCF-A72C-4DA4-9E52-884508E80BA1}.Release|Win32.Build.0 = Release|Win32
+ {7E85ECCF-A72C-4DA4-9E52-884508E80BA1}.Release|x64.ActiveCfg = Release|x64
+ {7E85ECCF-A72C-4DA4-9E52-884508E80BA1}.Release|x64.Build.0 = Release|x64
+ {C5A3E7FB-9695-4B2E-960B-1D9F43F1E555}.Debug|Win32.ActiveCfg = Debug|Win32
+ {C5A3E7FB-9695-4B2E-960B-1D9F43F1E555}.Debug|Win32.Build.0 = Debug|Win32
+ {C5A3E7FB-9695-4B2E-960B-1D9F43F1E555}.Debug|x64.ActiveCfg = Debug|x64
+ {C5A3E7FB-9695-4B2E-960B-1D9F43F1E555}.Debug|x64.Build.0 = Debug|x64
+ {C5A3E7FB-9695-4B2E-960B-1D9F43F1E555}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32
+ {C5A3E7FB-9695-4B2E-960B-1D9F43F1E555}.PGInstrument|Win32.Build.0 = PGInstrument|Win32
+ {C5A3E7FB-9695-4B2E-960B-1D9F43F1E555}.PGInstrument|x64.ActiveCfg = PGInstrument|x64
+ {C5A3E7FB-9695-4B2E-960B-1D9F43F1E555}.PGInstrument|x64.Build.0 = PGInstrument|x64
+ {C5A3E7FB-9695-4B2E-960B-1D9F43F1E555}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32
+ {C5A3E7FB-9695-4B2E-960B-1D9F43F1E555}.PGUpdate|Win32.Build.0 = PGUpdate|Win32
+ {C5A3E7FB-9695-4B2E-960B-1D9F43F1E555}.PGUpdate|x64.ActiveCfg = PGUpdate|x64
+ {C5A3E7FB-9695-4B2E-960B-1D9F43F1E555}.PGUpdate|x64.Build.0 = PGUpdate|x64
+ {C5A3E7FB-9695-4B2E-960B-1D9F43F1E555}.Release|Win32.ActiveCfg = Release|Win32
+ {C5A3E7FB-9695-4B2E-960B-1D9F43F1E555}.Release|Win32.Build.0 = Release|Win32
+ {C5A3E7FB-9695-4B2E-960B-1D9F43F1E555}.Release|x64.ActiveCfg = Release|x64
+ {C5A3E7FB-9695-4B2E-960B-1D9F43F1E555}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/PCbuild/build_ssl.bat b/PCbuild/prepare_ssl.bat index 805d77a..cb06500 100644 --- a/PCbuild/build_ssl.bat +++ b/PCbuild/prepare_ssl.bat @@ -1,12 +1,12 @@ @echo off if not defined HOST_PYTHON ( if %1 EQU Debug ( + shift set HOST_PYTHON=python_d.exe - if not exist python34_d.dll exit 1 + if not exist python35_d.dll exit 1 ) ELSE ( set HOST_PYTHON=python.exe - if not exist python34.dll exit 1 + if not exist python35.dll exit 1 ) ) -%HOST_PYTHON% build_ssl.py %1 %2 %3 - +%HOST_PYTHON% prepare_ssl.py %1 diff --git a/PCbuild/prepare_ssl.py b/PCbuild/prepare_ssl.py new file mode 100644 index 0000000..f9f8c12 --- /dev/null +++ b/PCbuild/prepare_ssl.py @@ -0,0 +1,217 @@ +# Script for preparing OpenSSL for building on Windows. +# Uses Perl to create nmake makefiles and otherwise prepare the way +# for building on 32 or 64 bit platforms. + +# Script originally authored by Mark Hammond. +# Major revisions by: +# Martin v. Löwis +# Christian Heimes +# Zachary Ware + +# THEORETICALLY, you can: +# * Unpack the latest OpenSSL release where $(opensslDir) in +# PCbuild\pyproject.props expects it to be. +# * Install ActivePerl and ensure it is somewhere on your path. +# * Run this script with the OpenSSL source dir as the only argument. +# +# it should configure OpenSSL such that it is ready to be built by +# ssl.vcxproj on 32 or 64 bit platforms. + +import os +import re +import sys +import shutil +import subprocess + +# Find all "foo.exe" files on the PATH. +def find_all_on_path(filename, extras = None): + entries = os.environ["PATH"].split(os.pathsep) + ret = [] + for p in entries: + fname = os.path.abspath(os.path.join(p, filename)) + if os.path.isfile(fname) and fname not in ret: + ret.append(fname) + if extras: + for p in extras: + fname = os.path.abspath(os.path.join(p, filename)) + if os.path.isfile(fname) and fname not in ret: + ret.append(fname) + return ret + +# Find a suitable Perl installation for OpenSSL. +# cygwin perl does *not* work. ActivePerl does. +# Being a Perl dummy, the simplest way I can check is if the "Win32" package +# is available. +def find_working_perl(perls): + for perl in perls: + try: + subprocess.check_output([perl, "-e", "use Win32;"]) + except subprocess.CalledProcessError: + continue + else: + return perl + + if perls: + print("The following perl interpreters were found:") + for p in perls: + print(" ", p) + print(" None of these versions appear suitable for building OpenSSL") + else: + print("NO perl interpreters were found on this machine at all!") + print(" Please install ActivePerl and ensure it appears on your path") + +def create_makefile64(makefile, m32): + """Create and fix makefile for 64bit + + Replace 32 with 64bit directories + """ + if not os.path.isfile(m32): + return + with open(m32) as fin: + with open(makefile, 'w') as fout: + for line in fin: + line = line.replace("=tmp32", "=tmp64") + line = line.replace("=out32", "=out64") + line = line.replace("=inc32", "=inc64") + # force 64 bit machine + line = line.replace("MKLIB=lib", "MKLIB=lib /MACHINE:X64") + line = line.replace("LFLAGS=", "LFLAGS=/MACHINE:X64 ") + # don't link against the lib on 64bit systems + line = line.replace("bufferoverflowu.lib", "") + fout.write(line) + os.unlink(m32) + +def fix_makefile(makefile): + """Fix some stuff in all makefiles + """ + if not os.path.isfile(makefile): + return + with open(makefile) as fin: + lines = fin.readlines() + with open(makefile, 'w') as fout: + for line in lines: + if line.startswith("PERL="): + continue + if line.startswith("CP="): + line = "CP=copy\n" + if line.startswith("MKDIR="): + line = "MKDIR=mkdir\n" + if line.startswith("CFLAG="): + line = line.strip() + for algo in ("RC5", "MDC2", "IDEA"): + noalgo = " -DOPENSSL_NO_%s" % algo + if noalgo not in line: + line = line + noalgo + line = line + '\n' + fout.write(line) + +def run_configure(configure, do_script): + print("perl Configure "+configure+" no-idea no-mdc2") + os.system("perl Configure "+configure+" no-idea no-mdc2") + print(do_script) + os.system(do_script) + +def cmp(f1, f2): + bufsize = 1024 * 8 + with open(f1, 'rb') as fp1, open(f2, 'rb') as fp2: + while True: + b1 = fp1.read(bufsize) + b2 = fp2.read(bufsize) + if b1 != b2: + return False + if not b1: + return True + +def copy(src, dst): + if os.path.isfile(dst) and cmp(src, dst): + return + shutil.copy(src, dst) + +def prep(arch): + if arch == "x86": + configure = "VC-WIN32" + do_script = "ms\\do_nasm" + makefile="ms\\nt.mak" + m32 = makefile + dirsuffix = "32" + elif arch == "amd64": + configure = "VC-WIN64A" + do_script = "ms\\do_win64a" + makefile = "ms\\nt64.mak" + m32 = makefile.replace('64', '') + dirsuffix = "64" + #os.environ["VSEXTCOMP_USECL"] = "MS_OPTERON" + else: + raise ValueError('Unrecognized platform: %s' % arch) + + # rebuild makefile when we do the role over from 32 to 64 build + if arch == "amd64" and os.path.isfile(m32) and not os.path.isfile(makefile): + os.unlink(m32) + + # If the ssl makefiles do not exist, we invoke Perl to generate them. + # Due to a bug in this script, the makefile sometimes ended up empty + # Force a regeneration if it is. + if not os.path.isfile(makefile) or os.path.getsize(makefile)==0: + print("Creating the makefiles...") + sys.stdout.flush() + run_configure(configure, do_script) + + if arch == "amd64": + create_makefile64(makefile, m32) + fix_makefile(makefile) + copy(r"crypto\buildinf.h", r"crypto\buildinf_%s.h" % arch) + copy(r"crypto\opensslconf.h", r"crypto\opensslconf_%s.h" % arch) + else: + print(makefile, 'already exists!') + + # If the assembler files don't exist in tmpXX, copy them there + if os.path.exists("asm"+dirsuffix): + if not os.path.exists("tmp"+dirsuffix): + os.mkdir("tmp"+dirsuffix) + for f in os.listdir("asm"+dirsuffix): + if not f.endswith(".asm"): continue + if os.path.isfile(r"tmp%s\%s" % (dirsuffix, f)): continue + shutil.copy(r"asm%s\%s" % (dirsuffix, f), "tmp"+dirsuffix) + +def main(): + if len(sys.argv) == 1: + print("Not enough arguments: directory containing OpenSSL", + "sources must be supplied") + sys.exit(1) + + if len(sys.argv) > 2: + print("Too many arguments supplied, all we need is the directory", + "containing OpenSSL sources") + sys.exit(1) + + ssl_dir = sys.argv[1] + + if not os.path.exists(ssl_dir) and os.path.isdir(ssl_dir): + print(ssl_dir, "is not an existing directory!") + sys.exit(1) + + # perl should be on the path, but we also look in "\perl" and "c:\\perl" + # as "well known" locations + perls = find_all_on_path("perl.exe", ["\\perl\\bin", "C:\\perl\\bin"]) + perl = find_working_perl(perls) + if perl: + print("Found a working perl at '%s'" % (perl,)) + else: + sys.exit(1) + sys.stdout.flush() + + # Put our working Perl at the front of our path + os.environ["PATH"] = os.path.dirname(perl) + \ + os.pathsep + \ + os.environ["PATH"] + + old_cwd = os.getcwd() + try: + os.chdir(ssl_dir) + for arch in ['amd64', 'x86']: + prep(arch) + finally: + os.chdir(old_cwd) + +if __name__=='__main__': + main() diff --git a/PCbuild/pyproject.props b/PCbuild/pyproject.props index 2219c95..d9811cc 100644 --- a/PCbuild/pyproject.props +++ b/PCbuild/pyproject.props @@ -5,7 +5,7 @@ <OutDir>$(SolutionDir)</OutDir> <IntDir>$(SolutionDir)$(PlatformName)-temp-$(Configuration)\$(ProjectName)\</IntDir> <LinkIncremental>false</LinkIncremental> - </PropertyGroup> + </PropertyGroup> <PropertyGroup Condition="'$(Platform)'=='x64'"> <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion> <_PropertySheetDisplayName>amd64</_PropertySheetDisplayName> @@ -13,7 +13,7 @@ <IntDir>$(SolutionDir)$(PlatformName)-temp-$(Configuration)\$(ProjectName)\</IntDir> </PropertyGroup> <PropertyGroup Label="UserMacros"> - <PyDllName>python34$(PyDebugExt)</PyDllName> + <PyDllName>python35$(PyDebugExt)</PyDllName> <PythonExe>$(OutDir)python$(PyDebugExt).exe</PythonExe> <KillPythonExe>$(OutDir)kill_python$(PyDebugExt).exe</KillPythonExe> <externalsDir>..\..</externalsDir> @@ -21,12 +21,10 @@ <bz2Dir>$(externalsDir)\bzip2-1.0.6</bz2Dir> <lzmaDir>$(externalsDir)\xz-5.0.5</lzmaDir> <opensslDir>$(externalsDir)\openssl-1.0.1g</opensslDir> + <tclDir>$(externalsDir)\tcl-8.6.1.0</tclDir> + <tkDir>$(externalsDir)\tk-8.6.1.0</tkDir> + <tixDir>$(externalsDir)\tix-8.4.3.4</tixDir> <tcltkDir>$(externalsDir)\tcltk</tcltkDir> - <tcltk64Dir>$(externalsDir)\tcltk64</tcltk64Dir> - <tcltkLib>$(tcltkDir)\lib\tcl86t.lib;$(tcltkDir)\lib\tk86t.lib</tcltkLib> - <tcltkLibDebug>$(tcltkDir)\lib\tcl86tg.lib;$(tcltkDir)\lib\tk86tg.lib</tcltkLibDebug> - <tcltk64Lib>$(tcltk64Dir)\lib\tcl86t.lib;$(tcltk64Dir)\lib\tk86t.lib</tcltk64Lib> - <tcltk64LibDebug>$(tcltk64Dir)\lib\tcl86tg.lib;$(tcltk64Dir)\lib\tk86tg.lib</tcltk64LibDebug> </PropertyGroup> <ItemDefinitionGroup> <ClCompile> @@ -82,23 +80,17 @@ <BuildMacro Include="opensslDir"> <Value>$(opensslDir)</Value> </BuildMacro> - <BuildMacro Include="tcltkDir"> - <Value>$(tcltkDir)</Value> - </BuildMacro> - <BuildMacro Include="tcltk64Dir"> - <Value>$(tcltk64Dir)</Value> + <BuildMacro Include="tclDir"> + <Value>$(tclDir)</Value> </BuildMacro> - <BuildMacro Include="tcltkLib"> - <Value>$(tcltkLib)</Value> + <BuildMacro Include="tkDir"> + <Value>$(tkDir)</Value> </BuildMacro> - <BuildMacro Include="tcltkLibDebug"> - <Value>$(tcltkLibDebug)</Value> + <BuildMacro Include="tixDir"> + <Value>$(tixDir)</Value> </BuildMacro> - <BuildMacro Include="tcltk64Lib"> - <Value>$(tcltk64Lib)</Value> - </BuildMacro> - <BuildMacro Include="tcltk64LibDebug"> - <Value>$(tcltk64LibDebug)</Value> + <BuildMacro Include="tcltkDir"> + <Value>$(tcltkDir)</Value> </BuildMacro> </ItemGroup> -</Project> +</Project>
\ No newline at end of file diff --git a/PCbuild/python.vcxproj b/PCbuild/python.vcxproj index bd12624..5387343 100644 --- a/PCbuild/python.vcxproj +++ b/PCbuild/python.vcxproj @@ -156,6 +156,14 @@ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet> <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" /> <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" /> + <CustomBuildAfterTargets Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Link</CustomBuildAfterTargets> + <CustomBuildAfterTargets Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Link</CustomBuildAfterTargets> + <CustomBuildAfterTargets Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">Link</CustomBuildAfterTargets> + <CustomBuildAfterTargets Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'">Link</CustomBuildAfterTargets> + <CustomBuildAfterTargets Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">Link</CustomBuildAfterTargets> + <CustomBuildAfterTargets Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'">Link</CustomBuildAfterTargets> + <CustomBuildAfterTargets Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Link</CustomBuildAfterTargets> + <CustomBuildAfterTargets Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Link</CustomBuildAfterTargets> </PropertyGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <ClCompile> @@ -176,6 +184,25 @@ <StackReserveSize>2000000</StackReserveSize> <BaseAddress>0x1d000000</BaseAddress> </Link> + <CustomBuildStep> + <Command>echo @rem This script invokes the most recently built Python with all arguments> "$(SolutionDir)..\python.bat" +echo @rem passed through to the interpreter. This file is generated by the>> "$(SolutionDir)..\python.bat" +echo @rem build process and any changes *will* be thrown away by the next>> "$(SolutionDir)..\python.bat" +echo @rem rebuild.>> "$(SolutionDir)..\python.bat" +echo @rem This is only meant as a convenience for developing CPython>> "$(SolutionDir)..\python.bat" +echo @rem and using it outside of that context is ill-advised.>> "$(SolutionDir)..\python.bat" +echo @echo Running $(Configuration)^^^|$(Platform) interpreter...>> "$(SolutionDir)..\python.bat" +echo @"$(OutDir)python$(PyDebugExt).exe" %%*>> "$(SolutionDir)..\python.bat"</Command> + </CustomBuildStep> + <CustomBuildStep> + <Message>Creating convenience batch file for easily invoking the newly built interpreter.</Message> + </CustomBuildStep> + <CustomBuildStep> + <Outputs>$(SolutionDir)..\python.bat</Outputs> + </CustomBuildStep> + <CustomBuildStep> + <Inputs>$(OutDir)python$(PyDebugExt).exe;%(Inputs)</Inputs> + </CustomBuildStep> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <Midl> @@ -199,6 +226,25 @@ <StackReserveSize>2000000</StackReserveSize> <BaseAddress>0x1d000000</BaseAddress> </Link> + <CustomBuildStep> + <Command>echo @rem This script invokes the most recently built Python with all arguments> "$(SolutionDir)..\python.bat" +echo @rem passed through to the interpreter. This file is generated by the>> "$(SolutionDir)..\python.bat" +echo @rem build process and any changes *will* be thrown away by the next>> "$(SolutionDir)..\python.bat" +echo @rem rebuild.>> "$(SolutionDir)..\python.bat" +echo @rem This is only meant as a convenience for developing CPython>> "$(SolutionDir)..\python.bat" +echo @rem and using it outside of that context is ill-advised.>> "$(SolutionDir)..\python.bat" +echo @echo Running $(Configuration)^^^|$(Platform) interpreter...>> "$(SolutionDir)..\python.bat" +echo @"$(OutDir)python$(PyDebugExt).exe" %%*>> "$(SolutionDir)..\python.bat"</Command> + </CustomBuildStep> + <CustomBuildStep> + <Message>Creating convenience batch file for easily invoking the newly built interpreter.</Message> + </CustomBuildStep> + <CustomBuildStep> + <Outputs>$(SolutionDir)..\python.bat</Outputs> + </CustomBuildStep> + <CustomBuildStep> + <Inputs>$(OutDir)python$(PyDebugExt).exe;%(Inputs)</Inputs> + </CustomBuildStep> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ClCompile> @@ -221,6 +267,25 @@ <StackReserveSize>2000000</StackReserveSize> <BaseAddress>0x1d000000</BaseAddress> </Link> + <CustomBuildStep> + <Command>echo @rem This script invokes the most recently built Python with all arguments> "$(SolutionDir)..\python.bat" +echo @rem passed through to the interpreter. This file is generated by the>> "$(SolutionDir)..\python.bat" +echo @rem build process and any changes *will* be thrown away by the next>> "$(SolutionDir)..\python.bat" +echo @rem rebuild.>> "$(SolutionDir)..\python.bat" +echo @rem This is only meant as a convenience for developing CPython>> "$(SolutionDir)..\python.bat" +echo @rem and using it outside of that context is ill-advised.>> "$(SolutionDir)..\python.bat" +echo @echo Running $(Configuration)^^^|$(Platform) interpreter...>> "$(SolutionDir)..\python.bat" +echo @"$(OutDir)python$(PyDebugExt).exe" %%*>> "$(SolutionDir)..\python.bat"</Command> + </CustomBuildStep> + <CustomBuildStep> + <Message>Creating convenience batch file for easily invoking the newly built interpreter.</Message> + </CustomBuildStep> + <CustomBuildStep> + <Outputs>$(SolutionDir)..\python.bat</Outputs> + </CustomBuildStep> + <CustomBuildStep> + <Inputs>$(OutDir)python$(PyDebugExt).exe;%(Inputs)</Inputs> + </CustomBuildStep> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <Midl> @@ -246,6 +311,25 @@ <StackReserveSize>4194304</StackReserveSize> <BaseAddress>0x1d000000</BaseAddress> </Link> + <CustomBuildStep> + <Command>echo @rem This script invokes the most recently built Python with all arguments> "$(SolutionDir)..\python.bat" +echo @rem passed through to the interpreter. This file is generated by the>> "$(SolutionDir)..\python.bat" +echo @rem build process and any changes *will* be thrown away by the next>> "$(SolutionDir)..\python.bat" +echo @rem rebuild.>> "$(SolutionDir)..\python.bat" +echo @rem This is only meant as a convenience for developing CPython>> "$(SolutionDir)..\python.bat" +echo @rem and using it outside of that context is ill-advised.>> "$(SolutionDir)..\python.bat" +echo @echo Running $(Configuration)^^^|$(Platform) interpreter...>> "$(SolutionDir)..\python.bat" +echo @"$(OutDir)python$(PyDebugExt).exe" %%*>> "$(SolutionDir)..\python.bat"</Command> + </CustomBuildStep> + <CustomBuildStep> + <Message>Creating convenience batch file for easily invoking the newly built interpreter.</Message> + </CustomBuildStep> + <CustomBuildStep> + <Outputs>$(SolutionDir)..\python.bat</Outputs> + </CustomBuildStep> + <CustomBuildStep> + <Inputs>$(OutDir)python$(PyDebugExt).exe;%(Inputs)</Inputs> + </CustomBuildStep> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'"> <ClCompile> @@ -268,6 +352,25 @@ <ImportLibrary> </ImportLibrary> </Link> + <CustomBuildStep> + <Command>echo @rem This script invokes the most recently built Python with all arguments> "$(SolutionDir)..\python.bat" +echo @rem passed through to the interpreter. This file is generated by the>> "$(SolutionDir)..\python.bat" +echo @rem build process and any changes *will* be thrown away by the next>> "$(SolutionDir)..\python.bat" +echo @rem rebuild.>> "$(SolutionDir)..\python.bat" +echo @rem This is only meant as a convenience for developing CPython>> "$(SolutionDir)..\python.bat" +echo @rem and using it outside of that context is ill-advised.>> "$(SolutionDir)..\python.bat" +echo @echo Running $(Configuration)^^^|$(Platform) interpreter...>> "$(SolutionDir)..\python.bat" +echo @"$(OutDir)python$(PyDebugExt).exe" %%*>> "$(SolutionDir)..\python.bat"</Command> + </CustomBuildStep> + <CustomBuildStep> + <Message>Creating convenience batch file for easily invoking the newly built interpreter.</Message> + </CustomBuildStep> + <CustomBuildStep> + <Outputs>$(SolutionDir)..\python.bat</Outputs> + </CustomBuildStep> + <CustomBuildStep> + <Inputs>$(OutDir)python$(PyDebugExt).exe;%(Inputs)</Inputs> + </CustomBuildStep> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'"> <Midl> @@ -294,6 +397,25 @@ </ImportLibrary> <TargetMachine>MachineX64</TargetMachine> </Link> + <CustomBuildStep> + <Command>echo @rem This script invokes the most recently built Python with all arguments> "$(SolutionDir)..\python.bat" +echo @rem passed through to the interpreter. This file is generated by the>> "$(SolutionDir)..\python.bat" +echo @rem build process and any changes *will* be thrown away by the next>> "$(SolutionDir)..\python.bat" +echo @rem rebuild.>> "$(SolutionDir)..\python.bat" +echo @rem This is only meant as a convenience for developing CPython>> "$(SolutionDir)..\python.bat" +echo @rem and using it outside of that context is ill-advised.>> "$(SolutionDir)..\python.bat" +echo @echo Running $(Configuration)^^^|$(Platform) interpreter...>> "$(SolutionDir)..\python.bat" +echo @"$(OutDir)python$(PyDebugExt).exe" %%*>> "$(SolutionDir)..\python.bat"</Command> + </CustomBuildStep> + <CustomBuildStep> + <Message>Creating convenience batch file for easily invoking the newly built interpreter.</Message> + </CustomBuildStep> + <CustomBuildStep> + <Outputs>$(SolutionDir)..\python.bat</Outputs> + </CustomBuildStep> + <CustomBuildStep> + <Inputs>$(OutDir)python$(PyDebugExt).exe;%(Inputs)</Inputs> + </CustomBuildStep> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'"> <ClCompile> @@ -316,6 +438,25 @@ <ImportLibrary> </ImportLibrary> </Link> + <CustomBuildStep> + <Command>echo @rem This script invokes the most recently built Python with all arguments> "$(SolutionDir)..\python.bat" +echo @rem passed through to the interpreter. This file is generated by the>> "$(SolutionDir)..\python.bat" +echo @rem build process and any changes *will* be thrown away by the next>> "$(SolutionDir)..\python.bat" +echo @rem rebuild.>> "$(SolutionDir)..\python.bat" +echo @rem This is only meant as a convenience for developing CPython>> "$(SolutionDir)..\python.bat" +echo @rem and using it outside of that context is ill-advised.>> "$(SolutionDir)..\python.bat" +echo @echo Running $(Configuration)^^^|$(Platform) interpreter...>> "$(SolutionDir)..\python.bat" +echo @"$(OutDir)python$(PyDebugExt).exe" %%*>> "$(SolutionDir)..\python.bat"</Command> + </CustomBuildStep> + <CustomBuildStep> + <Message>Creating convenience batch file for easily invoking the newly built interpreter.</Message> + </CustomBuildStep> + <CustomBuildStep> + <Outputs>$(SolutionDir)..\python.bat</Outputs> + </CustomBuildStep> + <CustomBuildStep> + <Inputs>$(OutDir)python$(PyDebugExt).exe;%(Inputs)</Inputs> + </CustomBuildStep> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'"> <Midl> @@ -342,6 +483,25 @@ </ImportLibrary> <TargetMachine>MachineX64</TargetMachine> </Link> + <CustomBuildStep> + <Command>echo @rem This script invokes the most recently built Python with all arguments> "$(SolutionDir)..\python.bat" +echo @rem passed through to the interpreter. This file is generated by the>> "$(SolutionDir)..\python.bat" +echo @rem build process and any changes *will* be thrown away by the next>> "$(SolutionDir)..\python.bat" +echo @rem rebuild.>> "$(SolutionDir)..\python.bat" +echo @rem This is only meant as a convenience for developing CPython>> "$(SolutionDir)..\python.bat" +echo @rem and using it outside of that context is ill-advised.>> "$(SolutionDir)..\python.bat" +echo @echo Running $(Configuration)^^^|$(Platform) interpreter...>> "$(SolutionDir)..\python.bat" +echo @"$(OutDir)python$(PyDebugExt).exe" %%*>> "$(SolutionDir)..\python.bat"</Command> + </CustomBuildStep> + <CustomBuildStep> + <Message>Creating convenience batch file for easily invoking the newly built interpreter.</Message> + </CustomBuildStep> + <CustomBuildStep> + <Outputs>$(SolutionDir)..\python.bat</Outputs> + </CustomBuildStep> + <CustomBuildStep> + <Inputs>$(OutDir)python$(PyDebugExt).exe;%(Inputs)</Inputs> + </CustomBuildStep> </ItemDefinitionGroup> <ItemGroup> <None Include="..\PC\pycon.ico" /> @@ -361,4 +521,4 @@ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <ImportGroup Label="ExtensionTargets"> </ImportGroup> -</Project> +</Project>
\ No newline at end of file diff --git a/PCbuild/readme.txt b/PCbuild/readme.txt index b8184bf..5d6c0eb 100644 --- a/PCbuild/readme.txt +++ b/PCbuild/readme.txt @@ -40,7 +40,7 @@ Debug Used to build Python with extra debugging capabilities, equivalent to using ./configure --with-pydebug on UNIX. All binaries built using this configuration have "_d" added to their name: - python34_d.dll, python_d.exe, parser_d.pyd, and so on. Both the + python35_d.dll, python_d.exe, parser_d.pyd, and so on. Both the build and rt (run test) batch files in this directory accept a -d option for debug builds. If you are building Python to help with development of CPython, you will most likely use this configuration. @@ -181,30 +181,19 @@ _ssl you should first try to update NASM and do a full rebuild of OpenSSL. - If you like to use the official sources instead of the files from - python.org's subversion repository, Perl is required to build the - necessary makefiles and assembly files. ActivePerl is available - from + The ssl sub-project expects your OpenSSL sources to have already + been configured and be ready to build. If you get your sources + from svn.python.org as suggested in the "Getting External Sources" + section below, the OpenSSL source will already be ready to go. If + you want to build a different version, you will need to run + + PCbuild\prepare_ssl.py path\to\openssl-source-dir + + That script will prepare your OpenSSL sources in the same way that + those available on svn.python.org have been prepared. Note that + Perl must be installed and available on your PATH to configure + OpenSSL. ActivePerl is recommended and is available from http://www.activestate.com/activeperl/ - The svn.python.org version contains pre-built makefiles and assembly - files. - - The build process makes sure that no patented algorithms are - included. For now RC5, MDC2 and IDEA are excluded from the build. - You may have to manually remove $(OBJ_D)\i_*.obj from ms\nt.mak if - using official sources; the svn.python.org-hosted version is already - fixed. - - The ssl.vcxproj sub-project simply invokes PCbuild/build_ssl.py, - which locates and builds OpenSSL. - - build_ssl.py attempts to catch the most common errors (such as not - being able to find OpenSSL sources, or not being able to find a Perl - that works with OpenSSL) and give a reasonable error message. If - you have a problem that doesn't seem to be handled correctly (e.g., - you know you have ActivePerl but we can't find it), please take a - peek at build_ssl.py and suggest patches. Note that build_ssl.py - should be able to be run directly from the command-line. The ssl sub-project does not have the ability to clean the OpenSSL build; if you need to rebuild, you'll have to clean it by hand. @@ -217,11 +206,19 @@ _tkinter Homepage: http://www.tcl.tk/ - Unlike the other external libraries listed above, Tk must be built - separately before the _tkinter module can be built. This means that - a pre-built Tcl/Tk installation is expected in ..\..\tcltk (tcltk64 - for 64-bit) relative to this directory. See "Getting External - Sources" below for the easiest method to ensure Tcl/Tk is built. + Tkinter's dependencies are built by the tcl.vcxproj and tk.vcxproj + projects. The tix.vcxproj project also builds the Tix extended + widget set for use with Tkinter. + + Those three projects install their respective components in a + directory alongside the source directories called "tcltk" on + Win32 and "tcltk64" on x64. They also copy the Tcl and Tk DLLs + into the current output directory, which should ensure that Tkinter + is able to load Tcl/Tk without having to change your PATH. + + The tcl, tk, and tix sub-projects do not have the ability to clean + their builds; if you need to rebuild, you'll have to clean them by + hand. Getting External Sources @@ -250,26 +247,6 @@ XZ Utils, you would need to extract the archive into ..\..\xz-5.0.5 anyway, since that is where the solution is set to look for xz. The same is true for all other external projects. -The external(-amd64).bat scripts will also build a debug build of -Tcl/Tk, but there aren't any equivalent batch files for building release -versions of Tcl/Tk currently available. If you need to build a release -version of Tcl/Tk, just take a look at the relevant external(-amd64).bat -file and find the two nmake lines, then call each one without the -'DEBUG=1' parameter, i.e.: - -The external-amd64.bat file contains this for tcl: - nmake -f makefile.vc DEBUG=1 MACHINE=AMD64 INSTALLDIR=..\..\tcltk64 clean all install - -So for a release build, you'd call it as: - nmake -f makefile.vc MACHINE=AMD64 INSTALLDIR=..\..\tcltk64 clean all install - -Note that the above command is called from within ..\..\tcl-8.6.1.0\win -(relative to this directory); don't forget to build Tk as well as Tcl! - -This will be cleaned up in the future; http://bugs.python.org/issue15968 -tracks adding a new tcltk.vcxproj file that will build Tcl/Tk and Tix -the same way the other external projects listed above are built. - Building for AMD64 ------------------ @@ -332,6 +309,7 @@ The property files used are (+-- = "also imports"): * pyproject (base settings for all projects, user macros like PyDllName) * release (release macro: NDEBUG) * sqlite3 (used only by sqlite3.vcxproj) + * tcltk (used by _tkinter, tcl, tk and tix projects) * x64 (AMD64 / x64 platform specific settings) The pyproject property file defines _WIN32 and x64 defines _WIN64 and diff --git a/PCbuild/release.props b/PCbuild/release.props index acfe3e4..b460f01 100644 --- a/PCbuild/release.props +++ b/PCbuild/release.props @@ -2,6 +2,7 @@ <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup Label="UserMacros"> <PyDebugExt /> + <TclDebugExt /> </PropertyGroup> <PropertyGroup> <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion> @@ -15,5 +16,8 @@ <BuildMacro Include="PyDebugExt"> <Value>$(PyDebugExt)</Value> </BuildMacro> + <BuildMacro Include="TclDebugExt"> + <Value>$(TclDebugExt)</Value> + </BuildMacro> </ItemGroup> </Project>
\ No newline at end of file diff --git a/PCbuild/ssl.vcxproj b/PCbuild/ssl.vcxproj index d5eac9a..5f318d0 100644 --- a/PCbuild/ssl.vcxproj +++ b/PCbuild/ssl.vcxproj @@ -118,9 +118,12 @@ <PropertyGroup Label="UserMacros" /> <PropertyGroup> <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion> - <NMakeBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">cd "$(SolutionDir)" -"$(PythonExe)" build_ssl.py Release $(Platform) -a -</NMakeBuildCommandLine> + <NMakeBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> +cd "$(SolutionDir)$(opensslDir)" +copy /Y crypto\buildinf_x86.h crypto\buildinf.h +copy /Y crypto\opensslconf_x86.h crypto\opensslconf.h +nmake /nologo -f "ms\nt.mak" + </NMakeBuildCommandLine> <NMakeReBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> <NMakeCleanCommandLine Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">echo OpenSSL must be cleaned manually if you want to rebuild it.</NMakeCleanCommandLine> <NMakeOutput Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> @@ -129,9 +132,13 @@ <NMakeForcedIncludes Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(NMakeForcedIncludes)</NMakeForcedIncludes> <NMakeAssemblySearchPath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(NMakeAssemblySearchPath)</NMakeAssemblySearchPath> <NMakeForcedUsingAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(NMakeForcedUsingAssemblies)</NMakeForcedUsingAssemblies> - <NMakeBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">cd "$(SolutionDir)" -"$(PythonExe)" build_ssl.py Release $(Platform) -a -</NMakeBuildCommandLine> + <NMakeBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> +cd "$(SolutionDir)$(opensslDir)" +nasm -f win64 -DNEAR -Ox -g ms\\uptable.asm || echo nasm failed! && exit +copy /Y crypto\buildinf_amd64.h crypto\buildinf.h +copy /Y crypto\opensslconf_amd64.h crypto\opensslconf.h +nmake /nologo -f "ms\nt64.mak" + </NMakeBuildCommandLine> <NMakeReBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" /> <NMakeCleanCommandLine Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">echo OpenSSL must be cleaned manually if you want to rebuild it.</NMakeCleanCommandLine> <NMakeOutput Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" /> @@ -140,9 +147,12 @@ <NMakeForcedIncludes Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(NMakeForcedIncludes)</NMakeForcedIncludes> <NMakeAssemblySearchPath Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(NMakeAssemblySearchPath)</NMakeAssemblySearchPath> <NMakeForcedUsingAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(NMakeForcedUsingAssemblies)</NMakeForcedUsingAssemblies> - <NMakeBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">cd "$(SolutionDir)" -"$(PythonExe)" build_ssl.py Release $(Platform) -a -</NMakeBuildCommandLine> + <NMakeBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> +cd "$(SolutionDir)$(opensslDir)" +copy /Y crypto\buildinf_x86.h crypto\buildinf.h +copy /Y crypto\opensslconf_x86.h crypto\opensslconf.h +nmake /nologo -f "ms\nt.mak" + </NMakeBuildCommandLine> <NMakeReBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> <NMakeCleanCommandLine Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">echo OpenSSL must be cleaned manually if you want to rebuild it.</NMakeCleanCommandLine> <NMakeOutput Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> @@ -151,9 +161,13 @@ <NMakeForcedIncludes Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(NMakeForcedIncludes)</NMakeForcedIncludes> <NMakeAssemblySearchPath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(NMakeAssemblySearchPath)</NMakeAssemblySearchPath> <NMakeForcedUsingAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(NMakeForcedUsingAssemblies)</NMakeForcedUsingAssemblies> - <NMakeBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Release|x64'">cd "$(SolutionDir)" -"$(PythonExe)" build_ssl.py Release $(Platform) -a -</NMakeBuildCommandLine> + <NMakeBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> +cd "$(SolutionDir)$(opensslDir)" +nasm -f win64 -DNEAR -Ox -g ms\\uptable.asm || echo nasm failed! && exit +copy /Y crypto\buildinf_amd64.h crypto\buildinf.h +copy /Y crypto\opensslconf_amd64.h crypto\opensslconf.h +nmake /nologo -f "ms\nt64.mak" + </NMakeBuildCommandLine> <NMakeReBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Release|x64'" /> <NMakeCleanCommandLine Condition="'$(Configuration)|$(Platform)'=='Release|x64'">echo OpenSSL must be cleaned manually if you want to rebuild it.</NMakeCleanCommandLine> <NMakeOutput Condition="'$(Configuration)|$(Platform)'=='Release|x64'" /> @@ -162,9 +176,12 @@ <NMakeForcedIncludes Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(NMakeForcedIncludes)</NMakeForcedIncludes> <NMakeAssemblySearchPath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(NMakeAssemblySearchPath)</NMakeAssemblySearchPath> <NMakeForcedUsingAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(NMakeForcedUsingAssemblies)</NMakeForcedUsingAssemblies> - <NMakeBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">cd "$(SolutionDir)" -"$(PythonExe)" build_ssl.py Release $(Platform) -a -</NMakeBuildCommandLine> + <NMakeBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'"> +cd "$(SolutionDir)$(opensslDir)" +copy /Y crypto\buildinf_x86.h crypto\buildinf.h +copy /Y crypto\opensslconf_x86.h crypto\opensslconf.h +nmake /nologo -f "ms\nt.mak" + </NMakeBuildCommandLine> <NMakeReBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" /> <NMakeCleanCommandLine Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">echo OpenSSL must be cleaned manually if you want to rebuild it.</NMakeCleanCommandLine> <NMakeOutput Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" /> @@ -173,9 +190,13 @@ <NMakeForcedIncludes Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">$(NMakeForcedIncludes)</NMakeForcedIncludes> <NMakeAssemblySearchPath Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">$(NMakeAssemblySearchPath)</NMakeAssemblySearchPath> <NMakeForcedUsingAssemblies Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">$(NMakeForcedUsingAssemblies)</NMakeForcedUsingAssemblies> - <NMakeBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'">cd "$(SolutionDir)" -"$(PythonExe)" build_ssl.py Release $(Platform) -a -</NMakeBuildCommandLine> + <NMakeBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'"> +cd "$(SolutionDir)$(opensslDir)" +nasm -f win64 -DNEAR -Ox -g ms\\uptable.asm || echo nasm failed! && exit +copy /Y crypto\buildinf_amd64.h crypto\buildinf.h +copy /Y crypto\opensslconf_amd64.h crypto\opensslconf.h +nmake /nologo -f "ms\nt64.mak" + </NMakeBuildCommandLine> <NMakeReBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" /> <NMakeCleanCommandLine Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'">echo OpenSSL must be cleaned manually if you want to rebuild it.</NMakeCleanCommandLine> <NMakeOutput Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" /> @@ -184,9 +205,12 @@ <NMakeForcedIncludes Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'">$(NMakeForcedIncludes)</NMakeForcedIncludes> <NMakeAssemblySearchPath Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'">$(NMakeAssemblySearchPath)</NMakeAssemblySearchPath> <NMakeForcedUsingAssemblies Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'">$(NMakeForcedUsingAssemblies)</NMakeForcedUsingAssemblies> - <NMakeBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">cd "$(SolutionDir)" -"$(PythonExe)" build_ssl.py Release $(Platform) -a -</NMakeBuildCommandLine> + <NMakeBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'"> +cd "$(SolutionDir)$(opensslDir)" +copy /Y crypto\buildinf_x86.h crypto\buildinf.h +copy /Y crypto\opensslconf_x86.h crypto\opensslconf.h +nmake /nologo -f "ms\nt.mak" + </NMakeBuildCommandLine> <NMakeReBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" /> <NMakeCleanCommandLine Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">echo OpenSSL must be cleaned manually if you want to rebuild it.</NMakeCleanCommandLine> <NMakeOutput Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" /> @@ -195,9 +219,13 @@ <NMakeForcedIncludes Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">$(NMakeForcedIncludes)</NMakeForcedIncludes> <NMakeAssemblySearchPath Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">$(NMakeAssemblySearchPath)</NMakeAssemblySearchPath> <NMakeForcedUsingAssemblies Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">$(NMakeForcedUsingAssemblies)</NMakeForcedUsingAssemblies> - <NMakeBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'">cd "$(SolutionDir)" -"$(PythonExe)" build_ssl.py Release $(Platform) -a -</NMakeBuildCommandLine> + <NMakeBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'"> +cd "$(SolutionDir)$(opensslDir)" +nasm -f win64 -DNEAR -Ox -g ms\\uptable.asm || echo nasm failed! && exit +copy /Y crypto\buildinf_amd64.h crypto\buildinf.h +copy /Y crypto\opensslconf_amd64.h crypto\opensslconf.h +nmake /nologo -f "ms\nt64.mak" + </NMakeBuildCommandLine> <NMakeReBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" /> <NMakeCleanCommandLine Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'">echo OpenSSL must be cleaned manually if you want to rebuild it.</NMakeCleanCommandLine> <NMakeOutput Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" /> @@ -209,12 +237,6 @@ </PropertyGroup> <ItemDefinitionGroup> </ItemDefinitionGroup> - <ItemGroup> - <ProjectReference Include="python.vcxproj"> - <Project>{b11d750f-cd1f-4a96-85ce-e69a5c5259f9}</Project> - <ReferenceOutputAssembly>false</ReferenceOutputAssembly> - </ProjectReference> - </ItemGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <ImportGroup Label="ExtensionTargets"> </ImportGroup> diff --git a/PCbuild/tcl.vcxproj b/PCbuild/tcl.vcxproj new file mode 100644 index 0000000..dc426b3 --- /dev/null +++ b/PCbuild/tcl.vcxproj @@ -0,0 +1,175 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Debug|x64"> + <Configuration>Debug</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="PGInstrument|Win32"> + <Configuration>PGInstrument</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="PGInstrument|x64"> + <Configuration>PGInstrument</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="PGUpdate|Win32"> + <Configuration>PGUpdate</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="PGUpdate|x64"> + <Configuration>PGUpdate</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|x64"> + <Configuration>Release</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectGuid>{B5FD6F1D-129E-4BFF-9340-03606FAC7283}</ProjectGuid> + <RootNamespace>tcl</RootNamespace> + <Keyword>MakeFileProj</Keyword> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" Label="Configuration"> + <ConfigurationType>Makefile</ConfigurationType> + <CharacterSet>NotSet</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" Label="Configuration"> + <ConfigurationType>Makefile</ConfigurationType> + <CharacterSet>NotSet</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>Makefile</ConfigurationType> + <CharacterSet>NotSet</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>Makefile</ConfigurationType> + <CharacterSet>NotSet</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" Label="Configuration"> + <ConfigurationType>Makefile</ConfigurationType> + <CharacterSet>NotSet</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" Label="Configuration"> + <ConfigurationType>Makefile</ConfigurationType> + <CharacterSet>NotSet</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> + <ConfigurationType>Makefile</ConfigurationType> + <CharacterSet>NotSet</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> + <ConfigurationType>Makefile</ConfigurationType> + <CharacterSet>NotSet</CharacterSet> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="pyproject.props" /> + <Import Project="pgupdate.props" /> + <Import Project="tcltk.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="pyproject.props" /> + <Import Project="pginstrument.props" /> + <Import Project="tcltk.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="pyproject.props" /> + <Import Project="release.props" /> + <Import Project="tcltk.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="pyproject.props" /> + <Import Project="debug.props" /> + <Import Project="tcltk.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="pyproject.props" /> + <Import Project="x64.props" /> + <Import Project="pgupdate.props" /> + <Import Project="tcltk.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="pyproject.props" /> + <Import Project="x64.props" /> + <Import Project="pginstrument.props" /> + <Import Project="tcltk.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="pyproject.props" /> + <Import Project="x64.props" /> + <Import Project="release.props" /> + <Import Project="tcltk.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="pyproject.props" /> + <Import Project="x64.props" /> + <Import Project="debug.props" /> + <Import Project="tcltk.props" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup> + <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion> + <NMakeBuildCommandLine> +IF EXIST $(tcltkDir)\include\tcl.h ( + IF EXIST $(tcltkDir)\bin\$(tclDLLName) ( + IF EXIST $(OutDir)$(tclDLLName) ( + echo Tcl is already built and available. + exit /b 0 + ) ELSE ( + echo Copying tcl dll to $(OutDir) + xcopy $(tcltkDir)\bin\$(tclDLLName) $(OutDir) + exit /b 0 + ) + ) +) + +IF NOT EXIST $(tclDir) ( + echo error: $(tclDir) doesn't exist. + exit 1 +) + +IF "$(Platform)" EQU "Win32" set TclMachine=IX86 +IF "$(Platform)" EQU "x64" set TclMachine=AMD64 + +IF "$(Configuration)" EQU "Debug" ( + set TclOpts=symbols +) ELSE ( + set TclOpts= +) + +cd $(tclDir)\win + +nmake -f makefile.vc MACHINE=%TclMachine% OPTS=%TclOpts% core shell dlls && nmake -f makefile.vc MACHINE=%TclMachine% OPTS=%TclOpts% INSTALLDIR=$(SolutionDir)$(tcltkDir) install-binaries install-libraries && xcopy /y $(SolutionDir)$(tcltkDir)\bin\$(tclDLLName) $(OutDir) + </NMakeBuildCommandLine> + <NMakeCleanCommandLine>del $(OutDir)$(tclDLLName) +echo Tcl must be cleaned manually if you want to rebuild it.</NMakeCleanCommandLine> + </PropertyGroup> + <ItemDefinitionGroup> + </ItemDefinitionGroup> + <ItemGroup> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> +</Project>
\ No newline at end of file diff --git a/PCbuild/tcltk.props b/PCbuild/tcltk.props new file mode 100644 index 0000000..c169427 --- /dev/null +++ b/PCbuild/tcltk.props @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ImportGroup Label="PropertySheets" /> + <PropertyGroup Label="UserMacros"> + <MSDEVDIR>Dummy value to avoid patching Tcl/Tk's makefile.vc</MSDEVDIR> + <tclDLLName>tcl86t$(TclDebugExt).dll</tclDLLName> + <tkDLLName>tk86t$(TclDebugExt).dll</tkDLLName> + <tixDLLName>tix84$(TclDebugExt).dll</tixDLLName> + <tcltkLib>$(tcltkDir)\lib\tcl86t$(TclDebugExt).lib;$(tcltkDir)\lib\tk86t$(TclDebugExt).lib</tcltkLib> + </PropertyGroup> + <ItemDefinitionGroup /> + <ItemGroup> + <BuildMacro Include="MSDEVDIR"> + <Value>$(MSDEVDIR)</Value> + <EnvironmentVariable>true</EnvironmentVariable> + </BuildMacro> + <BuildMacro Include="tclDLLName"> + <Value>$(tclDLLName)</Value> + </BuildMacro> + <BuildMacro Include="tkDLLName"> + <Value>$(tkDLLName)</Value> + </BuildMacro> + <BuildMacro Include="tixDLLName"> + <Value>$(tixDLLName)</Value> + </BuildMacro> + <BuildMacro Include="tcltkLib"> + <Value>$(tcltkLib)</Value> + </BuildMacro> + </ItemGroup> +</Project>
\ No newline at end of file diff --git a/PCbuild/tix.vcxproj b/PCbuild/tix.vcxproj new file mode 100644 index 0000000..a177f5c --- /dev/null +++ b/PCbuild/tix.vcxproj @@ -0,0 +1,171 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Debug|x64"> + <Configuration>Debug</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="PGInstrument|Win32"> + <Configuration>PGInstrument</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="PGInstrument|x64"> + <Configuration>PGInstrument</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="PGUpdate|Win32"> + <Configuration>PGUpdate</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="PGUpdate|x64"> + <Configuration>PGUpdate</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|x64"> + <Configuration>Release</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectGuid>{C5A3E7FB-9695-4B2E-960B-1D9F43F1E555}</ProjectGuid> + <RootNamespace>tix</RootNamespace> + <Keyword>MakeFileProj</Keyword> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" Label="Configuration"> + <ConfigurationType>Makefile</ConfigurationType> + <CharacterSet>NotSet</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" Label="Configuration"> + <ConfigurationType>Makefile</ConfigurationType> + <CharacterSet>NotSet</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>Makefile</ConfigurationType> + <CharacterSet>NotSet</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>Makefile</ConfigurationType> + <CharacterSet>NotSet</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" Label="Configuration"> + <ConfigurationType>Makefile</ConfigurationType> + <CharacterSet>NotSet</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" Label="Configuration"> + <ConfigurationType>Makefile</ConfigurationType> + <CharacterSet>NotSet</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> + <ConfigurationType>Makefile</ConfigurationType> + <CharacterSet>NotSet</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> + <ConfigurationType>Makefile</ConfigurationType> + <CharacterSet>NotSet</CharacterSet> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="pyproject.props" /> + <Import Project="pgupdate.props" /> + <Import Project="tcltk.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="pyproject.props" /> + <Import Project="pginstrument.props" /> + <Import Project="tcltk.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="pyproject.props" /> + <Import Project="release.props" /> + <Import Project="tcltk.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="pyproject.props" /> + <Import Project="debug.props" /> + <Import Project="tcltk.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="pyproject.props" /> + <Import Project="x64.props" /> + <Import Project="pgupdate.props" /> + <Import Project="tcltk.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="pyproject.props" /> + <Import Project="x64.props" /> + <Import Project="pginstrument.props" /> + <Import Project="tcltk.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="pyproject.props" /> + <Import Project="x64.props" /> + <Import Project="release.props" /> + <Import Project="tcltk.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="pyproject.props" /> + <Import Project="x64.props" /> + <Import Project="debug.props" /> + <Import Project="tcltk.props" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup> + <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion> + <NMakeBuildCommandLine> +IF EXIST $(tcltkDir)\lib\tix8.4.3\$(tixDLLName) ( + echo Tix is already built and available. + exit /b 0 +) + +IF NOT EXIST $(tixDir) ( + echo error: $(tixDir) doesn't exist. + exit 1 +) + +IF "$(Platform)" EQU "Win32" set TclMachine=IX86 +IF "$(Platform)" EQU "x64" set TclMachine=AMD64 + +IF "$(Configuration)" EQU "Debug" ( + set TixDebug=1 +) ELSE ( + set TixDebug=0 +) + +cd $(tixDir)\win +nmake -f python.mak MACHINE=%TclMachine% DEBUG=%TixDebug% TCL_DIR=$(SolutionDir)$(tclDir) TK_DIR=$(SolutionDir)$(tkDir) all && nmake -f python.mak MACHINE=%TclMachine% DEBUG=%TixDebug% TCL_DIR=$(SolutionDir)$(tclDir) TK_DIR=$(SolutionDir)$(tkDir) INSTALL_DIR=$(SolutionDir)$(tcltkDir) install + </NMakeBuildCommandLine> + <NMakeCleanCommandLine>echo Tix must be cleaned manually if you want to rebuild it.</NMakeCleanCommandLine> + </PropertyGroup> + <ItemDefinitionGroup> + </ItemDefinitionGroup> + <ItemGroup> + <ProjectReference Include="tcl.vcxproj"> + <Project>{b5fd6f1d-129e-4bff-9340-03606fac7283}</Project> + </ProjectReference> + <ProjectReference Include="tk.vcxproj"> + <Project>{7e85eccf-a72c-4da4-9e52-884508e80ba1}</Project> + </ProjectReference> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> +</Project>
\ No newline at end of file diff --git a/PCbuild/tk.vcxproj b/PCbuild/tk.vcxproj new file mode 100644 index 0000000..d760f87 --- /dev/null +++ b/PCbuild/tk.vcxproj @@ -0,0 +1,178 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Debug|x64"> + <Configuration>Debug</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="PGInstrument|Win32"> + <Configuration>PGInstrument</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="PGInstrument|x64"> + <Configuration>PGInstrument</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="PGUpdate|Win32"> + <Configuration>PGUpdate</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="PGUpdate|x64"> + <Configuration>PGUpdate</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|x64"> + <Configuration>Release</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectGuid>{7E85ECCF-A72C-4DA4-9E52-884508E80BA1}</ProjectGuid> + <RootNamespace>tk</RootNamespace> + <Keyword>MakeFileProj</Keyword> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" Label="Configuration"> + <ConfigurationType>Makefile</ConfigurationType> + <CharacterSet>NotSet</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" Label="Configuration"> + <ConfigurationType>Makefile</ConfigurationType> + <CharacterSet>NotSet</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>Makefile</ConfigurationType> + <CharacterSet>NotSet</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>Makefile</ConfigurationType> + <CharacterSet>NotSet</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" Label="Configuration"> + <ConfigurationType>Makefile</ConfigurationType> + <CharacterSet>NotSet</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" Label="Configuration"> + <ConfigurationType>Makefile</ConfigurationType> + <CharacterSet>NotSet</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> + <ConfigurationType>Makefile</ConfigurationType> + <CharacterSet>NotSet</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> + <ConfigurationType>Makefile</ConfigurationType> + <CharacterSet>NotSet</CharacterSet> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="pyproject.props" /> + <Import Project="pgupdate.props" /> + <Import Project="tcltk.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="pyproject.props" /> + <Import Project="pginstrument.props" /> + <Import Project="tcltk.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="pyproject.props" /> + <Import Project="release.props" /> + <Import Project="tcltk.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="pyproject.props" /> + <Import Project="debug.props" /> + <Import Project="tcltk.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="pyproject.props" /> + <Import Project="x64.props" /> + <Import Project="pgupdate.props" /> + <Import Project="tcltk.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="pyproject.props" /> + <Import Project="x64.props" /> + <Import Project="pginstrument.props" /> + <Import Project="tcltk.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="pyproject.props" /> + <Import Project="x64.props" /> + <Import Project="release.props" /> + <Import Project="tcltk.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="pyproject.props" /> + <Import Project="x64.props" /> + <Import Project="debug.props" /> + <Import Project="tcltk.props" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup> + <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion> + <NMakeBuildCommandLine> +IF EXIST $(tcltkDir)\include\tk.h ( + IF EXIST $(tcltkDir)\bin\$(tkDLLName) ( + IF EXIST $(OutDir)$(tkDLLName) ( + echo Tk is already built and available. + exit /b 0 + ) ELSE ( + echo Copying tk dll to $(OutDir) + xcopy $(tcltkDir)\bin\$(tkDLLName) $(OutDir) + exit /b 0 + ) + ) +) + +IF NOT EXIST $(tkDir) ( + echo error: $(tkDir) doesn't exist. + exit 1 +) + +IF "$(Platform)" EQU "Win32" set TclMachine=IX86 +IF "$(Platform)" EQU "x64" set TclMachine=AMD64 + +IF "$(Configuration)" EQU "Debug" ( + set TclOpts=symbols +) ELSE ( + set TclOpts= +) + +cd $(tkDir)\win + +nmake -f makefile.vc MACHINE=%TclMachine% OPTS=%TclOpts% TCLDIR=$(SolutionDir)$(tclDir) all && nmake -f makefile.vc MACHINE=%TclMachine% OPTS=%TclOpts% TCLDIR=$(SolutionDir)$(tclDir) INSTALLDIR=$(SolutionDir)$(tcltkDir) install-binaries install-libraries && xcopy /y $(SolutionDir)$(tcltkDir)\bin\$(tkDLLName) $(OutDir) + </NMakeBuildCommandLine> + <NMakeCleanCommandLine>del $(OutDir)$(tkDLLName) +echo Tk must be cleaned manually if you want to rebuild it.</NMakeCleanCommandLine> + </PropertyGroup> + <ItemDefinitionGroup> + </ItemDefinitionGroup> + <ItemGroup> + <ProjectReference Include="tcl.vcxproj"> + <Project>{b5fd6f1d-129e-4bff-9340-03606fac7283}</Project> + </ProjectReference> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> +</Project>
\ No newline at end of file diff --git a/PCbuild/x64.props b/PCbuild/x64.props index 985c0ef..9e6f5bb 100644 --- a/PCbuild/x64.props +++ b/PCbuild/x64.props @@ -3,6 +3,9 @@ <PropertyGroup Label="UserMacros" Condition="'$(HOST_PYTHON)'!=''"> <PythonExe>$(HOST_PYTHON)</PythonExe> </PropertyGroup> + <PropertyGroup Label="UserMacros"> + <tcltkDir>$(externalsDir)\tcltk64</tcltkDir> + </PropertyGroup> <ItemDefinitionGroup> <ClCompile> <BufferSecurityCheck>false</BufferSecurityCheck> @@ -16,5 +19,8 @@ <BuildMacro Include="PythonExe"> <Value>$(PythonExe)</Value> </BuildMacro> + <BuildMacro Include="tcltkDir"> + <Value>$(tcltkDir)</Value> + </BuildMacro> </ItemGroup> -</Project> +</Project>
\ No newline at end of file |