Skip to content

Getting Started

Evan Pezent edited this page Feb 24, 2019 · 21 revisions

Chocolatey

To get started, download and install Chocolatey, a package manager for Windows similar to Linux's apt-get. Throughout this guide we will use Chocolatey to install most of our needed software, but a direct link will always be provided to download and install software manually if you prefer.

Note: Always run Chocolatey from an Administrator Command Prompt or PowerShell terminal. You can do this by right clicking the Desktop, Start Menu, or Taskbar icon for the terminal and choosing Run as Administrator. Also, when installing command line tools, it may be necessary to restart you terminal before the tool will become visible.

Git

The first program we need is Git, which provides command line source control and an interface to GitHub so you can download and keep up-to-date with MEL. Download it using Chocolatey (choco):

> choco install git    # install git using Chocolatey
> git --version        # make sure Git was installed correctly

Let's use Git to download all of MEL's source code. Open a terminal in the location you wish to keep MEL (the recommended location is C:/Git/) and run the following command:

> git clone https://github.com/mahilab/MEL    # make local copy of the MEL master repository

Git will download a local copy of all of MEL's source code to your computer. Changes you make to this copy are your own, and will not affect the master repository unless they are submitted for a pull request and accepted.

CMake

MEL uses a very popular tool called CMake to handle the automatic generation of C/C++ build files from MEL's source code. These "build files" could be a number of things depending on the target hardware and/or compiler being used with MEL. For example, when using Quanser hardware, MEL must be compiled with Microsoft Visual C++ (MSVC), so we use CMake to generate a Visual Studio solution .sln file from MEL's source files. Likewise, when using National Instruments Linux Real-Time hardware, MEL must be compiled using NI's GNU-based cross-compiler which is incompatible with MSVC or Visual Studio, so we generate a .ninja file to use with the cross-platform build tool Ninja. Go ahead and install CMake using choco:

> choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System'    # install CMake, adding it to the system PATH
> cmake --version                                                 # make sure CMake was installed correctly