In part 1, we installed the tools that are required to build from source.
Qt is huge and building it from scratch takes a long time, typically several hours on a current desktop machine. Using pre-compiled binaries as available on the Qt site can be preferred, although it is only since quite recently (4.5.2?) that the pre-compiled version can be used to build manitou-mail (As I mentioned in this message to qt-interest, there was a problem with the pre-compiled qmake that precluded its use with autotools scripts launched in MSYS. But this appears to have been fixed).
If however a custom compilation is chosen, here are the steps to follow:
- Download Qt sources into c:\qt\4.5.2 or similar
- Open CMD.EXE and make sure g++ is in the PATH. Add it manually if necessary.
- Inside c:\qt\4.5.2, run
configure.exe -platform win32-g++.
- Run mingw32-make as told at the end of configure, and don’t expect the result before several hours :)
Beware: contrary to the Unix way of installing from source, no make install is necessary nor possible with Qt/Windows : the build must happen directly inside the destination directory.
- Grab postgresql source tar archive and untar it. I’ve used version 8.4.0, the latest available at the time of this post.
- If /mingw/include/libz.h doesn’t exist, grab and unpack the zlib dev archive in /mingw.
- cd into postgresql source directory and run ./configure
- cd into src/interfaces/libpq
- run make && make install
Once this is done, the headers files to be found in /usr/local/pgsql/include and the libraries (.a and .dll) in /usr/local/pgsql/lib
Conclusion of part 2
Now that Qt and PostgreSQL are built, in the next and final part of this series we’ll compile the manitou-mail application itself for windows, with the toolchain that we installed in part 1.