Delta Platform

  1. Introduction
  2. Setup
    1. Qt
    2. Winlocal
    3. QConf
    4. QCA
  3. Extra
    1. Read-only Qt installation

1. Introduction

To work with anything XMPP-related, including Iris or Psi, you must first set up your development environment.  Since the build preparation for many of the Delta subprojects is similar, this text defines a “Delta Platform” to describe a common environment setup.

2. Setup

The Delta Platform essentially consists of the Qt and QCA libraries.  There is also the QConf tool and the Winlocal qmake feature, depending on the operating system.

2.1 Qt

You need Qt 4.2.3 or higher.

Note that while many of the Delta subprojects may not individually require this high of a Qt version (for example, QConf only depends on Qt 4.1), the Delta Platform must specify the minimum version to build all of our subprojects, which at this time is 4.2.3.

Compiler

If you are using Windows and you have no C++ compiler, Trolltech provides a convenient MinGW self-installer which can install both the MinGW C++ compiler and the Qt library.  You can go from having no development environment whatsoever to being able to develop Qt/C++ applications after a single install.

Otherwise, be sure you have a C++ compiler supported by Qt.  GNU GCC (including MinGW and Xcode) and Microsoft Visual Studio 2003/2005 are recommended for the Delta Platform, but you can try your luck with others.

Qt

If you are a commercial Qt user, then we assume you already know how to set up Qt.  For everyone else, below are some instructions for installing the open source version of Qt.

Qt for Windows

For Windows, Trolltech offers a ready-made package of Qt for the MinGW compiler.  It can even optionally install the MinGW compiler if you do not already have it.  Visit Qt’s open source download page.

At the time of this writing, MinGW is the only compiler supported in this way.  For others, you’ll need to refer to the source section below.

Qt for Mac

For Mac, Trolltech offers a ready-made package of Qt for GCC.  Visit Qt’s open source download page.

Qt for Unix (non-Mac)

On non-Mac unix distributions, Qt may be conveniently available as a package.  You’ll want both the runtime objects and the development files, as well as the development tools.  Below is a list of distributions and the packages that you’ll need to install for each:

If your distribution is not listed here, and you cannot otherwise find appropriate packages in your distribution, information about installation from source can be found below.

Qt from Source

Visit Qt’s open source download page to obtain an appropriate source package for your platform (note that for non-Mac unix, you want the “X11″ platform).  While Qt can be configured in a number of ways when installing from source, the default configuration should be fine.

2.2 Winlocal

This section only applies to Windows environments.

One difficulty with compiling projects on the Windows platform is the locating of dependency libraries. Historically, the Delta programs would require everyone to put their dependencies in the same place (commonly C:\local, similar in spirit to a unix /usr/local). Unfortunately, not everyone liked having to store files in C:\local, and in that case it was necessary to edit the project files by hand to change the path to a more favorable location.

Today, we have winlocal.prf. This is a file that you put in your qmake features directory (QTDIR\mkspecs\features). It contains a single line:

WINLOCAL_PREFIX = C:/local

This way, project files don’t have to hardcode C:\local. Instead, the projects load winlocal.prf (which is stored in a common location, so it is always findable), and honor the WINLOCAL_PREFIX variable. You can set this variable to whatever path you want.

Note: if you would prefer not to write into your Qt installation, see this section.

2.3 QConf

This section only applies to unix (including Mac) environments.

The qconf utility is used to create “configure” scripts for our projects.  Source distributions will always contain configure scripts, but if you are working with development repositories then you may need qconf to generate the scripts yourself.  The Delta Platform insists that you have at least qconf version 1.3.

Download the qconf source from this page, and install it the usual way.

Note: If configure cannot find your Qt 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.

2.4 QCA

QCA is our security framework.  You’ll need 2.0.0 or higher.

QCA for Windows

For Windows, a number of ready-made packages are available depending on your compiler:

Unpack the appropriate package and prepare it for use according to the included Readme.txt file.  Be sure the crypto qmake feature is installed.

If your Windows compiler is not listed, information about installation from source can be found below.

Note: if you would prefer not to write into your Qt installation, see this section.

QCA for Mac

On Mac, there is a ready-made package: qca-2.0.1.dmg

Open the package, copy the files out of it, and prepare it for use according to the included Readme.txt file.  Be sure the crypto qmake feature is installed.

Note: if you would prefer not to write into your Qt installation, see this section.

QCA for Unix (non-Mac)

On non-Mac unix distributions, QCA may be conveniently available as a package.  You’ll want both the runtime objects and the development files, as well as the qcatool utility.  Below is a list of distributions and the packages that you’ll need to install for each:

You may need to remove any development files related to QCA version 1.0 if you have them installed.  For example, on Ubuntu/Debian you’d want to remove the qca-dev package before installing libqca2-dev.

If your distribution is not listed here, and you cannot otherwise find appropriate packages in your distribution, information about installation from source can be found below.

QCA from Source

First, download the source and unpack.  In the case of Windows, be sure to unpack the files (or move the files after unpacking) to where you’d eventually like to keep them.

Then, go to where the files are unpacked from within a command prompt or terminal.  In the case of Windows, you should use the Qt Command Prompt from the Start menu.

QCA for Windows from Source

If you don’t have Qt debug libraries, which is the case by default with the MinGW package, run the following command:

configwin r

Otherwise, run this (for release & debug):

configwin rd

After QCA is configured, run

qmake
make (or nmake, or mingw32-make)
installwin

Note: if you would prefer not to write into your Qt installation, see this section.

QCA for Unix (including Mac) from Source

Install QCA in the usual way.

Note: If configure cannot find your Qt 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.

Be sure the path that you installed the QCA ‘lib’ files to is recognized as a library path by your system, and that the files you just installed are recognized as well.  Either add the path to /etc/ld.so.conf (if it is not there already) and run ldconfig or add the path to your LD_LIBRARY_PATH (DYLD_LIBRARY_PATH on Mac).

Note: if you would prefer not to write into your Qt installation, see this section.

3. Extra

This section contains extra information about setting up the Delta Platform.

3.1 Read-only Qt installation

Some installation steps involve writing into your Qt directory.  This is mainly to add qmake feature files (.prf) or plugins.  If for some reason you’d prefer to avoid writing into your Qt directory, read on to learn how.  For advanced users only.

Set the QMAKEFEATURES environment variable to point to an alternative path for reading prf files.  For example:

export QMAKEFEATURES=/home/user/myqtdir/mkspecs/features

Note that setting this variable does not change how the current installation procedures behave.  For example, in the case of QCA, it would be your job to manually copy the crypto.prf file into the directory that this variable points to.

gipoco.com is neither affiliated with the authors of this page nor responsible for its contents. This is a safe-cache copy of the original web site.