Compile On Windows
From Blogilo Wiki
Contents |
Tutorial : How To Compile Blogilo under Microsoft Windows
This tutorial is dedicated to guide users who want to compile Blogilo under Microsoft Windows. I will use Windows XP Service Pack2 and KDE 4.3.
Stage 1: KDE4 Installation
- Download latest kde installer from here, run it and follow the instruction:
- Note: It's better to install KDE in a simple path, without use blank space, (else compilation can be broken). Here we use C:\KDE
- Select Developer/Package manager Install Mode using MinGW Compiler and a suitable mirror to download packages.
- Select right KDE version to use. In this example we use KDE 4.3, but you can use a more recent release of course. Start to select all components that we will need.
- First group to set is Debug Tools: gdb to get crash backtrace, and debugview to show all debug messages (normally reported in the console under Linux).
- Next group is Devel Tools: Most important here are cmake and gcc-mingw compiler. You don't need Microsoft Visual C++ IDE.
- Most important packages to download from KDE group are: kdebase-runtime, kdelibs, kdepimlibs. And you have to install Devel packages for kdelibs and kdepimlibs. (Also you can install Kate as an advanced text editor. Or just use Notpad++ if already installed. We need it to edit some text files)
- On kdesupport group, It's very important to checkout automoc package, and kdewin devel and phonon devel packages. We need some others but installer will install them as well.
- qt group is of course mandatory to compile and run Blogilo and all the rest of KDE. Both bin and devel packages.
- If you like to use Blogilo with a language other than English, you have to install GetText from win32libs section, Otherwise you can skip it by removing po directory from root of Blogilo source.
- Note: During MinGW pakage installation, take care to select right components: base tools, g++ compiler, and make.
- And of course, install MinGW in a simple path. Usual place is C:\MinGW.
Stage 2: Set-up Your System To Compile
This part is very important, else you will not be able to compile and link on your computer. At first, go to My Computer control panel and Advanced section, and go to Environment Variables setup dialog to add a new entry named KDEDIRS with the value C:\KDE. Also patch PATH entry with this value: ;C:\KDE\bin;C:\MinGW\bin. You need to close your current Windows session to set on these values.
Another important task is to patch some CMake scripts installed in KDE which use a wrong default KDE install dir.
Files are installed in C:\KDE\share\apps\cmake\modules. Just use Kate editor (available in C:\KDE\bin) and open these files: KDELibsDependencies.cmake, KDELibsDependenciesInternal.cmake, KDELibsDependenciesInternal.cmake.template, KDEPimLibsDependencies.cmake, KDEPimLibsDependencies.cmake.template, KDELibs4LibraryTargets-relwithdebinfo.cmake.
Replace D:/kde-4.3/kde-mingw by C:/KDE.
Finaly, I recommend to make a copy of C:\MinGW\bin\mingw32-make.exe to C:\MinGW\bin\make.exe to just type make on the console (as under Linux).
Stage 3: Download Source Code
You can download a released package to use or use this links to download latest development snapshot or latest stable release
Stage 4: Compile and Install Blogilo
Just like Linux, make a build dir under the blogilo root directory and cd to it. Run CMake:
cmake.exe -G "MinGW Makefiles" .. -DCMAKE_INCLUDE_PATH=c:\kde\include -DCMAKE_LIBRARY_PATH=c:\kde\lib -DCMAKE_BUILD_TYPE=relwithdebinfo -DKdepimLibs_DIR=c:\KDE\lib\cmake\KdepimLibs -DCMAKE_INSTALL_PREFIX=c:\kde
Note: You should change dirs on cmake command if installed KDE on a path other than C:\KDE.
If everything's done, And build files written into build directory, Just run make install.
Blogilo is ready to use, Enjoy...
How to solve problems
If you encounter any problem during compilation, feel free to ask us and other users in Blogilo forum!
One known problem:
After running Blogilo, If you see a dialog telling you that Cannot connect to database, There are 2 ways to fix it:
- Move directories on C:\KDE\plugins into C:\KDE\bin .
- Or, Create a new environment variable: name: QT_PLUGIN_PATH value: C:\KDE\plugins\.
Report bugs
To report Blogilo bugs use KDE bug tracker.
Reference
Have used Digikam Tutorial : How To Compile digiKam under Microsoft Windows to write this article.
