Content: - Building with MSVC - CMake - Building Windows installer. - Building with MINGW (autotools). (OUT OF DATE) # # Building with MSVC - CMake (+ See README.CMAKE) # 0. All related steps are done in the "Visual Studio Command Prompt" I have MS Visual Studio 2008 Express (aka version 9). It contains all basic tools propably so there is no more stuff from Microsoft required. 1. Downaload Qt4 source version for Windows - Trolltech doesn't provide MSVC binaries at all. I didn't find a nice download link for this, but it was available from the FTP server: URL: ftp://ftp.qtsoftware.com/qt/source/qt-all-opensource-src-4.5.2.zip 2. Install Oracle client - instant or standard one. 3. Download and install Postgresql development packages. It's a part of default installer - just check its component. NOTE: Install it to the path *without* space in its name - Qt has problems with compilation in the case of space. URL: http://www.enterprisedb.com/products/pgdownload.do#windows Testing with version 8.4.0 Seems that this installer doesn't prompt for any paths/etc. Be sure and disable postgres service after install if you won't be running the server itself 4. Download and install Mysql development packages. It's a part of default installer - just check its component. NOTE: Install it to the path *without* space in its name - Qt has problems with compilation in the case of space. URL: http://dev.mysql.com/downloads/mysql/5.1.html#win32 I am testing with the 5.1.37 MSI installer, not the 'Essentials' one 5. Update system environment paths in variables: INCLUDE and LIB to fit Postgresql and Mysql includes and libraries. Note: Mysql uses subdirectories in its lib directory. Example: set INCLUDE=%INCLUDE%;d:\Qt\sqlite\;D:\Qt\pgsql\include\;d:\Qt\mysql\include\ set LIB=%LIB%;d:\Qt\sqlite\;d:\Qt\pgsql\lib\;d:\Qt\mysql\lib\opt\ 6. Compile Qt4 with MSVC. Don't forget to specify -qt-sql-mysql -qt-sql-psql -qt-sql-odbc -plugin-sql-mysql -plugin-sql-psql -plugin-sql-odbc parameters for configure script. Example: configure.exe -plugin-sql-sqlite -system-sqlite -plugin-sql-mysql -plugin-sql-psql -plugin-sql-odbc but it dependes on your system mood. I mean it's not deterministic. Sometimes you will need to hack more paths etc. But building DB plugins is described in the Qt documentation. 7. Compile Tora - read README.CMAKE Example: set ORACLE_HOME=d:\oracle-xe\... set LIB=%LIB%;d:\Qt\pgsql\lib cmake -G "NMake Makefiles" -DWANT_INTERNAL_QSCINTILLA=1 -DCMAKE_INSTALL_PREFIX=d:\oss\tora\RELEASE -DORACLE_OCI_VERSION=10G_R2 -DPOSTGRESQL_PATH_INCLUDES=d:\Qt\pgsql\include -DPOSTGRESQL_PATH_LIB=d:\Qt\pgsql\lib\ ..\tora Misc notes: seting ORACLE_HOME is a good thing (TM) building with internal qscintilla is easier for beginners ;) prepare for longer headache (if you're a windows devel newbie) # # Building Windows installer. # 1. Obtain and install NSIS installer software from http://nsis.sourceforge.net 2. Copy all the distribution files with desired directory structure to the src/windows/installer/files directory within your TOra directory structure (or use it as INSTALLDIR when building TOra and use step 9 of above build instrucstions). 3. Run NSIS compiler GUI and then drag and drop the tora.nsi file from src/windows/installer directory in TOra to the compiler GUI window and wait till installer will finish the build. Please report any bugs should you find them as this port is still in the experimental stage. # # BELOW DOCS ARE OUT OF DATE, STANDARD BUILD METHOD IS ABOVE # Building with MINGW (autotools). At the moment this only works with QT3/Windows Free Edition port (http://qtwin.sourceforge.net/). The makefiles were only tested in Mingw MSYS environment so it is advised that you obtain and install full MINGW and MSYS packages from http://www.mingw.org. This requires mingw compiled binaries of QT which could be obtained at http://qtwin.sourceforge.net/ Please note that for TOra to work properly QT has to be compiled with RTTI support in mingw. If the available QT binary does not work then please compile your own version of it following HOWTO instructions on http://qtwin.sourceforge.net/ website and using -rtti configuration parameter. 1. Get and install (or build) QT3/Windows Free Edition from http://qtwin.sourceforge.net/ 2. Get the QScintilla sources here http://www.riverbankcomputing.co.uk/qscintilla/index.php 3. Obtain TOra sources 4. Modify the qscintilla\build.cmd file in TOra directory with your environment settings (MINGW, QT and QScintilla paths) 5. Build and install QScintilla by running qscintilla\build.cmd 6. Copy Makefile.migw to src/Makefile in your TOra directory 7. Edit src/Makefile and change path for QTDIR, OCI_DLL and OCI_HOME (and optionally for INSTALLDIR). Optionally edit the TARGET to set the desirable executable. Also check the CFLAGS_GLOB and LFLAGS_GLOB for the debug option (-g) depending on whether you want debug executable or not. You may also need to create default version of config.h 8. Run 'make' in MSYS environment from TOra src directory. 9. Optionally run 'make install' - this will strip down the executable and copy the necessary files (not yet all of them) to the install directory (INSTALLDIR)