diff --git a/opengl/CyOpenGL.pyx b/opengl/CyOpenGL.pyx index f03bed29..eb4a18e3 100644 --- a/opengl/CyOpenGL.pyx +++ b/opengl/CyOpenGL.pyx @@ -10,7 +10,7 @@ include "CySnapPyfont.pxi" include "CySnapPyimages.pxi" from .infowindow import InfoWindow -from . import togl3 +from . import tkgl from cpython cimport array @@ -22,7 +22,7 @@ from math import sqrt, ceil, floor, pi, sin, cos, tan from random import random import time -Togl_dir = os.path.abspath(os.path.dirname(togl3.__file__)) +TkGL_dir = os.path.abspath(os.path.dirname(tkgl.__file__)) import tkinter as Tk_ @@ -110,20 +110,21 @@ class RawOpenGLWidget(Tk_.Widget, Tk_.Misc): curr_platform = 'linux' elif curr_platform == 'win32': curr_platform = 'windows' - Togl_path = os.path.join(Togl_dir, curr_platform) - if not os.path.exists(Togl_path): - raise RuntimeError('Togl directory "%s" missing.' % Togl_path) + TkGL_path = os.path.join(TkGL_dir, curr_platform) + if not os.path.exists(TkGL_path): + raise RuntimeError('TkGL directory "%s" missing.' % TkGL_path) - master.tk.call('lappend', 'auto_path', Togl_path) + master.tk.call('lappend', 'auto_path', TkGL_path) try: - master.tk.call('package', 'require', 'Togl') + master.tk.call('package', 'require', 'Tkgl') except Tk_.TclError: - raise RuntimeError('Tcl can not find Togl even though directory %s exists' % Togl_path) + raise RuntimeError( + 'Tcl can not find TkGL even though directory %s exists' % TkGL_path) if self.profile: kw['profile'] = self.profile - Tk_.Widget.__init__(self, master, 'togl', cnf, kw) + Tk_.Widget.__init__(self, master, 'tkgl', cnf, kw) self.root = master self.bind('', self.tkMap_expose_or_configure) self.bind('', self.tkMap_expose_or_configure) diff --git a/python/togl3/__init__.py b/python/tkgl/__init__.py similarity index 100% rename from python/togl3/__init__.py rename to python/tkgl/__init__.py diff --git a/python/togl3/darwin/Togl3.0/libTogl3.0.dylib b/python/tkgl/darwin/Tkgl1.0/libTkgl1.0.dylib old mode 100755 new mode 100644 similarity index 65% rename from python/togl3/darwin/Togl3.0/libTogl3.0.dylib rename to python/tkgl/darwin/Tkgl1.0/libTkgl1.0.dylib index fd100b4c..c13b87f4 Binary files a/python/togl3/darwin/Togl3.0/libTogl3.0.dylib and b/python/tkgl/darwin/Tkgl1.0/libTkgl1.0.dylib differ diff --git a/python/togl3/darwin/Togl3.0/libtcl9Togl3.0.dylib b/python/tkgl/darwin/Tkgl1.0/libtcl9Tkgl1.0.dylib old mode 100755 new mode 100644 similarity index 66% rename from python/togl3/darwin/Togl3.0/libtcl9Togl3.0.dylib rename to python/tkgl/darwin/Tkgl1.0/libtcl9Tkgl1.0.dylib index 30e2b4f3..8da5d141 Binary files a/python/togl3/darwin/Togl3.0/libtcl9Togl3.0.dylib and b/python/tkgl/darwin/Tkgl1.0/libtcl9Tkgl1.0.dylib differ diff --git a/python/tkgl/darwin/Tkgl1.0/pkgIndex.tcl b/python/tkgl/darwin/Tkgl1.0/pkgIndex.tcl new file mode 100644 index 00000000..a13f0ba5 --- /dev/null +++ b/python/tkgl/darwin/Tkgl1.0/pkgIndex.tcl @@ -0,0 +1,10 @@ +# -*- tcl -*- +# Tcl package index file, version 1.1 +# +if {[package vsatisfies [package provide Tcl] 9.0-]} { + package ifneeded Tkgl 1.0 \ + [list load [file join $dir libtcl9Tkgl1.0.dylib] [string totitle Tkgl]] +} else { + package ifneeded Tkgl 1.0 \ + [list load [file join $dir libTkgl1.0.dylib] [string totitle Tkgl]] +} diff --git a/python/togl3/linux/Togl3.0/libTogl3.0.so b/python/tkgl/linux/Tkgl1.0/libTkgl1.0.so old mode 100755 new mode 100644 similarity index 65% rename from python/togl3/linux/Togl3.0/libTogl3.0.so rename to python/tkgl/linux/Tkgl1.0/libTkgl1.0.so index af0dc7dc..48b6adb1 Binary files a/python/togl3/linux/Togl3.0/libTogl3.0.so and b/python/tkgl/linux/Tkgl1.0/libTkgl1.0.so differ diff --git a/python/tkgl/linux/Tkgl1.0/libtcl9Tkgl1.0.so b/python/tkgl/linux/Tkgl1.0/libtcl9Tkgl1.0.so new file mode 100644 index 00000000..055c94f4 Binary files /dev/null and b/python/tkgl/linux/Tkgl1.0/libtcl9Tkgl1.0.so differ diff --git a/python/tkgl/linux/Tkgl1.0/pkgIndex.tcl b/python/tkgl/linux/Tkgl1.0/pkgIndex.tcl new file mode 100644 index 00000000..b7d989c9 --- /dev/null +++ b/python/tkgl/linux/Tkgl1.0/pkgIndex.tcl @@ -0,0 +1,10 @@ +# -*- tcl -*- +# Tcl package index file, version 1.1 +# +if {[package vsatisfies [package provide Tcl] 9.0-]} { + package ifneeded Tkgl 1.0 \ + [list load [file join $dir libtcl9Tkgl1.0.so] [string totitle Tkgl]] +} else { + package ifneeded Tkgl 1.0 \ + [list load [file join $dir libTkgl1.0.so] [string totitle Tkgl]] +} diff --git a/python/tkgl/windows/TkGL1.0/Tkgl10t.dll b/python/tkgl/windows/TkGL1.0/Tkgl10t.dll new file mode 100644 index 00000000..53dc852f Binary files /dev/null and b/python/tkgl/windows/TkGL1.0/Tkgl10t.dll differ diff --git a/python/tkgl/windows/TkGL1.0/Tkgl10t.lib b/python/tkgl/windows/TkGL1.0/Tkgl10t.lib new file mode 100644 index 00000000..6e11d049 Binary files /dev/null and b/python/tkgl/windows/TkGL1.0/Tkgl10t.lib differ diff --git a/python/tkgl/windows/TkGL1.0/pkgIndex.tcl b/python/tkgl/windows/TkGL1.0/pkgIndex.tcl new file mode 100644 index 00000000..320e679f --- /dev/null +++ b/python/tkgl/windows/TkGL1.0/pkgIndex.tcl @@ -0,0 +1,5 @@ +if {[package vsatisfies [package provide Tcl] 9.0-]} { +package ifneeded Tkgl 1.0 [list load [file join $dir tcl9Tkgl10.dll]] +} else { +package ifneeded Tkgl 1.0 [list load [file join $dir Tkgl10.dll]] +} diff --git a/python/tkgl/windows/TkGL1.0/tcl9Tkgl10.dll b/python/tkgl/windows/TkGL1.0/tcl9Tkgl10.dll new file mode 100644 index 00000000..635dce1e Binary files /dev/null and b/python/tkgl/windows/TkGL1.0/tcl9Tkgl10.dll differ diff --git a/python/tkgl/windows/TkGL1.0/tcl9Tkgl10.lib b/python/tkgl/windows/TkGL1.0/tcl9Tkgl10.lib new file mode 100644 index 00000000..c0fa6429 Binary files /dev/null and b/python/tkgl/windows/TkGL1.0/tcl9Tkgl10.lib differ diff --git a/python/togl3/windows/Togl3.0/Togl30t.dll b/python/tkgl/windows/Togl3.0/Togl30t.dll similarity index 100% rename from python/togl3/windows/Togl3.0/Togl30t.dll rename to python/tkgl/windows/Togl3.0/Togl30t.dll diff --git a/python/togl3/windows/Togl3.0/pkgIndex.tcl b/python/tkgl/windows/Togl3.0/pkgIndex.tcl similarity index 100% rename from python/togl3/windows/Togl3.0/pkgIndex.tcl rename to python/tkgl/windows/Togl3.0/pkgIndex.tcl diff --git a/python/togl3/darwin/Togl3.0/pkgIndex.tcl b/python/togl3/darwin/Togl3.0/pkgIndex.tcl deleted file mode 100644 index db5a2576..00000000 --- a/python/togl3/darwin/Togl3.0/pkgIndex.tcl +++ /dev/null @@ -1,10 +0,0 @@ -# -*- tcl -*- -# Tcl package index file, version 1.1 -# -if {[package vsatisfies [package provide Tcl] 9.0-]} { - package ifneeded Togl 3.0 \ - [list load [file join $dir libtcl9Togl3.0.dylib] [string totitle Togl]] -} else { - package ifneeded Togl 3.0 \ - [list load [file join $dir libTogl3.0.dylib] [string totitle Togl]] -} diff --git a/python/togl3/linux/Togl3.0/pkgIndex.tcl b/python/togl3/linux/Togl3.0/pkgIndex.tcl deleted file mode 100644 index 476759cc..00000000 --- a/python/togl3/linux/Togl3.0/pkgIndex.tcl +++ /dev/null @@ -1,10 +0,0 @@ -# -*- tcl -*- -# Tcl package index file, version 1.1 -# -if {[package vsatisfies [package provide Tcl] 9.0-]} { - package ifneeded Togl 3.0 \ - [list load [file join $dir libtcl9Togl3.0.so] [string totitle Togl]] -} else { - package ifneeded Togl 3.0 \ - [list load [file join $dir libTogl3.0.so] [string totitle Togl]] -} diff --git a/setup.py b/setup.py index 67892f7f..ae2bb5a5 100644 --- a/setup.py +++ b/setup.py @@ -568,7 +568,7 @@ def add(self, source_file, dependency_mod_time=0.0): 'snappy/raytracing', 'snappy/raytracing/shaders', 'snappy/raytracing/zoom_slider', - 'snappy/togl3', + 'snappy/tkgl', 'snappy/dev', 'snappy/dev/extended_ptolemy', 'snappy/dev/vericlosed', @@ -583,7 +583,7 @@ def add(self, source_file, dependency_mod_time=0.0): 'doc/_static/js/*', 'doc/_static/css/*', 'doc/_static/css/fonts/*'], - 'snappy/togl3': ['*/Togl3.0/*'], + 'snappy/tkgl': ['*/TkGL1.0/*'], 'snappy/manifolds' : ['HTWKnots/*.gz'], 'snappy/twister' : ['surfaces/*'], 'snappy/ptolemy':['magma/*.magma_template', @@ -620,7 +620,7 @@ def add(self, source_file, dependency_mod_time=0.0): 'snappy/raytracing':'python/raytracing', 'snappy/raytracing/shaders':'python/raytracing/shaders', 'snappy/raytracing/zoom_slider':'python/raytracing/zoom_slider', - 'snappy/togl3': 'python/togl3', + 'snappy/tkgl': 'python/tkgl', 'snappy/dev':'dev/python', 'snappy/dev/extended_ptolemy':'dev/extended_ptolemy', 'snappy/dev/vericlosed':'dev/vericlosed',