-
-
Notifications
You must be signed in to change notification settings - Fork 705
Expand file tree
/
Copy pathbuild_webview.sh
More file actions
executable file
·41 lines (31 loc) · 991 Bytes
/
build_webview.sh
File metadata and controls
executable file
·41 lines (31 loc) · 991 Bytes
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
#!/bin/bash
set -euo pipefail
DEBIAN_VERSION='bookworm'
QT_MAJOR='6'
QT_MINOR='4'
QT_PATCH='2'
QT_VERSION="${QT_MAJOR}.${QT_MINOR}.${QT_PATCH}"
CORE_COUNT="$(expr $(nproc) - 2)"
BOARD=${BOARD:-"x86"}
if [[ ! "${BOARD}" =~ ^(x86|pi5|pi4-64)$ ]]; then
echo "Error: Invalid board specified. Must be either 'x86', 'pi5', or 'pi4-64'."
exit 1
fi
function create_webview_archive() {
local ARCHIVE_NAME="webview-${QT_VERSION}-${DEBIAN_VERSION}-${BOARD}-$GIT_HASH.tar.gz"
local ARCHIVE_DESTINATION="/build/release/${ARCHIVE_NAME}"
mkdir -p /build/release
cp -rf /webview /build
cd /build/webview
qmake6
make -j${CORE_COUNT}
make install
mkdir -p fakeroot/bin fakeroot/share/ScreenlyWebview
mv ScreenlyWebview fakeroot/bin/
cp -rf /webview/res fakeroot/share/ScreenlyWebview/
cd fakeroot
tar cfz ${ARCHIVE_DESTINATION} .
cd /build/release
sha256sum ${ARCHIVE_NAME} > ${ARCHIVE_DESTINATION}.sha256
}
create_webview_archive