Index: PCbuild/build_tkinter.py =================================================================== --- PCbuild/build_tkinter.py (revision 66629) +++ PCbuild/build_tkinter.py (working copy) @@ -11,9 +11,9 @@ here = os.path.abspath(os.path.dirname(__file__)) par = os.path.pardir -TCL = "tcl8.5.2" -TK = "tk8.5.2" -TIX = "tix-8.4.0.x" +TCL = "tcl-8.5.2.1" +TK = "tk-8.5.2.0" +TIX = "tix-8.4.3" ROOT = os.path.abspath(os.path.join(here, par, par)) # Windows 2000 compatibility: WINVER 0x0500 @@ -29,7 +29,7 @@ if os.system(cmd) != 0: raise RuntimeError(cmd) -def build(platform, clean): +def build(platform, clean, debug): if platform == "Win32": dest = os.path.join(ROOT, "tcltk") machine = "X86" @@ -39,43 +39,53 @@ else: raise ValueError(platform) + if debug: + debug = "1" + else: + debug = "0" + # TCL tcldir = os.path.join(ROOT, TCL) if 1: os.chdir(os.path.join(tcldir, "win")) + params = dict(MACHINE=machine, DEBUG=debug, INSTALLDIR=dest) if clean: - nmake("makefile.vc", "clean") - nmake("makefile.vc", MACHINE=machine) - nmake("makefile.vc", "install", INSTALLDIR=dest, MACHINE=machine) + nmake("makefile.vc", "clean", **params) + nmake("makefile.vc", **params) + nmake("makefile.vc", "install", **params) # TK if 1: os.chdir(os.path.join(ROOT, TK, "win")) + params = dict(MACHINE=machine, DEBUG=debug, INSTALLDIR=dest, TCLDIR=tcldir, + OPTS="noxp") if clean: - nmake("makefile.vc", "clean", TCLDIR=tcldir) - nmake("makefile.vc", TCLDIR=tcldir, MACHINE=machine) - nmake("makefile.vc", "install", TCLDIR=tcldir, INSTALLDIR=dest, MACHINE=machine) + nmake("makefile.vc", "clean", **params) + nmake("makefile.vc", **params) + nmake("makefile.vc", "install", **params) # TIX if 1: - # python9.mak is available at http://svn.python.org os.chdir(os.path.join(ROOT, TIX, "win")) + params = dict(MACHINE=machine, DEBUG=debug, INSTALL_DIR=dest, + TCL_MAJOR="8", TCL_MINOR="5", + TK_DIR=os.path.join(ROOT, TK), + TCL_DIR=os.path.join(ROOT, TCL), + ) if clean: - nmake("python9.mak", "clean") - nmake("python9.mak", MACHINE=machine, INSTALL_DIR=dest) - nmake("python9.mak", "install", INSTALL_DIR=dest) + nmake("python.mak", "clean", **params) + nmake("python.mak", **params) + nmake("python.mak", "install", **params) def main(): if len(sys.argv) < 2 or sys.argv[1] not in ("Win32", "AMD64"): - print("%s Win32|AMD64" % sys.argv[0]) + print("%s Win32|AMD64 [--debug]" % sys.argv[0]) sys.exit(1) - if "-c" in sys.argv: - clean = True - else: - clean = False + clean = "-c" in sys.argv + debug = "--debug" in sys.argv - build(sys.argv[1], clean) + build(sys.argv[1], clean, debug) if __name__ == '__main__':