You are on page 1of 5

Report on PyEPL modicationsJanuary 2011

Aaron Geller January 18, 2011

Manual Installation Instructions


1. Prerequisites: mac running Mac OS X 10.6 (Snow Leopard) 2. Install XCode tools from snow leopard DVD apple developer website 3. Install MacPorts: http://www.macports.org/install.php 4. Macports installs: % sudo port install python26 freetype libpng libsndfile libsamplerate \ libsdl swig-python py26-opengl py26-game py26-scipy py26-numpy \ py26-pyrex this will take a while as pygame has gcc44 as a dependency, which took on the order of 1.52 hours to compile! when its done, do: % sudo python_select python26 % sudo ln -s /opt/local/Library/Frameworks/Python.framework/Versions\ /2.6/bin/pyrexc /opt/local/bin/ 5. Manual installs: (a) ODE Get SVN version of ODE and install it, as follows:

% svn co https://opende.svn.sourceforge.net/svnroot/opende/trunk \ opende % cd opende % sh autogen.sh % ./configure --enable-double-precision --enable-shared % make % sudo make install (b) PyODE get it from here: https://sourceforge.net/projects/pyode/ files/pyode/snapshot-2010-03-22/PyODE-snapshot-2010-03-22. zip/download unpack it and do: % cd PyODE-snapshot-2010-03-22 % python setup.py build % sudo python setup.py install (c) USB support hacked version of ActiveWire drivers LabJack drivers and interface: driver: http://labjack.com/sites/default/files/2010/ 08/Exodriver NativeUSB Setup.zip python interface: http://labjack.com/sites/default/ files/2010/10/LabJackPython-9-20-2010.zip (d) PyEPL get it: % sudo port install git % git clone git://git.debian.org/pkg-exppsy/pyepl.git install it: % cd pyepl % python setup.py build % sudo python setup.py install

2
2.1

Modications to PyEPL code


Makele changes
1. pyepl/setup.py 2. pyepl/code/hardware/Makefile 2

3. pyepl/code/hardware/rt/Makefile 4. pyepl/code/hardware/eeg/pulse/Makefile 5. pyepl/code/hardware/sound/Makefile

2.2

Code changes
GCC 4.2 will not link against the libaw.dylib in the old ActiveWire installer also, the source for the driver no longer compiles because it includesthe Apple-provided encryption suite libCdsaCrypt, which no longer compiles (and I was unable to nd a version that does) fortunately, we do not rely on this functionality. therefore, I commented out the code which mentions libCdsaCrypt and recompiled the ActiveWire drivers. I am providing a new installer for this version of the activewire drivers but dont have an activewire box so it is not yet tested.

1. ActiveWire driver

2. labjack functionality I added a class LabJack to pyepl/code/hardware/eeg/pulse/ init .py, which inherits from the LabJack-provided u3.U3 class and adds some convenience functions. I added code to pyepl/code/hardware/eeg/ init .py in the nalize() function, to cause cleanup I added code to pyepl/code/eeg.py to use the LabJack object for default sync pulsing on channel 1 and the following functions for client-code sync pulsing on channel 2: EEGTrack.clientPulse() takes a duration as an argument and blocks until a pulse (1 on/o cycle) of that duration is completed EEGTrack.clientHighNow() takes a PresentationClock as an argument and returns immediately after setting channel 2 to high EEGTrack.clientLowNow() takes a PresentationClock as an argument and returns immediately after setting channel 2 to low 3

Pyrex 0.9.9 to allow for compatibility with Pyrex 0.9.9, a version of code/hardware/vr/environment.pyx was added which is copied over the default version

Making the .pkgs


1. Any pkg foo installed with port may be made into a pkg with sudo port pkg foo. 2. There 7 items which are installed manually: pyepl the font DejaVuSans labjack drivers labjack python interface ode PyODE ActiveWire For each of these, do: (a) make a directory structure which simulates the path to where each component belongs. for example, ode installs things to /usr/local/lib and /usr/local/include. So you should make a directory structure with commands like: mkdir -p oderoot/usr/local/lib mkdir -p oderoot/usr/local/include (b) copy the components from your system into where they belong in this simulated directory structure. E.g. copy the directory /usr/local/include/ode into oderoot/usr/local/include. (c) use /Developer/usr/bin/packagemaker root to make the pkg; dont use the GUI, or else you wont be able to use the GUI to make your .mpkg. For the above case, do /Developer/usr/bin/packagemaker --root oderoot --id \ edu.upenn.psych.memory.ode

For packages requiring post-install shell command execution, make a le called postflight (not postflight.sh), set it to executable, put it in its own directory, and use the --scripts ag to pass that directory name to packagemaker. Note that the string passed to the id ag should be unique for each package you make. 3. To make the super-installer (.mpkg), do: just drop all the packages you want into the left-hand side of a new PackageMaker GUI project. The command line packagemaker seems not to work for making mpkgs!

You might also like