Programming Howto:Quickstart Guide: Difference between revisions
Appearance
mNo edit summary |
No edit summary |
||
| Line 15: | Line 15: | ||
# You probably do not need to build all of BCI2000 at once. To use BCI2000, the minimum you will need consists of the Operator, plus at least one SignalSource module, at least one SignalProcessing module, and at least one Application module. To build a single module in Visual C++ Express, right-click on the module's name in the list on the left, and select "Build". Building will typically take a few minutes per module. If you do not intend to modify a given module, you can always skip building it by copying the corresponding ready-built binary (for example, <tt>Operator.exe</tt>) from the <tt>prog</tt> subdirectory of a BCI2000 v.2 or v.3 binary distribution, and paste it into the corresponding directory of the distribution in which you are working, i.e. <tt>C:\BCI2000\3.x\prog</tt> . (To [http://bci2000.org/downloads/bin/BCI2000Setup.exe download the latest binary distribution], you will need to supply the same username and password that you used for SVN download.) Let's assume you have built, or copied, the following modules: '''Operator''', '''SignalGenerator''', '''ARSignalProcessing''' and '''CursorTask'''. | # You probably do not need to build all of BCI2000 at once. To use BCI2000, the minimum you will need consists of the Operator, plus at least one SignalSource module, at least one SignalProcessing module, and at least one Application module. To build a single module in Visual C++ Express, right-click on the module's name in the list on the left, and select "Build". Building will typically take a few minutes per module. If you do not intend to modify a given module, you can always skip building it by copying the corresponding ready-built binary (for example, <tt>Operator.exe</tt>) from the <tt>prog</tt> subdirectory of a BCI2000 v.2 or v.3 binary distribution, and paste it into the corresponding directory of the distribution in which you are working, i.e. <tt>C:\BCI2000\3.x\prog</tt> . (To [http://bci2000.org/downloads/bin/BCI2000Setup.exe download the latest binary distribution], you will need to supply the same username and password that you used for SVN download.) Let's assume you have built, or copied, the following modules: '''Operator''', '''SignalGenerator''', '''ARSignalProcessing''' and '''CursorTask'''. | ||
# Build the '''NewBCI2000Module''' and '''NewBCI2000Filter''' targets for use in the next step. The result will be two new executables, <tt>NewBCI2000Module.exe</tt> and <tt>NewBCI2000Filter.exe</tt>, in the <tt>C:\BCI2000\3.x\build</tt> directory. | # Build the '''NewBCI2000Module''' and '''NewBCI2000Filter''' targets for use in the next step. The result will be two new executables, <tt>NewBCI2000Module.exe</tt> and <tt>NewBCI2000Filter.exe</tt>, in the <tt>C:\BCI2000\3.x\build</tt> directory. | ||
===Creating a project for a new BCI2000 module, from a template=== | |||
# Navigate to <tt>C:\BCI2000\3.x\build</tt> | |||
# Find <tt>NewBCI2000Module.exe</tt> there, assuming you have already built it (see "Setup", above). | |||
# Launch it and answer the questions it asks. The default parent location <tt>../src/custom</tt> (or some subdirectory thereof) is a good choice. This maps to <tt>C:\BCI2000\3.x\src\custom</tt> which is an area reserved for your own projects. | |||
'''Under Construction''' | |||
Revision as of 20:04, 20 April 2011
Prerequisites
- If you do not already have a bci2000.org username, get one here. Your password will be mailed to you.
- To download the BCI2000 source-code, you will need an SVN client. If you do not have one, for Windows we recommend TortoiseSVN, which can be downloaded here. The BCI2000 wiki contains more documentation about how to set up and use SVN.
- Use SVN, with your username and password, to check out the latest BCI2000 source-code-included distribution, the location of which is http://www.bci2000.org/svn/trunk . We will assume that you checked out the trunk to a location C:\BCI2000\3.x on your hard-drive. Wherever you see this path below, adjust it so that it reflects the location you actually used. More information about the layout of the resulting distribution can be found here.
- Next you will need to download and install CMake if you do not already have it (at least version 2.8.3 is recommended). CMake can be downloaded here. Make sure you select the option add to path for all users when installing.
- Finally will need a C++ compiler. We will proceed on the assumption that you are on 32-bit Windows and using the free Visual C++ 2010 Express environment which can be downloaded here. Consult the documentation for the BCI2000 build system for information on other supported compilers, and more about CMake.
You should now have everything you need in order to build and customize BCI2000.
Setup
- Use CMake to build a project file. This is done by going to C:\BCI2000\3.x\build (which is the main workbench from which all build operations occur) and launching one of the "Make ... .bat" batch-files. If you are using Visual C++ 2010 Express, the appropriate batch file is Make VS10 Project Files.bat . It will ask you several questions: feel free to answer "y" to all of them except the last one about MFC (since MFC is not part of the free Visual C++ Express release). If successful, you should see a long list of sub-projects being created, and after several seconds of this, "Configuring done."
- Open the resulting solution file, ALL_BUILD.vcproj , in Visual C++ Express. The file should be located in C:\BCI2000\3.x\build .
- You probably do not need to build all of BCI2000 at once. To use BCI2000, the minimum you will need consists of the Operator, plus at least one SignalSource module, at least one SignalProcessing module, and at least one Application module. To build a single module in Visual C++ Express, right-click on the module's name in the list on the left, and select "Build". Building will typically take a few minutes per module. If you do not intend to modify a given module, you can always skip building it by copying the corresponding ready-built binary (for example, Operator.exe) from the prog subdirectory of a BCI2000 v.2 or v.3 binary distribution, and paste it into the corresponding directory of the distribution in which you are working, i.e. C:\BCI2000\3.x\prog . (To download the latest binary distribution, you will need to supply the same username and password that you used for SVN download.) Let's assume you have built, or copied, the following modules: Operator, SignalGenerator, ARSignalProcessing and CursorTask.
- Build the NewBCI2000Module and NewBCI2000Filter targets for use in the next step. The result will be two new executables, NewBCI2000Module.exe and NewBCI2000Filter.exe, in the C:\BCI2000\3.x\build directory.
Creating a project for a new BCI2000 module, from a template
- Navigate to C:\BCI2000\3.x\build
- Find NewBCI2000Module.exe there, assuming you have already built it (see "Setup", above).
- Launch it and answer the questions it asks. The default parent location ../src/custom (or some subdirectory thereof) is a good choice. This maps to C:\BCI2000\3.x\src\custom which is an area reserved for your own projects.
Under Construction