Jump to content

Programming Howto:Quickstart Guide: Difference between revisions

From BCI2000 Wiki
Jhill (talk | contribs)
No edit summary
Jhill (talk | contribs)
No edit summary
Line 1: Line 1:
===Prerequisites===
# If you do not already have a [[Creating_a_User_Account|bci2000.org username]], get one [http://www.bci2000.org/GPL/ here].  Your password will be mailed to you.
# If you do not already have a [[Creating_a_User_Account|bci2000.org username]], get one [http://www.bci2000.org/GPL/ 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 [http://tortoisesvn.net/downloads.html here].  The BCI2000 wiki contains more documentation about how to [[Programming_Howto:SVN_Client_Setup|set up]] and [[Programming_Howto:Using_TortoiseSVN|use]] SVN.
# 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 [http://tortoisesvn.net/downloads.html here].  The BCI2000 wiki contains more documentation about how to [[Programming_Howto:SVN_Client_Setup|set up]] and [[Programming_Howto:Using_TortoiseSVN|use]] SVN.
# Use SVN, with your username and password, to check out the source code from http://www.bci2000.org/svn/trunk
# 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 . More information about the layout of the resulting distribution can be found [[Programming_Reference:BCI2000_Source_Code|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 [http://www.cmake.org/cmake/resources/software.html|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 [http://www.cmake.org/cmake/resources/software.html 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 [http://www.microsoft.com/express/downloads/#2010-Visual-CPP here].  Consult the documentation for the [[Programming_Reference:Build_System|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. We will assume that you checked out the trunk to a location  <tt>C:\BCI2000\3.x</tt>  on your hard-drive. Wherever you see this path below, adjust it so that it reflects the location you actually used.
 
# Use CMake to build a project file. This is done by going to <tt>C:\BCI2000\3.x\build</tt>  (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 will see a long list of sub-projects being created, and after several seconds of this, "Configuring done."
# Open the resulting solution file,  <tt>ALL_BUILD.vcproj</tt> , in Visual C++ Express. The file should be located in <tt>C:\BCI2000\3.x\build</tt> .
# 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 copy the corresponding ready-built binary (for example, <tt>Operator.exe</tt>)  from

Revision as of 19:40, 20 April 2011

Prerequisites

  1. If you do not already have a bci2000.org username, get one here. Your password will be mailed to you.
  2. 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.
  3. 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 . More information about the layout of the resulting distribution can be found here.
  4. 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.
  5. 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. 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.

  1. 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 will see a long list of sub-projects being created, and after several seconds of this, "Configuring done."
  2. Open the resulting solution file, ALL_BUILD.vcproj , in Visual C++ Express. The file should be located in C:\BCI2000\3.x\build .
  3. 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 copy the corresponding ready-built binary (for example, Operator.exe) from