(→Compiling Marble using Microsoft Visual C++ x86/x64) |
(→Compiling Marble using Microsoft Visual C++ x86/x64) |
||
| Line 58: | Line 58: | ||
** Git | ** Git | ||
** Cmake | ** Cmake | ||
| − | ** | + | ** Qt |
* Getting the sources from Git | * Getting the sources from Git | ||
* Compiling Marble | * Compiling Marble | ||
| Line 69: | Line 69: | ||
#CMAKE | #CMAKE | ||
#: Install [http://www.cmake.org/cmake/resources/software.html CMake], addind it to the system path. Note, it may be necessary to adjust the permissions on the rules folder if you get "access denied" error messages later during compilation. (on Win 7 at least) | #: Install [http://www.cmake.org/cmake/resources/software.html CMake], addind it to the system path. Note, it may be necessary to adjust the permissions on the rules folder if you get "access denied" error messages later during compilation. (on Win 7 at least) | ||
| − | |||
| − | |||
| − | |||
;Preparing the workplace | ;Preparing the workplace | ||
| − | :The following steps and congfiguration/compilation commands assume source in one directory, Visual Studio generated files (config and objects in a second directory, and then prepared binaries in a third. This way the source directory is kept clean, the final binaries are easy to find, and debug/release versions of each file kept in separate directories. It is very inconvenient to have these mixed. | + | :The following steps and congfiguration/compilation commands assume source in one directory, Visual Studio generated files (config and objects in a second directory, and then prepared binaries in a third. This way the source directory is kept clean, the final binaries are easy to find, and debug/release versions of each file kept in separate directories. It is very inconvenient to have these mixed. |
| + | ::Example of directories tree: | ||
| + | :*Marble-Src | ||
| + | :*Marble-Build | ||
| + | :** Debug | ||
| + | :** Release | ||
| + | :* Marble-Bin | ||
| + | :** Debug | ||
| + | :** Release | ||
| + | |||
| + | ;Getting the sources | ||
| + | :When Tortose Git is properly installed and integrated with windows file explorer, you should be able to right click on a directory where you whant to download the sources to ex. '''Marble-Src''', and select "Clone Git repository", pointing to the address of the source code, from the official Marble page. (todo, screenshot here) | ||
;Configuring and Compiling: | ;Configuring and Compiling: | ||
| + | :Like mentioned before, it is desirable to keep the sources clean on a large project like this. Visual Studio will create a lot of files and it is also much easier to work on. You'll be able to change files and configurations more easily if you keep sources and built objects separate. | ||
| + | :In the directory to use to build in debug mode for example, open a command prompt. No need of elevated priviledges or setting of VS specific variables. Run cmake with ONE (in case its being presented on multiple lines) command similar to this: | ||
| + | |||
| + | :cmake -G "Visual Studio 9 2008 Win64" -Wno-dev -D QTONLY=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=..\..\Marble-Bin\Debug ..\..\Marble-Src | ||
| + | |||
| + | :*This command specifies x64 project files and solutions vor Visual Studio 2008. CMake supports different targets, adjust if necessary. | ||
| + | :*-Wno-dev hides some unwanted warnings | ||
| + | :* QTONLY=ON is nessary for a non-KDE installation | ||
| + | :* -DCMAKE_BUILD_TYPE=Debug specifies in advance to link/build in debug mode in the generated vcproj/sln files | ||
| + | :* -DCMAKE_INSTALL_PREFIX=..\..\Marble-Bin\Debug specifies where the '''final''' binaries should be placed. It will only be populated by the "INSTALL'' project target part of the complete solution. You can specify a relative or absolute path. | ||
| + | :* ..\..\Marble-Src points to the root directory containing the marble files, where you cloned the Git repository. (It contains the '''top-level''' CMakeLists.txt file.) '''Not''' the "src" directory within. | ||
| + | |||
| + | : If all options and paths are correct, the current directory should now be populated with Visual Studio project files, a lot of them, and one single solution file. Double click/open in VS Studio. No further command line work necessary. | ||
| + | :Repeat the above steps in another directory for a release build if desired. | ||
| + | |||
| + | |||
| + | ; | ||
| This section needs improvements: Please help us to
cleanup confusing sections and fix sections which contain a todo This page does not reflect Marble's move from svn to git. |
This page present only how to build Marble on windows. Here is an other howto about using libmarblewidget in a application built for windows. You should also have already read this too.
Contents |
1st of February 2013 update :
svn co svn://anonsvn.kde.org/home/kde/trunk/KDE/kdeedu/marble
cd buildcmake -G "MinGW Makefiles" -DQTONLY=ON -DCMAKE_BUILD_TYPE=Release ..
mingw32-make
mingw32-make installTest it... Yeah!
Tested with CMake 2.8.1, Qt sdk 2010.02.1 ( Qt 4.6.2 ; Qt Creator 1.3.1 ; MinGW 3.15 ; GCC4.4.0 ) and rev. 1128605 of marble for the MingW part, and the Qt SDK 4.6.3 for MSVC.