Building Installer

From wikiPodLinux

This page is about building the new Installer 2 from source code.

Table of contents

Overview

Basically, you need these things:

  • The Installer source code from the svn repository
  • The open source version of Qt4 from Trolltech (http://www.trolltech.com) as the GUI library
  • gcc3.4.2 or later (gcc 4 is fine) as the main tool for building

Building under Windows

This section tells you how to build the installer under Windows for running under Windows

Preparation

  • Install the combined Qt4 + MinGW installer (http://www.trolltech.com/download/qt/windows.html) (i.e. not the source distribution). You may place Qt and MinGW in any place you like on your Windows disks.
  • Once Qt and MinGW are installed, you may optionally choose to build the Qt Debug Libraries so that you can later debug the installer. To do that, choose the "Qt 4.1.x (Build Debug Libraries), which you can find in the Programs submenu in your Start menu.
  • Get the Installer source code, place it anywhere you like.

Compilation

To build the installer a first time, follow these steps:

  1. Open a shell (Command Prompt), e.g. by using the Run... command under Start and entering "cmd".
  2. Change to the directory in which you have placed the installer files (using the cd command).
  3. Enter the command qmake CONFIG+=nocrypto. This should create three Makefiles in the installer's directory. Hopefully without errors.
    Linux note: if you have qt3-dev and qt4-dev both installed make sure your qmake points to qmake-qt4 or simply type qmake-qt4 CONFIG+=nocrypto. You will avoid a headache.
  4. Next, enter the command make. This will compile the program. This may take quite a while.
  5. When it has finished without errors, open the new directory "release". In it, you should find, amoung a lot of .o files, one Installer.exe. Open that. it should run the installer.

To debug the installer, you need to use make debug instead of make. You also need to have built the debug libs are explained above. The built app will then be placed into the "debug" directory.

Building under Linux

First, check if your distribution has a QT4 package. I run Fedora Core 4, so I used

# yum install qt4 qt4-devel

Make sure you get the header package (in this case -devel does the trick) as well as the binaries. This is important because we are going to compile source against the headers. If you cannot find a package for your distro, go to here (http://www.trolltech.com/developer/downloads/qt/x11) and download one. Next, run the qmake which was included in the package you installed. I emphasize this because if you run the qmake from QT3 (/usr/bin/qmake), it will not make a proper Makefile. I used this command:

$ /usr/lib/qt4/bin/qmake

Once the Makefile is done, type make. This will begin the long compiling and linking process. When that is finally done, type ./installer and you're all set.

If the compile dies with the error '/usr/bin/ld: cannot find -laudio', it means that it was looking for /usr/lib/libaudio.so but couldn't find it. If there is a /usr/lib/libaudio.so.2, then type 'cd /usr/lib; ln -s libaudio.so.2 libaudio.so' and try again. If /usr/lib/libaudio.so.2 is missing, get nas-1.8-6.fc4.i386.rpm and try again.

Views
Personal tools