(→Compiling Marble using Microsoft Visual C++ x86/x64) |
(→Compiling Marble using Microsoft Visual C++ x86/x64 from Git) |
||
| (3 intermediate revisions by one user not shown) | |||
| Line 53: | Line 53: | ||
<br> 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. | <br> 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. | ||
| − | === Compiling Marble using Microsoft Visual C++ x86/x64 === | + | === Compiling Marble using Microsoft Visual C++ x86/x64 from Git === |
;Quick summary: | ;Quick summary: | ||
* Installing the tools | * Installing the tools | ||
** Git | ** Git | ||
** Cmake | ** Cmake | ||
| − | ** | + | ** Qt |
* Getting the sources from Git | * Getting the sources from Git | ||
* Compiling Marble | * Compiling Marble | ||
| Line 64: | Line 64: | ||
;Installing the tools | ;Installing the tools | ||
#Qt. | #Qt. | ||
| − | #:For Marble to work right, you'll need the [http://qt-project.org/downloads MSVC++ compiled version of QT]. If needed and no x64 version of Qt is available, you can compile it from source in a few easy [http://www.holoborodko.com/pavel/2011/02/01/how-to-compile-qt-4-7-with-visual-studio-2010/ steps]. | + | #:For Marble to work right, you'll need the [http://qt-project.org/downloads MSVC++ compiled version of QT]. If needed and no x64 version of Qt is available, you can compile it from source in a few easy [http://www.holoborodko.com/pavel/2011/02/01/how-to-compile-qt-4-7-with-visual-studio-2010/ steps]. Long and CPU intensive, but easy.... |
#Git Client | #Git Client | ||
#:The sources are on a Git Server. Install a Git client to download the sources. [http://code.google.com/p/tortoisegit/ Tortoise Git] offers a simple windows interface and is easy to use and install. It offers an interface to [http://msysgit.github.com/ Git for Windows] that must also be installed. | #:The sources are on a Git Server. Install a Git client to download the sources. [http://code.google.com/p/tortoisegit/ Tortoise Git] offers a simple windows interface and is easy to use and install. It offers an interface to [http://msysgit.github.com/ Git for Windows] that must also be installed. | ||
#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 [http://marble.kde.org/sources.php 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. Repeat the above steps in another directory for a release build if desired. | ||
| + | |||
| + | :Double click/open "marble.sln" in VS Studio. No further command line work necessary. | ||
| + | |||
| + | :Once inside VS, use ALL_BUILD project to build all binaries, looking for errors. Expect a few minor problems. The stable sources may not be perfectly visual studio friendly. Last time I checked out the "Stable" sources, VS Compiler complained about some code that compiles under Gcc, but that VC compiler does not accept. An Implicit Type conversion issue in something as simple as atan2() function. Another problem was missing functions implementations for the Null-Audio plugin. The NUll audio plugin is used on windows, if there is no phonon server. | ||
| + | |||
| + | :When all compiles without errors, run the project "INSTALL" to copy the binaries to the install folder. It is important to have all executables and plugins and data in the correct place relative to each other. | ||
| 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.