pulsar/script/update-cef

41 lines
1.5 KiB
Plaintext
Raw Normal View History

2012-09-19 02:00:03 +04:00
#!/bin/sh
usage() {
echo 'usage: `basename $0` 'chromium-dir' [cef-release-branch] 1>&2'
echo
echo 'chromium-dir is the root of the chromium directory (i.e. ~/code/chromium)'
echo 'CEF release branches can be found at http://code.google.com/p/chromiumembedded/wiki/BranchesAndBuilding'
2012-09-19 02:00:03 +04:00
exit 1
}
if [ ! $1 ]; then
2012-09-19 02:00:03 +04:00
usage
fi
ATOM_ROOT=$(cd $(dirname $0); pwd -P)/..
CHROMIUM_DIR=$1
CEF_DIR=$CHROMIUM_DIR/src/cef/
CEF_RELEASE_BRANCH=${2:-1271}
CEF_BINARY_PATH=$(echo "$CEF_DIR"/binary_distrib/cef_binary_*_macosx/) # Expand the path
# Update and compile CEF
CEF_AUTOMATE_SCRIPT_PATH=/tmp/cef-update
rm -rf $CEF_AUTOMATE_SCRIPT_PATH
svn checkout http://chromiumembedded.googlecode.com/svn/trunk/cef1/tools/automate $CEF_AUTOMATE_SCRIPT_PATH
cd $CEF_AUTOMATE_SCRIPT_PATH
python automate.py --download-dir="$(dirname $CHROMIUM_DIR)" --url=http://chromiumembedded.googlecode.com/svn/branches/$CEF_RELEASE_BRANCH/cef3
2012-09-19 02:00:03 +04:00
# Copy the CEF gypi files and update their paths to match Atom's file layout
for GYPI_PATH in "$CEF_DIR/cef_paths.gypi" "$CEF_DIR/cef_paths2.gypi"; do
sed "s/include\//cef\/include\//;s/libcef_dll\//cef\/libcef_dll\//" $GYPI_PATH > $ATOM_ROOT/cef/$(basename $GYPI_PATH)
2012-09-19 02:00:03 +04:00
done
# Copy the framework files
for FRAMEWORK_PATH in ffmpegsumo.so libcef.dylib; do
cp "$CEF_BINARY_PATH/Release/$FRAMEWORK_PATH" $ATOM_ROOT/cef/frameworks/
2012-09-19 02:00:03 +04:00
done
cp -R "$CEF_BINARY_PATH/include" $ATOM_ROOT/cef/
cp -R "$CEF_BINARY_PATH/libcef_dll" $ATOM_ROOT/cef/
cp -R "$CEF_BINARY_PATH/Resources/" $ATOM_ROOT/cef/Resources