Installation for Windows¶
Prerequisites for Windows users¶
If not already installed:
- Install git
- Optionally you can install SourceTree to manage your repositories
- Install Visual Studio 2015 Community
- Install Python 2.7
- Install CMake
- Install jom
- Install ninja
Qt is an external library used in FW4SPL. For the successful compilation of Qt for FW4SPL, please see the following requirements:
FW4SPL installation¶
Good practice in FW4SPL recommend to separate source files, build and install folders. So to prepare the development environment:
Create a development folder (Dev)
Create a build folder (Dev\Build)
- Add a sub folder for Debug and Release.
Create a source folder (Dev\Src)
Create a install folder (Dev\Install)
- Add a sub folder for Debug and Release.
To prepare the third party environment:
Create a third party folder (BinPkgs)
Create a build folder (BinPkgs\Build)
- Add a sub folder for Debug and Release.
Create a source folder (BinPkgs\Src)
Create an install folder (BinPkgs\Install)
- Add a sub folder for Debug and Release.
Set the environment for a x64 version. To compile BinPkgs and sources, you must use the ‘VS2015 x64 Native Tools Command Prompt’
Dependencies¶
Warning
Be sure to be in the ‘VS2015 x64 Native Tools Command Prompt’
Clone the following repository in the (BinPkgs) source folder:
Note
Optionnal: You can also clone this extension repository: fw4spl-ext-deps
- Checkout the master branch in the cloned repositories.
Note
Make sure that CMake executable location is present in your PATH environment variable.
- Call the cmake-gui
- Set the wanted Build directory (e.g. C:\Dev\BinPkgs\Build\Debug)
- During Configure, choose the generator ‘NMake Makefiles JOM’.
Note
Make sure that JOM executable location is present in your PATH environment variable.
Set the following arguments:
- CMAKE_INSTALL_PREFIX: set the install location (e.g. C:\Dev\BinPkgs\Install\Debug).
- CMAKE_BUILD_TYPE: set to Debug or Release.
- ADDITIONAL_PROJECTS: you can leave it empty, it is only needed if you have an extra source location like fw4spl-ext-deps or a custom repository.
Generate the code.
- Compile the FW4SPL dependencies using jom in the console:
- Use “jom all” to compile all the dependencies
- Use “jom name_of_target” to compile only the wanted target
Source¶
Warning
Be sure to be in the ‘VS2015 x64 Native Tools Command Prompt’
Note
- Optionnal: You can also clone these extension repositories:
- fw4spl-ar contains functionalities for augmented reality (video tracking for instance).
- fw4spl-ext contains experimental code.
- fw4spl-ogre contains a 3D backend using Ogre3D.
- Checkout the master branch in the cloned repositories.
Note
Make sure that CMake executable location is present in your PATH environment variable.
- Call the cmake-gui.
- Set the wanted Build directory (e.g. C:\Dev\Build\Debug)
- During configure step, choose the generator ‘Ninja’ to compile FW4SPL sources.
Note
Make sure that Ninja executable location is present in your PATH environment variable.
Set the following arguments:
- ADDITIONAL_PROJECTS: set the source location of fw4spl-ar, fw4spl-ext and fw4spl-ogre, separated by ”;”.
- CMAKE_INSTALL_PREFIX: set the install location (e.g. C:\Dev\Install\Debug).
- CMAKE_BUILD_TYPE: set to Debug or Release.
- EXTERNAL_LIBRARIES: set the install path of the dependencies install directory (e.g. C:\Dev\BinPkgs\Install\Debug).
- PROJECT_TO_BUILD: set the names of the applications to build (see DevSrcApps or DevSrcSamples, ex: VRRender, Tuto01Basic ...), each project should be separated by ”;”.
- ECLIPSE_PROJECT: check this box if you want to generate an Eclipse project.
- If you want to generate installers:
- PROJECT_TO_INSTALL: set the names of the applications you want to install (i.e. VRRender).
Note
- If PROJECT_TO_BUILD is empty, all application will be compiled
- If PROJECT_TO_INSTALL is empty, no application will be installed
Warning
Make sure the arguments concerning the compiler (advanced arguments) point to Visual Studio.
- Generate the code.
- Compile the FW4SPL source code with ninja in the console.
Note
- Use “ninja” if you want to compile all the applications set in CMake.
- Use “ninja name_of_application” to compile only one of the applications set in CMake.
Launch an application¶
After a successful compilation the application can be launched with the fwlauncher.exe from FW4SPL. Therefore the profile.xml of the application in the build folder has to be passed as argument.
Note
Make sure that the external libraries directory is set to the path (set PATH=<FW4SPL Binpkgs path>\Debug\bin;<FW4SPL Binpkgs path>\Debug\x64\vc12\bin;%PATH%).
Generate an installer¶
- After setting the applications for which you want to generate installers in the PROJECT_TO_INSTALL variable of CMake and generating the code, follow these two steps:
- Run ninja install application_to_install in the Build directory
- Run ninja package in the Build directory
The installer will be generated in the Build directory.
Recommended software¶
The following programs may be helpful for your developments:
- Eclipse CDT: Eclipse is a multi-OS Integrated Development Environment (IDE) for computer programming.
- Notepad++: Notepad++ is a free source code editor, which is designed with syntax highlighting functionality.
- ConsoleZ: ConsoleZ is an alternative command prompt for Windows, adding more capabilities to the default Windows command prompt. To compile FW4SPL with the console the windows command prompt has to be set in the tab settings.