From aff5b0a7ceedd24fad920915464268279e56c4c4 Mon Sep 17 00:00:00 2001 From: Bennett Goble Date: Sat, 1 Oct 2022 05:39:48 -0700 Subject: [PATCH 01/26] Add github action build --- .github/dependabot.yaml | 7 +++++++ .github/release.yaml | 18 ++++++++++++++++++ .github/workflows/build.yaml | 24 ++++++++++++++++++++++++ 3 files changed, 49 insertions(+) create mode 100644 .github/dependabot.yaml create mode 100644 .github/release.yaml create mode 100644 .github/workflows/build.yaml diff --git a/.github/dependabot.yaml b/.github/dependabot.yaml new file mode 100644 index 0000000..f54fbcd --- /dev/null +++ b/.github/dependabot.yaml @@ -0,0 +1,7 @@ +version: 2 +updates: + + - package-ecosystem: github-actions + directory: / + schedule: + interval: monthly diff --git a/.github/release.yaml b/.github/release.yaml new file mode 100644 index 0000000..0f4884c --- /dev/null +++ b/.github/release.yaml @@ -0,0 +1,18 @@ +changelog: + exclude: + labels: + - ignore-for-release + authors: + - dependabot + categories: + - title: Breaking Changes 🛠 + labels: + - semver-major + - breaking-change + - title: New Features 🎉 + labels: + - semver-minor + - enhancement + - title: Other Changes + labels: + - '*' diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 0000000..fbf7d96 --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,24 @@ +name: Build +on: [push] +jobs: + build: + strategy: + matrix: + os: [windows-2022, macos-11, ubuntu-22.04] + addrsize: ["64"] + include: + - os: windows-2022 + addrsize: "32" + runs-on: ${{ matrix.os }} + steps: + - uses: secondlife/action-autobuild@release/v3 + with: + addrsize: ${{ matrix.addrsize }} + release: + needs: build + runs-on: [ubuntu-latest] + if: startsWith(github.ref, 'refs/tags/v') + steps: + - uses: secondlife/action-autobuild-release@v1 + with: + public: true From ebd458c41148f001dba2fdee33a3417ec19cb395 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Fri, 31 Mar 2023 16:23:15 -0400 Subject: [PATCH 02/26] SL-18837: Tweak build.yaml to current canonical form --- .github/workflows/build.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index fbf7d96..3521942 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -9,9 +9,10 @@ jobs: include: - os: windows-2022 addrsize: "32" + continue-on-error: true runs-on: ${{ matrix.os }} steps: - - uses: secondlife/action-autobuild@release/v3 + - uses: secondlife/action-autobuild@v3 with: addrsize: ${{ matrix.addrsize }} release: @@ -19,6 +20,6 @@ jobs: runs-on: [ubuntu-latest] if: startsWith(github.ref, 'refs/tags/v') steps: - - uses: secondlife/action-autobuild-release@v1 + - uses: secondlife/action-autobuild-release@v2 with: public: true From f83f2e12339699a06ee3def8c567a7dea24ca962 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Fri, 31 Mar 2023 16:56:40 -0400 Subject: [PATCH 03/26] SL-18837: Disable Dullahan on Linux64: no viable CEF build --- .github/workflows/build.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 3521942..ae19ba9 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -4,7 +4,8 @@ jobs: build: strategy: matrix: - os: [windows-2022, macos-11, ubuntu-22.04] + ## linux64 cef-bin URL has a 192.168.mmm.nnn host + os: [windows-2022, macos-11] ##, ubuntu-22.04] addrsize: ["64"] include: - os: windows-2022 From 6a42472145fa5537feaa3d468d5e227ca3ebf08f Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Fri, 31 Mar 2023 17:02:18 -0400 Subject: [PATCH 04/26] SL-18837: Defend Mac build against absence of build_secrets_checkout --- build-cmd.sh | 66 ++++++++++++++++++++++++++-------------------------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/build-cmd.sh b/build-cmd.sh index 42a1aed..4260dee 100755 --- a/build-cmd.sh +++ b/build-cmd.sh @@ -178,8 +178,8 @@ print(':'.join(OrderedDict((dir.rstrip('/'), 1) for dir in sys.argv[1].split(':' cp "$top/LICENSE.txt" "$stage/LICENSES" # sign the binaries (both CEF and DullahanHelper) - CONFIG_FILE="$build_secrets_checkout/code-signing-osx/config.sh" - if [ -f "$CONFIG_FILE" ]; then + CONFIG_FILE="${build_secrets_checkout:-}/code-signing-osx/config.sh" + if [[ -n "${build_secrets_checkout:-}" && -f "$CONFIG_FILE" ]]; then source $CONFIG_FILE pushd "$stage/lib/release/Chromium Embedded Framework.framework/Libraries" @@ -202,7 +202,7 @@ print(':'.join(OrderedDict((dir.rstrip('/'), 1) for dir in sys.argv[1].split(':' done popd else - echo "No config file found; skipping codesign." + echo "No config file $CONFIG_FILE found; skipping codesign." fi # populate version_file (after CMake runs) @@ -215,52 +215,52 @@ print(':'.join(OrderedDict((dir.rstrip('/'), 1) for dir in sys.argv[1].split(':' rm "$stage/version" ;; linux64) - #Force version regeneration. - rm -f src/dullahan_version.h + #Force version regeneration. + rm -f src/dullahan_version.h # build the CEF c->C++ wrapper "libcef_dll_wrapper" - cd "${cef_no_wrapper_dir}" + cd "${cef_no_wrapper_dir}" rm -rf "${cef_no_wrapper_build_dir}" mkdir -p "${cef_no_wrapper_build_dir}" cd "${cef_no_wrapper_build_dir}" cmake -G Ninja .. - ninja libcef_dll_wrapper - + ninja libcef_dll_wrapper + cd "$stage" cmake .. -G Ninja -DCEF_WRAPPER_DIR="${cef_no_wrapper_dir}" \ -DCEF_WRAPPER_BUILD_DIR="${cef_no_wrapper_build_dir}" \ - -DCMAKE_C_FLAGS:STRING="$LL_BUILD_RELEASE -m${AUTOBUILD_ADDRSIZE}" \ - -DCMAKE_CXX_FLAGS:STRING="$LL_BUILD_RELEASE -m${AUTOBUILD_ADDRSIZE}" + -DCMAKE_C_FLAGS:STRING="$LL_BUILD_RELEASE -m${AUTOBUILD_ADDRSIZE}" \ + -DCMAKE_CXX_FLAGS:STRING="$LL_BUILD_RELEASE -m${AUTOBUILD_ADDRSIZE}" - ninja + ninja - g++ -std=c++11 -I "${cef_no_wrapper_dir}/include" -I "${dullahan_source_dir}" -o "$stage/version" "$top/tools/autobuild_version.cpp" + g++ -std=c++11 -I "${cef_no_wrapper_dir}/include" -I "${dullahan_source_dir}" -o "$stage/version" "$top/tools/autobuild_version.cpp" - "$stage/version" > "$stage/VERSION.txt" - rm "$stage/version" - - mkdir -p "$stage/LICENSES" - mkdir -p "$stage/bin/release/" - mkdir -p "$stage/include" - mkdir -p "$stage/include/cef" - mkdir -p "$stage/lib/release/swiftshader" - mkdir -p "$stage/resources" - - cp libdullahan.a ${stage}/lib/release/ - cp ${cef_no_wrapper_build_dir}/libcef_dll_wrapper/libcef_dll_wrapper.a $stage/lib/release + "$stage/version" > "$stage/VERSION.txt" + rm "$stage/version" + + mkdir -p "$stage/LICENSES" + mkdir -p "$stage/bin/release/" + mkdir -p "$stage/include" + mkdir -p "$stage/include/cef" + mkdir -p "$stage/lib/release/swiftshader" + mkdir -p "$stage/resources" + + cp libdullahan.a ${stage}/lib/release/ + cp ${cef_no_wrapper_build_dir}/libcef_dll_wrapper/libcef_dll_wrapper.a $stage/lib/release - cp -a ${cef_no_wrapper_dir}/Release/*.so ${stage}/lib/release/ - cp -a ${cef_no_wrapper_dir}/Release/swiftshader/* ${stage}/lib/release/swiftshader/ + cp -a ${cef_no_wrapper_dir}/Release/*.so ${stage}/lib/release/ + cp -a ${cef_no_wrapper_dir}/Release/swiftshader/* ${stage}/lib/release/swiftshader/ - cp dullahan_host ${stage}/bin/release/ + cp dullahan_host ${stage}/bin/release/ - cp -a ${cef_no_wrapper_dir}/Release/*.bin ${stage}/bin/release/ - cp -a ${cef_no_wrapper_dir}/Release/chrome-sandbox ${stage}/bin/release/ + cp -a ${cef_no_wrapper_dir}/Release/*.bin ${stage}/bin/release/ + cp -a ${cef_no_wrapper_dir}/Release/chrome-sandbox ${stage}/bin/release/ - cp -R ${cef_no_wrapper_dir}/Resources/* ${stage}/resources/ - cp ${dullahan_source_dir}/dullahan.h ${stage}/include/cef/ - cp ${dullahan_source_dir}/dullahan_version.h ${stage}/include/cef/ + cp -R ${cef_no_wrapper_dir}/Resources/* ${stage}/resources/ + cp ${dullahan_source_dir}/dullahan.h ${stage}/include/cef/ + cp ${dullahan_source_dir}/dullahan_version.h ${stage}/include/cef/ cp "$top/CEF_LICENSE.txt" "$stage/LICENSES" cp "$top/LICENSE.txt" "$stage/LICENSES" - ;; + ;; esac From 67d7c52aa5daba1fcfe7757dd70eb3c531cfde77 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Fri, 31 Mar 2023 17:05:38 -0400 Subject: [PATCH 05/26] SL-18837: Use msbuild.exe instead of devenv.com --- build-cmd.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/build-cmd.sh b/build-cmd.sh index 4260dee..f39f43d 100755 --- a/build-cmd.sh +++ b/build-cmd.sh @@ -41,6 +41,25 @@ source_environment_tempfile="$stage/source_environment.sh" "$autobuild" source_environment > "$source_environment_tempfile" . "$source_environment_tempfile" +# Use msbuild.exe instead of devenv.com +build_sln() { + local solution=$1 + local config=$2 + local proj="${3:-}" + local toolset="${AUTOBUILD_WIN_VSTOOLSET:-v143}" + + # e.g. config = "Release|$AUTOBUILD_WIN_VSPLATFORM" per devenv.com convention + local -a confparts + IFS="|" read -ra confparts <<< "$config" + + msbuild.exe \ + "$(cygpath -w "$solution")" \ + ${proj:+-t:"$proj"} \ + -p:Configuration="${confparts[0]}" \ + -p:Platform="${confparts[1]}" \ + -p:PlatformToolset=$toolset +} + build=${AUTOBUILD_BUILD_ID:=0} case "$AUTOBUILD_PLATFORM" in From 23a52d26f0fb14c17338cfed8032c20de29a2c6e Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Fri, 31 Mar 2023 17:18:00 -0400 Subject: [PATCH 06/26] SL-18837: Specify cmake -A switch for Windows 32 builds. --- build-cmd.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/build-cmd.sh b/build-cmd.sh index f39f43d..b34d6a3 100755 --- a/build-cmd.sh +++ b/build-cmd.sh @@ -91,14 +91,15 @@ print(':'.join(OrderedDict((dir.rstrip('/'), 1) for dir in sys.argv[1].split(':' rm -rf "$cef_no_wrapper_build_dir" mkdir -p "$cef_no_wrapper_build_dir" cd "$cef_no_wrapper_build_dir" - cmake -G "$AUTOBUILD_WIN_CMAKE_GEN" -DCEF_RUNTIME_LIBRARY_FLAG=/MD -DUSE_SANDBOX=Off .. + cmake -G "$AUTOBUILD_WIN_CMAKE_GEN" -A "$AUTOBUILD_WIN_VSPLATFORM" \ + -DCEF_RUNTIME_LIBRARY_FLAG=/MD -DUSE_SANDBOX=Off .. build_sln cef.sln "Release|$AUTOBUILD_WIN_VSPLATFORM" "libcef_dll_wrapper" build_sln cef.sln "Debug|$AUTOBUILD_WIN_VSPLATFORM" "libcef_dll_wrapper" # generate the project files for Dullahan cd "$stage" cmake .. \ - -G "$AUTOBUILD_WIN_CMAKE_GEN" \ + -G "$AUTOBUILD_WIN_CMAKE_GEN" -A "$AUTOBUILD_WIN_VSPLATFORM" \ -DCEF_WRAPPER_DIR="$(cygpath -w "$cef_no_wrapper_dir")" \ -DCEF_WRAPPER_BUILD_DIR="$(cygpath -w "$cef_no_wrapper_build_dir")" \ -DCMAKE_C_FLAGS="$LL_BUILD_RELEASE" From f8631e0a5b3a313615cf39d50761e80f07ac3afc Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Mon, 17 Apr 2023 17:24:08 -0400 Subject: [PATCH 07/26] SL-18837: re-enable build error recognition, try C++17 --- .github/workflows/build.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index ae19ba9..826b56c 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -10,11 +10,12 @@ jobs: include: - os: windows-2022 addrsize: "32" - continue-on-error: true + continue-on-error: false runs-on: ${{ matrix.os }} steps: - uses: secondlife/action-autobuild@v3 with: + build-variables-ref: viewer-c++17 addrsize: ${{ matrix.addrsize }} release: needs: build From b70841d65125a3edcdef5c01eadfff21a9b97872 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Tue, 18 Apr 2023 14:21:03 -0400 Subject: [PATCH 08/26] SL-18837: Set CMAKE_CXX_FLAGS consistently. Remove CMAKE_C_FLAGS: there are no .c source files in this repository, and passing -std=c++NN to the classic C compiler causes CMake to stop with an error. Also remove Windows PATH de-dup logic since autobuild now does that. --- build-cmd.sh | 39 ++++++++++++--------------------------- 1 file changed, 12 insertions(+), 27 deletions(-) diff --git a/build-cmd.sh b/build-cmd.sh index b34d6a3..257d28e 100755 --- a/build-cmd.sh +++ b/build-cmd.sh @@ -66,32 +66,13 @@ case "$AUTOBUILD_PLATFORM" in windows*) load_vsvars - # We've observed some weird failures in which the PATH is too big to be - # passed to a child process! When that gets munged, we start seeing errors - # like failing to find the 'mt.exe' command. Thing is, by this point - # in the script we've acquired a shocking number of duplicate entries. - # Dedup the PATH using Python's OrderedDict, which preserves the order in - # which you insert keys. - # We find that some of the Visual Studio PATH entries appear both with and - # without a trailing slash, which is pointless. Strip those off and dedup - # what's left. - # Pass the existing PATH as an explicit argument rather than reading it - # from the environment to bypass the fact that cygwin implicitly converts - # PATH to Windows form when running a native executable. Since we're - # setting bash's PATH, leave everything in cygwin form. That means - # splitting and rejoining on ':' rather than on os.pathsep, which on - # Windows is ';'. - # Use python -u, else the resulting PATH will end with a spurious '\r'. - export PATH="$(python -u -c "import sys -from collections import OrderedDict -print(':'.join(OrderedDict((dir.rstrip('/'), 1) for dir in sys.argv[1].split(':'))))" "$PATH")" - # build the CEF c->C++ wrapper "libcef_dll_wrapper" cd "$cef_no_wrapper_dir" rm -rf "$cef_no_wrapper_build_dir" mkdir -p "$cef_no_wrapper_build_dir" cd "$cef_no_wrapper_build_dir" cmake -G "$AUTOBUILD_WIN_CMAKE_GEN" -A "$AUTOBUILD_WIN_VSPLATFORM" \ + -DCMAKE_CXX_FLAGS="$LL_BUILD_RELEASE" \ -DCEF_RUNTIME_LIBRARY_FLAG=/MD -DUSE_SANDBOX=Off .. build_sln cef.sln "Release|$AUTOBUILD_WIN_VSPLATFORM" "libcef_dll_wrapper" build_sln cef.sln "Debug|$AUTOBUILD_WIN_VSPLATFORM" "libcef_dll_wrapper" @@ -102,7 +83,7 @@ print(':'.join(OrderedDict((dir.rstrip('/'), 1) for dir in sys.argv[1].split(':' -G "$AUTOBUILD_WIN_CMAKE_GEN" -A "$AUTOBUILD_WIN_VSPLATFORM" \ -DCEF_WRAPPER_DIR="$(cygpath -w "$cef_no_wrapper_dir")" \ -DCEF_WRAPPER_BUILD_DIR="$(cygpath -w "$cef_no_wrapper_build_dir")" \ - -DCMAKE_C_FLAGS="$LL_BUILD_RELEASE" + -DCMAKE_CXX_FLAGS="$LL_BUILD_RELEASE" # build individual dullahan libraries but not examples build_sln "dullahan.sln" "Release|$AUTOBUILD_WIN_VSPLATFORM" dullahan @@ -161,7 +142,10 @@ print(':'.join(OrderedDict((dir.rstrip('/'), 1) for dir in sys.argv[1].split(':' rm -rf "$cef_no_wrapper_build_dir" mkdir -p "$cef_no_wrapper_build_dir" cd "$cef_no_wrapper_build_dir" - cmake -G Xcode -DPROJECT_ARCH="x86_64" .. + cmake -G Xcode \ + -DPROJECT_ARCH="x86_64" \ + -DCMAKE_CXX_FLAGS="$LL_BUILD_RELEASE" \ + .. xcodebuild -project cef.xcodeproj -target libcef_dll_wrapper -configuration Debug xcodebuild -project cef.xcodeproj -target libcef_dll_wrapper -configuration Release @@ -171,7 +155,6 @@ print(':'.join(OrderedDict((dir.rstrip('/'), 1) for dir in sys.argv[1].split(':' -DCMAKE_OSX_ARCHITECTURES="$AUTOBUILD_CONFIGURE_ARCH" \ -DCEF_WRAPPER_DIR="$cef_no_wrapper_dir" \ -DCEF_WRAPPER_BUILD_DIR="$cef_no_wrapper_build_dir" \ - -DCMAKE_C_FLAGS:STRING="$LL_BUILD_RELEASE" \ -DCMAKE_CXX_FLAGS:STRING="$LL_BUILD_RELEASE" \ .. @@ -243,13 +226,15 @@ print(':'.join(OrderedDict((dir.rstrip('/'), 1) for dir in sys.argv[1].split(':' rm -rf "${cef_no_wrapper_build_dir}" mkdir -p "${cef_no_wrapper_build_dir}" cd "${cef_no_wrapper_build_dir}" - cmake -G Ninja .. + cmake -G Ninja \ + -DCMAKE_CXX_FLAGS="$LL_BUILD_RELEASE" \ + .. ninja libcef_dll_wrapper cd "$stage" - cmake .. -G Ninja -DCEF_WRAPPER_DIR="${cef_no_wrapper_dir}" \ - -DCEF_WRAPPER_BUILD_DIR="${cef_no_wrapper_build_dir}" \ - -DCMAKE_C_FLAGS:STRING="$LL_BUILD_RELEASE -m${AUTOBUILD_ADDRSIZE}" \ + cmake .. -G Ninja \ + -DCEF_WRAPPER_DIR="${cef_no_wrapper_dir}" \ + -DCEF_WRAPPER_BUILD_DIR="${cef_no_wrapper_build_dir}" \ -DCMAKE_CXX_FLAGS:STRING="$LL_BUILD_RELEASE -m${AUTOBUILD_ADDRSIZE}" ninja From 02a8fc52588b0daaf750bcec638f6e10d0e41754 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Wed, 19 Apr 2023 11:56:19 -0400 Subject: [PATCH 09/26] SL-18837: Don't let CMake infer CMAKE_C_FLAGS from CMAKE_CXX_FLAGS. --- build-cmd.sh | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/build-cmd.sh b/build-cmd.sh index 257d28e..b46b559 100755 --- a/build-cmd.sh +++ b/build-cmd.sh @@ -41,6 +41,9 @@ source_environment_tempfile="$stage/source_environment.sh" "$autobuild" source_environment > "$source_environment_tempfile" . "$source_environment_tempfile" +# remove_cxxstd +source "$(dirname "$AUTOBUILD_VARIABLES_FILE")/functions" + # Use msbuild.exe instead of devenv.com build_sln() { local solution=$1 @@ -142,9 +145,12 @@ case "$AUTOBUILD_PLATFORM" in rm -rf "$cef_no_wrapper_build_dir" mkdir -p "$cef_no_wrapper_build_dir" cd "$cef_no_wrapper_build_dir" + opts="$LL_BUILD_RELEASE" + plainopts="$(remove_cxxstd $opts)" cmake -G Xcode \ -DPROJECT_ARCH="x86_64" \ - -DCMAKE_CXX_FLAGS="$LL_BUILD_RELEASE" \ + -DCMAKE_C_FLAGS="$plainopts" \ + -DCMAKE_CXX_FLAGS="$opts" \ .. xcodebuild -project cef.xcodeproj -target libcef_dll_wrapper -configuration Debug xcodebuild -project cef.xcodeproj -target libcef_dll_wrapper -configuration Release @@ -155,7 +161,8 @@ case "$AUTOBUILD_PLATFORM" in -DCMAKE_OSX_ARCHITECTURES="$AUTOBUILD_CONFIGURE_ARCH" \ -DCEF_WRAPPER_DIR="$cef_no_wrapper_dir" \ -DCEF_WRAPPER_BUILD_DIR="$cef_no_wrapper_build_dir" \ - -DCMAKE_CXX_FLAGS:STRING="$LL_BUILD_RELEASE" \ + -DCMAKE_C_FLAGS:STRING="$plainopts" \ + -DCMAKE_CXX_FLAGS:STRING="$opts" \ .. xcodebuild -project dullahan.xcodeproj -target dullahan -configuration Release @@ -226,8 +233,11 @@ case "$AUTOBUILD_PLATFORM" in rm -rf "${cef_no_wrapper_build_dir}" mkdir -p "${cef_no_wrapper_build_dir}" cd "${cef_no_wrapper_build_dir}" + opts="$LL_BUILD_RELEASE -m${AUTOBUILD_ADDRSIZE}" + plainopts="$(remove_cxxstd $opts)" cmake -G Ninja \ - -DCMAKE_CXX_FLAGS="$LL_BUILD_RELEASE" \ + -DCMAKE_C_FLAGS="$plainopts" \ + -DCMAKE_CXX_FLAGS="$opts" \ .. ninja libcef_dll_wrapper @@ -235,7 +245,7 @@ case "$AUTOBUILD_PLATFORM" in cmake .. -G Ninja \ -DCEF_WRAPPER_DIR="${cef_no_wrapper_dir}" \ -DCEF_WRAPPER_BUILD_DIR="${cef_no_wrapper_build_dir}" \ - -DCMAKE_CXX_FLAGS:STRING="$LL_BUILD_RELEASE -m${AUTOBUILD_ADDRSIZE}" + -DCMAKE_CXX_FLAGS:STRING="$opts" ninja From 621d2a151b7d234530f1adb6503f7c4b2c314abf Mon Sep 17 00:00:00 2001 From: Callum Prentice Date: Thu, 27 Apr 2023 08:28:50 -0700 Subject: [PATCH 10/26] SL-19410: Update macOS runner to point to new, self hosted instance --- .github/workflows/build.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index ae19ba9..d297cae 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -5,11 +5,13 @@ jobs: strategy: matrix: ## linux64 cef-bin URL has a 192.168.mmm.nnn host - os: [windows-2022, macos-11] ##, ubuntu-22.04] + os: [windows-2022] addrsize: ["64"] include: - os: windows-2022 addrsize: "32" + - os: macos + tag: self-hosted continue-on-error: true runs-on: ${{ matrix.os }} steps: From 038468526900d32b1bad38d2d0b582ab2b524a9b Mon Sep 17 00:00:00 2001 From: Callum Prentice Date: Thu, 27 Apr 2023 08:33:39 -0700 Subject: [PATCH 11/26] SL-19410: indent at ion is important --- .github/workflows/build.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index d297cae..e60e31e 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -4,8 +4,7 @@ jobs: build: strategy: matrix: - ## linux64 cef-bin URL has a 192.168.mmm.nnn host - os: [windows-2022] + os: [windows-2022] addrsize: ["64"] include: - os: windows-2022 From 3b4dca75aa384ae05ce74c399170ad81542e3b1f Mon Sep 17 00:00:00 2001 From: Callum Prentice Date: Thu, 27 Apr 2023 08:57:12 -0700 Subject: [PATCH 12/26] SL-19410: whitespace change to kick off a new workflow build --- .github/workflows/build.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index e60e31e..f3d6615 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -25,3 +25,4 @@ jobs: - uses: secondlife/action-autobuild-release@v2 with: public: true + From 7e974098904f995931be3d819326255acd523ca4 Mon Sep 17 00:00:00 2001 From: Callum Prentice Date: Thu, 27 Apr 2023 09:10:47 -0700 Subject: [PATCH 13/26] SL-19410: whitespace change to kick off another new workflow build after a change to runner config --- .github/workflows/build.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index f3d6615..e60e31e 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -25,4 +25,3 @@ jobs: - uses: secondlife/action-autobuild-release@v2 with: public: true - From 61fded0aa10ddf6d37ee4f01c07cb648e726e094 Mon Sep 17 00:00:00 2001 From: Callum Prentice Date: Thu, 27 Apr 2023 10:25:40 -0700 Subject: [PATCH 14/26] SL-19410: add more debugging/logging --- .github/workflows/build.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index e60e31e..f3de46a 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -1,5 +1,7 @@ name: Build on: [push] +env: + ACTIONS_RUNNER_DEBUG: true jobs: build: strategy: From dac171f1a2eecbfd412f9bf53196e0c925b27f5c Mon Sep 17 00:00:00 2001 From: JJ Linden Date: Thu, 27 Apr 2023 20:29:10 +0000 Subject: [PATCH 15/26] ci: add addrsize to macos runner in matrix --- .github/workflows/build.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index f3de46a..19fe91a 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -13,6 +13,7 @@ jobs: addrsize: "32" - os: macos tag: self-hosted + addrsize: "64" continue-on-error: true runs-on: ${{ matrix.os }} steps: From 42f544786adb35c40cda22e908e715f78bb278de Mon Sep 17 00:00:00 2001 From: Callum Prentice Date: Thu, 11 May 2023 14:49:02 -0700 Subject: [PATCH 16/26] Updates so we can build this package against CEF 112. As well as the usual assortment of CEF interface changes, there are some additions/editing and removal of variables. The OnQuotaRequest in browserClient was removed too and is implemented in a different way now but I dont think we need it. Finally, the notion of a debug build is removed. We just don't have the resources to build a debug version in GHA (runs out of time and/or disk space) and it hasn't been used since the early days of this library. One can always do local debug builds in the unlikely event they are required --- CMakeLists.txt | 42 ++--------------------------- autobuild.xml | 20 +++++++++----- build-cmd.sh | 6 ++--- src/dullahan_browser_client.cpp | 23 +++------------- src/dullahan_browser_client.h | 9 ++----- src/dullahan_impl.cpp | 47 +++++++++++++++------------------ src/dullahan_impl.h | 1 + src/dullahan_render_handler.cpp | 2 +- src/dullahan_version.h.in | 4 +-- tools/build.bat | 12 +++++---- 10 files changed, 57 insertions(+), 109 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 82788f3..123f83e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,11 +22,8 @@ endfunction() # The user must pass in CEF_WRAPPER_DIR and CEF_WRAPPER_BUILD_DIR then we # derrive all the other ones we need based on those set(CEF_INCLUDE_DIR ${CEF_WRAPPER_DIR}/include) -set(CEF_DEBUG_LIB_DIR ${CEF_WRAPPER_DIR}/Debug) -set(CEF_DEBUG_DLL_LIB_DIR ${CEF_WRAPPER_BUILD_DIR}/libcef_dll_wrapper/Debug) set(CEF_RELEASE_LIB_DIR ${CEF_WRAPPER_DIR}/Release) set(CEF_RELEASE_DLL_LIB_DIR ${CEF_WRAPPER_BUILD_DIR}/libcef_dll_wrapper/Release) -set(CEF_DEBUG_BIN_DIR ${CEF_WRAPPER_DIR}/Debug) set(CEF_RELEASE_BIN_DIR ${CEF_WRAPPER_DIR}/Release) set(CEF_RESOURCES_DIR ${CEF_WRAPPER_DIR}/Resources) @@ -35,33 +32,14 @@ set(CEF_RESOURCES_DIR ${CEF_WRAPPER_DIR}/Resources) check_exists(CEF_WRAPPER_DIR) check_exists(CEF_WRAPPER_BUILD_DIR) check_exists(CEF_INCLUDE_DIR) -check_exists(CEF_DEBUG_LIB_DIR) -check_exists(CEF_DEBUG_DLL_LIB_DIR) check_exists(CEF_RELEASE_LIB_DIR) check_exists(CEF_RELEASE_DLL_LIB_DIR) -check_exists(CEF_DEBUG_BIN_DIR) check_exists(CEF_RELEASE_BIN_DIR) check_exists(CEF_RESOURCES_DIR) ############################################################################### # location of CEF libraries we link against if(CMAKE_SYSTEM_NAME STREQUAL "Windows") - - # Find both link libraries we need for Debug/Release - find_library( - CEF_LIBRARY_DEBUG - NAMES libcef.lib - PATHS ${CEF_DEBUG_LIB_DIR} - NO_DEFAULT_PATH - ) - - find_library( - CEF_DLL_LIBRARY_DEBUG - NAMES libcef_dll_wrapper.lib - PATHS ${CEF_DEBUG_DLL_LIB_DIR} - NO_DEFAULT_PATH - ) - find_library( CEF_LIBRARY_RELEASE NAMES libcef.lib @@ -77,32 +55,22 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Windows") ) # Confirm that we were able to find our link libs - check_exists(CEF_LIBRARY_DEBUG) - check_exists(CEF_DLL_LIBRARY_DEBUG) check_exists(CEF_LIBRARY_RELEASE) check_exists(CEF_DLL_LIBRARY_RELEASE) elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin") - find_library( - CEF_DLL_LIBRARY_DEBUG - NAMES libcef_dll_wrapper.a - PATHS ${CEF_DEBUG_DLL_LIB_DIR} - ) - find_library( CEF_DLL_LIBRARY_RELEASE NAMES libcef_dll_wrapper.a PATHS ${CEF_RELEASE_DLL_LIB_DIR} ) - set(CEF_FRAMEWORK "'${CEF_RELEASE_BIN_DIR}/Chromium Embedded Framework.framework'") find_library(OPENGL_FRAMEWORK OpenGL) find_library(COCOA_FRAMEWORK Cocoa) # Check that we were able to find our build components - check_exists(CEF_DLL_LIBRARY_DEBUG) check_exists(CEF_DLL_LIBRARY_RELEASE) check_exists(CEF_FRAMEWORK) check_exists(OPENGL_FRAMEWORK) @@ -131,11 +99,9 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux") set(CEF_DLL_LIBRARY ${CEF_DLL_LIBRARY_RELEASE} ) else() set(CEF_LIBRARY - debug ${CEF_LIBRARY_DEBUG} optimized ${CEF_LIBRARY_RELEASE} ) set(CEF_DLL_LIBRARY - debug ${CEF_DLL_LIBRARY_DEBUG} optimized ${CEF_DLL_LIBRARY_RELEASE} ) endif() @@ -150,10 +116,8 @@ check_exists(CEF_DLL_LIBRARY) # 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} -std=c++11 -xobjective-c++") set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -std=c++11 -xobjective-c++") elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11") @@ -301,7 +265,6 @@ 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_DEBUG "/SUBSYSTEM:WINDOWS") set_target_properties(dullahan_host PROPERTIES LINK_FLAGS_RELEASE "/SUBSYSTEM:WINDOWS") set_target_properties(dullahan_host PROPERTIES LINK_FLAGS "/ignore:4099") @@ -318,7 +281,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Windows") add_custom_command( TARGET dullahan_host POST_BUILD COMMAND "${CMAKE_COMMAND}" -E copy_directory - "$<$:${CEF_DEBUG_BIN_DIR}>$<$:${CEF_RELEASE_BIN_DIR}>" + "$<$:${CEF_RELEASE_BIN_DIR}>" "$" COMMENT "Copying runtime files to executable directory") @@ -367,7 +330,6 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Windows") # 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_DEBUG "/SUBSYSTEM:WINDOWS") set_target_properties(webcube PROPERTIES LINK_FLAGS_RELEASE "/SUBSYSTEM:WINDOWS") set_target_properties(webcube PROPERTIES LINK_FLAGS "/ignore:4099") endif() @@ -560,5 +522,5 @@ endif() # generic commands that have to go after everything else if(CMAKE_CONFIGURATION_TYPES) - set(CMAKE_CONFIGURATION_TYPES "Debug;Release") + set(CMAKE_CONFIGURATION_TYPES "Release") endif() diff --git a/autobuild.xml b/autobuild.xml index a9aeef3..15b11b0 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -20,9 +20,11 @@ archive hash - 857f5531a30f1f956bcbea637e665c1f + 81e6c73dd0bc700194754fd86b163702765870f6 + hash_algorithm + sha1 url - https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/83391/779820/cef_bin-91.1.21_g9dd45fe_chromium-91.0.4472.114-darwin64-560735.tar.bz2 + https://github.com/secondlife/cef/releases/download/v112.3.0-a27689a/cef_bin-112.3.0_gb09c4ca_chromium-112.0.5615.165-darwin64-a27689a.tar.zst name darwin64 @@ -44,9 +46,11 @@ archive hash - 3164a2ebaadc473ddac3cedf39a7c0f3 + 23ce6b7bd82a1a605d2e4e823559564ca1aa0ac5 + hash_algorithm + sha1 url - https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/83393/779738/cef_bin-91.1.21_g9dd45fe_chromium-91.0.4472.114-windows-560735.tar.bz2 + https://github.com/secondlife/cef/releases/download/v112.3.0-a27689a/cef_bin-112.3.0_gb09c4ca_chromium-112.0.5615.165-windows-a27689a.tar.zst name windows @@ -56,16 +60,18 @@ archive hash - 5ab7616c3b013b0bf771146f740092fb + de8b1185e0f1b102d788537abcb3bce72bd0e538 + hash_algorithm + sha1 url - https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/83392/779744/cef_bin-91.1.21_g9dd45fe_chromium-91.0.4472.114-windows64-560735.tar.bz2 + https://github.com/secondlife/cef/releases/download/v112.3.0-a27689a/cef_bin-112.3.0_gb09c4ca_chromium-112.0.5615.165-windows64-a27689a.tar.zst name windows64 version - 91.1.21_g9dd45fe_chromium-91.0.4472.114 + 112.3.0_gb09c4ca_chromium-112.0.5615.165 package_description diff --git a/build-cmd.sh b/build-cmd.sh index b34d6a3..2e38f48 100755 --- a/build-cmd.sh +++ b/build-cmd.sh @@ -94,7 +94,6 @@ print(':'.join(OrderedDict((dir.rstrip('/'), 1) for dir in sys.argv[1].split(':' cmake -G "$AUTOBUILD_WIN_CMAKE_GEN" -A "$AUTOBUILD_WIN_VSPLATFORM" \ -DCEF_RUNTIME_LIBRARY_FLAG=/MD -DUSE_SANDBOX=Off .. build_sln cef.sln "Release|$AUTOBUILD_WIN_VSPLATFORM" "libcef_dll_wrapper" - build_sln cef.sln "Debug|$AUTOBUILD_WIN_VSPLATFORM" "libcef_dll_wrapper" # generate the project files for Dullahan cd "$stage" @@ -129,7 +128,6 @@ print(':'.join(OrderedDict((dir.rstrip('/'), 1) for dir in sys.argv[1].split(':' # CEF run time binaries (copy individually except SwiftShader so it's # obvious when a file is removed and this part of the script fails) - cp -R "$cef_no_wrapper_dir/Release/swiftshader/"* "$stage/bin/release/swiftshader/" cp "$cef_no_wrapper_dir/Release/chrome_elf.dll" "$stage/bin/release/" cp "$cef_no_wrapper_dir/Release/d3dcompiler_47.dll" "$stage/bin/release/" cp "$cef_no_wrapper_dir/Release/libcef.dll" "$stage/bin/release/" @@ -137,6 +135,9 @@ print(':'.join(OrderedDict((dir.rstrip('/'), 1) for dir in sys.argv[1].split(':' cp "$cef_no_wrapper_dir/Release/libGLESv2.dll" "$stage/bin/release/" cp "$cef_no_wrapper_dir/Release/snapshot_blob.bin" "$stage/bin/release/" cp "$cef_no_wrapper_dir/Release/v8_context_snapshot.bin" "$stage/bin/release/" + cp "$cef_no_wrapper_dir/Release/vk_swiftshader.dll" "$stage/bin/release/" + cp "$cef_no_wrapper_dir/Release/vk_swiftshader_icd.json" "$stage/bin/release/" + cp "$cef_no_wrapper_dir/Release/vulkan-1.dll" "$stage/bin/release/" # CEF resources cp -R "$cef_no_wrapper_dir/Resources/"* "$stage/resources/" @@ -162,7 +163,6 @@ print(':'.join(OrderedDict((dir.rstrip('/'), 1) for dir in sys.argv[1].split(':' mkdir -p "$cef_no_wrapper_build_dir" cd "$cef_no_wrapper_build_dir" cmake -G Xcode -DPROJECT_ARCH="x86_64" .. - xcodebuild -project cef.xcodeproj -target libcef_dll_wrapper -configuration Debug xcodebuild -project cef.xcodeproj -target libcef_dll_wrapper -configuration Release # build Dullahan diff --git a/src/dullahan_browser_client.cpp b/src/dullahan_browser_client.cpp index db8b2d0..588d832 100644 --- a/src/dullahan_browser_client.cpp +++ b/src/dullahan_browser_client.cpp @@ -33,8 +33,10 @@ #include "dullahan_impl.h" +#include + dullahan_browser_client::dullahan_browser_client(dullahan_impl* parent, - dullahan_render_handler* render_handler) : + scoped_refptr render_handler) : mParent(parent), mRenderHandler(render_handler) { @@ -329,21 +331,6 @@ bool dullahan_browser_client::GetAuthCredentials(CefRefPtr browser, } } -// CefRequestHandler override -bool dullahan_browser_client::OnQuotaRequest(CefRefPtr browser, - const CefString& origin_url, - int64 new_size, - CefRefPtr callback) -{ - CEF_REQUIRE_IO_THREAD(); - - // 10MB hard coded for now - static const int64 max_size = 1024 * 1024 * 10; - - callback->Continue(new_size <= max_size); - return true; -} - // CefDownloadHandler overrides void dullahan_browser_client::OnBeforeDownload(CefRefPtr browser, CefRefPtr download_item, @@ -380,7 +367,6 @@ bool dullahan_browser_client::OnFileDialog(CefRefPtr browser, const CefString& title, const CefString& default_file_path, const std::vector& accept_filters, - int selected_accept_filter, CefRefPtr callback) { CEF_REQUIRE_UI_THREAD(); @@ -428,8 +414,7 @@ bool dullahan_browser_client::OnFileDialog(CefRefPtr browser, cef_file_paths.push_back(*iter); } - const int file_path_index = 0; - callback->Continue(file_path_index, cef_file_paths); + callback->Continue(cef_file_paths); } else { diff --git a/src/dullahan_browser_client.h b/src/dullahan_browser_client.h index 1c8efdf..1bfd756 100644 --- a/src/dullahan_browser_client.h +++ b/src/dullahan_browser_client.h @@ -46,7 +46,7 @@ class dullahan_browser_client : { public: dullahan_browser_client(dullahan_impl* parent, - dullahan_render_handler* render_handler); + scoped_refptr render_handler); ~dullahan_browser_client(); // CefClient override @@ -119,11 +119,6 @@ class dullahan_browser_client : const CefString& host, int port, const CefString& realm, const CefString& scheme, CefRefPtr callback) override; - bool OnQuotaRequest(CefRefPtr browser, - const CefString& origin_url, - int64 new_size, - CefRefPtr callback) override; - // CefDownloadHandler overrides CefRefPtr GetDownloadHandler() override { @@ -143,7 +138,7 @@ class dullahan_browser_client : return this; } bool OnFileDialog(CefRefPtr browser, FileDialogMode mode, const CefString& title, - const CefString& default_file_path, const std::vector& accept_filters, int selected_accept_filter, + const CefString& default_file_path, const std::vector& accept_filters, CefRefPtr callback) override; // CefJSDialogHandler overrides diff --git a/src/dullahan_impl.cpp b/src/dullahan_impl.cpp index 62d4287..121ff88 100644 --- a/src/dullahan_impl.cpp +++ b/src/dullahan_impl.cpp @@ -37,7 +37,6 @@ #include "include/cef_request_context.h" #include "include/cef_request_context_handler.h" #include "include/cef_waitable_event.h" -#include "include/cef_web_plugin.h" #include "include/base/cef_logging.h" #include "dullahan_version.h" @@ -58,7 +57,7 @@ dullahan_impl::dullahan_impl() : mInitialized(false), - mBrowser(0), + mBrowser(nullptr), mCallbackManager(new dullahan_callback_manager), mViewWidth(0), mViewHeight(0), @@ -68,13 +67,14 @@ dullahan_impl::dullahan_impl() : mForceWaveAudio(false), mDisableGPU(true), mDisableWebSecurity(false), + mAllowFileAccessFromFiles(false), mDisableNetworkService(false), mUseMockKeyChain(false), mAutoPlayWithoutGesture(false), mFakeUIForMediaStream(false), mFlipPixelsY(false), mFlipMouseY(false), - mRequestContext(0), + mRequestContext(nullptr), mRequestedPageZoom(1.0) { DLNOUT("dullahan_impl::dullahan_impl()"); @@ -110,6 +110,13 @@ void dullahan_impl::OnBeforeCommandLineProcessing(const CefString& process_type, command_line->AppendSwitch("enable-begin-frame-scheduling"); } + // The ability to access local files used to be a member of CefBrowserSettings but + // now is is configured globally via command line switch (https://github.com/cefsharp/CefSharp/issues/3668) + if (mAllowFileAccessFromFiles == true) + { + command_line->AppendSwitch("allow-file-access-from-files"); + } + // n.b. be careful enabling this. At least on Linux it will break sites like twitch.tv mixer.com, dlive.com. // Probably this also makes only sense for Win32? @@ -277,9 +284,6 @@ bool dullahan_impl::initCEF(dullahan::dullahan_settings& user_settings) // act like a browser and do not persist session cookies ever settings.persist_session_cookies = false; - // turn on only for Windows 7+ - CefEnableHighDPISupport(); - // explicitly set the path to the locales folder since defaults no longer work on some systems CefString(&settings.locales_dir_path) = user_settings.locales_dir_path; @@ -352,6 +356,10 @@ bool dullahan_impl::initCEF(dullahan::dullahan_settings& user_settings) // needing a web server. mDisableWebSecurity = user_settings.disable_web_security; + // this flag allows access to local files - it used to be set via a member of CefBrowserSettings + // but now must be set via the command line so we capture it here + mAllowFileAccessFromFiles = user_settings.file_access_from_file_urls; + // this flag if set, adds a command line parameter that disables "network service" and // is like adding --disable-features=NetworkService. This appears to be required after // Chrome 75 to disable the "Chrome wants access to passwords" dialog on macOS that @@ -410,10 +418,7 @@ bool dullahan_impl::init(dullahan::dullahan_settings& user_settings) browser_settings.windowless_frame_rate = user_settings.frame_rate; browser_settings.webgl = user_settings.webgl_enabled ? STATE_ENABLED : STATE_DISABLED; browser_settings.javascript = user_settings.javascript_enabled ? STATE_ENABLED : STATE_DISABLED; - browser_settings.plugins = user_settings.plugins_enabled ? STATE_ENABLED : STATE_DISABLED; - browser_settings.application_cache = user_settings.cache_enabled ? STATE_ENABLED : STATE_DISABLED; browser_settings.background_color = user_settings.background_color; - browser_settings.file_access_from_file_urls = user_settings.file_access_from_file_urls ? STATE_ENABLED : STATE_DISABLED; browser_settings.image_shrink_standalone_to_fit = user_settings.image_shrink_standalone_to_fit ? STATE_ENABLED : STATE_DISABLED; mRenderHandler = new dullahan_render_handler(this); @@ -454,10 +459,9 @@ bool dullahan_impl::init(dullahan::dullahan_settings& user_settings) CefWindowInfo window_info; window_info.SetAsWindowless(0); window_info.windowless_rendering_enabled = true; - window_info.x = 0; - window_info.y = 0; - window_info.width = user_settings.initial_width; - window_info.height = user_settings.initial_height; + const int width = user_settings.initial_width; + const int height = user_settings.initial_height; + window_info.bounds = { 0, 0, width, height }; mBrowser = CefBrowserHost::CreateBrowserSync(window_info, mBrowserClient.get(), url, browser_settings, extra_info, mRequestContext.get()); @@ -645,7 +649,7 @@ void dullahan_impl::setFocus() { if (mBrowser.get() && mBrowser->GetHost()) { - mBrowser->GetHost()->SendFocusEvent(true); + mBrowser->GetHost()->SetFocus(true); } } @@ -745,10 +749,7 @@ void dullahan_impl::showDevTools() if (mBrowser.get() && mBrowser->GetHost()) { CefWindowInfo window_info; - window_info.x = 0; - window_info.y = 0; - window_info.width = 400; - window_info.height = 400; + window_info.bounds = { 0,0, 600, 800 }; #ifdef WIN32 window_info.SetAsPopup(nullptr, "Dullahan Dev Tools"); #elif __APPLE__ @@ -775,9 +776,9 @@ void dullahan_impl::printToPDF(const std::string path) if (mBrowser.get() && mBrowser->GetHost()) { CefPdfPrintSettings settings; - settings.backgrounds_enabled = true; + settings.print_background = true; + settings.display_header_footer = true; settings.landscape = true; - settings.header_footer_enabled = true; CefRefPtr callback = this; mBrowser->GetHost()->PrintToPDF(path, settings, callback); } @@ -814,11 +815,7 @@ bool dullahan_impl::setCookie(const std::string url, const std::string name, cookie.httponly = httponly; cookie.secure = secure; - cookie.has_expires = true; - cookie.expires.year = 2064; - cookie.expires.month = 4; - cookie.expires.day_of_week = 5; - cookie.expires.day_of_month = 10; + cookie.has_expires = false; // wait for cookie to be set in setCookie callback class setCookieCallback : diff --git a/src/dullahan_impl.h b/src/dullahan_impl.h index 21a41b2..5c7abe0 100644 --- a/src/dullahan_impl.h +++ b/src/dullahan_impl.h @@ -161,6 +161,7 @@ class dullahan_impl : bool mForceWaveAudio; bool mDisableGPU; bool mDisableWebSecurity; + bool mAllowFileAccessFromFiles; bool mDisableNetworkService; bool mUseMockKeyChain; bool mAutoPlayWithoutGesture; diff --git a/src/dullahan_render_handler.cpp b/src/dullahan_render_handler.cpp index 636813f..a7f80e4 100644 --- a/src/dullahan_render_handler.cpp +++ b/src/dullahan_render_handler.cpp @@ -172,7 +172,7 @@ void dullahan_render_handler::OnPopupShow(CefRefPtr browser, bool sh delete[] mPopupBuffer; mPopupBuffer = nullptr; - mPopupBufferRect.Reset(); + mPopupBufferRect.Set(0,0, 0,0); } } diff --git a/src/dullahan_version.h.in b/src/dullahan_version.h.in index f7e7b51..21d877e 100644 --- a/src/dullahan_version.h.in +++ b/src/dullahan_version.h.in @@ -37,8 +37,8 @@ // version of this package #define DULLAHAN_VERSION_MAJOR 1 -#define DULLAHAN_VERSION_MINOR 12 -#define DULLAHAN_VERSION_POINT 4 +#define DULLAHAN_VERSION_MINOR 13 +#define DULLAHAN_VERSION_POINT 0 // The build version number as of v1.2 is now the date/time the build was made // It is only regenerated if the constructed version header (dullahan_version.h) diff --git a/tools/build.bat b/tools/build.bat index 912c7bf..35bdc50 100644 --- a/tools/build.bat +++ b/tools/build.bat @@ -20,7 +20,7 @@ @pushd . @rem The CMake generator string to use -@set VS_CMD=Visual Studio 15 2017 +@set VS_CMD=Visual Studio 17 2022 @rem Rudimentary test to see if we are in the Dullahan root directory where @rem we demand that this script is started from. @@ -81,13 +81,15 @@ @rem Set up build parameters for 32 bit builds @if "%BIT_WIDTH%"=="32" ( - @set CMAKE_CMD="%VS_CMD%" + @set CMAKE_GENERATOR="%VS_CMD%" + @set CMAKE_ARCH=-A Win32 @set PLATFORM_CMD="/property:PlatformTarget=x86" ) @rem Set up build parameters for 64 bit builds @if "%BIT_WIDTH%"=="64" ( - @set CMAKE_CMD="%VS_CMD% Win64" + @set CMAKE_GENERATOR="%VS_CMD%" + @set CMAKE_ARCH=-A x64 @set PLATFORM_CMD="/property:PlatformTarget=x64" ) @@ -119,7 +121,7 @@ @rem we don't often need the Debug build, the Dullahan CMakeLists.txt file refers @rem to it and will fail without it so we must build @cd %CEF_BUILD_DIR% -@cmake -G %CMAKE_CMD% .. -DCEF_RUNTIME_LIBRARY_FLAG=/MD -DUSE_SANDBOX=Off +@cmake -G %CMAKE_GENERATOR% %CMAKE_ARCH% .. -DCEF_RUNTIME_LIBRARY_FLAG=/MD -DUSE_SANDBOX=Off @if errorlevel 1 goto End @cd libcef_dll_wrapper @msbuild libcef_dll_wrapper.vcxproj /property:Configuration="Debug" %PLATFORM_CMD% @@ -137,7 +139,7 @@ if exist ..\src\dullahan_version.h del ..\src\dullahan_version.h @rem Build the Dullahan solution which includes the SDK as well as the examples @rem Note: we remove the Dullahan version header file since it is created each @rem time to include the latest information by the CMake script -@cmake -G %CMAKE_CMD% ^ +@cmake -G %CMAKE_GENERATOR% %CMAKE_ARCH% ^ -DCEF_WRAPPER_DIR=%DST_CEF_DIR% ^ -DCEF_WRAPPER_BUILD_DIR=%CEF_BUILD_DIR% ^ .. From e794c36154239deadc749fd6691b8bbd19618b3c Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Fri, 12 May 2023 12:24:53 -0400 Subject: [PATCH 17/26] SL-18837: Revert to default build-variables-ref --- .github/workflows/build.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 05eb2de..9092893 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -19,7 +19,6 @@ jobs: steps: - uses: secondlife/action-autobuild@v3 with: - build-variables-ref: viewer-c++17 addrsize: ${{ matrix.addrsize }} release: needs: build From 94f84d8f0b77035cbfd80b671d9f03f395838265 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Fri, 12 May 2023 13:54:55 -0400 Subject: [PATCH 18/26] SL-18837: Also pass CMake -DCMAKE_CXX_STANDARD from -std=c++17. --- build-cmd.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/build-cmd.sh b/build-cmd.sh index c2f14aa..987001a 100755 --- a/build-cmd.sh +++ b/build-cmd.sh @@ -76,6 +76,7 @@ case "$AUTOBUILD_PLATFORM" in cd "$cef_no_wrapper_build_dir" cmake -G "$AUTOBUILD_WIN_CMAKE_GEN" -A "$AUTOBUILD_WIN_VSPLATFORM" \ -DCMAKE_CXX_FLAGS="$LL_BUILD_RELEASE" \ + $(cmake_cxx_standard $LL_BUILD_RELEASE) \ -DCEF_RUNTIME_LIBRARY_FLAG=/MD -DUSE_SANDBOX=Off .. build_sln cef.sln "Release|$AUTOBUILD_WIN_VSPLATFORM" "libcef_dll_wrapper" @@ -85,7 +86,8 @@ case "$AUTOBUILD_PLATFORM" in -G "$AUTOBUILD_WIN_CMAKE_GEN" -A "$AUTOBUILD_WIN_VSPLATFORM" \ -DCEF_WRAPPER_DIR="$(cygpath -w "$cef_no_wrapper_dir")" \ -DCEF_WRAPPER_BUILD_DIR="$(cygpath -w "$cef_no_wrapper_build_dir")" \ - -DCMAKE_CXX_FLAGS="$LL_BUILD_RELEASE" + -DCMAKE_CXX_FLAGS="$LL_BUILD_RELEASE" \ + $(cmake_cxx_standard $LL_BUILD_RELEASE) \ # build individual dullahan libraries but not examples build_sln "dullahan.sln" "Release|$AUTOBUILD_WIN_VSPLATFORM" dullahan @@ -152,6 +154,7 @@ case "$AUTOBUILD_PLATFORM" in -DPROJECT_ARCH="x86_64" \ -DCMAKE_C_FLAGS="$plainopts" \ -DCMAKE_CXX_FLAGS="$opts" \ + $(cmake_cxx_standard $opts) \ .. xcodebuild -project cef.xcodeproj -target libcef_dll_wrapper -configuration Release @@ -163,6 +166,7 @@ case "$AUTOBUILD_PLATFORM" in -DCEF_WRAPPER_BUILD_DIR="$cef_no_wrapper_build_dir" \ -DCMAKE_C_FLAGS:STRING="$plainopts" \ -DCMAKE_CXX_FLAGS:STRING="$opts" \ + $(cmake_cxx_standard $opts) \ .. xcodebuild -project dullahan.xcodeproj -target dullahan -configuration Release @@ -238,6 +242,7 @@ case "$AUTOBUILD_PLATFORM" in cmake -G Ninja \ -DCMAKE_C_FLAGS="$plainopts" \ -DCMAKE_CXX_FLAGS="$opts" \ + $(cmake_cxx_standard $LL_BUILD_RELEASE) \ .. ninja libcef_dll_wrapper @@ -245,7 +250,8 @@ case "$AUTOBUILD_PLATFORM" in cmake .. -G Ninja \ -DCEF_WRAPPER_DIR="${cef_no_wrapper_dir}" \ -DCEF_WRAPPER_BUILD_DIR="${cef_no_wrapper_build_dir}" \ - -DCMAKE_CXX_FLAGS:STRING="$opts" + -DCMAKE_CXX_FLAGS:STRING="$opts" \ + $(cmake_cxx_standard $LL_BUILD_RELEASE) ninja From 1758b1b9c87811157e55e0d365a8329a72157803 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Wed, 17 May 2023 20:04:39 -0400 Subject: [PATCH 19/26] SL-18837: Update cef-bin to release v113.1.5_ge452d82_chromium-113.0.5672.93-9175570. --- autobuild.xml | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/autobuild.xml b/autobuild.xml index 15b11b0..f43aa22 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -1,6 +1,5 @@ - - + installables cef-bin @@ -20,11 +19,11 @@ archive hash - 81e6c73dd0bc700194754fd86b163702765870f6 + 1fa98e8bf27a2acd062369b4f9c7fa366f4c6b3f hash_algorithm sha1 url - https://github.com/secondlife/cef/releases/download/v112.3.0-a27689a/cef_bin-112.3.0_gb09c4ca_chromium-112.0.5615.165-darwin64-a27689a.tar.zst + https://github.com/secondlife/cef/releases/download/v113.1.5_ge452d82_chromium-113.0.5672.93-9175570/cef_bin-113.1.5_ge452d82_chromium-113.0.5672.93-darwin64-9175570.tar.zst name darwin64 @@ -46,11 +45,11 @@ archive hash - 23ce6b7bd82a1a605d2e4e823559564ca1aa0ac5 + ecf47ff69172987dc246f06688dbbbfd4e79483a hash_algorithm sha1 url - https://github.com/secondlife/cef/releases/download/v112.3.0-a27689a/cef_bin-112.3.0_gb09c4ca_chromium-112.0.5615.165-windows-a27689a.tar.zst + https://github.com/secondlife/cef/releases/download/v113.1.5_ge452d82_chromium-113.0.5672.93-9175570/cef_bin-113.1.5_ge452d82_chromium-113.0.5672.93-windows-9175570.tar.zst name windows @@ -60,18 +59,18 @@ archive hash - de8b1185e0f1b102d788537abcb3bce72bd0e538 + 12594089b986816501cb159f4af836259e34ec38 hash_algorithm sha1 url - https://github.com/secondlife/cef/releases/download/v112.3.0-a27689a/cef_bin-112.3.0_gb09c4ca_chromium-112.0.5615.165-windows64-a27689a.tar.zst + https://github.com/secondlife/cef/releases/download/v113.1.5_ge452d82_chromium-113.0.5672.93-9175570/cef_bin-113.1.5_ge452d82_chromium-113.0.5672.93-windows64-9175570.tar.zst name windows64 version - 112.3.0_gb09c4ca_chromium-112.0.5615.165 + 113.1.5_ge452d82_chromium-113.0.5672.93 package_description @@ -202,5 +201,4 @@ autobuild version 1.3 - - + From 27d166700a5709603b31d0a06ff2069e520405a6 Mon Sep 17 00:00:00 2001 From: Callum Linden Date: Wed, 4 Oct 2023 08:42:42 -0700 Subject: [PATCH 20/26] SL-20359: Remove Windows 32bit build from the Actions YAML file - no longer required --- .github/workflows/build.yaml | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 9092893..83e8e3c 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -1,20 +1,11 @@ name: Build on: [push] -env: - ACTIONS_RUNNER_DEBUG: true jobs: build: strategy: matrix: - os: [windows-2022] + os: [windows-2022, macos-13] addrsize: ["64"] - include: - - os: windows-2022 - addrsize: "32" - - os: macos - tag: self-hosted - addrsize: "64" - continue-on-error: false runs-on: ${{ matrix.os }} steps: - uses: secondlife/action-autobuild@v3 From da427b5635c2a9e1ab6657a30dab144ef19abaef Mon Sep 17 00:00:00 2001 From: Callum Linden Date: Wed, 4 Oct 2023 08:43:40 -0700 Subject: [PATCH 21/26] SL-20359: Pull in the GHA Build of CEF 117.0.598.132 (the one with fixes for multiple 0days) --- autobuild.xml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/autobuild.xml b/autobuild.xml index f43aa22..10add7f 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -19,11 +19,11 @@ archive hash - 1fa98e8bf27a2acd062369b4f9c7fa366f4c6b3f + b6efadfab1663a8d22b5efddb22cdacfabd54520 hash_algorithm sha1 url - https://github.com/secondlife/cef/releases/download/v113.1.5_ge452d82_chromium-113.0.5672.93-9175570/cef_bin-113.1.5_ge452d82_chromium-113.0.5672.93-darwin64-9175570.tar.zst + https://github.com/secondlife/cef/releases/download/v117.2.2_ge80c977_chromium-117.0.5938.132-b5ecda7/cef_bin-117.2.2_ge80c977_chromium-117.0.5938.132-darwin64-b5ecda7.tar.zst name darwin64 @@ -59,18 +59,18 @@ archive hash - 12594089b986816501cb159f4af836259e34ec38 + 7668f118d96f170ff2684ea24d44b4dfb9688a20 hash_algorithm sha1 url - https://github.com/secondlife/cef/releases/download/v113.1.5_ge452d82_chromium-113.0.5672.93-9175570/cef_bin-113.1.5_ge452d82_chromium-113.0.5672.93-windows64-9175570.tar.zst + https://github.com/secondlife/cef/releases/download/v117.2.2_ge80c977_chromium-117.0.5938.132-b5ecda7/cef_bin-117.2.2_ge80c977_chromium-117.0.5938.132-windows64-b5ecda7.tar.zst name windows64 version - 113.1.5_ge452d82_chromium-113.0.5672.93 + 117.2.2_ge80c977_chromium-117.0.5938.132 package_description From 516a6969d3579c1cd0f9381c4d334bd1c5769a8a Mon Sep 17 00:00:00 2001 From: Callum Linden Date: Wed, 4 Oct 2023 09:02:37 -0700 Subject: [PATCH 22/26] SL-20359: Bump the version of Dullahan to 1.15.0 after the update of CEF to 117.x --- src/dullahan_version.h.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dullahan_version.h.in b/src/dullahan_version.h.in index 21d877e..87b7860 100644 --- a/src/dullahan_version.h.in +++ b/src/dullahan_version.h.in @@ -37,7 +37,7 @@ // version of this package #define DULLAHAN_VERSION_MAJOR 1 -#define DULLAHAN_VERSION_MINOR 13 +#define DULLAHAN_VERSION_MINOR 15 #define DULLAHAN_VERSION_POINT 0 // The build version number as of v1.2 is now the date/time the build was made From f4c78619508b4274312ffba2cc3e08ce60c494df Mon Sep 17 00:00:00 2001 From: Callum Linden Date: Wed, 4 Oct 2023 11:12:42 -0700 Subject: [PATCH 23/26] SL-20359: Bump the version of Dullahan to 1.15.1 to test GHA Release process --- src/dullahan_version.h.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dullahan_version.h.in b/src/dullahan_version.h.in index 87b7860..e38913e 100644 --- a/src/dullahan_version.h.in +++ b/src/dullahan_version.h.in @@ -38,7 +38,7 @@ // version of this package #define DULLAHAN_VERSION_MAJOR 1 #define DULLAHAN_VERSION_MINOR 15 -#define DULLAHAN_VERSION_POINT 0 +#define DULLAHAN_VERSION_POINT 1 // The build version number as of v1.2 is now the date/time the build was made // It is only regenerated if the constructed version header (dullahan_version.h) From 4626baa1e08de12a183c8591524f5a93d706307c Mon Sep 17 00:00:00 2001 From: Callum Linden Date: Wed, 4 Oct 2023 13:03:03 -0700 Subject: [PATCH 24/26] Incorporate CEF 117.0.5938.132 and call is version v1.15.3 (AND REMEMBER TO PUT A v AT START OF VERSION OR IT WON'T WORK --- src/dullahan_version.h.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dullahan_version.h.in b/src/dullahan_version.h.in index e38913e..79bebeb 100644 --- a/src/dullahan_version.h.in +++ b/src/dullahan_version.h.in @@ -38,7 +38,7 @@ // version of this package #define DULLAHAN_VERSION_MAJOR 1 #define DULLAHAN_VERSION_MINOR 15 -#define DULLAHAN_VERSION_POINT 1 +#define DULLAHAN_VERSION_POINT 3 // The build version number as of v1.2 is now the date/time the build was made // It is only regenerated if the constructed version header (dullahan_version.h) From bb8417db2e063aa3508095f2f1dd8533097ac95f Mon Sep 17 00:00:00 2001 From: Callum Linden Date: Wed, 4 Oct 2023 13:37:14 -0700 Subject: [PATCH 25/26] Incorporate CEF 117.0.5938.132 and call it version v1.14.0 --- src/dullahan_version.h.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dullahan_version.h.in b/src/dullahan_version.h.in index 79bebeb..bf392c1 100644 --- a/src/dullahan_version.h.in +++ b/src/dullahan_version.h.in @@ -37,8 +37,8 @@ // version of this package #define DULLAHAN_VERSION_MAJOR 1 -#define DULLAHAN_VERSION_MINOR 15 -#define DULLAHAN_VERSION_POINT 3 +#define DULLAHAN_VERSION_MINOR 14 +#define DULLAHAN_VERSION_POINT 0 // The build version number as of v1.2 is now the date/time the build was made // It is only regenerated if the constructed version header (dullahan_version.h) From 6b02a60f90cbeaa5e4001515bbc76a127d904faa Mon Sep 17 00:00:00 2001 From: Callum Linden Date: Fri, 13 Oct 2023 05:56:02 -0700 Subject: [PATCH 26/26] SL-20359: Incorporate v118.0.5993.54 of CEF/Chromium - no changes to Dullahan --- autobuild.xml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/autobuild.xml b/autobuild.xml index 10add7f..f593c67 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -19,11 +19,11 @@ archive hash - b6efadfab1663a8d22b5efddb22cdacfabd54520 + fe25699d025bac8925a80e43564608e15d6811c9 hash_algorithm sha1 url - https://github.com/secondlife/cef/releases/download/v117.2.2_ge80c977_chromium-117.0.5938.132-b5ecda7/cef_bin-117.2.2_ge80c977_chromium-117.0.5938.132-darwin64-b5ecda7.tar.zst + https://github.com/secondlife/cef/releases/download/v118.0.5993.54b/cef_bin-118.4.1_g3dd6078_chromium-118.0.5993.54-darwin64-9522e46.tar.zst name darwin64 @@ -59,18 +59,18 @@ archive hash - 7668f118d96f170ff2684ea24d44b4dfb9688a20 + b0a3386821d9e15715733e64cd4b83beef67b311 hash_algorithm sha1 url - https://github.com/secondlife/cef/releases/download/v117.2.2_ge80c977_chromium-117.0.5938.132-b5ecda7/cef_bin-117.2.2_ge80c977_chromium-117.0.5938.132-windows64-b5ecda7.tar.zst + https://github.com/secondlife/cef/releases/download/v118.0.5993.54b/cef_bin-118.4.1_g3dd6078_chromium-118.0.5993.54-windows64-9522e46.tar.zst name windows64 version - 117.2.2_ge80c977_chromium-117.0.5938.132 + 118.4.1_g3dd6078_chromium-118.0.5993.54 package_description