6e21d9ee2cde57b0a003eec39d35535b5fa16455
[novacoin.git] / mingw64_deps / qt / build.sh
1 #!/bin/bash
2
3 CROSS=$1
4 ROOT=$(pwd)
5
6 if [[ ! "${CROSS}" =~ ^(aarch64|x86_64) ]]; then
7 echo "Platform ${CROSS} is not supported"
8 echo "Expected either aarch64 or x86_64."
9 exit 1
10 fi
11
12 # Make build directories
13 mkdir ${ROOT}/${CROSS}-w64-mingw32-build
14 mkdir ${ROOT}/${CROSS}-w64-mingw32-build-qttools
15 mkdir ${ROOT}/${CROSS}-w64-mingw32-build-qttranslations
16 mkdir ${ROOT}/${CROSS}-w64-mingw32-build-qtdeclarative
17
18 # Stage directory
19 mkdir ${ROOT}/${CROSS}-w64-mingw32
20
21 # Compile Qt
22
23 cd ${ROOT}/${CROSS}-w64-mingw32-build
24 ${ROOT}/qtbase/configure -xplatform win32-clang-g++ --hostprefix=${ROOT}/${CROSS}-w64-mingw32 --prefix=${ROOT}/${CROSS}-w64-mingw32 -device-option CROSS_COMPILE=${CROSS}-w64-mingw32- -release -confirm-license -no-compile-examples -no-cups -no-egl -no-eglfs -no-evdev -no-gif -no-icu -no-ico -no-iconv -no-libjpeg -no-libproxy -no-openssl -no-openvg -no-reduce-relocations -no-schannel -no-sctp -no-sql-db2 -no-sql-ibase -no-sql-oci -no-sql-tds -no-sql-mysql -no-sql-odbc -no-sql-psql -no-sql-sqlite  -no-sql-sqlite2 -no-system-proxies -no-use-gold-linker -no-zstd -nomake examples -nomake tests -nomake tools -opensource -qt-libpng -qt-pcre -qt-zlib -static -no-feature-bearermanagement -no-feature-colordialog -no-feature-concurrent -no-feature-dial -no-feature-ftp -no-feature-http -no-feature-image_heuristic_mask -no-feature-keysequenceedit -no-feature-lcdnumber -no-feature-networkdiskcache -no-feature-networkproxy -no-feature-pdf -no-feature-printdialog -no-feature-printer -no-feature-printpreviewdialog -no-feature-printpreviewwidget -no-feature-sessionmanager -no-feature-socks5 -no-feature-sql -no-feature-sqlmodel -no-feature-statemachine -no-feature-syntaxhighlighter -no-feature-textbrowser -no-feature-textmarkdownwriter -no-feature-textodfwriter -no-feature-topleveldomain -no-feature-udpsocket -no-feature-undocommand -no-feature-undogroup -no-feature-undostack -no-feature-undoview -no-feature-vnc -no-feature-xml -no-dbus -no-opengl -no-freetype
25 make -j 4
26 make install
27
28 # Compile Qt tools
29
30 cd ${ROOT}/${CROSS}-w64-mingw32-build-qttools
31 ${ROOT}/${CROSS}-w64-mingw32/bin/qmake ${ROOT}/qttools
32 make -j 4
33 make DESTDIR=${ROOT}/${CROSS}-w64-mingw32 install
34
35 # Compile translations
36
37 cd ${ROOT}/${CROSS}-w64-mingw32-build-qttranslations
38 ${ROOT}/${CROSS}-w64-mingw32/bin/qmake ${ROOT}/qttranslations
39 make -j 4
40 make DESTDIR=${ROOT}/${CROSS}-w64-mingw32 install
41
42 # Compile qtdeclarative
43
44 cd ${ROOT}/${CROSS}-w64-mingw32-build-qtdeclarative
45 ${ROOT}/${CROSS}-w64-mingw32/bin/qmake ${ROOT}/qtdeclarative
46 make -j 4
47 make DESTDIR=${ROOT}/${CROSS}-w64-mingw32 install
48
49 # Remove build directories
50 cd ${ROOT}
51 rm -rf ${ROOT}/${CROSS}-w64-mingw32-build ${ROOT}/${CROSS}-w64-mingw32-build-qttools ${ROOT}/${CROSS}-w64-mingw32-build-qttranslations ${ROOT}/${CROSS}-w64-mingw32-build-qtdeclarative