FreeElectron
Download, Configure, and Build

Download Free Electron

http://www.freeelectron.org/release

Untar the bzip2 file where ever you please. Remember that path for your FE_ROOT environment variable.

Install Python

Debian/Ubuntu: apt-get install python

Windows: http://www.activestate.com/Products/ActivePython/

Get Supporting Code

Prerequisite Libraries

Quick Build

For a simple build, the makefile found at the root of the installation should suffice.

Edit the local.py file in the base directory. This describes what you want built and what external libraries you want to use.

cd <install path>/base
<edit> local.py
make

A developer may wish to build with more control. The easy build above uses the same procedure as shown below, but the makefile hides the details.

Setup Your Environment

At a minimum, two environment variables need to be set.

export FE_ROOT=<install path>/base
export CODEGEN=optimize (validate, debug, profile, or optimize)

For more control, a full list of environment variables can be found on a separate page.

Environment Variables

Compile

Linux

cd $FE_ROOT
python $FE_ROOT/bin/forge.py here

Shell aliases are recommended. For example,

export JOB_COUNT=`/bin/grep -c \^processor /proc/cpuinfo`
alias b='nice python ${FE_ROOT}/bin/forge.py -j ${JOB_COUNT}'
alias ba='b here'
alias bc='b clean here'
alias bt='b unit'

meaning build, build all, build clean, and build/run tests.

Win32

cd %FE_ROOT%
python %FE_ROOT%/bin/forge.py here

See the files ba.bat, bc.bat, and bt.bat included in the bin directory.

Run Unit Tests

TODO media

Most modules contain unit tests. To run the unit tests for all the active modules (selected with FE_EXT or local.py),

python ${FE_ROOT}/bin/forge.py unit

If the test have already been run since the last build, they generally don't build again. You can force the tests by removing the current log of the results before running the tests again. This log is automatically removed when the source is rebuilt.

rm ${FE_ROOT}/test/log.txt