Quick Guide to Compiling Qt for op64 - r52/op64 GitHub Wiki

Instructions as of Qt version 5.5.0

Windows

Dependencies

Python

Building

  1. Acquire a copy of the Qt source code from http://www.qt.io/download-open-source/
  2. Open up a Visual Studio command prompt (and navigate to the directory of the Qt source code)
  3. Configure Qt using the command configure -prefix "<installdir>" -debug-and-release -opensource -confirm-license -no-compile-examples -nomake examples -nomake tests -no-icu -opengl desktop -mp -qt-zlib -qt-pcre -qt-libpng -qt-libjpeg -qt-freetype -qt-harfbuzz replacing <installdir> with where you want Qt to be installed
  4. Build with nmake
  5. Install with nmake install
  6. Remember to set the environment variable QTDIR to the install directory (if the Visual Studio add-in is not installed)

For a super minimal build with only the necessary components to compile op64, try: configure -prefix "<installdir>" -opensource -confirm-license -debug-and-release -no-accessibility -no-angle -no-compile-examples -no-dbus -no-iconv -no-icu -no-openssl -no-qml-debug -no-sql-db2 -no-sql-ibase -no-sql-mysql -no-sql-oci -no-sql-odbc -no-sql-psql -no-sql-sqlite -no-sql-sqlite2 -no-sql-tds -nomake examples -nomake tests -opengl desktop -skip 3d -skip activeqt -skip connectivity -skip declarative -skip doc -skip enginio -skip feedback -skip graphicaleffects -skip imageformats -skip location -skip multimedia -skip pim -skip qa -skip quick1 -skip quickcontrols -skip repotools -skip script -skip sensors -skip svg -skip systems -skip serialport -skip tools -skip translations -skip wayland -skip webchannel -skip webengine -skip webkit -skip webkit-examples -skip websockets -skip xmlpatterns -skip macextras -skip x11extras -skip winextras -mp -qt-zlib -qt-pcre -qt-libpng -qt-libjpeg -qt-freetype -qt-harfbuzz

  • NOTE All the -skip <module> options correspond to each of the qt<module> folders in the root source directory. Any folder that isn't present in the root source directory requires the corresponding -skip option to be removed. Basically, op64 only requires (meaning you can skip everything except) qtbase.
  • Don't skip qttools if you intend on using Qt Designer to edit the UI form files

Did something wrong? Clean the build with nmake clean and configuration with nmake distclean, then reconfigure

Building from Git

If building from the Qt Git repository, Perl is also required.

  1. Clone the Qt Git repository git clone git://code.qt.io/qt/qt5.git
  2. Initialize the repository using perl init-repository --no-webkit --module-subset=qtbase or ./init-repository on cygwin/linux with the same arguments. (Add --force to update)
  3. Continue using the same configuration instructions above.
  • NOTE If you only initialize qtbase, all those -skip arguments are not required.

Linux

Tested on Ubuntu 14.04

Dependencies

perl python build-essential mesa-common-dev libglu1-mesa-dev libxcb1 libxcb1-dev libx11-xcb1 libx11-xcb-dev libxcb-keysyms1 libxcb-keysyms1-dev libxcb-image0 libxcb-image0-dev libxcb-shm0 libxcb-shm0-dev libxcb-icccm4 libxcb-icccm4-dev libxcb-sync1 libxcb-sync-dev libxcb-xfixes0-dev libxrender-dev libxcb-shape0-dev libxcb-randr0-dev libxcb-render-util0 libxcb-render-util0-dev libxcb-glx0-dev libfontconfig1-dev libfreetype6-dev libx11-dev libxext-dev libxfixes-dev libxi-dev

Building

  1. Acquire a copy of the Qt source code from http://www.qt.io/download-open-source/ or from Git
  2. Navigate to the directory of the Qt source code. Initialize the repository using instructions above if building from Git
  3. Configure Qt using the command ./configure -opensource -confirm-license -debug-and-release -no-accessibility -no-compile-examples -no-dbus -no-iconv -no-icu -no-openssl -no-qml-debug -no-sql-db2 -no-sql-ibase -no-sql-mysql -no-sql-oci -no-sql-odbc -no-sql-psql -no-sql-sqlite -no-sql-sqlite2 -no-sql-tds -nomake examples -nomake tests -opengl desktop -skip 3d -skip activeqt -skip connectivity -skip declarative -skip doc -skip enginio -skip feedback -skip graphicaleffects -skip imageformats -skip location -skip multimedia -skip pim -skip qa -skip quick1 -skip quickcontrols -skip repotools -skip script -skip sensors -skip svg -skip systems -skip serialport -skip tools -skip translations -skip wayland -skip webchannel -skip webengine -skip webkit -skip webkit-examples -skip websockets -skip xmlpatterns -skip macextras -skip x11extras -skip winextras -qt-xcb -qt-zlib -qt-libpng -qt-libjpeg -qt-freetype -qt-harfbuzz -qt-pcre
  4. Build with make
  5. Install with sudo make install
  6. Setup your PATH to /usr/local/Qt-%VERSION%/bin:$PATH
⚠️ **GitHub.com Fallback** ⚠️