pax_global_header 0000666 0000000 0000000 00000000064 13625540562 0014522 g ustar 00root root 0000000 0000000 52 comment=d3f295b19ab07f28cacf9fc395d96e70662b64da
3p-dullahan-master/ 0000775 0000000 0000000 00000000000 13625540562 0014467 5 ustar 00root root 0000000 0000000 3p-dullahan-master/.gitignore 0000664 0000000 0000000 00000000106 13625540562 0016454 0 ustar 00root root 0000000 0000000 stage
.DS_Store
dullahan/build*
stage
dullahan/src/dullahan_version.h
3p-dullahan-master/.gitlab-ci.yml 0000664 0000000 0000000 00000003074 13625540562 0017127 0 ustar 00root root 0000000 0000000 stages:
- build
- deploy
variables:
AUTOBUILD_PACKAGE_DIR: dullahan
AUTOBUILD_PACKAGE_NAME: dullahan
AUTOBUILD_BUILD_ID: $CI_PIPELINE_ID
build:windows:
stage: build
tags:
- autobuild
- windows
before_script:
- pipenv install
script:
- pipenv run autobuild install -A32
- pipenv run autobuild build -A32
- pipenv run autobuild package -A32
artifacts:
paths:
- ${env:AUTOBUILD_PACKAGE_NAME}-*windows*.tar.bz2
build:windows64:
stage: build
tags:
- autobuild
- windows
before_script:
- pipenv install
script:
- pipenv run autobuild install -A64
- pipenv run autobuild build -A64
- pipenv run autobuild package -A64
artifacts:
paths:
- ${env:AUTOBUILD_PACKAGE_NAME}-*windows64*.tar.bz2
deploy:nexus:
stage: deploy
tags:
- autobuild
- windows
script:
- $FileNameWin32 = Get-ChildItem -Path . -Name -Include ${env:AUTOBUILD_PACKAGE_NAME}-*-windows-${env:AUTOBUILD_BUILD_ID}*.tar.bz2
- curl.exe -v --user "${env:AUTOBUILD_HTTP_USER}:${env:AUTOBUILD_HTTP_PASS}" --upload-file .\$FileNameWin32 "https://pkg.alchemyviewer.org/repository/autobuild-external/${env:AUTOBUILD_PACKAGE_DIR}/windows/${FileNameWin32}"
- $FileNameWin64 = Get-ChildItem -Path . -Name -Include ${env:AUTOBUILD_PACKAGE_NAME}-*-windows64-${env:AUTOBUILD_BUILD_ID}*.tar.bz2
- curl.exe -v --user "${env:AUTOBUILD_HTTP_USER}:${env:AUTOBUILD_HTTP_PASS}" --upload-file .\$FileNameWin64 "https://pkg.alchemyviewer.org/repository/autobuild-external/${env:AUTOBUILD_PACKAGE_DIR}/windows64/${FileNameWin64}" 3p-dullahan-master/BuildParams 0000664 0000000 0000000 00000000514 13625540562 0016615 0 ustar 00root root 0000000 0000000 # Use Public Upload Locations
public_build = true
build_Linux = false
# Need viewer-build-variables as well as other shared repositories
# build_variables_repository_url set in TC project hierarchy
buildscripts_shared_more_NAMEs="build_variables"
# Incredibuild should not be used (so pdb information is good)
USE_INCREDIBUILD=0
3p-dullahan-master/Pipfile 0000664 0000000 0000000 00000000357 13625540562 0016007 0 ustar 00root root 0000000 0000000 [[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"
[dev-packages]
[packages]
llbase = "*"
certifi = "*"
autobuild = {git = "https://git.alchemyviewer.org/alchemy/autobuild.git"}
[requires]
python_version = "2.7"
3p-dullahan-master/autobuild.xml 0000664 0000000 0000000 00000014203 13625540562 0017201 0 ustar 00root root 0000000 0000000
3p-dullahan-master/build-cmd.sh 0000775 0000000 0000000 00000013401 13625540562 0016665 0 ustar 00root root 0000000 0000000 #!/usr/bin/env bash
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
# 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
export AUTOBUILD="$(cygpath -u $AUTOBUILD)"
fi
top="$(pwd)"
stage="$(pwd)/stage"
DULLAHAN_DIR="$top/dullahan"
# Load autobuild provided shell functions and variables
source_environment_tempfile="$stage/source_environment.sh"
"$AUTOBUILD" source_environment > "$source_environment_tempfile"
. "$source_environment_tempfile"
build=${AUTOBUILD_BUILD_ID:=0}
pushd "$DULLAHAN_DIR"
case "$AUTOBUILD_PLATFORM" in
windows*)
load_vsvars
# remove old project cruft
BUILD_FOLDER="build${AUTOBUILD_ADDRSIZE}"
rm -rf "${BUILD_FOLDER}"
mkdir -p "${BUILD_FOLDER}"
pushd ${BUILD_FOLDER}
# create Visual Studio project files
cmake .. \
-G "$AUTOBUILD_WIN_CMAKE_GEN" -A${AUTOBUILD_WIN_VSPLATFORM} \
-DCEF_INCLUDE_DIR="$(cygpath -w "$stage/packages/include/cef/include")" \
-DCEF_LIB_DIR="$(cygpath -w "$stage/packages/lib")" \
-DCEF_BIN_DIR="$(cygpath -w "$stage/packages/bin")" \
-DCEF_RESOURCE_DIR="$(cygpath -w "$stage/packages/resources")" \
-DCMAKE_CXX_FLAGS="/std:c++17 /Zc:wchar_t /EHsc"
# populate version_file (after CMake runs)
cl \
/Fo"$(cygpath -w "$stage/version.obj")" \
/Fe"$(cygpath -w "$stage/version.exe")" \
/I "$(cygpath -w "$stage/packages/include/cef")" \
/I "$(cygpath -w "$top/dullahan/src")" \
"$(cygpath -w "$top/version.cpp")"
"$stage/version.exe" > "$stage/version.txt"
rm "$stage"/version.{obj,exe}
# build individual projects but not examples
cmake --build . --config Release --target dullahan
cmake --build . --config Release --target dullahan_host
# prepare the staging dirs
mkdir -p "$stage/include/cef"
mkdir -p "$stage/lib/release"
mkdir -p "$stage/bin/release"
mkdir -p "$stage/resources"
mkdir -p "$stage/LICENSES"
# Dullahan files
cp "Release/dullahan.lib" "$stage/lib/release/"
cp "Release/dullahan_host.exe" "$stage/bin/release/"
# CEF libraries
cp "$stage/packages/lib/Release/libcef.lib" "$stage/lib/release"
cp "$stage/packages/lib/Release/libcef_dll_wrapper.lib" "$stage/lib/release"
# CEF run time binaries
cp -R "$stage/packages/bin/release/"* "$stage/bin/release/"
# CEF resources
cp -R "$stage/packages/resources/"* "$stage/resources/"
popd
;;
darwin*)
# remove old project cruft
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.13"
# 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'
xcodebuild -project dullahan.xcodeproj -target DullahanHelperGPU -configuration 'Release'
xcodebuild -project dullahan.xcodeproj -target DullahanHelperPlugin -configuration 'Release'
xcodebuild -project dullahan.xcodeproj -target DullahanHelperRenderer -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 (GPU).app" "$stage/lib/release"
cp -R "Release/DullahanHelper (Renderer).app" "$stage/lib/release"
cp -R "Release/DullahanHelper (Plugin).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"
popd
;;
linux*)
echo "This project is not currently supported for $AUTOBUILD_PLATFORM" 1>&2 ; exit 1
;;
esac
# Dullahan header files
cp "src/dullahan.h" "$stage/include/cef/"
cp "src/dullahan_version.h" "$stage/include/cef/"
# licenses
cp "CEF_LICENSE.txt" "$stage/LICENSES"
cp "LICENSE.txt" "$stage/LICENSES"
popd
3p-dullahan-master/dullahan/ 0000775 0000000 0000000 00000000000 13625540562 0016257 5 ustar 00root root 0000000 0000000 3p-dullahan-master/dullahan/CEF_LICENSE.txt 0000664 0000000 0000000 00000003176 13625540562 0020566 0 ustar 00root root 0000000 0000000 // Copyright (c) 2008-2014 Marshall A. Greenblatt. Portions Copyright (c)
// 2006-2009 Google Inc. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the name Chromium Embedded
// Framework nor the names of its contributors may be used to endorse
// or promote products derived from this software without specific prior
// written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3p-dullahan-master/dullahan/CMakeLists.txt 0000664 0000000 0000000 00000037063 13625540562 0021030 0 ustar 00root root 0000000 0000000 ################################################################################
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
# ensure location of CEF files is set at command line
if (CEF_INCLUDE_DIR STREQUAL "")
MESSAGE("CEF_INCLUDE_DIR not set" FATAL)
endif()
if (CEF_LIB_DIR STREQUAL "")
MESSAGE("CEF_LIB_DIR not set" FATAL)
endif()
if (CEF_BIN_DIR STREQUAL "")
MESSAGE("CEF_BIN_DIR not set" FATAL)
endif()
if (CEF_RESOURCE_DIR STREQUAL "")
MESSAGE("CEF_RESOURCE_DIR not set" FATAL)
endif()
# location of CEF libraries we link against
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
find_library(
CEF_LIBRARY_RELEASE
NAMES libcef.lib
PATHS ${CEF_LIB_DIR}
PATH_SUFFIXES release
)
find_library(
CEF_DLL_LIBRARY_RELEASE
NAMES libcef_dll_wrapper.lib
PATHS ${CEF_LIB_DIR}
PATH_SUFFIXES release
)
elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
find_library(
CEF_DLL_LIBRARY_RELEASE
NAMES libcef_dll_wrapper.a
PATHS ${CEF_LIB_DIR}
PATH_SUFFIXES release
)
find_library(
CEF_FRAMEWORK_RELEASE
NAMES "Chromium Embedded Framework"
PATHS ${CEF_BIN_DIR}/release
PATH_SUFFIXES release
)
set(CEF_FRAMEWORK
optimized ${CEF_FRAMEWORK_RELEASE}
)
FIND_LIBRARY(OPENGL_FRAMEWORK OpenGL)
FIND_LIBRARY(COCOA_FRAMEWORK Cocoa)
endif()
set(CEF_LIBRARY
optimized ${CEF_LIBRARY_RELEASE}
)
set(CEF_DLL_LIBRARY
optimized ${CEF_DLL_LIBRARY_RELEASE}
)
# set C and C++ flags
# Warnings at level 4 (-W4 generates too much spew) but disable:
# 4100 "unreferenced parameter" - too much spew for cef code
# 4127 "conditional is constant" - I use an explicity var to turn code on and off which triggers this
# 4505 "unreferenced local function has been removed" - supress meaningless freeglut warning
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -W4 -wd4100 -wd4127 -wd4505")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -W4 -wd4100 -wd4127 -wd4505")
elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -xobjective-c++")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -xobjective-c++")
endif()
################################################################################
## dullahan libary
# add source files to library
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
set(KEYBOARD_IMPL_SRC_FILE src/dullahan_impl_keyboard_win.cpp)
elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
set(KEYBOARD_IMPL_SRC_FILE src/dullahan_impl_keyboard_mac.mm)
endif()
add_library(
dullahan
STATIC
src/dullahan.cpp
src/dullahan.h
src/dullahan_browser_client.cpp
src/dullahan_browser_client.h
src/dullahan_callback_manager.cpp
src/dullahan_callback_manager.h
src/dullahan_debug.h
src/dullahan_impl.cpp
src/dullahan_impl.h
src/dullahan_version.h
src/dullahan_version.h.in
${KEYBOARD_IMPL_SRC_FILE}
src/dullahan_impl_mouse.cpp
src/dullahan_render_handler.cpp
src/dullahan_render_handler.h
)
# define which include directories to pull in
target_include_directories(
dullahan
PUBLIC
${CEF_INCLUDE_DIR}
${CEF_INCLUDE_DIR}/..
)
# turn off spurious linker warnings
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
set_target_properties(dullahan PROPERTIES LINK_FLAGS "/ignore:4099")
endif (CMAKE_SYSTEM_NAME STREQUAL "Windows")
################################################################################
## Parse CEF version header and process into dullahan header.
## Only do this if it's a clean build (try to keep version/build number
## the same for the same set of source files)
if (NOT EXISTS "${PROJECT_SOURCE_DIR}/src/dullahan_version.h")
# Extract CEF/Chrome version info from CEF header
FILE(STRINGS ${CEF_INCLUDE_DIR}/cef_version.h CEF_VERSION_STR REGEX "\#define CEF_VERSION ")
FILE(STRINGS ${CEF_INCLUDE_DIR}/cef_version.h CHROME_VERSION_MAJOR_STR REGEX "\#define CHROME_VERSION_MAJOR ")
FILE(STRINGS ${CEF_INCLUDE_DIR}/cef_version.h CHROME_VERSION_MINOR_STR REGEX "\#define CHROME_VERSION_MINOR ")
FILE(STRINGS ${CEF_INCLUDE_DIR}/cef_version.h CHROME_VERSION_BUILD_STR REGEX "\#define CHROME_VERSION_BUILD ")
FILE(STRINGS ${CEF_INCLUDE_DIR}/cef_version.h CHROME_VERSION_PATCH_STR REGEX "\#define CHROME_VERSION_PATCH ")
# Create a build number based on the actual build date/time
string(TIMESTAMP BUILDNUMBER "#define DULLAHAN_VERSION_BUILD %Y%m%d%H%M")
# Parse the version input file into the Dullahan version header
CONFIGURE_FILE (
"${PROJECT_SOURCE_DIR}/src/dullahan_version.h.in"
"${PROJECT_SOURCE_DIR}/src/dullahan_version.h"
)
endif ()
################################################################################
## dullahan host executable
# add source files to the application
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
add_executable(
dullahan_host
src/host/dullahan_host.cpp
src/win/compatibility.manifest
)
# define which include directories to pull in
target_include_directories(
dullahan_host
PUBLIC
${CEF_INCLUDE_DIR}
${CEF_INCLUDE_DIR}/..
)
elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
set(CEF_HELPER_APP_SUFFIXES
"::"
" (GPU):GPU:.gpu"
" (Plugin):Plugin:.plugin"
" (Renderer):Renderer:.renderer"
)
# Create the multiple Helper app bundle targets.
foreach(_suffix_list ${CEF_HELPER_APP_SUFFIXES})
# Convert to a list and extract the suffix values.
string(REPLACE ":" ";" _suffix_list ${_suffix_list})
list(GET _suffix_list 0 _name_suffix)
list(GET _suffix_list 1 _target_suffix)
list(GET _suffix_list 2 _plist_suffix)
# Define Helper target and output names.
set(_helper_target "DullahanHelper${_target_suffix}")
set(_helper_output_name "DullahanHelper${_name_suffix}")
# Create Helper executable target.
add_executable(${_helper_target} MACOSX_BUNDLE src/host/dullahan_host.cpp)
target_include_directories(
${_helper_target}
PUBLIC
${CEF_INCLUDE_DIR}
${CEF_INCLUDE_DIR}/..
)
target_link_libraries(${_helper_target} ${CEF_DLL_LIBRARY} ${CEF_FRAMEWORK})
set_target_properties(${_helper_target} PROPERTIES
MACOSX_BUNDLE_INFO_PLIST "${PROJECT_SOURCE_DIR}/src/host/Info.plist.in"
MACOSX_BUNDLE_BUNDLE_NAME ${_helper_output_name}
MACOSX_BUNDLE_GUI_IDENTIFIER "org.alchemyviewer.dullahan.helper${_plist_suffix}"
OUTPUT_NAME ${_helper_output_name}
)
endforeach()
endif()
# define which libs to link against
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
target_link_libraries(
dullahan_host
${CEF_LIBRARY}
${CEF_DLL_LIBRARY}
)
elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
target_link_libraries(
DullahanHelper
${CEF_DLL_LIBRARY}
${CEF_FRAMEWORK}
)
endif()
# we are building Windows executable, not a console app (default) and turn off spurious linker warnings
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
set_target_properties(dullahan_host PROPERTIES LINK_FLAGS_RELEASE "/SUBSYSTEM:WINDOWS")
set_target_properties(dullahan_host PROPERTIES LINK_FLAGS "/ignore:4099")
endif (CMAKE_SYSTEM_NAME STREQUAL "Windows")
# Windows commands to copy CEF 'bin', 'resources' folders to executable dir (needed at runtime)
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
add_custom_command(
TARGET dullahan_host POST_BUILD
COMMAND "${CMAKE_COMMAND}" -E copy_directory
"${CEF_BIN_DIR}/$"
"$"
COMMENT "Copying runtime files to executable directory")
add_custom_command(
TARGET dullahan_host POST_BUILD
COMMAND "${CMAKE_COMMAND}" -E copy_directory
"${CEF_RESOURCE_DIR}"
"$"
COMMENT "Copying resource files to executable directory")
endif()
################################################################################
## examples
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
################################################################################
## webcube example application
# add source file to application
add_executable(
webcube
examples/webcube/webcube.cpp
examples/webcube/webcube.h
examples/webcube/webcube.rc
examples/webcube/resource.h
)
# define which include directories to pull in
target_include_directories(
webcube
PUBLIC
src
)
# define which libs to link against
target_link_libraries(
webcube
dullahan
${CEF_LIBRARY}
${CEF_DLL_LIBRARY}
opengl32
glu32
comctl32
winmm
)
# we are building Windows executable, not a console app (default) and turn off spurious linker warnings
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
set_target_properties(webcube PROPERTIES LINK_FLAGS_RELEASE "/SUBSYSTEM:WINDOWS")
set_target_properties(webcube PROPERTIES LINK_FLAGS "/ignore:4099")
endif (CMAKE_SYSTEM_NAME STREQUAL "Windows")
# webcube example dependes on main library and host executable
add_dependencies(webcube dullahan)
add_dependencies(webcube dullahan_host)
# set the web cube example as the default startup project in Visual Studio
if("${CMAKE_VERSION}" VERSION_GREATER 3.6.2)
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
set_property(DIRECTORY PROPERTY VS_STARTUP_PROJECT "webcube")
endif (CMAKE_SYSTEM_NAME STREQUAL "Windows")
endif()
add_custom_command(
TARGET webcube POST_BUILD
COMMAND "mt.exe" -manifest \"$(ProjectDir)..\\src\\win\\compatibility.manifest\" -outputresource:"$(TargetDir)$(TargetFileName)"\;\#1
COMMENT "Adding custom manifest...")
################################################################################
## simplegl example application using FreeGLUT
# add source file to application
add_executable(
simplegl
examples/simplegl/simplegl.cpp
)
# define which include directories to pull in
target_include_directories(
simplegl
PUBLIC
src
examples/simplegl/freeglut/include/GL
)
# determine location of FreeGLUT library to link against based on bitwidth
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(FREEGLUT_LIBRARY "${PROJECT_SOURCE_DIR}/examples/simplegl/freeglut/lib/x64/freeglut.lib")
set(FREEGLUT_DLL "${PROJECT_SOURCE_DIR}/examples/simplegl/freeglut/bin/x64/freeglut.dll")
elseif(CMAKE_SIZEOF_VOID_P EQUAL 4)
set(FREEGLUT_LIBRARY "${PROJECT_SOURCE_DIR}/examples/simplegl/freeglut/lib/freeglut.lib")
set(FREEGLUT_DLL "${PROJECT_SOURCE_DIR}/examples/simplegl/freeglut/bin/freeglut.dll")
endif()
# copy over freeglut.dll
add_custom_command(
TARGET simplegl POST_BUILD
COMMAND "${CMAKE_COMMAND}" -E copy
"${FREEGLUT_DLL}"
"$"
COMMENT "Copying FreeGLUT DLL to executable directory")
# define which libs to link against
target_link_libraries(
simplegl
dullahan
${CEF_LIBRARY}
${CEF_DLL_LIBRARY}
${FREEGLUT_LIBRARY}
)
# turn off spurious linker warnings
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
set_target_properties(simplegl PROPERTIES LINK_FLAGS "/ignore:4099")
endif (CMAKE_SYSTEM_NAME STREQUAL "Windows")
add_custom_command(
TARGET simplegl POST_BUILD
COMMAND "mt.exe" -manifest \"$(ProjectDir)..\\src\\win\\compatibility.manifest\" -outputresource:"$(TargetDir)$(TargetFileName)"\;\#1
COMMENT "Adding custom manifest...")
################################################################################
## console example application
# add source file to application
add_executable(
console
examples/console/console.cpp
)
# define which include directories to pull in
target_include_directories(
console
PUBLIC
src
)
# define which libs to link against
target_link_libraries(
console
dullahan
${CEF_LIBRARY}
${CEF_DLL_LIBRARY}
)
# turn off spurious linker warnings
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
set_target_properties(console PROPERTIES LINK_FLAGS "/ignore:4099")
endif (CMAKE_SYSTEM_NAME STREQUAL "Windows")
add_custom_command(
TARGET console POST_BUILD
COMMAND "mt.exe" -manifest \"$(ProjectDir)..\\src\\win\\compatibility.manifest\" -outputresource:"$(TargetDir)$(TargetFileName)"\;\#1
COMMENT "Adding custom manifest...")
################################################################################
## minimal CEF console example (doesn't use Dullahan)
# add source file to the application
add_executable(
cef_minimal
examples/cef_minimal/cef_minimal.cpp
)
# define which include directories to pull in
target_include_directories(
cef_minimal
PUBLIC
${CEF_INCLUDE_DIR}
${CEF_INCLUDE_DIR}/..
)
# define which libs to link against
target_link_libraries(
cef_minimal
${CEF_LIBRARY}
${CEF_DLL_LIBRARY}
)
# cef_minimal example dependes on host executable
add_dependencies(cef_minimal dullahan_host)
# turn off spurious linker warnings
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
set_target_properties(cef_minimal PROPERTIES LINK_FLAGS "/ignore:4099")
endif (CMAKE_SYSTEM_NAME STREQUAL "Windows")
add_custom_command(
TARGET cef_minimal POST_BUILD
COMMAND "mt.exe" -manifest \"$(ProjectDir)..\\src\\win\\compatibility.manifest\" -outputresource:"$(TargetDir)$(TargetFileName)"\;\#1
COMMENT "Adding custom manifest...")
elseif (CMAKE_SYSTEM_NAME STREQUAL "Darwin")
################################################################################
## osxgl example application
# add source file to application
add_executable(
osxgl
MACOSX_BUNDLE
examples/osxgl/AppDelegate.h
examples/osxgl/AppDelegate.mm
examples/osxgl/LLOsxglView.h
examples/osxgl/LLOsxglView.mm
examples/osxgl/main.m
)
# define which include directories to pull in
target_include_directories(
osxgl
PUBLIC
src
)
# define which libs to link against
target_link_libraries(
osxgl
dullahan
${CEF_DLL_LIBRARY}
${CEF_FRAMEWORK}
${OPENGL_FRAMEWORK}
${COCOA_FRAMEWORK}
)
add_dependencies(osxgl dullahan)
add_dependencies(osxgl DullahanHelper)
# default Inof.plist.in template in CMake doesn't contain
# the NSPrincipalClass definition so we must add it
set(PRINCIPAL_CLASS "NSApplication")
set_target_properties(osxgl PROPERTIES
MACOSX_BUNDLE_BUNDLE_NAME "OSXGL Test"
MACOSX_BUNDLE_INFO_PLIST "${PROJECT_SOURCE_DIR}/examples/osxgl/Info.plist.in")
endif()
################################################################################
# generic commands that have to go after everything else
if(CMAKE_CONFIGURATION_TYPES)
set(CMAKE_CONFIGURATION_TYPES "Release")
endif()
3p-dullahan-master/dullahan/LICENSE.txt 0000664 0000000 0000000 00000002052 13625540562 0020101 0 ustar 00root root 0000000 0000000 Copyright (c) 2016, Linden Research, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
3p-dullahan-master/dullahan/README.md 0000664 0000000 0000000 00000025543 13625540562 0017547 0 ustar 00root root 0000000 0000000 # Dullahan
## What is it?
A headless browser SDK that uses the [Chromium Embedded Framework](https://en.wikipedia.org/wiki/Chromium_Embedded_Framework) (CEF). It is designed to make it easier to write applications that render modern web content directly to a memory buffer, inject synthesized mouse and keyboard events as well as interact with features like JavaScript or cookies.
#### **Important note**:
This is a __very__ early release - more than alpha quality but less than beta. I have high hopes this will develop into something useful but there is still a lot of work to do first.
#### **Documentation needs updating**:
The parts of this document that relate to building CEF are outdated as of 2019-09-11 and need to be updated. Once I have all the scripts working again on both Windows and macOS, I will update this document accordingly.
## What could I use it for?
It might be useful in a number of situations - for example:
* Anywhere you want to render web content in a graphics application - e.g. help pages in an OpenGL based game
* VR based video chat and shared environments (I'm working on an app like this now)
* HTML/JavaScript based user interfaces E.G. a tablet based paradigm for VR
* Integration with JavaScript for automated site testing like [PhantomJS](http://phantomjs.org/)
* Web page contents analysis - E.G:
* Capture images the most popular 500 web pages and count the top 5 colors in each.
* Capture a Google Maps traffic map of where you live for 24 hours and see how *really* miserable your commute is :)
* Web page capture to an image or a PDF file
* Lots more I haven't thought of yet
There are some examples included in this repository and there is a description and a screen shot for each [here](./examples/README.md).
## What is CEF?
From the [CEF Wiki](https://en.wikipedia.org/wiki/Chromium_Embedded_Framework) page: The Chromium Embedded Framework (CEF) is an open source framework for embedding a web browser engine based on the Chromium core.
An essential site to visit when developing a CEF based application is the [CEF forum](http://magpcss.org/ceforum/) started and run by (I believe) the original CEF author Marshall Greenblatt who is very generous with his time and expertise.
Building CEF locally is quite a dauting task and needs a toolset I do not have on my computer (E.G. Visual Studio 2015) so I used the builds that Spotify kindly hosts [here](http://opensource.spotify.com/cefbuilds/index.html).
## Which version of CEF does Dullahan use?
Dullahan currently builds against the [Spotify Opensource CEF site](http://opensource.spotify.com/cefbuilds/index.html) build of CEF but with some small tweaks to take account of CEF interface changes etc. it should work with slightly older or more recent versions too. For the exact version in use, you can inspect one of the [build batch files](https://bitbucket.org/lindenlab/dullahan/src/default/tools/build_win.bat?at=default&fileviewer=file-view-default#build_win.bat-10). files.
## What are the origins of this project?
Historically, the first incarnation was [LLCEFLib](https://bitbucket.org/lindenlab/3p-llceflib) - a [Linden Lab](http://lindenlab.com) internal library to render web content content inside [Second Life](http://secondlife.com). LLCEFLib had to support the outdated 32bit macOS version as well as many Second Life specific features so the code became very disjointed and messy. This effort is an attempt to unburden the API from those requirements and provide a more generic version which can be useful in other applications.
## Which platforms are supported?
* Windows 32/64 bit (primary development platform)
* macOS 64 bit (works, is supported but needs a little work - any macOS devs out there want to help?)
* Linux 64 bit (not available yet but hopefully one day - any Linux devs want to help?)
## Which version of the C++ runtime library does it use on Windows?
For historical reasons, both Dullahan and the version of CEF it consumes are built with the C++ runtime library set to `Multi-threaded DLL` / `Multi-threaded Debug DLL`.
## Is there a binary version I can download? ##
Not right now. I used to store a pre-built version on the Windows 64 bit version in my DropBox but that became untenable. Once I figure out a sensible place to store a large binary package, I'll bundle up the latest SDK and examples for all the platforms.
## What are the system requirements to build CEF and Dullahan?
* Windows
* Microsoft Visual Studio 2013 update 4
* [CMake](https://cmake.org/) version 3.6.3 or later
* [7-Zip](www.7-zip.org/) 7-Zip or a similar tool that can uncompress `.tar.bz2` files
* macOS
* [Xcode](https://developer.apple.com/xcode/) version 10 or later
* [CMake](https://cmake.org/) version 3.6.3 or later
## How do I build CEF?
Before you can build Dullahan, you will need to build a version of CEF. There are some scripts to help - a [batch](https://bitbucket.org/lindenlab/dullahan/src/default/tools/make_dullahan_cef_pkg.bat?) file for Windows and a [shell script](https://bitbucket.org/lindenlab/dullahan/src/default/tools/make_dullahan_cef_pkg.sh) for macOS. The macOS version is somewhat automated but the lack of built-in tools in Windows to download and uncompress `.tar.bz2` files means it needs some manual steps up front.
* Windows
* Grab a Windows 32 or 64 bit build of CEF from [http://opensource.spotify.com/cefbuilds/index.html](http://opensource.spotify.com/cefbuilds/index.html)
* Extract the archive to a local folder - I use the Windows Desktop
* Edit the `tools/make_dullahan_cef_pkg.bat` batch file - specifically, the lines at the top of the file that set the `CEF_VERSION` (match the version you downloaded), `SRC_DIR_32/64` (location of uncompressed CEF package you just downloaded) and `DST_DIR_32/64` (location where you want to generate a build).
* From a command prompt, run `tools\make_dullahan_cef_pkg.bat` with a parameter of either 32 or 64 to set the bit-width to build
* If all goes well, you will end up with a set of libs, headers and binary files in the `DST_DIR_32/64` folder that you can use to build Dullahan
* macOS
* Edit the `tools/make_dullahan_cef_pkg.sh` shell script and make sure the `CEF_VERSION` variable is set to the version you want and make sure the `DST_DIR` points to somewhere sensible. This is where the build will be generated.
* From a terminal prompt, run `tools/make_dullahan_cef_pkg.sh`. This will download the right version of CEF, build it and create a set of libs, frameworks, headers etc. that you need to build Dullahan
## Do I need to build Chromium?
The easy answer is no - CEF builds against [Chromium](https://www.chromium.org/) but the [Spotify](http://opensource.spotify.com/cefbuilds/index.html) builds already do that for you. However, you can build Chromium yourself and then build CEF against that in the same way as Spotify does - you might need to do this if you had to change the way part of Chromium works or more likely, you wanted a version of Chromium that has the proprietary media codec support turned on. The Dullahan project used to do this but the toolset required to build Chromium passed what I had available to me (Visual Studio 2015 is a dependency for recent builds) so we stopped doing it. The remnants of a batch file can be found in [here](https://bitbucket.org/lindenlab/dullahan/src/default/tools/cef_download_build.bat) - some pieces of that may still be useful. There is also a CEF [wiki page](https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding.md) that has lots of details too.
## How do I build Dullahan?
* Download or clone the Dullahan source code
* Windows
* Edit the `tools\build_win.bat` filer and change the `CEF_VERSION` variable to match the one you want to use and the `CEF_32_DIR` and `CEF_64_DIR` variables at the top to point to the appropriate build of CEF you just built.
* From a command prompt, run `tools/build_win.bat` with a parameter of either 32 or 64 to set the bit-width to build
* If Dullahan builds correctly, Visual Studio 2013 solution file in `build` or `build64` will open and you can run the examples like `WebCube` in the normal way
* macOS
* Edit the `tools/build_mac.sh` file and edit the `CEF_VERSION` variable to match the one you want to use and the `CEF_BUILDS_DIR` variable to point to the version of CEF you just built.
* From a terminal prompt, run `tools/build_mac.sh`.
* If it builds correctly, you can try to the run the included macOS example application (`open build64/Release/osxgl.app`)
* You can open the Xcode project file `build64/dullahan.xcodeproj` and edit files if you want to experiment
## Which files do I need in my own project?
The reason to use Dullahan vs raw CEF in your application is that you merely include the `dullahan.h` header file in your application and link against the `Dullahan`, `libcef` and `libcef_dll_wrapper` static libraries. Then, copy over the various CEF/Chromium runtime files alongside your application - see the post-build step for the examples in Visual Studio or the `build_mac.sh` script for more details.
TODO: Create a batch file and shell script that generates a CMake file which creates an empty project with everything set up correctly.
## How do I use it?
The short answer is look at the code in the `examples` folder and `dullahan.h`. Generally speaking, you create an instance of the library, call `init()` and regularly call the `update()` function in your own message loop. You can hook up a callback to be notified when the contents of the page changes and get access to the raw pixels. You can synthesize mouse and keyboard events and send them into the page. Finally, when you want to exit, make sure the `onRequestExit` callback is hooked up and call the `requestExit()` method. When the library and CEF have cleaned everything up, your callback will be triggered and you can call `shutdown()` before exiting normally.
## Are there examples?
Why yes there is - take a look in the `examples` subdirectory of this repo. There are some screenshots and short descriptions in the [README](https://bitbucket.org/lindenlab/dullahan/src/default/examples/README.md) file too
## What is left to do before the first real release?
* Implement proper Dullahan <--> JavaScript interoperability
* Improve the documentation
* Make sure all the features are used in the examples to help understand usage
* Unit tests
* Add support for different pages on each side of the Web Cube example
* Lots and lots more... please help if you can.
## Alternatives
* The most exciting alternative in this space is from Google themselves - [headless Chromium](https://chromium.googlesource.com/chromium/src/+/lkgr/headless/README.md) appears to offer much of what Dullahan does albeit better because they have more than one person working on it :) It's very new and still developing but definitely worth a look and will likely supersede Dullahan one day.
## Why the name?
[Seemed appropriate](https://www.google.com/search?q=dullahan)
3p-dullahan-master/dullahan/cef/ 0000775 0000000 0000000 00000000000 13625540562 0017014 5 ustar 00root root 0000000 0000000 3p-dullahan-master/dullahan/cef/README.md 0000664 0000000 0000000 00000000431 13625540562 0020271 0 ustar 00root root 0000000 0000000 This is a good place to put your CEF builds and refer to them here when using tools\build_win.bat.
This folder (except this file) is ignored by Mercurial (via .hgignore) so it makes commands like `hg status` less confusing when checking which files you have added or modified.
3p-dullahan-master/dullahan/docs/ 0000775 0000000 0000000 00000000000 13625540562 0017207 5 ustar 00root root 0000000 0000000 3p-dullahan-master/dullahan/docs/cef_minimal.png 0000664 0000000 0000000 00000076573 13625540562 0022202 0 ustar 00root root 0000000 0000000 PNG
IHDR Ɏ sRGB gAMA a pHYs od }IDATx^ݽ$M^\
b)& Vk)uU0h
z BBs̏ٱ??ផ2=-,,
7w/ rh o ǡ C >
| 8/S 5? a:̓A!GW[P_˿rmigOw??~lP=rl[g9