view qt5-cross-build.txt @ 167:c54ad71c1205

Apply (kludgey) adjustment scales for printed page to avoid overflow ..
author Matti Hamalainen <ccr@tnsp.org>
date Tue, 19 Sep 2017 13:14:51 +0300
parents 30babce5c4be
children 2552756f2876
line wrap: on
line source

# In Debian 9
apt-get install gcc-mingw-w64 g++-mingw-w64


# Clone Qt5 base git repo:
git clone https://code.qt.io/qt/qt5.git qt5-src
cd qt5-src/

# Checkout desired version
git checkout 5.8

# Initialize subrepos, we need just qtbase
./init-repository -f --module-subset=qtbase
git checkout v5.8.0
git submodule update

# Configure for cross-compilation
./configure -release -opensource -nomake examples -nomake tests -xplatform win32-g++ -device-option CROSS_COMPILE=i686-w64-mingw32- -opengl desktop

# Qt5.8 requires this Windows 10 -specific header file
wget https://raw.githubusercontent.com/tpn/winsdk-10/master/Include/10.0.10240.0/um/UIViewSettingsInterop.h
	-O /usr/i686-w64-mingw32/include/

# Build it
make -j8

#############
Stuff below is not relevant to Syntilista, just run build-win32.sh
#############

# To cross-compile using qmake
/misc/packages/qt5-src/qtbase/bin/qmake
make


# The compiled exe requires DLL libraries ( Qt5Core.dll Qt5Gui.dll Qt5Widgets.dll
# ) etc. which can be found from the QT5 cross build directory. Copy them
# into your application (executable) directory.
/misc/packages/qt5-src/qtbase/bin/


# And plugins, usually platforms/qwindows.dll and whatever you need,
# but it depends on your application. You will have to create the
# same subdirectories under your target application directory.

mkdir -p $TGTDIR/platforms
cp /misc/packages/qt5-src/qtbase/plugins/platforms/qwindows.dll $TGTDIR/platforms/


# Also libgcc and libstdc++ DLLs are needed, found from
/usr/lib/gcc/i686-w64-mingw32/6.3-win32/

# or so ..