Setup guide for Windows - rynti/openLima GitHub Wiki

In this guide I'll explain how to cover the dependencies of openLima, and later on how to compile openLima using Visual Studio.

Requirements

To follow this guide you need:

  • The openLima source (Probably from this Git repository)
  • Visual Studio (Some parts aren't relying on this, but if something doesn't work don't be surprised!)

Boost

openLima relies a lot on the Boost libraries, so we'll set that up now. If you already have Boost with compiled binaries, you can skip this part.

  1. Download the Boost C++ libraries.
  2. Decompress the downloaded archive. (You could use - for instance - 7-Zip)
  3. Run "bootstrap.bat" of that folder. NOTE: You probably have to execute this using the "Developer Command Prompt" (Included in Visual Studio)
  4. Run the "b2.exe" of that folder. NOTE: You probably have to execute this using the "Developer Command Prompt" (Included in Visual Studio)
  5. Set the environment variable BOOST_ROOT to the path of your boost directory (That contains the "bootstrap.bat" file)

Important: To prevent errors later, I strongly recommend you to log off and on again after defining the environment variable!

CMake

openLima uses a binary tree/source tree structure, which basically means the source codes are strictly splitted from the project files. (Or makefiles or whatever, depending on your platform) To manage that, openLima takes advantage of a tool called CMake: It is able to generate project files, makefiles, etc. from scripts. Those scripts are already made for you, so you basically only have to tell CMake where to find them and where you want your binary tree, and what kind of binary tree it should be. In this chapter I'll teach you how to set CMake up and how to generate the project files for openLima.

  1. Download and install CMake. Important: You need to select "Add CMake to the system PATH for all users" or - if you don't have the required permissions or whatever - at least "Add CMake to the system PATH for current user" during the installation, or you'll get in troubles later on at compilation.
  2. Run CMake (cmake-gui).
  3. At Where is the source code select the folder of openLima with the subfolders openLima and LimaBeans.
  4. At Where to build the binaries select the folder where you want your binary tree (The project files). NOTE: You shouldn't select the source folder or any subfolder of it, since it destroys the concept of splitting between binary/source tree and it may also won't work!
  5. Press "Configure" and select your desired target platform (For instance Visual Studio 10 for a Visual Studio 2011 project). NOTE: You can ignore the red list entries that may appear after this.
  6. Press "Generate".

Compile (Visual Studio)

Now, that we've covered all dependencies and generated the project files, we need to compile openLima & LimaBeans in order to run it.

  1. Open openLima.sln in your binary tree.
  2. Build the solution.
  3. After it compiled, you should make sure the resources of LimaBeans are in the output folder. (Which is normally Binary tree\LimaBeans\Debug) If there is no subfolder called resources there, you need to copy this folder from the superior directory (LimaBeans). If there is no folder called resources there either, you probably didn't follow the important advice for the CMake installation. However, you can find the resources folder also in the repository as a subfolder of "LimaBeans".
  4. For debugging purposes you should select LimaBeans as the initial project, else you can't run the output directly.