Commit 7d9ed7eb authored by Drake Arconis's avatar Drake Arconis

Get dullahan building on mac with cef 77

parent 2f60f81b
......@@ -34,9 +34,11 @@
<key>archive</key>
<map>
<key>hash</key>
<string>d020431ecf2dcefcb2e92c50de0dfc05</string>
<string>2ddb49faadf26ecdf67a723fff9a185b</string>
<key>hash_algorithm</key>
<string>md5</string>
<key>url</key>
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/39564/336519/cef_bin-75.0.11_gf50b3c2_chromium-75.0.3770.100.528486-darwin64-528486.tar.bz2</string>
<string>https://pkg.alchemyviewer.org/repository/autobuild-external/cef-bin/darwin64/cef_bin-77.1.7+gc7dbc2f+chromium-77.0.3865.90.3-darwin64-3.tar.bz2</string>
</map>
<key>name</key>
<string>darwin64</string>
......@@ -46,11 +48,11 @@
<key>archive</key>
<map>
<key>hash</key>
<string>47810b9dbe68952072fa594f9ca18c29</string>
<string>7b5bbb5dfe9d4d3b78663b67bedf9e1b</string>
<key>hash_algorithm</key>
<string>md5</string>
<key>url</key>
<string>https://pkg.alchemyviewer.org/repository/autobuild-external/cef-bin/windows/cef_bin-77.1.7+gc7dbc2f+chromium-77.0.3865.90.1-windows-1.tar.bz2</string>
<string>https://pkg.alchemyviewer.org/repository/autobuild-external/cef-bin/windows/cef_bin-77.1.7+gc7dbc2f+chromium-77.0.3865.90.2-windows-2.tar.bz2</string>
</map>
<key>name</key>
<string>windows</string>
......@@ -60,18 +62,18 @@
<key>archive</key>
<map>
<key>hash</key>
<string>c7c2a914ae7b080b1ee66eccf76159ef</string>
<string>275fb13cb21db3113fd1b0d860d6080b</string>
<key>hash_algorithm</key>
<string>md5</string>
<key>url</key>
<string>https://pkg.alchemyviewer.org/repository/autobuild-external/cef-bin/windows64/cef_bin-77.1.7+gc7dbc2f+chromium-77.0.3865.90.1-windows64-1.tar.bz2</string>
<string>https://pkg.alchemyviewer.org/repository/autobuild-external/cef-bin/windows64/cef_bin-77.1.7+gc7dbc2f+chromium-77.0.3865.90.2-windows64-2.tar.bz2</string>
</map>
<key>name</key>
<string>windows64</string>
</map>
</map>
<key>version</key>
<string>77.1.7+gc7dbc2f+chromium-77.0.3865.90.1</string>
<string>77.1.7+gc7dbc2f+chromium-77.0.3865.90.2</string>
</map>
</map>
<key>package_description</key>
......
......@@ -4,19 +4,18 @@ cd "$(dirname "$0")"
# turn on verbose debugging output for parabuild logs.
exec 4>&1; export BASH_XTRACEFD=4; set -x
# make errors fatal
set -e
# complain about unset env variables
# bleat on references to undefined shell variables
set -u
# Check autobuild is around or fail
if [ -z "$AUTOBUILD" ] ; then
exit 1
fi
if [ "$OSTYPE" = "cygwin" ] ; then
autobuild="$(cygpath -u $AUTOBUILD)"
else
autobuild="$AUTOBUILD"
export AUTOBUILD="$(cygpath -u $AUTOBUILD)"
fi
top="$(pwd)"
......@@ -25,14 +24,14 @@ stage="$(pwd)/stage"
DULLAHAN_DIR="$top/dullahan"
DULLAHAN_SOURCE_DIR="$DULLAHAN_DIR/src"
# load autobuild provided shell functions and variables
# Load autobuild provided shell functions and variables
source_environment_tempfile="$stage/source_environment.sh"
"$autobuild" source_environment > "$source_environment_tempfile"
"$AUTOBUILD" source_environment > "$source_environment_tempfile"
. "$source_environment_tempfile"
build=${AUTOBUILD_BUILD_ID:=0}
pushd "$DULLAHAN_SOURCE_DIR"
pushd "$DULLAHAN_DIR"
case "$AUTOBUILD_PLATFORM" in
windows*)
load_vsvars
......@@ -95,46 +94,55 @@ pushd "$DULLAHAN_SOURCE_DIR"
;;
darwin*)
# remove old project cruft
rm -rf "$DULLAHAN_DIR/build"
mkdir "$DULLAHAN_DIR/build"
cd "$DULLAHAN_DIR/build"
# create project file
cmake -G Xcode \
-DCMAKE_OSX_ARCHITECTURES="x86_64" \
-DCEF_INCLUDE_DIR="$stage/packages/include/cef/include" \
-DCEF_LIB_DIR="$stage/packages/lib" \
-DCEF_BIN_DIR="$stage/packages/bin" \
-DCEF_RESOURCE_DIR="$stage/packages/resources" \
-DCMAKE_OSX_SYSROOT:STRING="macosx10.14" \
-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING="10.13" \
..
# populate version_file (after CMake runs)
g++ \
-I "$stage/packages/include/cef" \
-I "$top/dullahan/src" \
-o "$stage/version" \
"$top/version.cpp"
"$stage/version" > "$stage/version.txt"
rm "$stage/version"
# build projects
xcodebuild -project dullahan.xcodeproj -target dullahan -configuration 'Release'
xcodebuild -project dullahan.xcodeproj -target DullahanHelper -configuration 'Release'
# copy files to staging ready to be packaged
mkdir -p "$stage/include/cef"
mkdir -p "$stage/lib/release"
mkdir -p "$stage/LICENSES"
cp "$DULLAHAN_DIR/build/Release/libdullahan.a" "$stage/lib/release/"
cp "$DULLAHAN_SOURCE_DIR/dullahan.h" "$stage/include/cef/"
cp "$DULLAHAN_SOURCE_DIR/dullahan_version.h" "$stage/include/cef/"
cp -R "$DULLAHAN_DIR/build/Release/DullahanHelper.app" "$stage/lib/release"
cp "$stage/packages/lib/release/libcef_dll_wrapper.a" "$stage/lib/release"
cp -R "$stage/packages/bin/release/Chromium Embedded Framework.framework" "$stage/lib/release"
cp "$DULLAHAN_DIR/CEF_LICENSE.txt" "$stage/LICENSES"
cp "$DULLAHAN_DIR/LICENSE.txt" "$stage/LICENSES"
BUILD_FOLDER="build${AUTOBUILD_ADDRSIZE}"
rm -rf "${BUILD_FOLDER}"
mkdir -p "${BUILD_FOLDER}"
pushd ${BUILD_FOLDER}
# create project file
cmake .. -G Xcode \
-DCMAKE_OSX_ARCHITECTURES="x86_64" \
-DCEF_INCLUDE_DIR="$stage/packages/include/cef/include" \
-DCEF_LIB_DIR="$stage/packages/lib" \
-DCEF_BIN_DIR="$stage/packages/bin" \
-DCEF_RESOURCE_DIR="$stage/packages/resources" \
-DCMAKE_OSX_SYSROOT="macosx10.15" \
-DCMAKE_OSX_DEPLOYMENT_TARGET="10.14"
# populate version_file (after CMake runs)
clang++ -std=c++17 \
-I "$stage/packages/include/cef" \
-I "$top/dullahan/src" \
-o "$stage/version" \
"$top/version.cpp"
"$stage/version" > "$stage/version.txt"
rm "$stage/version"
# build projects
xcodebuild -project dullahan.xcodeproj -target dullahan -configuration 'Release'
xcodebuild -project dullahan.xcodeproj -target DullahanHelper -configuration 'Release'
# copy files to staging ready to be packaged
mkdir -p "$stage/include/cef"
mkdir -p "$stage/lib/release"
mkdir -p "$stage/LICENSES"
cp "Release/libdullahan.a" "$stage/lib/release/"
cp -R "Release/DullahanHelper.app" "$stage/lib/release"
cp -R "Release/DullahanHelper.app" "$stage/lib/release/DullahanHelper (GPU).app"
mv "$stage/lib/release/DullahanHelper (GPU).app/Contents/MacOS/DullahanHelper" "$stage/lib/release/DullahanHelper (GPU).app/Contents/MacOS/DullahanHelper (GPU)"
cp -R "Release/DullahanHelper.app" "$stage/lib/release/DullahanHelper (Renderer).app"
mv "$stage/lib/release/DullahanHelper (Renderer).app/Contents/MacOS/DullahanHelper" "$stage/lib/release/DullahanHelper (Renderer).app/Contents/MacOS/DullahanHelper (Renderer)"
cp -R "Release/DullahanHelper.app" "$stage/lib/release/DullahanHelper (Plugin).app"
mv "$stage/lib/release/DullahanHelper (Plugin).app/Contents/MacOS/DullahanHelper" "$stage/lib/release/DullahanHelper (Plugin).app/Contents/MacOS/DullahanHelper (Plugin)"
cp "$DULLAHAN_SOURCE_DIR/dullahan.h" "$stage/include/cef/"
cp "$DULLAHAN_SOURCE_DIR/dullahan_version.h" "$stage/include/cef/"
cp "$stage/packages/lib/release/libcef_dll_wrapper.a" "$stage/lib/release"
cp -R "$stage/packages/bin/release/Chromium Embedded Framework.framework" "$stage/lib/release"
cp "$DULLAHAN_DIR/CEF_LICENSE.txt" "$stage/LICENSES"
cp "$DULLAHAN_DIR/LICENSE.txt" "$stage/LICENSES"
popd
;;
linux*)
echo "This project is not currently supported for $AUTOBUILD_PLATFORM" 1>&2 ; exit 1
......
################################################################################
cmake_minimum_required(VERSION 3.4.3)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
cmake_minimum_required(VERSION 3.10 FATAL_ERROR)
################################################################################
## Dullahan main project/solution
project(dullahan)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "")
################################################################################
## generics
......
......@@ -107,7 +107,6 @@ static void onRequestExitCallback() {
settings.javascript_enabled = true;
settings.cache_enabled = true;
settings.cache_path = "/tmp/cef_cachez";
settings.disable_network_service = true;
settings.cookies_enabled = true;
settings.user_agent_substring = "osxgl";
settings.accept_language_list = "en-us";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment