README Poisson/Superfish on OSX 10.6 July 1, 2010 David Lawrence May 8, 2013 (updated DL) This directory contains files related to running the poisson/superfish suite on OSX Snow Leopard. The programs are distributed as windows binaries, but are compatible with WINE and so may be run using it. Because WINE is available on other platforms (namely, Linux) much of these instructions are applicable for those as well. n.b. I have placed most of the configuration files generated over the years into a directory in svn: https://halldsvn.jlab.org/repos/trunk/home/davidl/PoissonConfigFiles Obtaining WINE for OSX ----------------------- I downloaded wine from here: http://winebottler.kronenberg.org/ This site provided a disk image with the wine and winebottler applications. I dragged them into my private Applications folder. One thing to note about these: at first I tried to use the WineBottler application, but that seems geared towards packages with a single executable and so isn't really appropriate here. Also, running the Wine app by double clicking it doesn't seem to do much. Because several programs must be run to produce a usable map, scripting the sequence using the "startwine" script provided with the Wine app seemed to be the way to go. (See sections below.) Setting up environment ----------------------- The environment should have 2 things: 1. "wine" in your path 2. LANL variable set to the LANL directory that contains the poisson/superfish program suite For my installation on OSX, I actually have "wine" set as an alias to the "startwine" script in the directory Wine.app/Contents/MacOS. The startwine script sets up some other environment variables just before running the actual wine executable. I was a little concerned that setting these in my .cshrc file so I could run "wine" without the script may lead to problems later on. This was because it needs LD_LIBRARY_PATH (not DYLD_LIBRARY_PATH) and DYLD_FALLBACK_LIBRARY_PATH both of which seem foreign to Darwin systems. NOTE: It seems startwine no longer comes with the Wine.app. I've copied it to the bottom of this file in case it is needed. Running the programs ----------------------- An example script can be found in the "example" directory. It is called "run_all.csh". It is probably easiest to just look there for an example of how to run each of the programs. APPENDIX: startwine script ----------------------------- Below is a copy of the startwine script from an older version of WineBottler from when they used to distribute it. #!/usr/bin/env bash #hack to add some paths # get current path if test $(echo $0 | grep "Wine.app/Contents/MacOS/startwine"); then WINE_DIRNAME="$(dirname "$0")/../Resources" else WINE_DIRNAME="$(pwd)/../Resources" fi # exports to ensure wine finds all libs in the bundle export PATH="$WINE_DIRNAME/bin":$PATH export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:"$WINE_DIRNAME/lib":"/usr/X11R6/lib" export DYLD_FALLBACK_LIBRARY_PATH="/usr/lib:$WINE_DIRNAME/lib:/usr/X11R6/lib" export FONTCONFIG_FILE="$WINE_DIRNAME/etc/fonts/fonts.conf" # set Display properties for Tiger if test $(echo $OSTYPE | grep darwin8); then export DISPLAY=:0.0 open /Applications/Utilities/X11.app fi # start wine exec "$WINE_DIRNAME/bin/wine" "$@"