SaroEngels (Talk | contribs) |
SaroEngels (Talk | contribs) |
||
| Line 1: | Line 1: | ||
{{KDE4}} | {{KDE4}} | ||
{{improve|''This page has been moved out of [http://kdelibs.com/wiki/index.php/Building_KDElibs_4_using_MS_Visual_Studio kdelibs.com] wiki page.''}} | {{improve|''This page has been moved out of [http://kdelibs.com/wiki/index.php/Building_KDElibs_4_using_MS_Visual_Studio kdelibs.com] wiki page.''}} | ||
| − | == | + | == Basic Tools == |
| − | + | === The Compiler === | |
| − | + | ||
You can use either: | You can use either: | ||
* (commercial) Visual Studio.NET (2003), Visual Studio 2005, or | * (commercial) Visual Studio.NET (2003), Visual Studio 2005, or | ||
| Line 19: | Line 18: | ||
</pre> | </pre> | ||
| − | + | === CMake === | |
[http://www.cmake.org CMake] is the make tool used by KDE. | [http://www.cmake.org CMake] is the make tool used by KDE. | ||
* use the most recent binaries from here [http://www.cmake.org/files/v2.4/ http://www.cmake.org/files/v2.4/] (the filename should be like <tt>cmake-2.4.?-win32-x86.zip</tt>; you can also pick an .exe file instead of .zip). Make sure you use at least cmake 2.4.5 | * use the most recent binaries from here [http://www.cmake.org/files/v2.4/ http://www.cmake.org/files/v2.4/] (the filename should be like <tt>cmake-2.4.?-win32-x86.zip</tt>; you can also pick an .exe file instead of .zip). Make sure you use at least cmake 2.4.5 | ||
| Line 26: | Line 25: | ||
Install cmake in a path without spaces to avoid troubles (at least under win2k). | Install cmake in a path without spaces to avoid troubles (at least under win2k). | ||
| − | + | === Perl === | |
Perl is a script language used to generate files. Install a Perl for Windows, e.g. ActivePerl from http://www.activestate.com | Perl is a script language used to generate files. Install a Perl for Windows, e.g. ActivePerl from http://www.activestate.com | ||
| − | + | === win32libs === | |
| − | ''win32libs'' contains a collection of libraries not available by default on Windows. | + | ''win32libs'' contains a collection of libraries not available by default on Windows. See [[Getting_Started/Build/KDE4/Windows/3rd-party_libraries|3rd-party libraries required for KDElibs 4]]. |
| − | See [[Getting_Started/Build/KDE4/Windows/3rd-party_libraries|3rd-party libraries required for KDElibs 4]]. | + | |
| − | + | == Compile and Install == | |
| − | These libraries | + | These libraries have to be installed. |
| − | + | === D-Bus for Windows === | |
| − | + | This library shouldn't be installed with the installer, you should rather [[http://techbase.kde.org/Getting_Started/Build/KDE4/Windows/build_dbus|compile]] it yourself. | |
| − | + | === Qt 4 === | |
| − | + | This Framework can be downloaded with the installer, or you can [[http://techbase.kde.org/Getting_Started/Build/KDE4/Windows/build_qt4|build it on your own]]. | |
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | === kdesupport libs === | |
There are several libs which will be required for building kdelibs. If you want to compile them yourself, you should [[Getting Started/Build/KDE4/Windows/build libraries from kdesupport|look here]]. | There are several libs which will be required for building kdelibs. If you want to compile them yourself, you should [[Getting Started/Build/KDE4/Windows/build libraries from kdesupport|look here]]. | ||
Otherwise you can simply download them using the KDEWin-Installer. | Otherwise you can simply download them using the KDEWin-Installer. | ||
| Line 95: | Line 49: | ||
* qca2 | * qca2 | ||
| − | + | === shared-mime-info === | |
The shared-mime-info package, is the freedesktop MIME standard used now by KDE. Download update-mime-database-*.*-*-bin.zip from | The shared-mime-info package, is the freedesktop MIME standard used now by KDE. Download update-mime-database-*.*-*-bin.zip from | ||
http://82.149.170.66/kde-windows/win32libs/zip/single/ and unpack the archive to kde4/ directory to get share/mime/ directory and bin/update-mime-database.exe program. | http://82.149.170.66/kde-windows/win32libs/zip/single/ and unpack the archive to kde4/ directory to get share/mime/ directory and bin/update-mime-database.exe program. | ||
| − | + | == Build KDElibs == | |
Check out the sources and make another build directory at the same level as kdelibs: | Check out the sources and make another build directory at the same level as kdelibs: | ||
<pre> | <pre> | ||
| Line 135: | Line 89: | ||
To also build the test programs add the option <tt>-DKDE4_BUILD_TESTS=1</tt> to the <tt>cmake</tt> command. | To also build the test programs add the option <tt>-DKDE4_BUILD_TESTS=1</tt> to the <tt>cmake</tt> command. | ||
| − | + | == Troubles? == | |
*to enable the release build add <tt>-DCMAKE_BUILD_TYPE=Release</tt> to the <tt>cmake</tt> command | *to enable the release build add <tt>-DCMAKE_BUILD_TYPE=Release</tt> to the <tt>cmake</tt> command | ||
*when kdewin32 is not found, try adding the cmake parameter (with YOUR path)<tt>-DGNUWIN32_DIR=c:/gnuwin32</tt> | *when kdewin32 is not found, try adding the cmake parameter (with YOUR path)<tt>-DGNUWIN32_DIR=c:/gnuwin32</tt> | ||
| Line 144: | Line 98: | ||
*whenever you update your checkout DON'T forget to rebuild '''AND''' reinstall kdewin32.lib | *whenever you update your checkout DON'T forget to rebuild '''AND''' reinstall kdewin32.lib | ||
| − | + | == Going further: kdepimlibs == | |
'''kdepimlibs''' are needed by kdebase or other modules like koffice. | '''kdepimlibs''' are needed by kdebase or other modules like koffice. | ||
| − | + | === Requirements === | |
kdepimlibs require: | kdepimlibs require: | ||
* [http://boost.org/ boost libraries]. Download the tarball. As boost is consisted of headers only, unpack the tarball and copy <tt>boost</tt> subdirectory to <tt>%KDEDIR%\include</tt>. Then add use <tt>set BOOST_ROOT=%KDEDIR%\include</tt> (you may want to add it to your <tt>environment.bat</tt> file as well). | * [http://boost.org/ boost libraries]. Download the tarball. As boost is consisted of headers only, unpack the tarball and copy <tt>boost</tt> subdirectory to <tt>%KDEDIR%\include</tt>. Then add use <tt>set BOOST_ROOT=%KDEDIR%\include</tt> (you may want to add it to your <tt>environment.bat</tt> file as well). | ||
* (really optional for now) [http://www.openldap.org OpenLDAP]: LDAP (Lightweight Directory Access Protocol) libraries Needed to provide LDAP functionality in KDE | * (really optional for now) [http://www.openldap.org OpenLDAP]: LDAP (Lightweight Directory Access Protocol) libraries Needed to provide LDAP functionality in KDE | ||
* (really optional for now) [http://asg.web.cmu.edu/sasl/sasl-library.html cyrus-sasl]: Cyrus SASL API needed to support authentication of logins | * (really optional for now) [http://asg.web.cmu.edu/sasl/sasl-library.html cyrus-sasl]: Cyrus SASL API needed to support authentication of logins | ||
| − | + | === Build === | |
Check out the sources, make another build directory and build: | Check out the sources, make another build directory and build: | ||
<pre> | <pre> | ||
| Line 164: | Line 118: | ||
</pre> | </pre> | ||
| − | + | == Going further: kofficelibs == | |
''(work in progress, to be moved to KOffice wiki)'' | ''(work in progress, to be moved to KOffice wiki)'' | ||
'''kofficelibs''' are needed for apps like KWord or Kexi. | '''kofficelibs''' are needed for apps like KWord or Kexi. | ||
| − | + | === Requirements === | |
kofficelibs require: | kofficelibs require: | ||
*[http://www.littlecms.com Little cms] library. Download the newest lcms-1.??.zip from [http://www.littlecms.com/downloads.htm] and uncompress. To build it with msvc, go to <tt>Projects</tt> subdir and choose a subdir for your compiler (i.e. Vc7 or Vc2005). | *[http://www.littlecms.com Little cms] library. Download the newest lcms-1.??.zip from [http://www.littlecms.com/downloads.htm] and uncompress. To build it with msvc, go to <tt>Projects</tt> subdir and choose a subdir for your compiler (i.e. Vc7 or Vc2005). | ||
| Tip |
|---|
| Note: This page is about KDE 4. It isn't applicable for KDE 3 development. |
| This section needs improvements: Please help us to
cleanup confusing sections and fix sections which contain a todo This page has been moved out of kdelibs.com wiki page. |
Contents |
You can use either:
Express Edition users: If you want to generate project files for Visual C++ then you must add the Platform SDK include and library directory to the default directories of the IDE:
Open Visual C++, go to Tool->Options in "Projects and Solutions" go to "VC++ Directories" On the right add the paths to your Platform SDK files: for "Library Files": YOUR_PLATFORM_SDK_PATH\lib for "Include Files": YOUR_PLATFORM_SDK_PATH\include
CMake is the make tool used by KDE.
Install cmake in a path without spaces to avoid troubles (at least under win2k).
Perl is a script language used to generate files. Install a Perl for Windows, e.g. ActivePerl from http://www.activestate.com
win32libs contains a collection of libraries not available by default on Windows. See 3rd-party libraries required for KDElibs 4.
These libraries have to be installed.
This library shouldn't be installed with the installer, you should rather [[1]] it yourself.
This Framework can be downloaded with the installer, or you can [it on your own].
There are several libs which will be required for building kdelibs. If you want to compile them yourself, you should look here. Otherwise you can simply download them using the KDEWin-Installer. You will need:
The shared-mime-info package, is the freedesktop MIME standard used now by KDE. Download update-mime-database-*.*-*-bin.zip from http://82.149.170.66/kde-windows/win32libs/zip/single/ and unpack the archive to kde4/ directory to get share/mime/ directory and bin/update-mime-database.exe program.
Check out the sources and make another build directory at the same level as kdelibs:
cd {KDE_SOURCE_DIR}\trunk
svn up -N KDE
cd KDE
svn up kdelibs
mkdir kdelibs-build
cd kdelibs-build
Now you have to add some paths to your PATH environment variable simliar to this:
set PATH=%QTDIR%\bin;%PATH%;%PROGRAMFILES%\win32libs\lib;
{location of your kdewin32 libs}\kdewin32\lib
Build KDE libraries with:
cmake -DCMAKE_INSTALL_PREFIX=%KDEDIR% -DCMAKE_BUILD_TYPE=Debug\ -G"NMake Makefiles" ..\kdelibs nmake nmake install
or use the IDE:
cmake -DCMAKE_INSTALL_PREFIX=%KDEDIR% -DCMAKE_BUILD_TYPE=Debug\ -G "Visual Studio 8 2005" ..\kdelibs
(use -G "Visual Studio 7 .NET 2003" for the older compiler)
In the latter case kdelibs.sln solution file will be created. Build and install the Debug and Release builds with the IDE. Tip: to do this from command line, type:
devenv /build Debug /project INSTALL kdelibs.sln devenv /build Release /project INSTALL kdelibs.sln
To also build the test programs add the option -DKDE4_BUILD_TESTS=1 to the cmake command.
kdepimlibs are needed by kdebase or other modules like koffice.
kdepimlibs require:
Check out the sources, make another build directory and build:
cd {KDE_SOURCE_DIR}\trunk\KDE
svn up kdepimlibs
mkdir kdepimlibs-build
cd kdelibs-build
cmake -DCMAKE_INSTALL_PREFIX=%KDEDIR% -DCMAKE_BUILD_TYPE=Debug\
-G"NMake Makefiles" ..\kdepimlibs
nmake
nmake install
(work in progress, to be moved to KOffice wiki)
kofficelibs are needed for apps like KWord or Kexi.
kofficelibs require:
AdditionalIncludeDirectories="..\..\include;f:\kde4\include"Then add AdditionalLibraryDirectories="c:\your\path\to\kde\lib" line just after every two occurences of AdditionalIncludeDirectories=. All the changes are presented in this pseudo-patch (change f:\ paths to your KDEDIR location!).