# Blepo Download

## Downloading the library

Blepo versions available for download:

- Version 0.5 (8 MB)

History of versions

## Setting up your system

Once you have downloaded the code and unzipped it, you will need to do the following to set up your system. Hopefully one day we will have an installer that will take care of these steps automatically.

1. The DLLs in the `external/bin` directory must be in your path. This can be accomplished on WindowsXP by selecting `Start Menu -> Control Panel -> System -> Advanced -> Environment Variables -> Path -> Edit`. In the edit box, append the full path to that directory, preceded by a semicolon, for example, `; c:/blepo/external/bin`. (If you already have Visual C++ running, then close and restart it in order to load the new path.)
2. The NASM assembler, which is used to compile the assembly code, must be in your executable path. The name of this file is `nasm.exe` and it resides in the `external/bin` directory. For some inexplicable reason the previous step does not solve this problem, so you have to copy the `nasm.exe` file to an existing directory on your path, such as `C:/Windows/System32`.
3. You will need to add the gsl (GNU scientific library) path to your include directory.
   - In Visual C++ 6.0, `Tools -> Options -> Directories -> Include files -> add external\WinGsl`.
   - In Visual Studio .Net, follow the same step except `Tools -> Options -> Projects -> VC++ Directories`.
   After this step, any project you create should work automatically. Alternatively, you can skip this step and add the include path individually to each project you create.

In addition, if you wish to capture images from a camera (e.g., USB webcam, Data Translation DT3120, or IEEE 1394), you will need to install the driver. For IEEE1394, you need to set it to use the CMU driver by following the instructions in `Capture/CaptureIEEE1394.h`. If you have any trouble, see the help in `blepo/external/doc/IEEE1394`. After installing the driver, you may test your camera using Blepo code or the CMU test application in `blepo/external/bin/1394CameraDemo.exe`

## Getting started

Once you have performed these steps, you should be able to open `Demo/Demo.dsw` or `Test/Test.dsw` in Visual C++ 6.0, compile the code, and run. These two workspaces will be a good starting point for learning how to build an executable using the library.

To create a new project to use Blepo,

1. Create a project with `File -> New -> Project`
   - Either `Win32 Console Application -> An application that supports MFC`, or
   - `MFC App Wizard` (Dialog based is the simplest, but the other application types should work as well)
2. Make the project use the Blepo library.
   - The simplest option is to add Blepo to the workspace and make the project dependent upon Blepo. More specifically,
     1. `Project -> Insert Project into Workspace`
     2. Select `blepo/src/blepo.dsp`
     3. Set your project to the active project again (`Project -> Set Active Project`)
     4. Make your project dependent upon Blepo (`Project -> Dependencies`, check the box next to `Blepo`)
   - Alternatively, you can compile Blepo separately and just add the .lib files to the project (the `blepo.lib` file as well as all the other `.lib` files in the Blepo project).
3. Include the Blepo header file (`#include "blepo.h"`). For the compiler to find this file, you will need to do one of the following:
   - Add the `blepo/src` path to your project include path (`Project -> Settings -> C/C++ -> Additional include directories`), or
   - add the path to your VC++ list of include directories (`Tools -> Options -> Directories -> Include directories`), or
   - put the path into the `#include` statement.

Enjoy!