Skip to content

Commit

Permalink
Add linux support
Browse files Browse the repository at this point in the history
Enable linux builds.
  • Loading branch information
bennettgoble committed Jan 27, 2024
1 parent 9522e46 commit 93e0eaf
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ jobs:
build:
strategy:
matrix:
os: [windows-large]
os: [windows-large, linux-large]
addrsize: ["64"]
include:
- os: macos
Expand Down
4 changes: 2 additions & 2 deletions autobuild.xml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
<key>name</key>
<string>darwin64</string>
</map>
<key>linux</key>
<key>linux64</key>
<map>
<key>build_directory</key>
<string>stage</string>
Expand All @@ -81,7 +81,7 @@
<string>resources/*</string>
</array>
<key>name</key>
<string>linux</string>
<string>linux64</string>
</map>
<key>windows</key>
<map>
Expand Down
16 changes: 11 additions & 5 deletions build-cmd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ cef_stage_dir="${stage}/cef"
# can make it difficult to find the branch number to use. This page can help:
# https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding
# E.G. Branch 5993 represents Chromium/CEF 118.x
cef_branch_number=5993
cef_branch_number=6167

# Turn on the proprietary codec support (the main reason for building from source vs using
# the Spotify open source builds here https://cef-builds.spotifycdn.com/index.html)
Expand Down Expand Up @@ -114,7 +114,7 @@ case "$AUTOBUILD_PLATFORM" in
rm "$stage"/version.{obj,exe}
;;

darwin64)
darwin64|linux64)
# the directory where CEF is built. The documentation suggests that on
# Windows at least, this shouldn't be in a subdirectory since the
# complex build process generates enormous path names. This means we
Expand Down Expand Up @@ -158,7 +158,12 @@ case "$AUTOBUILD_PLATFORM" in
# the location of the distributable files is based on the long, complex CEF/Chromium
# version numbers and that makes it difficult to deduce and find so we invoke the
# automate-git.py option to set the sub-dir ourselves
cef_distrib_subdir="cef_binary_macosx"
cef_distrib_subdir="cef_binary_$AUTOBUILD_PLATFORM"

cef_build_target="cefclient"
if [[ "$AUTOBUILD_PLATFORM" == "linux64" ]]; then
cef_build_target="cefsimple"
fi

# The main build script that does everything and based on command line parameter
# (--client-distrib) also generates the distributable packages just like we used
Expand All @@ -175,7 +180,8 @@ case "$AUTOBUILD_PLATFORM" in
--no-debug-tests \
--no-release-tests \
--distrib-subdir="$cef_distrib_subdir" \
--with-pgo-profiles
--with-pgo-profiles \
--build-target="$cef_build_target"

# copy over the bits of the build we need to package
cp -R "$cef_build_dir/code/chromium_git/chromium/src/cef/binary_distrib/$cef_distrib_subdir/" "$cef_stage_dir/"
Expand All @@ -200,7 +206,7 @@ case "$AUTOBUILD_PLATFORM" in
"$stage/version" > "$stage/version.txt"
;;

linux*)
*)
echo "This project is not currently supported for $AUTOBUILD_PLATFORM" 1>&2 ; exit 1
;;
esac

0 comments on commit 93e0eaf

Please sign in to comment.