| This section needs improvements: Please help us to
cleanup confusing sections and fix sections which contain a todo This page is outdated - please don't use it anymore unless you know exactly what you do. Use emerge instead |
| 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 |
This is a program that lets you easily install all the requirements for building kdelibs. It also has a list of tools in its list that are helpful and needed, like the mingw compiler suite, subversion clients, debugging tools and so on.
The kdewin-installer is available in a GUI and console-only form from the kdewin-installer download page.
You can use either:
There is not much to do - installer of the commercial version sets up the environment. Just do not forget to run vcvars32.bat to set your variables.
Install:
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
Note that the above is for GUI-based builds. For command line builds, set the variables in your .bat file (e.g. kdeenv.bat) by changing value of PLATFORMSDK is needed:
@set PLATFORMSDK=C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2 @set PATH=%PLATFORMSDK%\Bin;%PATH% @set INCLUDE=%PLATFORMSDK%\include;%INCLUDE% @set LIB=%PLATFORMSDK%\lib;%LIB%
More info on this is available: perform steps #3, #4 and #5.
CMake is the make tool used by KDE. You can get the most recent binaries from here. Use the Win32 Installer or the zip archive. Make sure you use at least cmake 2.4.5
On Windows 2000, it's recommended to install cmake in a path without spaces to avoid troubles.
These libraries have to be installed:
This library can be downloaded and installed with the installer (use the package name dbus-msvc) or you can compile it by yourself.
This Framework can be downloaded with the installer, or you can build it on your own.
There are several libraries which will be required for building kdelibs. You may want to compile them yourself or simply download them using the KDEWin-Installer. You will need:
To set up a build environment, follow the steps over here. If you have Cygwin installed, please be sure to remove Cygwin's /bin out of your path.
Check out the sources and make another build directory at the same level as kdelibs:
svn co svn://anonsvn.kde.org/home/kde/trunk/KDE/kdelibs cd .. 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%;%INSTALL_PATH%\lib;
Build KDE libraries with:
cmake -DCMAKE_INSTALL_PREFIX=%INSTALL_PATH% -DCMAKE_BUILD_TYPE=Debug\ -G"NMake Makefiles" ..\kdelibs nmake nmake install
or use the IDE:
cmake -DCMAKE_INSTALL_PREFIX=%INSTALL_PATH% -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
The devenv command is not available in the Express Edition.
If you use makefiles and also want to build the test programs add the option -DKDE4_BUILD_TESTS=1 to the cmake command. This is not necessary for the IDE projects.
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=%KDEDIRS% -DCMAKE_BUILD_TYPE=Debug\
-G"NMake Makefiles" ..\kdepimlibs
nmake
nmake install
or use Visual Studio:
cmake -DCMAKE_INSTALL_PREFIX=%INSTALL_PATH% -DCMAKE_BUILD_TYPE=Debug\ -G "Visual Studio 8 2005" ..\kdepimlibs
(use -G "Visual Studio 7 .NET 2003" for the older compiler)
In the latter case kdepimlibs.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 kdepimlibs.sln devenv /build Release /project INSTALL kdepimlibs.sln
The devenv command is not available in the Express Edition.
(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!).
Install all devel packages using kdewin-installer as usual, + msvc2005. Then:
svn co svn://anonsvn.kde.org/home/kde/trunk/KDE/kdesdk mkdir kdesdk\build cd kdesdk\build
Now you have to add some paths to your PATH environment variable simliar to this:
set PATH=%QTDIR%\bin;%PATH%;%INSTALL_PATH%\lib;
You may need to setup msvc environment:
call "C:\Program Files\Microsoft Visual Studio 8\VC\vcvarsall.bat" x86
Build command:
cmake -DCMAKE_INSTALL_PREFIX=%INSTALL_PATH% -DCMAKE_BUILD_TYPE=Release -G"NMake Makefiles" .. nmake nmake install