 **** FLXLab v2.5 - A program for running psychology experiments.  
 **** Copyright (C) 2010 Todd R. Haskell (todd.haskell@wwu.edu) 
 **** 
 **** Use and distribution is governed by the terms of the 
 **** GNU General Public License. Certain portions of the 
 **** program may be subject to other licenses as well. See 
 **** the file LICENSE.TXT for details.
 **** 

This document describes how to build the FLXLab package in Windows, OS X,
and Linux.

WINDOWS

The Windows version of FLXLab is built using the MinGW port of the
gcc compiler, along with the MSYS command-line environment. These
are both available at http://www.mingw.org/.

You will probably also need to download the library and header files
for DirectX 7 for purposes of compiling the Allegro library. You can
get these at http://alleg.sourceforge.net/wip. Scroll down the page
and look for "dx70_mgw.zip."

Once you have these installed, you should be able to build the
program as follows:

1) Start a MSYS terminal window, and change to the directory
containing the source distribution (i.e., the directory containing
this file).

2) Type "make". If all goes well, this should build the program.

3) Type "make install". This will install the program in a directory
called "flxlab" alongside the source directory. Note that it will not
create shortcuts in the start menu, associate the .flx extension with
FLXLab scripts, etc. You will have to do these things manually. Note
that once the program has been installed, you can move the "flxlab"
directory to any location you like, or even change the name of the
directory, and the program will still work.

4) See the user guide for instructions on how to configure FLXLab to
use system fonts.

OS X

For the Mac version, you need to build and run it from a
terminal. First open a terminal window, and navigate to the FLXLab
source directory. Then follow these instructions:

1) Start a terminal window, and change to the directory containing the
source distribution (i.e., the directory containing this file).

2) To configure the files for building on a Mac, type "perl configure.pl mac".

3) Type "make". If all goes well, the program
should compile without any errors.

4) By default, FLXLab is installed in a directory called "flxlab"
alongside the source distribution directory. If you want to install in
a different directory, edit the value of FLXLABBASEDIR in
Makefile.system.  If necessary, log in as root, then type "make
install".

5) See the user guide for instructions on how to configure FLXLab to
use system fonts.


LINUX

FLXLab requires several "development" packages which may not be
installed by default. For example, in OpenSuse 10.2 you will need to make
sure the following packages are installed:

xorg-x11-devel
glib2-devel
alsa-devel

Other Linux distributions might use slightly different packages. You can
generally tell when a necessary package has not been installed because
the linker will complain that it is unable to find a particular library.

BUILDING AND INSTALLING THE PROGRAM

1) To configure the files for building the program in Linux, type
"perl configure.pl linux".

2) You will need to edit Makefile.system to indicate where the glib2
headers and libraries are located on your system.  The base directory
is specified by GLIBDIR. On my distribution (openSUSE), this is
/opt/gnome. Edit this value if necessary. You may also have to
slightly edit GLIBINCLUDEDIR1, GLIBINCLUDEDIR2, and/or GLIBLIBRARYDIR
(e.g., change 'lib64' to just 'lib').

3) Type "make". If all goes well, the program
should compile without any errors.

4) By default, FLXLab is installed in a directory called "flxlab"
alongside the source distribution directory. If you want to install in
a different directory, edit the value of FLXLABBASEDIR in
Makefile.system.  If necessary, log in as root, then type "make
install".

5) If you don't want to add the installation directory to your path
statement, you can create a symbolic link to the binary in
/usr/local/bin. Note that you should link to the file "flxlab"
(which is a wrapper script) rather than the file "flxlab.bin".

6) See the user guide for instructions on how to configure FLXLab to
use system fonts.
