source: misc/build-cefpython.sh@ 1123:f0334593281d

python3
Last change on this file since 1123:f0334593281d was 1112:8138afeb88c2, checked in by István Váradi <ivaradi@…>, 14 months ago

The CEF Python building script can use a local copy of the CEF binary

  • Property exe set to *
File size: 1.9 KB
Line 
1#!/bin/bash
2
3# build-cefpython.sh <builddir>
4#
5# Build CEF Python (the latest compatible version with the MAVA Logger X)
6# for Linux in the given build directory.
7
8set -e -u -x
9
10CEF_VERSION_MAJOR="108"
11CEF_VERSION_MINOR="4"
12CEF_VERSION_SHORT="${CEF_VERSION_MAJOR}.${CEF_VERSION_MINOR}"
13CEF_VERSION="${CEF_VERSION_SHORT}.13"
14CEF_FULL_VERSION="${CEF_VERSION}+ga98cd4c+chromium-108.0.5359.125"
15
16CEF_NAME="cef_binary_${CEF_FULL_VERSION}_linux64"
17CEFPYTHON_CEF_DIRNAME="cef${CEF_VERSION_MAJOR}_${CEF_FULL_VERSION}_linux64"
18CEFPYTHON_SHA="dbc68bb401f2163496e2503bb89a7084cd92bd56"
19MAKEJOBS="16"
20
21builddir="${1}"
22
23mkdir -p "${builddir}"
24
25cd "${builddir}"
26rm -rf "${CEF_NAME}"
27if test -f "${HOME}/sources/mlx/${CEF_NAME}.tar.bz2"; then
28 tar xf "${HOME}/sources/mlx/${CEF_NAME}.tar.bz2"
29else
30 wget -O - "https://cef-builds.spotifycdn.com/${CEF_NAME}.tar.bz2" | bzip2 -dc | tar xf -
31fi
32
33cd "${CEF_NAME}"
34mv tests tests.orig
35mkdir build
36cd build
37cmake -G "Unix Makefiles" ..
38cd libcef_dll_wrapper
39make -j${MAKEJOBS}
40
41cd "${builddir}"
42rm -rf "cefpython-${CEFPYTHON_SHA}"
43
44wget -O - https://github.com/ivaradi/cefpython/archive/${CEFPYTHON_SHA}.tar.gz | gzip -dc | tar xf -
45
46cd "cefpython-${CEFPYTHON_SHA}"
47mkdir build
48cd build
49
50mkdir -p "${CEFPYTHON_CEF_DIRNAME}/bin"
51mv "${builddir}/${CEF_NAME}/Release/"* "${CEFPYTHON_CEF_DIRNAME}/bin"
52mv "${builddir}/${CEF_NAME}/Resources/"* "${CEFPYTHON_CEF_DIRNAME}/bin"
53
54mkdir -p "${CEFPYTHON_CEF_DIRNAME}/lib"
55mv "${builddir}/${CEF_NAME}/build/libcef_dll_wrapper/libcef_dll_wrapper.a" "${CEFPYTHON_CEF_DIRNAME}/lib"
56
57mv "${builddir}/${CEF_NAME}/LICENSE.txt" "${CEFPYTHON_CEF_DIRNAME}"
58
59pip3 install --break-system-packages -r ../tools/requirements.txt
60
61python3 ../tools/build.py "${CEF_VERSION}" || true
62python3 ../tools/make_installer.py "${CEF_VERSION_SHORT}"
63
64cd "cefpython3_${CEF_VERSION_SHORT}_linux64"
65python3 setup.py bdist_wheel
66mv "dist/cefpython3-${CEF_VERSION_SHORT}-"*".whl" "${builddir}"
Note: See TracBrowser for help on using the repository browser.