Programming Howto:Building BCI2000: Difference between revisions
Appearance
No edit summary |
|||
| Line 10: | Line 10: | ||
The operator GUI and Application modules currently require the Borland VCL library. | The operator GUI and Application modules currently require the Borland VCL library. | ||
Non-GUI related parts of BCI2000 can be built using the freely available Borland C++ compiler: | Non-GUI related parts of BCI2000 can be built using the freely available Borland C++ compiler: | ||
*[[Command line tools]] | *[[User Reference:Command Line Processing|Command line tools]] | ||
*[[Matlab mex files]] | *[[Matlab mex files]] | ||
| Line 38: | Line 38: | ||
# In the project manager (at the top right), right-click the topmost project and choose "Make all from here". | # In the project manager (at the top right), right-click the topmost project and choose "Make all from here". | ||
# To get rid of possible inconsistencies from earlier builds, choose "Build all from here" rather than "Make all from here". | # To get rid of possible inconsistencies from earlier builds, choose "Build all from here" rather than "Make all from here". | ||
# Command-line builds cannot be done with Borland C++ Builder 2007 because it lacks a project-to-makefile conversion utility. Still, [[Command line tools]] and [[Matlab mex files]] may be compiled from the command line as described in their documentation. | # Command-line builds cannot be done with Borland C++ Builder 2007 because it lacks a project-to-makefile conversion utility. Still, [[User Reference:Command Line Processing|Command line tools]] and [[Matlab mex files]] may be compiled from the command line as described in their documentation. | ||
# When using BCB2006, you may experience "invalid property" errors when running BCI2000. This may be due to imperfect import of *.dfm files. Make sure to install all available updates, then import a clean version of the BCI2000 source tree. If this doesn't help, consider updating to BCB2007. | # When using BCB2006, you may experience "invalid property" errors when running BCI2000. This may be due to imperfect import of *.dfm files. Make sure to install all available updates, then import a clean version of the BCI2000 source tree. If this doesn't help, consider updating to BCB2007. | ||
Revision as of 20:41, 6 November 2007
This document describes how to build BCI2000, i.e. how to create the BCI2000 executables from their source code.
Why to build
Typically, you will install BCI2000 from its binary distribution, and do not need to build BCI2000, unless
- you want to always use its most current SVN version,
- you create your own module by modifying an existing one, or create a new one from scratch.
Tools required
As of BCI2000 version 2.0, building all parts of BCI2000 requires Borland's C++ Builder 6, or a more recent version. The operator GUI and Application modules currently require the Borland VCL library. Non-GUI related parts of BCI2000 can be built using the freely available Borland C++ compiler:
Matlab mex files can also be built on platforms other than Win32. Please use the src/tools/mex/buildmex.m Matlab script (tested with gcc).
How to build
Compiling BCI2000 from the command line
Command-line builds require a working installation of Borland C++ Builder 6.
- Open a Windows cmd shell, e.g. by choosing "Run..." from the Start Menu and entering "cmd".
- Change to the "src" directory where this document resides.
- Execute "make" from the command prompt.
- If you updated or edited any of the source files, and experience linker errors or other unexpected behavior, execute "make clean && make all".
- For build versioning, execute "make build" rather than "make" or "make all". This will update the build information visible in the BCI2000 "Version" parameters, and in the "About" boxes of BCI2000 GUI applications.
Compiling BCI2000 using the Borland C++ Builder 6 IDE
- Open the file "BCI2000.bpg" with the IDE by double-clicking it.
- Make sure the "ProjectManager" view is visible to the left.
- Right-click the topmost project (located immediately below the line reading "BCI2000"), and choose "Make all from here".
- To get rid of possible inconsistencies from earlier builds, choose "Build all from here" rather than "Make all from here".
Starting up BCI2000
- After compilation, a desired configuration of BCI2000 may be started by executing an appropriate batch file from the top level "batch" directory. Once a particular configuration of BCI2000 is started, simply load a parameter file with the same name as the batch file from the "parms" directory.
- If you need a configuration for which no batch file exists, just modify a copy of a batch file that is close to your needs.
Compiling BCI2000 with Borland C++ Builder 2006/2007
- Open the file "BCI2000.bpg" from within Borland Developer Studio. This will import all existing projects into BDS project files.
- In the project manager (at the top right), right-click the topmost project and choose "Make all from here".
- To get rid of possible inconsistencies from earlier builds, choose "Build all from here" rather than "Make all from here".
- Command-line builds cannot be done with Borland C++ Builder 2007 because it lacks a project-to-makefile conversion utility. Still, Command line tools and Matlab mex files may be compiled from the command line as described in their documentation.
- When using BCB2006, you may experience "invalid property" errors when running BCI2000. This may be due to imperfect import of *.dfm files. Make sure to install all available updates, then import a clean version of the BCI2000 source tree. If this doesn't help, consider updating to BCB2007.