[PyOpenGL-Devel] Togl workaround instructions for those wanting to use it with Python 2.3
Brought to you by:
mcfletch
From: Mike C. F. <mcf...@ro...> - 2003-12-27 04:58:30
|
Well, following a tip from Jesse Hager I've been playing a bit more with Togl. This email is intended for those who have older PyOpenGL code that relies on Togl and thus need Togl support but would like to upgrade to PyOpenGL 2.0.1 and Python 2.3. If you need a Togl widget, it's possible to build one and install it manually. The Tcl pkg_mkIndex command used by the automatic installer (i.e. setup.py) still fails, so there's something broken still, but the work-around does allow you to run Togl-based code under Python 2.3. Here's the instructions: * Unpack tk8.4.5-src.tar.gz <http://prdownloads.sourceforge.net/tcl/tk8.4.5-src.tar.gz?download> and tcl8.4.5-src.tar.gz <http://prdownloads.sourceforge.net/tcl/tcl8.4.5-src.tar.gz?download> from the Tcl sf.net project (https://sourceforge.net/project/showfiles.php?group_id=10894) * Edit src/Togl-1.6/makefile.vc to point to the appropriate directories in the Tcl Installation section. e.g. o TKDIR = c:\bin\lang\tk8.4.5 TCLDIR = C:\bin\lang\tcl8.4.5 TCLVER = 84 TCLFLAGS = -DUSE_TCL_STUBS -DUSE_TK_STUBS TCLLIBS = tclstub$(TCLVER).lib tkstub$(TCLVER).lib TCLINCDIR = -I$(TCLDIR)\include -I. -I$(TKDIR)\generic -I$(TCLDIR)\win -I$(TCLDIR)\generic -I$(TKDIR)\xlib TCLLIBDIR = -libpath:C:\bin\lang\py23\tcl TCLSH = $(TCLDIR)\bin\tclsh$(TCLVER).exe WISH = $(TCLDIR)\bin\wish$(TCLVER).exe * Run nmake /f makefile.vc in the Togl-1.6 directory * Create directory under py23/tcl/Togl (i.e. in your Python 2.3 installation directory) * Copy the Togl.dll from the Togl-1.6 source directory to py23/tcl/Togl * Create a file in the py23/tcl/Togl directory named pkgIndex.tcl with these contents: o if {![package vsatisfies [package provide Tcl] 8]} {return} package ifneeded Togl 1.6.0 \ [list load [file join $dir togl.dll] Togl] It's that last step which is causing the failure in the current code-base, as the current code does: tk.tk.call('pkg_mkIndex','-verbose',togl_dir, togl) to try to have the Python Tk/Tcl system build the pkgIndex file automatically and fails as the built-in Tk doesn't provide a needed interface. Enjoy all, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ |