[vtkusers] vtk, OSX and tcl

Yves Starreveld ystarrev at uwo.ca
Wed May 1 14:52:53 EDT 2002


Mike,

My subscription to vtkusers must have expired... someone forwarded me 
your message, tho, and I have now resubscribed.

OSX installation of vtk:

1) You need the latest cvs versions of CMake, VTK.
2) You need tcl/tk (if you want tcl/tk) - there is a binary release at 
sourceforge now
3) You need python (if you want python) - I recommend one of the recent 
2.2 releases.
4) Your expectations need to be tempered somewhat - 
RenderWindowInteractor only works from C++ and Python. Something goes 
awry with .wm withdraw on the current iteration of Tk and the OSX event 
loop does not start properly. This is likely due to Tk being Carbon 
based, and the OSX version of VTK being Cocoa based. I will write Carbon 
based VTK classes in the near future, but contributions are always 
welcome. This means that vtk on osx will support three event managers. 
(X-windows, Cocoa, Carbon).
5) Instructions:

a) In your freshly downloaded VTK directory, run cmake
b) edit CMakeCache.txt to set

//Build VTK with shared libraries.
BUILD_SHARED_LIBS:BOOL=ON

//Where can the GL library be found
OPENGL_LIBRARY:FILEPATH=-framework OpenGL -framework Cocoa

c) run cmake again, run make

d) cd to VTK/bin

e) run the examples there, like Mace, TimeRenderer

f) back in VTK directory, re-edit CMakeCache.txt to switch on wrapping 
for tcl

g) re-run cmake

h) re-edit CMakeCache.txt to set
//What is the path where the file tcl.h can be found
TCL_INCLUDE_PATH:PATH=/Library/Frameworks/Tcl.framework/Headers

//Where can one of the tcl, tcl84, tcl8.4, tcl83, tcl8.3, tcl82,
// tcl8.2, tcl80 or tcl8.0 libraries be found
TCL_LIBRARY:FILEPATH=-framework Tcl

//Path to a program.
TCL_TCLSH:FILEPATH=/usr/bin/tclsh

//What is the path where the file tk.h can be found
TK_INCLUDE_PATH:PATH=/Library/Frameworks/Tk.framework/Headers

//Where can one of the tk, tk84, tk8.4, tk83, tk8.3, tk82, tk8.2,
// tk80 or tk8.0 libraries be found
TK_LIBRARY:FILEPATH=-framework Tk

i) re-run cmake
j) make


I split things up into the binary and tcl portions, but clearly they 
could all be done as one - it may be easier for me to debug any problems 
you may have if we split it up this way.

I have not had a lot of time of late, but this is changing now.

The list of things to do for vtkOSX is now: integrate Sander's patches 
to allow building for x-windows (without breaking the other builds), add 
support for TextMapper (there will need to be two, one for Cocoa, one 
for Carbon), add Carbon-based RenderWindow and RenderWindowInteractor.

Suggestions, comments and code always welcome.

Yves




More information about the vtkusers mailing list