Mercurial > hg > syntilista
annotate qt5-cross-build.txt @ 259:14ed3a2500e6
Fix build.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 24 Dec 2019 05:14:48 +0200 |
parents | 30babce5c4be |
children | 2552756f2876 |
rev | line source |
---|---|
27
0ade5c3e424c
Some loose instructions for cross-building for Windows on Debian 9.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
1 # In Debian 9 |
0ade5c3e424c
Some loose instructions for cross-building for Windows on Debian 9.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
2 apt-get install gcc-mingw-w64 g++-mingw-w64 |
0ade5c3e424c
Some loose instructions for cross-building for Windows on Debian 9.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
3 |
0ade5c3e424c
Some loose instructions for cross-building for Windows on Debian 9.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
4 |
0ade5c3e424c
Some loose instructions for cross-building for Windows on Debian 9.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
5 # Clone Qt5 base git repo: |
0ade5c3e424c
Some loose instructions for cross-building for Windows on Debian 9.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
6 git clone https://code.qt.io/qt/qt5.git qt5-src |
0ade5c3e424c
Some loose instructions for cross-building for Windows on Debian 9.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
7 cd qt5-src/ |
0ade5c3e424c
Some loose instructions for cross-building for Windows on Debian 9.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
8 |
0ade5c3e424c
Some loose instructions for cross-building for Windows on Debian 9.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
9 # Checkout desired version |
0ade5c3e424c
Some loose instructions for cross-building for Windows on Debian 9.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
10 git checkout 5.8 |
0ade5c3e424c
Some loose instructions for cross-building for Windows on Debian 9.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
11 |
0ade5c3e424c
Some loose instructions for cross-building for Windows on Debian 9.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
12 # Initialize subrepos, we need just qtbase |
0ade5c3e424c
Some loose instructions for cross-building for Windows on Debian 9.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
13 ./init-repository -f --module-subset=qtbase |
0ade5c3e424c
Some loose instructions for cross-building for Windows on Debian 9.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
14 git checkout v5.8.0 |
0ade5c3e424c
Some loose instructions for cross-building for Windows on Debian 9.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
15 git submodule update |
0ade5c3e424c
Some loose instructions for cross-building for Windows on Debian 9.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
16 |
0ade5c3e424c
Some loose instructions for cross-building for Windows on Debian 9.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
17 # Configure for cross-compilation |
0ade5c3e424c
Some loose instructions for cross-building for Windows on Debian 9.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
18 ./configure -release -opensource -nomake examples -nomake tests -xplatform win32-g++ -device-option CROSS_COMPILE=i686-w64-mingw32- -opengl desktop |
0ade5c3e424c
Some loose instructions for cross-building for Windows on Debian 9.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
19 |
0ade5c3e424c
Some loose instructions for cross-building for Windows on Debian 9.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
20 # Qt5.8 requires this Windows 10 -specific header file |
0ade5c3e424c
Some loose instructions for cross-building for Windows on Debian 9.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
21 wget https://raw.githubusercontent.com/tpn/winsdk-10/master/Include/10.0.10240.0/um/UIViewSettingsInterop.h |
0ade5c3e424c
Some loose instructions for cross-building for Windows on Debian 9.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
22 -O /usr/i686-w64-mingw32/include/ |
0ade5c3e424c
Some loose instructions for cross-building for Windows on Debian 9.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
23 |
0ade5c3e424c
Some loose instructions for cross-building for Windows on Debian 9.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
24 # Build it |
0ade5c3e424c
Some loose instructions for cross-building for Windows on Debian 9.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
25 make -j8 |
0ade5c3e424c
Some loose instructions for cross-building for Windows on Debian 9.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
26 |
85
30babce5c4be
Add note about build-win32.sh
Matti Hamalainen <ccr@tnsp.org>
parents:
27
diff
changeset
|
27 ############# |
30babce5c4be
Add note about build-win32.sh
Matti Hamalainen <ccr@tnsp.org>
parents:
27
diff
changeset
|
28 Stuff below is not relevant to Syntilista, just run build-win32.sh |
30babce5c4be
Add note about build-win32.sh
Matti Hamalainen <ccr@tnsp.org>
parents:
27
diff
changeset
|
29 ############# |
27
0ade5c3e424c
Some loose instructions for cross-building for Windows on Debian 9.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
30 |
0ade5c3e424c
Some loose instructions for cross-building for Windows on Debian 9.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
31 # To cross-compile using qmake |
0ade5c3e424c
Some loose instructions for cross-building for Windows on Debian 9.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
32 /misc/packages/qt5-src/qtbase/bin/qmake |
0ade5c3e424c
Some loose instructions for cross-building for Windows on Debian 9.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
33 make |
0ade5c3e424c
Some loose instructions for cross-building for Windows on Debian 9.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
34 |
0ade5c3e424c
Some loose instructions for cross-building for Windows on Debian 9.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
35 |
0ade5c3e424c
Some loose instructions for cross-building for Windows on Debian 9.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
36 # The compiled exe requires DLL libraries ( Qt5Core.dll Qt5Gui.dll Qt5Widgets.dll |
0ade5c3e424c
Some loose instructions for cross-building for Windows on Debian 9.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
37 # ) etc. which can be found from the QT5 cross build directory. Copy them |
0ade5c3e424c
Some loose instructions for cross-building for Windows on Debian 9.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
38 # into your application (executable) directory. |
0ade5c3e424c
Some loose instructions for cross-building for Windows on Debian 9.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
39 /misc/packages/qt5-src/qtbase/bin/ |
0ade5c3e424c
Some loose instructions for cross-building for Windows on Debian 9.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
40 |
0ade5c3e424c
Some loose instructions for cross-building for Windows on Debian 9.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
41 |
0ade5c3e424c
Some loose instructions for cross-building for Windows on Debian 9.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
42 # And plugins, usually platforms/qwindows.dll and whatever you need, |
0ade5c3e424c
Some loose instructions for cross-building for Windows on Debian 9.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
43 # but it depends on your application. You will have to create the |
0ade5c3e424c
Some loose instructions for cross-building for Windows on Debian 9.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
44 # same subdirectories under your target application directory. |
0ade5c3e424c
Some loose instructions for cross-building for Windows on Debian 9.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
45 |
0ade5c3e424c
Some loose instructions for cross-building for Windows on Debian 9.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
46 mkdir -p $TGTDIR/platforms |
0ade5c3e424c
Some loose instructions for cross-building for Windows on Debian 9.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
47 cp /misc/packages/qt5-src/qtbase/plugins/platforms/qwindows.dll $TGTDIR/platforms/ |
0ade5c3e424c
Some loose instructions for cross-building for Windows on Debian 9.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
48 |
0ade5c3e424c
Some loose instructions for cross-building for Windows on Debian 9.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
49 |
0ade5c3e424c
Some loose instructions for cross-building for Windows on Debian 9.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
50 # Also libgcc and libstdc++ DLLs are needed, found from |
0ade5c3e424c
Some loose instructions for cross-building for Windows on Debian 9.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
51 /usr/lib/gcc/i686-w64-mingw32/6.3-win32/ |
0ade5c3e424c
Some loose instructions for cross-building for Windows on Debian 9.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
52 |
0ade5c3e424c
Some loose instructions for cross-building for Windows on Debian 9.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
53 # or so .. |