-
Notifications
You must be signed in to change notification settings - Fork 0
/
make-qt-kit.sh
executable file
·79 lines (64 loc) · 2.09 KB
/
make-qt-kit.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#!/bin/bash
BASE_DIR=$(pwd)
export FZF_DEFAULT_OPTS="--height 40% --reverse --border"
./downloads.sh
echo "Selection de la Raspeberry PI"
RASPI=$(fzf < <(
echo "4"
)
)
echo "Architecture CPU de la Raspeberry PI"
ARCH=$(fzf < <(
echo "aarch64"
)
)
NB_BITS="32"
if [ "${ARCH}" == "aarch64" ]; then
NB_BITS="64"
fi
echo "Qt version"
QT_VERSION=$(fzf < <(
echo "5.15.2"
echo "6.2.2"
)
)
echo "Sysroot"
SYSROOT=$(fzf < <(
echo "sysroot-2021-05-07-raspios-buster"
echo "sysroot-2022-01-28-raspios-bullseye"
)
)
SYSROOT="${SYSROOT}-${ARCH}"
DIR_NAME=build-qt-${QT_VERSION}-raspi${RASPI}-${ARCH}-${SYSROOT}
echo ""
echo "Raspberry PI : ${RASPI} - ${ARCH}"
echo "Sysroot : ${SYSROOT}"
echo "QT Version : ${QT_VERSION}"
echo "Build dir : ${DIR_NAME}"
echo ""
echo "Continue ? (y/n)"
read CONTINUE
if [ "${CONTINUE}" != "y" ]; then
exit 1
fi
mkdir -p ${BASE_DIR}/${DIR_NAME}/build
cd ${DIR_NAME}
if [ ! -d qt-everywhere-src-${QT_VERSION} ] ; then
rsync -a --info=progress2 --no-i-r ${BASE_DIR}/sources/qt-everywhere-src-${QT_VERSION} .
fi
PATCH_FILE=arig-qt-${QT_VERSION}-pi${RASPI}-${ARCH}.patch
if [ ! -f ${PATCH_FILE} ] ; then
cp -vf ../patches/${PATCH_FILE} .
cd qt-everywhere-src-${QT_VERSION}
echo "Apply patch ${PATCH_FILE}"
patch -s -p0 < ../${PATCH_FILE}
fi
DEVICE=linux-rasp-pi${RASPI}-v3d-g++
if [ "${ARCH}" == "aarch64" ]; then
DEVICE=linux-rasp-pi${RASPI}-64-v3d-g++
fi
GCC_CROSS_COMPILE=${BASE_DIR}/build-tools/gcc-linaro-7.5.0-2019.12-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-
cd ${BASE_DIR}/${DIR_NAME}/build
../qt-everywhere-src-${QT_VERSION}/configure -release -opengl es2 -eglfs -device ${DEVICE} -device-option CROSS_COMPILE=${GCC_CROSS_COMPILE} -sysroot ${BASE_DIR}/build-tools/${SYSROOT} -prefix /home/pi/qt${QT_VERSION} -extprefix ${BASE_DIR}/${DIR_NAME}/qt${QT_VERSION}-pi -hostprefix ${BASE_DIR}/${DIR_NAME}/qt${QT_VERSION}-host -opensource -confirm-license -skip qtscript -skip qtwayland -skip qtwebengine -nomake tests -make libs -pkg-config -no-use-gold-linker -v -recheck
make -j4
make install