forked from livecode/livecode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild-cef.sh
More file actions
executable file
·48 lines (39 loc) · 1.27 KB
/
Copy pathbuild-cef.sh
File metadata and controls
executable file
·48 lines (39 loc) · 1.27 KB
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
#!/bin/bash
source "${BASEDIR}/scripts/platform.inc"
source "${BASEDIR}/scripts/lib_versions.inc"
source "${BASEDIR}/scripts/util.inc"
# Grab the source for the library
if [ "${ARCH}" == "x86" ] ; then
CEF_SRC="cef_binary_${CEF_VERSION}.${CEF_BUILDREVISION}_${PLATFORM}32"
elif [ "${ARCH}" == "x86_64" ] ; then
CEF_SRC="cef_binary_${CEF_VERSION}.${CEF_BUILDREVISION}_${PLATFORM}64"
else
echo "No binaries available for arch"
fi
CEF_TGZ="${CEF_SRC}.tar.bz2"
cd "${BUILDDIR}"
if [ ! -d "$CEF_SRC" ] ; then
if [ ! -e "$CEF_TGZ" ] ; then
echo "Fetching CEF source"
fetchUrl "http://opensource.spotify.com/cefbuilds/${CEF_TGZ}" "${CEF_TGZ}"
if [ $? != 0 ] ; then
echo " failed"
if [ -e "${CEF_TGZ}" ] ; then
rm ${CEF_TGZ}
fi
exit
fi
fi
echo "Unpacking CEF source"
tar -vjxf "${CEF_TGZ}"
fi
# just repackage existing prebuilts and strip unneeded symbols
function buildCEF {
local PLATFORM=$1
local ARCH=$2
mkdir -p "${OUTPUT_DIR}/lib/${PLATFORM}/${ARCH}/CEF"
cp -av "${BUILDDIR}/${CEF_SRC}/Release/"* "${OUTPUT_DIR}/lib/${PLATFORM}/${ARCH}/CEF/"
cp -av "${BUILDDIR}/${CEF_SRC}/Resources/"* "${OUTPUT_DIR}/lib/${PLATFORM}/${ARCH}/CEF/"
strip --strip-unneeded "${OUTPUT_DIR}/lib/${PLATFORM}/${ARCH}/CEF/libcef.so"
}
buildCEF "${PLATFORM}" "${ARCH}"