User:Andrej/Building Spring on Windows 2 temp: Difference between revisions

From Spring
Jump to navigationJump to search
Andrej (talk | contribs)
Link directly to develop branch instead of master
Andrej (talk | contribs)
Update CMake note after having investigated the issue
Line 24: Line 24:
- CMake
- CMake


I (Andrej) use version 2.8.11.1. Search for cmake-2.8.11.1-win32-x86.exe on the CMake download site: http://www.cmake.org/files/v2.8/
The newest release of CMake at time of writing, 2.8.12.1, introduces a regression that breaks Spring's use of some obscure CMake construct. It therefore can not be used to Configure Spring. (I've reported the issue to CMake bug tracker: http://www.cmake.org/Bug/view.php?id=14619 )


The newest release, 2.8.12.1, fails - If you already have the newest version , and are getting errors during CMake configure step, try an older release.
The recommended CMake release is version 2.8.11.1. (Search for cmake-2.8.11.1-win32-x86.exe on the CMake download site: http://www.cmake.org/files/v2.8/ )


[[image:Spring_build_cmake05.png|200px]]
[[image:Spring_build_cmake05.png|200px]]

Revision as of 08:59, 3 December 2013

Source Code GIT URLs

Modified Spring github URL: https://github.com/nOOb3167/spring/tree/develop
Modified vclibs11 github URL: https://github.com/nOOb3167/vclibs11/

Prerequisites

- Visual Studio 2012 (v11)

- Microsoft Visual C++ Compiler Nov 2012 CTP

Download link: http://www.microsoft.com/en-us/download/details.aspx?id=35515

How to tell if you have Nov 2012 CTP installed: Start Visual Studio and open any Solution. Open the 'Property Pages' of any Project inside this solution, and check available values of 'Platform Toolset' under 'Configuration Properties -> General'. Nov 2012 CTP should be listed.

- GIT

If you can open command line and run git you should be fine.

- CMake

The newest release of CMake at time of writing, 2.8.12.1, introduces a regression that breaks Spring's use of some obscure CMake construct. It therefore can not be used to Configure Spring. (I've reported the issue to CMake bug tracker: http://www.cmake.org/Bug/view.php?id=14619 )

The recommended CMake release is version 2.8.11.1. (Search for cmake-2.8.11.1-win32-x86.exe on the CMake download site: http://www.cmake.org/files/v2.8/ )

Building

First clone the git repositories.

Second configure through CMake.

Third compile through Visual Studio.

Cloning the git repositories

- Spring into any directory.
- vclibs11 into subdirectory of Spring, named 'vclibs'
cd someEmptyDirectory
git clone git://github.com/nOOb3167/spring.git
cd spring
git clone git://github.com/nOOb3167/vclibs11.git vclibs

- This is the only command line step.

 The directory structure should end up looking like below.
 A 'spring' directory with spring source, and a 'vclibs' subdirectory
 inside.

Configuring through CMake

Start CMake GUI.

- There should be a start menu shortcut if you used the CMake installer.

Set Source and Build paths.

- Source path should be set to where you cloned the Spring repository.
  You should find a file CMakeLists.txt in that directory
- Build path can be set to whatever empty directory, or just same as Source path.
  On the screenshot below, Build path is set to a subdirectory named 'Build'.

Set CMAKE_INSTALL_PREFIX to where you want Spring installed.

- This is necessary because the default, Program Files, requires
  admin permissions to write.

Press Configure.

- The correct option to select for compiler is as shown below.
  (Should be the default)

- For comparison, here is what is output for me after Configure.
  The warnings shown here are normal / expected.

Press Generate.

- This should generate the Visual Studio solution and project files.
  Those will be used to compile through Visual Studio next.

Compiling Solution through Visual Studio

Open the solution file.

- There should be a Spring.sln file, in the location you set as the Build path CMake.

Select the INSTALL Project.

- Unfortunately I have not found a way to do this automatically.

Build Project

- There should be no compile / link errors (But many warnings).
  If you forgot to change CMAKE_INSTALL_PREFIX from the default path
  (Program Files, requiring admin access), the installation step will complain.