domingo, 5 de abril de 2009

KDE development environment for Windows (MinGW)

As soon as I had my Windows desktop with a basic configuration, I put a KDE 4 installation on it. Instructions on how to set a development environment and build KDE (I skipped it by using the installer) are available in the techbase page.

If you are like me, you may want to try different setups at the same time. Perhaps you want to have both MinGW and MSVC installations for whatever reason. Or just may want a simple and painless environment creation without polluting your desktop. This is what I did:

1) Install devel packages and tools with the KDE installer in a path of your choice. (eg. C:\KDE): kdelibs, kdepimlibs, automoc, qt, kdewin32, gcc-mingw, cmake are the minimal packages you need.
1.1). Apparently dependencies are not resolved for devel packages. So, if you want to install more, make sure to install other devel libraries your module/software needs.

2) Save the following to "mingw.bat" (change paths as necessary):
@set SOURCE_PATH=C:\src
@set INSTALL_PATH=C:\kde

@set PATH=c:\mingw\bin;%INSTALL_PATH%\bin;%INSTALL_PATH%\lib;%PATH%
@set QT_PLUGIN_PATH=%INSTALL_PATH%\lib\kde4\plugins;%INSTALL_PATH%\plugins


What you need to check/change are the INSTALL_PATH and PATH variables to point to your KDE dir and MinGW dir. Save it in your sources dir or anywhere else.

3) The key is the environment shortcut. Select a good place where you will usually start your environment from (e.g. c:\src\). Create a new shortcut to:
%windir%\system32\cmd.exe /K c:\YOURDIR\mingw.bat

And save it as "Environment (MinGW)". Done.

Whenever you will build/install from sources, open "Environment (MinGW)" and start hacking.

No hay comentarios.:


caralibro (1) debian (6) gentoo (2) gnu (1) jabber (1) kde (8) omaque (2) plasma (1) qt (1) software libre (1) ubuntu (2) windows (3) xmms2 (1)