Psychtoolbox-3 Installing the MEX File Source

Several core Psychtoolbox functions are implemented as MATLAB Extension (MEX) files. These are compiled binary files, written in the C programming language. Instructions for downloading the source code can be found by typing help UseTheSource in Matlab. Some tips on modifying and compiling the source are follow on this page.

These are the steps I took to get Psychtoolbox source to compile on my machine. I am sure this is probably not the best way (being that I was just winging it) but it might help you get going. Most are just a series of hacks and work arounds trying to get it all to compile without really knowing what I was doing. If anyone wants to improve these steps, feel free. -- Rob Kohr 26 January 2006 (UTC)

Download the source and unzip it somewhere. Mostly this will not be used, since the version management system will be used to get the newest source, but it seems some of the stuff only exists in the source folder on the website.
Follow these instructions to get the most up to date version of PTB
svn checkout SOME_OUTPUT_PATH
open the project file (located in PsychSourceGL/Projects/MacOSX/PsychToolbox/PsychToolbox.xcodeproj) with XCode (project may need to be converted)
There will be a number of red files. Do a get info on them and try to fix the file names and folder names in the finder to match the paths in the project view.
Start with the files in IO Warrior libs. Rename the file folder approprately
For a bunch of them I had to go to PsychSourceGL/Source/Common/PsychSound/StaticOpenALLib/ and unzip a file, and drag the contents of the zip to the appropriate directory
Some of the stuff in Cohorts need to be in the Resources folder and vise versa. Just take a look at the paths to make sure it is all in the right places.
Download and install the CHUD framework
Set the path for the CHUD.framework to /System/Library/PrivateFrameworks/CHUD.framework
Put Development folder in PsychSourceGL/Projects/MacOSX/PsychToolbox/build/ . For some reason this is only in the source code you download from the psychtoolbox website.
Go to terminal and type
ln -s /Applications/YOUR_MATLAB_FOLDER /Applications/MATLAB704
ln -s /Applications/MATLAB704/toolbox/Psychtoolbox /Applications/Psychtoolbox
Change path for Quicktime framework -> /System/Library/Frameworks/QuickTime.framework
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki