-----------------------------------------
Installation notes for the qtbase package
-----------------------------------------

The qtbase package should work on Linux and Mac. Windows support is
still in progress.

Requirements
------------
1. Qt >= 4.0.0 SDK (>= 4.8.0 recommended for optimal performance)
2. cmake >= 2.8.1

Mac OS X instructions
---------------------

1. Make sure that you have a recent version of xcode installed.
2. Install Qt by downloading and running the installer at
   http://qt.nokia.com/downloads/sdk-mac-os-cpp.
3. Install cmake (version 2.8.1 or later); obtain it from cmake.org.
4. Check your PATH, ensuring that both are visible.
5. Run R CMD INSTALL qtbase.

Linux instructions
------------------

1. Install the Qt SDK (i.e., devel) >= 4.0 and cmake >= 2.8.1 packages.
2. Run R CMD INSTALL qtbase.

Windows instructions
--------------------

1. Download the 64 bit MinGW Qt binaries and headers from ...
2. Install cmake >= 2.8.1 from http://www.cmake.org/.
3. Set CMAKE environment variable to path containing cmake.exe.
4. Set QMAKE environment variable to point to qmake.exe.
5. Set QTBASE_QT_PATH to the directory containing qmake.exe.
6. Set RC_COMPILER to point to windres.exe in R Tools. This path must use the
   '/' file separator, instead of '\'.
7. Make sure that PATH includes perl.exe.
8. Make sure that the machine is properly configured to build binary packages.
9. Using command.exe, run R CMD INSTALL qtbase.

===================
Building on Windows
===================

Building qtbase
-----------------------

1. Install Rtools.
2. Install cmake.
3. Download and install the Qt libraries:
   32 bit: http://download.qt-project.org/official_releases/qt/4.8/4.8.4/qt-win-opensource-4.8.4-mingw.exe
   64 bit: follow the instructions below to build it.
3. Set the CMAKE environment variable to point to your cmake.exe.
4. Set QMAKE environment variable to point to qmake.exe.
5. Set QTBASE_QT_PATH to the directory containing qmake.exe.
6. Set RC_COMPILER environment variable to point to windres.exe from Rtools.
7. Make sure perl.exe is on your PATH.
8. Start the command shell.
9. Run "R CMD INSTALL --build qtbase" with "--arch 32" or "--arch 64".

Building Qt for 64 bit
------------------------------

0. Download MinGW and add it to your PATH.
1. Download the latest Qt source code and extract it somewhere.
   URL: (http://releases.qt-project.org/qt4/source/qt-everywhere-opensource-src-4.8.2.zip)
2. The complicated part is getting Qt to build with the compiler from
   Rtools. Open somewhere/mkspecs/win32-g++/qmake.conf and set
   QMAKE_CFLAGS and QMAKE_LFLAGS to "-m64". Also, add "-F pe-x86-64"
   to QMAKE_RC.  In qmake/Makefile.win32-g++-sh, add "-m64" to CFLAGS
   and change LFLAGS in that file to "-s -m64".
3. Start the command shell.
5. Switch to the qt source directory.
6. Run
 "configure -release -opensource -nomake examples -nomake demos -no-qt3support"
7. Run mingw32-make, as instructed.
8. Wait a long time. (about 3-4 hours)
