Programming Reference:Building Qt for BCI2000 (obsolete)

From BCI2000 Wiki
Revision as of 14:55, 12 March 2010 by Mellinger (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This document describes how to build and install Qt in the BCI2000 source tree.

Note: Following this procedure is only required if you are updating the Qt build coming with BCI2000. To build BCI2000 against a version of Qt outside the source tree, just modify the file BCI2000/build/cmake/FindQt.cmake, line 10, to read SET( USE_STD_QT TRUE ).

Copy Qt include files to the BCI2000 directory

  • Download and install Qt on your machine.
  • Copy the contents of the directory qt/include/Qt into BCI2000/src/extlib/qt/include/Qt, omitting the private directory.
  • Likewise, copy the QtCore, QtGui, and QtOpenGL include directories to BCI2000/src/extlib/qt/include, omitting the respective private directories.

Build and copy MSVC libraries and auxiliary files

  • In all the files qt/mkspecs/win32-msvc*, replace the -Zi compiler flag in QMAKE_CFLAGS_DEBUG with -Z7.
  • From the Qt installation's qt directory, run configure with the following options:
-platform  win32-msvc2008 
-static 
-no-sql-sqlite
-no-qt3support 
-fast 
-qt-zlib
-qt-gif 
-qt-libpng 
-qt-libmng 
-no-libtiff 
-no-libjpeg 
-no-phonon 
-no-webkit 
-no-scripttools 
-no-style-plastique 
-no-style-motif 
-no-style-cde 
  • When prompted for the type of license, choose "Open Source", and answer "yes" when asked whether you accept the terms of the license.
  • Open the VS2008 console from the start menu, and cd to the qt directory. There, run nmake.
  • When the build is finished, copy the following files from qt/bin to BCI2000/src/extlib/qt/msvc/bin:
findtr
idc.exe
moc.exe
qmake.exe
qt.conf
rcc.exe
syncqt
uic.exe
  • From qt/lib, copy the following files to BCI2000/src/extlib/qt/msvc/lib:
QtCore.lib
QtCored.lib
QtGui.lib
QtGuid.lib
qtmain.lib
qtmaind.lib
QtOpenGL.lib
QtOpenGLd.lib
  • From qt/mkspecs, copy the directories features and all the win32-msvc* directories to BCI2000/src/extlib/qt/msvc/mkspecs.

Build and copy mingw libraries and auxiliary files

  • From the Qt installation's qt directory, run configure with the following options:
-platform  win32-g++
-static 
-no-sql-sqlite
-no-qt3support 
-fast 
-qt-zlib
-qt-gif 
-qt-libpng 
-qt-libmng 
-no-libtiff 
-no-libjpeg 
-no-phonon 
-no-webkit 
-no-scripttools 
-no-style-plastique 
-no-style-motif 
-no-style-cde 
  • When prompted for the type of license, choose "Open Source", and answer "yes" when asked whether you accept the terms of the license.
  • From the qt directory, run mingw32-make.
  • When the build is finished, copy the following files from qt/bin to BCI2000/src/extlib/qt/mingw/bin:
findtr
idc.exe
moc.exe
qmake.exe
qt.conf
rcc.exe
syncqt
uic.exe
  • From qt/lib, copy the following files to BCI2000/src/extlib/qt/mingw/lib:
libQtCore.a
libQtCored.a
libQtGui.a
libQtGuid.a
libqtmain.a
libqtmaind.a
libQtOpenGL.a
libQtOpenGLd.a
  • From qt/mkspecs, recursively copy the content of directories features, common, and win32-g++ to BCI2000/src/extlib/qt/mingw/mkspecs.