SplitsTree for Mac OS X

This is SplitsTree 3.2 compiled for Mac OS X using Tcl/Tk Aqua. The interface has some minor bugs, but is useable.

Application home page.

Download

SplitsTree for Mac Os X.

Requirements

Tcl/Tk for Aqua. Available from SourceForge, or download a local copy for Mac Os X 10.1.x.

 

Bugs

I've had to edit the initialisation file for the Tcl/Tk menus to get SplitsTree to work properly. As a result some commands that should read "Open..." are simply "Open". The "..." break Tcl/Tk on Mac OS X, and you simply get <Error> appearing in the menus.

Compiling

To compile SplitsTree for Mac OS X 10.1.5 I did the following.

  1. Got the source from the SplitsTree home page.
  2. Copied the file "Definitions.linux" to "Definitions.darwin"
  3. Created a makefile "MakefileX" based on "Makefile" but with include and library flags set for TclTkAqua.
  4. Inserted #ifdef" is the code wherever the functions srand48 and drand48 are called, as these are not available in Mac O X 10.1.x (I think these are available in Mac OS 10.2).
  5. Hacked initstr.h to replace Ctrl+ with Command to get special command character appearing in menus. I also deleted all ... after any command that displays a dialog. Lastly the code for opening a file dialog box didn't work, so I've replaced it with this:
    # Open File:
    proc open_file {var} {
    	global var_filename program_name var_selection
    	set var_selection 0
    	show_logwin
    	if {$var==\"\"} {
    		set name [tk_getOpenFile -filetypes\\
    		\"{{NEXUS Files} {.nex .nxs} TEXT} {{Text Files} {.txt} TEXT} {{Any file} *}\"\\
    		 -title \"Open Nexus File\"]
    	} else {
    		set name $var
    	}
    
    	if {$name != \"\"} {
    		if {[file readable $name] == 1} {
    			append_log \"\\nOpen file: $name\\n\"
    			set var_filename $name
    			if {[catch {st_cmd \"open '$var_filename'\"}]==0} {
    				wm title . \"$program_name: [file tail $var_filename]\"
    			}
    		}
    	}
    }
    
    .
  6. Wrote a shell script to bundle the executable into a package so that it launches correctly, has an icon, and doesn't produce the "SetFrontProcess failed,-600" error (thanks to the ocaml list for the hint).

The code I used is here.