Introduction:
For those who have some knowledge about the functioning of Mac OSX, Lsd, and Tcl/Tk, the following procedure can be used directly. Others will want to consult Matthieu Farcot's note on installing Lsd on OSX that was written in 2003. However, they should probably not follow Farcot's procedure but turn to the present one after having read his note.
John Chang's procedure is tested with Mac OS X v10.4 (Tiger), but may work on Mac OS X v10.3 (Panther), too. Not all Lsd functionality has been tested on Mac OS X, but at least the basics work.
The procedure:
- Install X11.
- Download and expand Lsd sources
http://www.business.aau.dk/~mv/Lsd/Lsd5_5linux.zip
- Go into the Lsd5.5 directory. Then save this patch file (which only works as long as Marco Valente does not change the source file!): Lsd5.5-macosx.diff
- Launch Applications > Utilities > X11
- cd to the Lsd5.5 directory and
$ patch -p1 < Lsd5.5-macosx.diff
$ make -f makefile.ln
$ ./lmm
- Pick a model, then change Lsd's System Compilation Options as follows:
LSDROOT=/###INSERT YOUR PATH TO###/Lsd5.5
TCL_VERSION=8.4
TK_VERSION=8.4
DUMMY=-L/usr/X11R6/lib -lX11 -ldl -lstdc++
PATH_TCL_LIB=/usr/lib
PATH_TK_LIB=/usr/lib
PATH_TK_HEADER=/usr/include
PATH_TCL_HEADER=/usr/include
PATH_LIB=/usr/lib
INCLUDE_LIB=-I/usr/include
Explanation of the diffs:
- Library/header paths and linker options are of course different from platform to platform.
- The Mac OS X implementation of tk_getOpenFile doesn't support the - initialfile option
- The Unix version of Lsd hard-codes "konsole" and "mozilla" helper apps which don't
exist on Mac OS X. The equivalents are "xterm" and "open". The diffs are a dirty hack
to work around this; the proper fix would be cleaner...
- The a.bat temporary script needs +x permissions.
The result: