[1090] | 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 |
|
---|
| 8 | set -e -u -x
|
---|
| 9 |
|
---|
| 10 | CEF_VERSION_MAJOR="108"
|
---|
| 11 | CEF_VERSION_MINOR="4"
|
---|
| 12 | CEF_VERSION_SHORT="${CEF_VERSION_MAJOR}.${CEF_VERSION_MINOR}"
|
---|
| 13 | CEF_VERSION="${CEF_VERSION_SHORT}.13"
|
---|
| 14 | CEF_FULL_VERSION="${CEF_VERSION}+ga98cd4c+chromium-108.0.5359.125"
|
---|
| 15 |
|
---|
| 16 | CEF_NAME="cef_binary_${CEF_FULL_VERSION}_linux64"
|
---|
| 17 | CEFPYTHON_CEF_DIRNAME="cef${CEF_VERSION_MAJOR}_${CEF_FULL_VERSION}_linux64"
|
---|
| 18 | CEFPYTHON_SHA="2c3c542c469808aa2308f5f29498f3a2cd4c4f88"
|
---|
| 19 | MAKEJOBS="4"
|
---|
| 20 |
|
---|
| 21 | builddir="${1}"
|
---|
| 22 |
|
---|
| 23 | mkdir -p "${builddir}"
|
---|
| 24 |
|
---|
| 25 | cd "${builddir}"
|
---|
| 26 | rm -rf "${CEF_NAME}"
|
---|
| 27 | wget -O - "https://cef-builds.spotifycdn.com/${CEF_NAME}.tar.bz2" | bzip2 -dc | tar xf -
|
---|
| 28 |
|
---|
| 29 | cd "${CEF_NAME}"
|
---|
| 30 | mv tests tests.orig
|
---|
| 31 | mkdir build
|
---|
| 32 | cd build
|
---|
| 33 | cmake -G "Unix Makefiles" ..
|
---|
| 34 | cd libcef_dll_wrapper
|
---|
| 35 | make -j${MAKEJOBS}
|
---|
| 36 |
|
---|
| 37 | cd "${builddir}"
|
---|
| 38 | rm -rf "cefpython-${CEFPYTHON_SHA}"
|
---|
| 39 |
|
---|
| 40 | wget -O - https://github.com/ivaradi/cefpython/archive/${CEFPYTHON_SHA}.tar.gz | gzip -dc | tar xf -
|
---|
| 41 |
|
---|
| 42 | cd "cefpython-${CEFPYTHON_SHA}"
|
---|
| 43 | mkdir build
|
---|
| 44 | cd build
|
---|
| 45 |
|
---|
| 46 | mkdir -p "${CEFPYTHON_CEF_DIRNAME}/bin"
|
---|
| 47 | mv "${builddir}/${CEF_NAME}/Release/"* "${CEFPYTHON_CEF_DIRNAME}/bin"
|
---|
| 48 | mv "${builddir}/${CEF_NAME}/Resources/"* "${CEFPYTHON_CEF_DIRNAME}/bin"
|
---|
| 49 |
|
---|
| 50 | mkdir -p "${CEFPYTHON_CEF_DIRNAME}/lib"
|
---|
| 51 | mv "${builddir}/${CEF_NAME}/build/libcef_dll_wrapper/libcef_dll_wrapper.a" "${CEFPYTHON_CEF_DIRNAME}/lib"
|
---|
| 52 |
|
---|
| 53 | mv "${builddir}/${CEF_NAME}/LICENSE.txt" "${CEFPYTHON_CEF_DIRNAME}"
|
---|
| 54 |
|
---|
| 55 | pip3 install -r ../tools/requirements.txt
|
---|
| 56 |
|
---|
| 57 | python3 ../tools/build.py "${CEF_VERSION}" || true
|
---|
| 58 | python3 ../tools/make_installer.py "${CEF_VERSION_SHORT}"
|
---|
| 59 |
|
---|
| 60 | cd "cefpython3_${CEF_VERSION_SHORT}_linux64"
|
---|
| 61 | python3 setup.py bdist_wheel
|
---|
| 62 | mv "dist/cefpython3-${CEF_VERSION_SHORT}-"*".whl" "${builddir}"
|
---|