MantisBT - VTK
View Issue Details
0001376VTK(No Category)public2004-11-22 11:552007-01-17 11:41
Goodwin Lawlor 
David Cole 
lowfeaturealways
closedopen 
 
 
0001376: stubs enabled vtk tcl libraries
Below are some patches to give the option in cmake to build stubs enabled vtk tcl libraries.

An advanced option TCL_TK_STUBS is offered which, if set, defines the USE_TCL_STUBS and USE_TK_STUBS preprocessor flags.

The tcl and tk stubs tables are initialized first when the Vtk*tcl_Init functions are called.

tclstub84.lib and tkstub84.lib should be linked instead of tcl84.lib and tk84.lib.

TkWinChildProc is not exported in the stubs tables, so there is a work-around in vtkTkRenderWindowWidget and vtkTkImageViewerWidget to retrieve it from the the class info registered with windows.
No tags attached.
patch cmake-cmVTKWrapTcl2Command.c.patch (1,535) 1969-12-31 19:00
https://www.vtk.org/Bug/file/5169/cmake-cmVTKWrapTcl2Command.c.patch
patch CMakeLists.txt.patch (883) 1969-12-31 19:00
https://www.vtk.org/Bug/file/5170/CMakeLists.txt.patch
patch common-CMakeLists.txt.patch (740) 1969-12-31 19:00
https://www.vtk.org/Bug/file/5171/common-CMakeLists.txt.patch
patch graphics-CMakeLists.txt.patch (744) 1969-12-31 19:00
https://www.vtk.org/Bug/file/5172/graphics-CMakeLists.txt.patch
patch hybrid-CMakeLists.txt.patch (740) 1969-12-31 19:00
https://www.vtk.org/Bug/file/5173/hybrid-CMakeLists.txt.patch
patch imaging-CMakeLists.txt.patch (741) 1969-12-31 19:00
https://www.vtk.org/Bug/file/5174/imaging-CMakeLists.txt.patch
patch io-CMakeLists.txt.patch (724) 1969-12-31 19:00
https://www.vtk.org/Bug/file/5175/io-CMakeLists.txt.patch
patch parallel-CMakeLists.txt.patch (747) 1969-12-31 19:00
https://www.vtk.org/Bug/file/5176/parallel-CMakeLists.txt.patch
patch patented-CMakeLists.txt.patch (743) 1969-12-31 19:00
https://www.vtk.org/Bug/file/5177/patented-CMakeLists.txt.patch
patch rendering-CMakeLists.txt.patch (767) 1969-12-31 19:00
https://www.vtk.org/Bug/file/5178/rendering-CMakeLists.txt.patch
patch rendering-vtkTkImageViewerWidget.cxx.patch (4,155) 1969-12-31 19:00
https://www.vtk.org/Bug/file/5179/rendering-vtkTkImageViewerWidget.cxx.patch
patch rendering-vtkTkRenderWindowWidget.cxx.patch (3,226) 1969-12-31 19:00
https://www.vtk.org/Bug/file/5180/rendering-vtkTkRenderWindowWidget.cxx.patch
patch wrapping-vtkWrapTclInit.c.patch (1,064) 1969-12-31 19:00
https://www.vtk.org/Bug/file/5181/wrapping-vtkWrapTclInit.c.patch
patch tcltkstubs-VTK-5.0.2.patch (12,481) 1969-12-31 19:00
https://www.vtk.org/Bug/file/5852/tcltkstubs-VTK-5.0.2.patch
Issue History
2011-06-16 13:11Zack GalbreathCategory => (No Category)

Notes
(0002742)
Goodwin Lawlor   
2005-07-29 11:27   
Stubs-enabling vtk dll libs allow them to be loaded into a tclkit... unfortunately they can't be (easily) wrapped into a starpack because of dependencies. To work around this, there are a couple of choices:
1. Copy dlls out of starpack at runtime and load them from disk
2. Distribute vtk dll with starpack and have them in a know relative path (kind of defeats the whole purpose).
3. Drop stubs enabling and statically link vtk libs into tclkit... this is the one I'm going for (cf www.bioengineering-research.com/vtk/vtkit.htm)
(0006214)
Hideaki Hiraki   
2007-01-17 11:08   
I ported the patches (see tcltkstubs-VTK-5.0.2.patch) to vtk-5.0.2 release with some modifications.
- TCL_STUB_LIBRARY and TK_STUB_LIBRARY are used.
- The vtk executable had to be linked to both the stub and the original libraries.
- cmVTKWrapTcl2Command.c isn't patched. (may depend on cmake version)
- vtkXRenderWindowTclInteractor.cxx should include tkInt.h but the current code has a hack to avoid it.
- Tcl_FindExecutable() in vtkTclApplicationInitExecutable() must not be called before stub initialization. The code should be moved back to vtkTkAppInit.cxx if it's really needed.

With the modifications, I could just run a build process on linux. The functionality haven't been tested yet.