== How to build the orangeqt library: ==

= Prerequisites =

orangeqt uses CMake and SIP. They are both free software and are included in most Linux distributions. 
They can also be downloaded from their sites: 

CMake: http://www.cmake.org/cmake/resources/software.html
SIP: http://www.riverbankcomputing.co.uk/software/sip/download

orangeqt also needs the Qt libraries and headers (the qt-dev or qt-devel packages on Linux) and PyQt. 

The Qt libraries can be downloaded from Nokia: https://qt.nokia.com/downloads/downloads#qt-lib. 

Download and install the latest version of the libraries that matches your operating system and compiler. Different version of compilers are compatible, but different compilers are not. 


= General compilation instructions =

If you use GNU Make, it's enough to just call 'make' from the orangeqt directory. 

On windows, follow the standard CMake instructions to compile orangeqt:
 1.a) Use the CMake GUI, and load the orangeqt directory from there. 
	The build directory must be a new or empty directory, and is usually called build and placed inside the source directory.
	This method is preferred as it asks you for your compiler settings.

 1.b) From the command line: run 
		mkdir build
		cd build
		cmake -G "NMake Makefiles" ..
	Be sure there are two dots at the end of the line. 
	If you use a compiler other than NMake, replace "NMake Makefiles" with the appropriate value. 
        The list of possible choices includes "Visual Studio 10", "Unix Makefiles", "NMake Makefiles" and many others. 
        It is exparing with every new compiler supported by CMake, the complete list is available in the GUI version of CMake. 
        If you use Linux and GNU Make, the -G parameter is not needed, as the Makefile will be generated by default. 

 2) This step depends on your selected compiler. If you chose any type of makefiles, run "make" or "nmake" in the build directory. If you used Visual Studio, open the Solution file located in the build directory. 

 There is no need to install the library, because CMake will copy both the library into the parent directory, with other Orange libraries. However, make sure that the generated library (orangeqt.so or orangeqt.pyd) is in Python's path. You can either adjust the path, or copy the library somewhere where Python will find it. 

If any step reports an error, it is mostly likely some of the dependencies listed above are not installed or not found. 

= Compilation on Windows XP =

1.) Install:
	 * Visual C++ 2010 Express http://www.microsoft.com/visualstudio/en-us/products/2010-editions/visual-cpp-express
	 * Qt libraries 4.7.3 for Windows (VS 2010): http://qt.nokia.com/downloads/
	 * PyQt4 Windows installer: http://www.riverbankcomputing.co.uk/software/pyqt/download
	 * CMake (Win32 installer): cmake-2.8.5-win32-x86.exe (put it in path)
         * Make sure glext.h exists (in GL/ folder), download from http://www.opengl.org/registry/api/glext.h otherwise

2.) In file c:\Qt\4.7.3\bin\qtvars.bat replace win32-msvc2008 with win32-msvc2010

3.) Run Visual Studio Command Prompt
	 * navigate to orangeqt directory
	 * mkdir build
	 * cd build
	 * c:\Qt\4.7.3\bin\qtvars.bat
	 * cmake -DCMAKE_BUILD_TYPE=Release -G "NMake Makefiles" ..
	 * nmake
	 * move orangeqt.pyd to orange directory
	 
4.) if you use this pyd file on another machine, I thik you must install Microsoft Visual C++ 2010 Redistributable Package: http://www.microsoft.com/download/en/details.aspx?id=5555
 
= Compilation on Mac OS X =

Compile the library following the same steps as on Linux. After the compilation, rename "orangeqt.dylib" to "orangeqt.so" and move it somewhere in Python's path. 
