Sidebar

Adding Tcl syntax highlighting and more to XCode 3.x

I wanted some nice editing of TCL scripts in order to work on some VMD scripts under good conditions.In particular I wanted features such as syntax highlighting, code folding and identification of procedures with shortcuts to them.For many other languages Xcode provides just this, but not for TCL. So I had to make some configuration files myself.After a thorough search on the internet I finally put together the relevant files. The files are called Tcl.pbfilespec and Tcl.xclangspec and need to be put in the directory "/Library/Application Support/Developer/Shared/Xcode/Specifications".


Animoltion demo application combining VTK and Cocoa

animoltion_win
Some while ago, Drew McCormack has published a very nice tutorial about "Developing Visualization Applications with Cocoa and VTK", explaining how one can use the Visualization ToolKit VTK from within a Cocoa application. In this tutorial, an application called "Animoltion" is developed step by step. Unfortunately VTK, Cocoa and XCode have changed since the time the tutorial was written, and the code doesn't quite compile any more. I have adapted this tutorial application to work with the current versions of VTK (5.0.x), XCode (2.4.1) and MacOSX Tiger (10.4.9) by combining the original Animoltion with the SimpleCocoaVTK.app by Sean McBride and Mike Jackson.
The adapted Animoltion source code can be downloaded here.


Compiling an MPI (parallel) version of Paraview 3 on Mac OSX

It took a bit of fiddling to get Paraview 3 to compile on Mac OSX, so here is what I did and which seems to work for the current version of the operating system and of Paraview.

Let's first look at the software versions that I used. Currently we are at Mac OSX Tiger 10.4.10. I first checked out the current stable branch of paraview from CVS (at time of writing that is "ParaView-3-0-2"), installed current cmake (2.4.6-1001), openmpi and openmpi-dev (1.2.2-1000) from fink and installed QT4 from Trolltech (qt-mac-opensource-4.2.3.dmg and qt-mac-opensource-4.2.3-debug-libs.dmg).

I put the paraview cvs sources into /opt/src/paraview-cvs and compiled in /opt/paraview-cvs as build directory using the following cmake options:

cd /opt/paraview-cvs
ccmake \
-DMPI_INCLUDE_PATH:PATH="/sw/include" \
-DMPI_LIBRARY:FILEPATH="-L/sw/lib/openmpi -lmpi -lmpi_cxx -lopal" \
-DVTK_MPIRUN_EXE:FILEPATH=/sw/bin/om-mpirun \
-DQT_QMAKE_EXECUTABLE:FILEPATH=/Developer/Tools/Qt/qmake \
-DCMAKE_INSTALL_PREFIX:PATH=/opt \
-DPARAVIEW_USE_MPI:BOOL=ON \
../src/paraview-cvs

Then one needs to confirm the configuration twice with c and generate the Makefiles with g. Follows the classical make and make install. This goes fine and I can then run using a parallel server with the graphical client. The server and client are started with the following command lines

om-mpirun -np 4 /opt/bin/pvserver --use-offscreen-rendering # start server
open /opt/bin/paraview.app # start client

Happy parallel paraviewing to you!


Metamail 2.7 OSX Patch

I patched metamail to compile on Mac OSX and to allow for integration into Fink. You can download the patch from this site here. To apply the patch, uncompress the metamail sourcecode available from here. Then change directory into the mm2.7 directory (the one containing the src subdirectory) and do

patch -Np1 < ../mm2.7_macosx.patch

which should work fine. Then change directory into the src subdirectory and issue

make
make install-all

which should compile metamail and then install the binaries into /sw/bin. The changes in the source code are


  • include string.h and stdlib.h headers where needed

  • malloc and mrealloc return type void* and not char*

  • the second argument to signal() is cast via (void (*)(int))