m (→win32libs) |
m (Getting_Started/Build/KDE4/Windows/Littlecms.patch) |
||
| Line 239: | Line 239: | ||
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). | ||
| − | *#Then you will see <tt>lcms.sln</tt> solution file - you can click it to open in the msvc IDE. But first, you need to fix some paths in the project files. You probably have <tt>%KDEDIR%\lib\jpeg.lib</tt>, not libjpeg.lib, so edit <tt>tifficc.vcproj</tt>, <tt>tiffdiff.vcproj</tt> and <tt>jpegicc.vcproj</tt> and change libjpeg.lib to jpeg.lib in <tt>AdditionalDependencies</tt> variable. Then add full path to your <tt>%KDEDIR%\include</tt> directory (where tiffio.h resides) in AdditionalIncludeDirectories variable, (note: do it by expanding KDEDIR environment variable, i.e the result should be like: <pre>AdditionalIncludeDirectories="..\..\include;f:\kde4\include"</pre> Then add <tt>AdditionalLibraryDirectories="c:\your\path\to\kde\lib"</tt> line just after every two occurences of <tt>AdditionalIncludeDirectories=</tt>. All the changes are presented in [[Littlecms.patch|this pseudo-patch]] (change f:\ paths to your KDEDIR location!). | + | *#Then you will see <tt>lcms.sln</tt> solution file - you can click it to open in the msvc IDE. But first, you need to fix some paths in the project files. You probably have <tt>%KDEDIR%\lib\jpeg.lib</tt>, not libjpeg.lib, so edit <tt>tifficc.vcproj</tt>, <tt>tiffdiff.vcproj</tt> and <tt>jpegicc.vcproj</tt> and change libjpeg.lib to jpeg.lib in <tt>AdditionalDependencies</tt> variable. Then add full path to your <tt>%KDEDIR%\include</tt> directory (where tiffio.h resides) in AdditionalIncludeDirectories variable, (note: do it by expanding KDEDIR environment variable, i.e the result should be like: <pre>AdditionalIncludeDirectories="..\..\include;f:\kde4\include"</pre> Then add <tt>AdditionalLibraryDirectories="c:\your\path\to\kde\lib"</tt> line just after every two occurences of <tt>AdditionalIncludeDirectories=</tt>. All the changes are presented in [[Getting_Started/Build/KDE4/Windows/Littlecms.patch|this pseudo-patch]] (change f:\ paths to your KDEDIR location!). |
*#You probbaly want to skip building Python wrapper, so click on Build->Configuration Manager menu command and check off "Build" in "Python" line. | *#You probbaly want to skip building Python wrapper, so click on Build->Configuration Manager menu command and check off "Build" in "Python" line. | ||
*#Select "Build Solution" menu command. After successful build, you should notice:<tt>Build: 9 succeeded, 0 failed, 1 skipped</tt> | *#Select "Build Solution" menu command. After successful build, you should notice:<tt>Build: 9 succeeded, 0 failed, 1 skipped</tt> | ||
| 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 |
Install following, no compiling is required.
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 you must compile and install by your own.
Be sure you've installed win32libs!
Download the latest winDBus sources (which are already patched) and extract them into "C:\svn\windbus" or get the latest svn sources.
cd c:\svn\windbus patch -p0 < DBus-win32.patch cd .. mkdir windbus-build cd windbus-build cmake -G "Visual Studio 8 2005" ..\windbus\cmake\
(use -G "Visual Studio 7 .NET 2003" for the older compiler)
dbus.sln solution file will be created. Build and install the Debug and Release builds with the IDE. You can switch between the Debug and Release configuration in the Build -> Configuration Manager menu.
Tip: to perform compilation and installation from the command line, type:
devenv /build Debug /project INSTALL dbus.sln devenv /build Release /project INSTALL dbus.sln
Default target for the installation is %PROGRAMFILES%\dbus.
Currently you need qt-copy from kde svn to successful compile kdelibs! Maybe a current snapshot from 4.3 also works fine.
Also make sure that configure.exe find openssl headers and libs:
qconfigure {PLATFORM} -openssl -I "<path to openssl headers>" \
-L "<path to openssl libs>" -qdbus -I "<path to windbus headers>" \
-L "<path to windbus libs>"
{PLATFORM} can be msvc.net for msvc .NET (2003) or msvc2005 for msvc 2005. This is needed to simplify path names in the future if you did not use the commercial configure.exe GUI installer:
set QTDIR={your qt installation directory}
Note: this (QTDIR) and the subsequent environment variables described below on this page could be set globally in the "System" applet, Advanced->Environment Variables. Optionally, if you want to have multiple configurations (e.g. Qt3 and Qt4) on the same machine and account, you can enter appropriate set commands into a single .bat file, e.g. environment.bat which you can then execute once in a new cmd shell.
See also alternative instructions at qtnode.net.
kdewin32 is a support library required specifically for Windows in order to be able to build KDElibs.
We will refer to {KDE_SOURCE_DIR} as to a directory of your choice where you want to keep KDE source code and its "build" directories. You need enough of disk space for this. Do not use paths with spaces to avoid potential problems.
cd {KDE_SOURCE_DIR}
svn co -N svn://anonsvn.kde.org/home/kde/trunk
Note: if you want to use your KDE SVN account with write access type this instead: svn --username={yourname} co -N https://svn.kde.org/home/kde/trunk. Use the --username and https address for every command mentioned below too.
cd trunk svn up -N kdesupport cd kdesupport svn up kdewin32 mkdir kdewin32-build cd kdewin32-build cmake -DCMAKE_INSTALL_PREFIX=%KDEDIR% -DCMAKE_BUILD_TYPE=Debug\ -G"Visual Studio 8 2005" ..\kdewin32
(use -G"Visual Studio 7 .NET 2003" for the older compiler, and replace Debug by Release for release build)
kdewin32.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 kdewin32.sln devenv /build Release /project INSTALL kdewin32.sln
Note: Whenever you update your checkout don't forget to rebuild and reinstall kdewin32.
You'll need some more libs which are located in http://websvn.kde.org/trunk/kdesupport/ They're all compilable with cmake (if not, let us know)
strigi is required by kdelibs:
cd kdesupport svn up strigi mkdir strigi-build cd strigi-build cmake -DCMAKE_INSTALL_PREFIX=%KDEDIR% -DCMAKE_BUILD_TYPE=Debug\ -G"NMake Makefiles" ..\strigi nmake nmake install
Soprano is also needed, it depends on 'redland' library which is available through the kdewin installer. Development versions of KDElibs now require soprano both in release and debug versions, so we're using two build directories: soprano-build and soprano-build-rel.
cd kdesupport svn up soprano mkdir soprano-build cd soprano-build cmake -DCMAKE_INSTALL_PREFIX=%KDEDIR% -DCMAKE_BUILD_TYPE=Debug\ -G"NMake Makefiles" ..\soprano nmake nmake install cd .. mkdir soprano-build-rel cd soprano-build-rel cmake -DCMAKE_INSTALL_PREFIX=%KDEDIR% -DCMAKE_BUILD_TYPE=Release\ -G"NMake Makefiles" ..\soprano nmake nmake install
qca2 is needed to compile some apps (e.g. Kopete)
cd qca2 svn up qca2 mkdir qca2-build cd qca2-build cmake -DCMAKE_INSTALL_PREFIX=%KDEDIR% -DCMAKE_BUILD_TYPE=Debug\ -G"NMake Makefiles" ..\qca2 nmake nmake install
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!).