14 March 2004

INSTALLATION INSTRUCTIONS

Prerequisites
-------------
* GCC 2.95.3 or later

Qt# should be built with the same (or very similar) version of GCC
that was used to build Qt and QtC. Qt#'s C++ support library, libqtsharp,
must link against Qt, which requires binary compatibility.


* Qt Development System >= 3.1

Versions of Qt prior to 3.1 might work but have not been tested.
If you installed Qt from binary packages, you might need to install
an additional "devel" package (e.g. qt31-devel.rpm) and possibly a
"tools" package. In other words, you need both Qt's headers and
Qt's tools, moc in particular.


* QtC (from kdebindings or Qt# site)

You must have installed QtC before installing Qt#. QtC is available
as the kdebindings module of KDE or separately from the Qt# site.


* Mono >= 0.30 or Portable.NET >= 0.6.2

Recent CVS versions of Mono or Portable.NET should also work, but
please refer to README for potential problems with Portable.NET.


Building the Library
--------------------

Also, QTDIR should be set to the base directory where Qt is installed,
and $QTDIR/bin should be in your path. The instructions in Qt's
INSTALL file explain one way to achieve this.

Brief version: qmake; make; become root; make install


Detailed version:

1. Change to the toplevel qtsharp directory.


2. Run qmake

By default, Qt# will attempt to use mcs for the C# compiler
(falling back to csc or cscs) and mono for the CLI launcher.

Optionally, you can pass parameters to qmake to alter certain
behaviors:

CSC=<C# compiler>
CLI=<CLI/exe launcher>
INSTALLDIR=<installation directory for libs>

Example: qmake "CSC=cscc CLI=ilrun INSTALLDIR=/usr/lib"


3. Next, run "make" to build the libraries.


4. Then run "make install" to copy libqtsharp.so (and friends)
along with Qt.dll to the designated location.


5. If you have installed the libraries in an unusual location,
you might need to edit /etc/ld.so.conf or add the location to
LD_LIBRARY_PATH.


6. On Linux (and possibly other platforms), run ldconfig to
update the dynamic linker's cache.


7. You might also need to inform the CLI about the location of
Qt.dll using CSCC_LIB_PATH for Pnet or MONO_PATH for Mono. For
example, export MONO_PATH=/opt/kde/lib.


Building the Examples
---------------------

Qt# must be installed before the examples can be built.

1. cd qtsharp/src/examples

2. Repeat steps 2 and 3 under "Building the Libraries"
