Build Instructions Qt4
From PsiWiki
This page contains the official instructions on how to build the current development version of Psi. A list of issues for this version can be found here.
Contents |
Requirements
- You need Qt 4.3.0 or higher to build Psi. For Windows, just download and install the MingW32 self-installer. If a packaged version of Qt is not available for your OS (or if you want debug symbols in your Qt libraries), you will need to build and install Qt yourself. See the Qt instructions to find out how to do this.
- You need QCA 2.0 and the QCA plugin for OpenSSL (qca-ossl), which you can get here. Instructions on how to build these packages can be found below.
- If you want to use the QCA plugin for OpenSSL on Windows, you will need to download and install the OpenSSL package. Linux and Mac operating systems traditionally have OpenSSL installed already.
Sources
The current version of the Psi sources can be retrieved via Subversion. For more information on Subversion, take a look at Version Control with Subversion.
mkdir psi-svn cd psi-svn svn checkout http://svn.psi-im.org/psi/trunk/ cd trunk
Building on Unix & Mac OS X
Note: If you are only interested in vanilla Mac OS X universal binaries, please use a nightly build instead. You'll save yourself some time and trouble.
Building QCA
After unpacking the QCA sources, run the following command:
./configure --prefix=/usr/local/qca2
If configure cannot find your Qt4 library, use the --qtdir option to specify the path to Qt (e.g. /usr/share/qt4), or make sure that the qmake binary for Qt4 occurs first in your PATH. If something else goes wrong, use the --verbose option to get more information on the configuration process.
After QCA is configured, run
make make install
To be able to run applications using QCA2, you will need to add /usr/local/qca2/lib to /etc/ld.so.conf and run ldconfig or add /usr/local/qca2/lib to your LD_LIBRARY_PATH (DYLD_LIBRARY_PATH on Mac OS X).
Building the QCA plugin for OpenSSL (qca-ossl)
After unpacking qca-ossl's sources, run the following commands
./configure make make install
See above on how to troubleshoot configure problems.
Building Psi
From the toplevel Psi source dir, run the following commands:
./configure make
This should configure and build Psi. See above on how to troubleshoot configure problems.
More detailed instructions in case the above fails to create the expected:
From the toplevel Psi source dir:
export MYQTDIR="/path/to/your/qt4/installation" (e.g. /usr/local/Trolltech/Qt-4.2.0-tp1) export MYGROWLDIR="/Path/To/Growl.Framework/Container" (e.g. /Library/Frameworks)
./configure \ --qtdir=$MYQTDIR \ --with-growl=$MYGROWLDIR \ --enable-universal \ --disable-dnotify \ --disable-xss
Edit variables in mac/Makefile:
QTDIR= (same as $MYQTDIR)
QCADIR= (/usr/local/qca2/lib)
GROWLDIR= (same as $MYGROWLDIR)
QT_FRAMEWORK_VERSION= (take note which dir is in the
Qt Frameworks: is it 4.0, 4, or 4.2...?)
make -C mac/
This should create a relocatable Psi.app in mac/disk/. To show it in the Finder:
open mac/disk/
In any case, always refer to doc/build-mac.txt!
Building on Windows using MinGW
All these instructions are performed from within the Qt command prompt (found in the Start menu)
Note: If you are only interested in Windows (win32) binaries, please use a nightly build instead. You'll save yourself some time and trouble.
Installing Qt and MinGW
First of all, install Qt 4.3.0 or higher. You can get the latest version bundled with the MinGW compiler here.
Building with QCA
Building QCA
After unpacking the QCA sources, run the following command (for release & debug):
configwin rd
If you don't have Qt-debug, run this:
configwin r
After QCA is configured, run
qmake mingw32-make (or make, or nmake) installwin
Building the QCA plugin for OpenSSL (qca-ossl)
Install or build a version of OpenSSL. You can get a pre-compiled version as installer here.
- Create a winlocal.prf file that sets WINLOCAL_PREFIX to point to the directory where you will install Psi library dependencies. For example:
echo "WINLOCAL_PREFIX = C:/local" > %QTDIR%\mkspecs\features\winlocal.prf
(be sure to use forward-slashes in the path) This directory will hereby be referred to as winlocal. Make sure the directory exists, and create bin, include, and lib subdirectories within it. For example, you might have the following directories:
C:\local C:\local\bin C:\local\include C:\local\lib
- Copy the OpenSSL include directory into winlocal\include. Thus, you should have files such as winlocal\include\openssl\tls1.h. Copy the OpenSSL library files (found in lib\MingW) into winlocal\lib. You should have both libeay32.a and ssleay32.a (copy it to libeay32.lib and ssleay32.lib).
Now you are ready to build qca-ossl.
After unpacking the qca-ossl sources, run the following command (for release & debug):
configwin rd
For release only:
configwin r
After qca-ossl is configured, run
qmake mingw32-make (or make, or nmake) mkdir %QTDIR%\plugins\crypto copy lib\*.dll %QTDIR%\plugins\crypto
Building with qca-static && openssl
- If you want to use the QCA OpenSSL plugin on Windows, you will need to download and install the OpenSSL package from here. Download full (~6MB) version, not light (~1MB).
- Go to the dir where you unpacked OpenSSL. In the lib\MingW subdir of that dir, copy the files ssleay32.a and libeay32.a to ssleay32.lib and libeay32.lib
respectively.
- uncomment the 'CONFIG += qca-static' in conf_windows.pri. Change the OPENSSL_PREFIX in the windows section to point to the dir where you installed OpenSSL (e.g. C:/OpenSSL). Change -L$$OPENSSL_PREFIX/lib into -L$$OPENSSL_PREFIX/lib/MinGW.
Building Psi
- Edit src/src.pro and conf_windows.pri in the Psi tree, and remove the line CONFIG += DEBUG if you find it.
- From the toplevel dir in your tree, run the following commands:
qmake mingw32-make (or make, or nmake)
- There should now be a binary psi.exe in src/release.
Packaging Psi
- To package everything up into a self-containing dir, edit win32/Makefile to reflect your local setup
- Make sure the dir win32/psi does not exist, then run
mingw32-make -C win32
This should make a dir win32/psi with all the necessary files.
Building on Windows using Microsoft Visual C++
Qt and Psi can be built using any fairly recent version of Microsoft Visual C++, starting with version 6.0. Any edition thereof is supported, even free Microsoft Visual C++ Express Edition. The procedure below is aimed towards usage of this edition.
Be sure to use Qt-4.3.2 or later as previous versions of Qt4/OpenSource officially did not support Microsoft Visual C++.
Installing Microsoft Visual C++
- Microsoft Visual C++ Express Edition can be found on Microsoft website. You can use either Visual C++ 2005 or Visual C++ 2008, but the latter is recommended.
If you intend to use Microsoft Visual C++ 2008, then you will also need:
If you intend to use Microsoft Visual C++ 2005, then you will also need:
- Either Microsoft Windows Server 2003 R2 Platform SDK or abovementioned Windows SDK for Windows Server 2008 and .NET Framework 3.5
- If you have installed Microsoft Visual C++ 2005 without Service Pack 1, then
- Either Microsoft Visual C++ 2005 Express Edition Service Pack 1 or Microsoft Visual C++ 2005 Service Pack 1 (for any other Microsoft Visual C++ 2005 edition);
- KB930198 hotfix (must be installed after installation of Service Pack 1).
Installing other libraries
You will need OpenSSL. Windows binaries and headers can be grabbed there. Download full (~6MB) version, not light (~1MB).
Compiling Qt
You can get latest source code here. QtBuilder will help you with compilation.
Building Psi
TODO
Building on Solaris
Building the QCA plugin for OpenSSL (qca-ossl)
After unpacking qca-ossl's sources, run the following commands
LD_LIBRARY_PATH=/usr/local/qca2/lib bash ./configure --qtdir=/usr/local/Trolltech/Qt-4.1.4 \ --with-openssl-lib=/usr/sfw/lib --with-openssl-inc=/usr/sfw/include gmake
and as root
/usr/sfw/bin/gmake install
See above on how to troubleshoot configure problems.
Building Psi
From the toplevel Psi source dir, run the following commands:
LD_LIBRARY_PATH=/usr/local/qca2/lib bash ./configure --qtdir=/usr/local/Trolltech/Qt-4.1.4 gmake
and as root
/usr/sfw/bin/gmake install
This should configure and build Psi. See above on how to troubleshoot configure problems.
Running Psi
With this very dirty command, I'm now able to run Psi:
LD_LIBRARY_PATH=/usr/sfw/lib:/usr/openwin/sfw/lib:/usr/local/qca2/lib /usr/local/bin/psi
As you can probably see, these instruction are created by someone who really knows little about Solaris. If you have better/nicer solutions for certain things, please fix this page!


