HowToBuildGimias 1 4 0 InWindows Step 2
What is CSnake?
CSnake is a CMake wrapper.
CMake is a cross-platform, open-source build system, used to control the software compilation process using platform and compiler independent configuration files.
CSnake is a tool developed at CISTIB using Python language, which provides a high level user interface for non CMake users, in order to configure and build multiplatform solutions like GIMIAS.
Set up CSnake
- [Download CSnake-2.4.4]
- Launch CSnake from the installation path
Configure CSnake options
In CSnake Options tab:
- Specify the compiler: Visual Studio 9 2008 is suggested.
- Choose Visual Studio 9 2008 if you want to build GIMIAS on a 32-bit machine
- Choose Visual Studio 9 2008 Win64 if you want to build GIMIAS on a 64-bit machine
- Specify the path of the cmake.exe file
- Specify the path of the python.exe file
- Specify the path of the compiler
- Check the “Ask to launch VisualStudio” checkbox (if you want to launch Visual Studio automatically after configuring the solution)
| Note: |
If you use Visual Studio Express 2008, CSnake cannot find the default executable. You need to browse the executable for the field "Path to Visual Studio". You can find the file in a similar path like this: C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\VCExpress.exe
Configure CSnake building parameters
In CSnake Context tab:
- In Build folder specify a folder in which the solution for Gimias will be created (e.g. C:/Code/bin/gimias_stable_vs90_32). Be sure to use a different folder for source and build folders. Source folder will contain the source code only and build folder will contain the generated files in your local computer
- In Root Folders specify the folder for the source file (e.g. C:\Code\src\gimias_stable\src )
- In ThirdParty Folders/Source Folder specify the root folder for the Third Parties (e.g. C:/Code/src/gimias_stable/thirdParty this option will be automatically given by CSnake )
- In ThirdParty Folders/Build Folder specify a folder in which the solution for the Third Parties will be created (e.g. C:/Code/bin/gimias_stable_vs90_32/thirdParty this option will be automatically given by CSnake)
- In CSnake File specify the python file that contains the parameters for Gimias configuration (e.g.C:/Code/src/gimias_stable/src/Apps/Gimias/csnGIMIAS.py)
- Press the Update button
| Note: |
The update button loads all available instances for the project. It can be used also to reactivate all buttons (as you will see in the next steps, each button is disabled after the relevant step is completed).
In the Select Project tab:
- Choose the plugins you want to compile
- Leave all other checkbox unchecked
Use CSnake to build GIMIAS
| Note: Install Visual Studio Service packs|
If you receive one of these errors:
Once GIMIAS has been built, GIMIAS.exe will be placed into the folder "Build Folder"/bin/release/Gimias.exe.
In CSnake Context tab press Configure All: This will automatically perform all steps needed to build GIMIAS and generate the executable file Gimias.exe in your build folder (e.g. /Bin/bin/Release ) To perform all the steps to build GIMIAS manually, you can follow the instructions provided in the following paragraphs.
Build Third Party Libraries
In order to build the third party libraries manually (Advanced users) you need to complete the following steps. In CSnake Context tab:
- Press Configure Third Party Folder: this will create a Visual Studio solution (CILAB_TOOLKIT.sln) for the thirdparties in the folder /Bin/thirdParty.
- Open the Visual Studio solution. If you checked the option Ask to launch VisualStudio checkbox in the Options tab, the solution will be automatically opened.
- Compile the ThirdParties in VisualStudio.
After you built the third parties, in order to build GIMIAS manually (Advanced users) you need to complete the following steps. In CSnake Context tab:
- Press Create CMake files and run CMake: this will create a Visual Studio solution (gimias.sln) for Gimias in the folder /Bin/executable/gimias
- Press Install Files to Build Folder
- Press Launch IDE
- Compile Gimias in Visual Studio
Save CSnake configuration
To save the CSnake configuration:
- Open the top menu ’File’
- Click on ’Save’ or ’Save As’ and choose the file where you want to save your CSnake configuration (e.g. contextMyApplication.CSnakeGUI for a GIMIAS version containing your
application, or context32.CSnakeGUI for your 32bit version of GIMIAS, or context64.CSnakeGUI for your 64bit version of GIMIAS
- Configure CSnake according to your needs, as described in the paragraphs above.
- CSnake will ask you to save the current configuration in your .CSnakeGUI file, when you close it.
To open a saved CSnake configuration:
- Open the top menu ’File’
- Click on ’Open’ and choose the .CSnakeGUI file containing the configuration that you want to open
- The selected configuration will be loaded in CSnake. CSnake will ask you to save all changes done to the current configuration when you close it