Multimedial (Talk | contribs) |
Neverendingo (Talk | contribs) m (Text replace - "<code bash=" to "<syntaxhighlight lang=") |
||
| (5 intermediate revisions by 3 users not shown) | |||
| Line 1: | Line 1: | ||
| + | {{improve|This page does not reflect Marble's move from svn to git.}} | ||
| + | |||
This page present only how to build Marble on windows. [[Projects/Marble/MarbleWindows|Here]] is an other howto about using libmarblewidget in a application built for windows. You should also have already read [http://edu.kde.org/marble/obtain.php this] too. | This page present only how to build Marble on windows. [[Projects/Marble/MarbleWindows|Here]] is an other howto about using libmarblewidget in a application built for windows. You should also have already read [http://edu.kde.org/marble/obtain.php this] too. | ||
| Line 11: | Line 13: | ||
*using the Microsoft Visual C++ compiler (steps below were tested with MSVC++ 2008 Express edition). | *using the Microsoft Visual C++ compiler (steps below were tested with MSVC++ 2008 Express edition). | ||
| − | === Compiling Marble using MingW === | + | === Compiling Marble using MingW === |
#You have to add mingw's path and qmake's path in the environment variable. (use C:\Qt\20xx.xx.x\MinGW\bin and C:\Qt\20xx.xx.x\qt\bin )(follow those [http://www.computerhope.com/issues/ch000549.htm instructions] if needed). To check that cmake.exe, gcc.exe and qmake.exe are in your %PATH% : | #You have to add mingw's path and qmake's path in the environment variable. (use C:\Qt\20xx.xx.x\MinGW\bin and C:\Qt\20xx.xx.x\qt\bin )(follow those [http://www.computerhope.com/issues/ch000549.htm instructions] if needed). To check that cmake.exe, gcc.exe and qmake.exe are in your %PATH% : | ||
| Line 19: | Line 21: | ||
##run "qmake" , it should give you help output | ##run "qmake" , it should give you help output | ||
##(Hint: make sure not to add the directory %QT-installation-dir%/bin but rather %QT-installation-dir%/qt/bin, there are for some reason incompatible dll's that might lead to crashes) | ##(Hint: make sure not to add the directory %QT-installation-dir%/bin but rather %QT-installation-dir%/qt/bin, there are for some reason incompatible dll's that might lead to crashes) | ||
| − | ##If one of those command are not known then something is wrong. | + | ##If one of those command are not known then something is wrong. |
| − | #Then check out marble's svn : < | + | #Then check out marble's svn : <syntaxhighlight lang="bash">svn co svn://anonsvn.kde.org/home/kde/trunk/KDE/kdeedu/marble</syntaxhighlight> (Note: this is for the development version. You may want a more stable version. So look for the appropriate url) |
#now you can compile marble : | #now you can compile marble : | ||
##open the cmd-window | ##open the cmd-window | ||
##cd to the marble dir | ##cd to the marble dir | ||
##create a build directory (mkdir build) | ##create a build directory (mkdir build) | ||
| − | ##< | + | ##<syntaxhighlight lang="bash">cd build</syntaxhighlight> |
| − | ##< | + | ##<syntaxhighlight lang="bash">cmake -G "MinGW Makefiles" -DQTONLY=ON -DCMAKE_BUILD_TYPE=Release ..</syntaxhighlight> (add -DWITH_DESIGNER_PLUGIN=ON if you want the MarbleWidget Plugin )(note that the "-DCMAKE_BUILD_TYPE=Release" '''is''' important because without it you will have trouble like no downloading tiles etc) |
| − | ##< | + | ##<syntaxhighlight lang="bash">mingw32-make</syntaxhighlight> (you can add "-j2" if you have a 2 cores cpu) |
| − | ##< | + | ##<syntaxhighlight lang="bash">mingw32-make install</syntaxhighlight> (Note: if you are under Windows seven you must be root to install marble in the standard place. See [http://www.howtogeek.com/howto/windows-vista/run-a-command-as-administrator-from-the-windows-vista-run-box/ this] ) |
#Now if all went well you should find marble.exe in Program Files>marble> directory. | #Now if all went well you should find marble.exe in Program Files>marble> directory. | ||
| − | Test it... Yeah! | + | Test it... Yeah! |
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | === Compiling Marble using Microsoft Visual C++ === | + | === Compiling Marble using Microsoft Visual C++ === |
| − | #The Windows version of Marble distributed on the KDE website is compiled using the <br>Microsoft VC++ compiler. For Marble to work right, you'll need the [http://qt.nokia.com/downloads/windows-cpp-vs2008 MSVC+ compiled <br>version of QT]. | + | #The Windows version of Marble distributed on the KDE website is compiled using the <br>Microsoft VC++ compiler. For Marble to work right, you'll need the [http://qt.nokia.com/downloads/windows-cpp-vs2008 MSVC+ compiled <br>version of QT]. <br><br> |
| − | #Once you got these installed, make sure that you add the bin Path of the <br>framework to your PATH variable. E.g. "C:\Qt\4.6.3\bin". This will point <br>the system to the DLLs of the framework eventually needed. | + | #Once you got these installed, make sure that you add the bin Path of the <br>framework to your PATH variable. E.g. "C:\Qt\4.6.3\bin". This will point <br>the system to the DLLs of the framework eventually needed.<br><br> |
| − | #Get the Marble sources from SVN into a fresh directory (see above for steps). Then you can open a command line window (with administrator privileges - on Vista <br>and Windows 7, you need to hold down SHIFT and Control when executing <br>"CMD.exe" from the start button menu). You need to make sure that you <br>got those privileges, otherwise the build will fail due to missing <br>rights to write files later on during linking and installing. | + | #Get the Marble sources from SVN into a fresh directory (see above for steps). Then you can open a command line window (with administrator privileges - on Vista <br>and Windows 7, you need to hold down SHIFT and Control when executing <br>"CMD.exe" from the start button menu). You need to make sure that you <br>got those privileges, otherwise the build will fail due to missing <br>rights to write files later on during linking and installing.<br><br> |
| − | #Make sure to set the environment variables for the MS Visual C++ <br>compiler by doing "vcvarsall.bat" in the tool subdirectory of your <br>Microsoft Visual C++ installation.<br>< | + | #Make sure to set the environment variables for the MS Visual C++ <br>compiler by doing "vcvarsall.bat" in the tool subdirectory of your <br>Microsoft Visual C++ installation.<br><u>Example:</u><br>C:\>cd "\Program Files\Microsoft Visual Studio 9.0\VC<br>C:\Program Files\Microsoft Visual Studio 9.0\VC>vcvarsall<br>Setting environment for using Microsoft Visual Studio 2008 x86 tools.<br>C:\<br><br> |
| − | #Change to the directory with the Marble sources, and enter the following build commands (thanks to Patrick Spendrin for that):<br><br>C:\Marble-Src\cmake -G "NMake Makefiles" -DQTONLY=ON <br>-DCMAKE_INSTALL_PREFIX=C:\marble-tmp && nmake && nmake install<br> | + | #Change to the directory with the Marble sources, and enter the following build commands (thanks to Patrick Spendrin for that):<br><br>C:\Marble-Src\cmake -G "NMake Makefiles" -DQTONLY=ON <br>-DCMAKE_INSTALL_PREFIX=C:\marble-tmp && nmake && nmake install<br><br> |
| − | #Once issued, you will get the build kicked off. First, the cmake cross-compiler will make the MakeFile, and Nmake will then compile it, while nmake install will install the application at the path specified at CMAKE_IMSTALL_PATH Prefix.<br> | + | #Once issued, you will get the build kicked off. First, the cmake cross-compiler will make the MakeFile, and Nmake will then compile it, while nmake install will install the application at the path specified at CMAKE_IMSTALL_PATH Prefix.<br><br> |
| − | #Once you got your version of Marble "installed", you need to manually copy the missing Qt Framework DLLs as well as the missing imageformat DLL for importing tiles.The following DLLs go from the Qt/bin directory right next to the <br>marble.exe file in the installation directory:<br><br>QtCore4.dll<br>QtGui4.dll<br>QtNetwork4.dll<br>QtSvg4.dll<br>QtWebKit4.dll<br>QtXml4.dll<br> | + | #Once you got your version of Marble "installed", you need to manually copy the missing Qt Framework DLLs as well as the missing imageformat DLL for importing tiles.The following DLLs go from the Qt/bin directory right next to the <br>marble.exe file in the installation directory:<br><br>QtCore4.dll<br>QtGui4.dll<br>QtNetwork4.dll<br>QtSvg4.dll<br>QtWebKit4.dll<br>QtXml4.dll<br><br> |
| − | #Additionally, you need to create a directory in the "plugins" folder <br>named "imageformats". This is the plugin for different image formats. In <br>Marble 0.8.0, there was just one DLL in there, namely "qjpeg4.dll", <br>which is the support for JPEG file tiles in Marble.<br>[NOTE: what about PNG support? Would that be "qmng4.dll" to be added?]<br> | + | #Additionally, you need to create a directory in the "plugins" folder <br>named "imageformats". This is the plugin for different image formats. In <br>Marble 0.8.0, there was just one DLL in there, namely "qjpeg4.dll", <br>which is the support for JPEG file tiles in Marble.<br>[NOTE: what about PNG support? Would that be "qmng4.dll" to be added?]<br><br> |
| − | #The "qjpeg4.dll" is not build yet after downloading and installing the <br>MSVC version of the Qt Framework, yet you will find a MS VC Project file <br>in your Qt source directory (e.g. "C:\Qt\4.6.3\src\plugins\imageformats\imageformats.dsw"). Open that up, <br>set the release configuration in the compiler and compile the project.<br> | + | #The "qjpeg4.dll" is not build yet after downloading and installing the <br>MSVC version of the Qt Framework, yet you will find a MS VC Project file <br>in your Qt source directory (e.g. "C:\Qt\4.6.3\src\plugins\imageformats\imageformats.dsw"). Open that up, <br>set the release configuration in the compiler and compile the project.<br><br> |
#Note that the output files will be found in another place! Namely in the <br>plugins folder of Qt (e.g. "C:\Qt\4.6.3\plugins\imageformats"). From there, you can copy the qjpeg4.dll needed, and you should be all set - you now got a fresh Marble version compiled with MSVC.<br> | #Note that the output files will be found in another place! Namely in the <br>plugins folder of Qt (e.g. "C:\Qt\4.6.3\plugins\imageformats"). From there, you can copy the qjpeg4.dll needed, and you should be all set - you now got a fresh Marble version compiled with MSVC.<br> | ||
<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. | ||
| 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.
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.