source: misc/build-cefpython.sh@ 1091:190a836956c0

python3
Last change on this file since 1091:190a836956c0 was 1090:8e29be47c5b8, checked in by István Váradi <ivaradi@…>, 20 months ago

Script to compile CEFPython for Linux

  • Property exe set to *
File size: 1.7 KB
RevLine 
[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
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="2c3c542c469808aa2308f5f29498f3a2cd4c4f88"
19MAKEJOBS="4"
20
21builddir="${1}"
22
23mkdir -p "${builddir}"
24
25cd "${builddir}"
26rm -rf "${CEF_NAME}"
27wget -O - "https://cef-builds.spotifycdn.com/${CEF_NAME}.tar.bz2" | bzip2 -dc | tar xf -
28
29cd "${CEF_NAME}"
30mv tests tests.orig
31mkdir build
32cd build
33cmake -G "Unix Makefiles" ..
34cd libcef_dll_wrapper
35make -j${MAKEJOBS}
36
37cd "${builddir}"
38rm -rf "cefpython-${CEFPYTHON_SHA}"
39
40wget -O - https://github.com/ivaradi/cefpython/archive/${CEFPYTHON_SHA}.tar.gz | gzip -dc | tar xf -
41
42cd "cefpython-${CEFPYTHON_SHA}"
43mkdir build
44cd build
45
46mkdir -p "${CEFPYTHON_CEF_DIRNAME}/bin"
47mv "${builddir}/${CEF_NAME}/Release/"* "${CEFPYTHON_CEF_DIRNAME}/bin"
48mv "${builddir}/${CEF_NAME}/Resources/"* "${CEFPYTHON_CEF_DIRNAME}/bin"
49
50mkdir -p "${CEFPYTHON_CEF_DIRNAME}/lib"
51mv "${builddir}/${CEF_NAME}/build/libcef_dll_wrapper/libcef_dll_wrapper.a" "${CEFPYTHON_CEF_DIRNAME}/lib"
52
53mv "${builddir}/${CEF_NAME}/LICENSE.txt" "${CEFPYTHON_CEF_DIRNAME}"
54
55pip3 install -r ../tools/requirements.txt
56
57python3 ../tools/build.py "${CEF_VERSION}" || true
58python3 ../tools/make_installer.py "${CEF_VERSION_SHORT}"
59
60cd "cefpython3_${CEF_VERSION_SHORT}_linux64"
61python3 setup.py bdist_wheel
62mv "dist/cefpython3-${CEF_VERSION_SHORT}-"*".whl" "${builddir}"
Note: See TracBrowser for help on using the repository browser.