Add linux arm64

This commit is contained in:
FriwiDev 2021-11-16 15:39:07 +01:00
parent 903f82c696
commit 50f778a8c3
3 changed files with 39 additions and 5 deletions

32
.github/workflows/build-linux-arm64.yml vendored Normal file
View File

@ -0,0 +1,32 @@
name: build-linux-arm64
on:
workflow_dispatch:
inputs:
repo:
description: 'Git repository to clone'
required: true
default: 'https://bitbucket.org/chromiumembedded/java-cef.git'
ref:
description: 'Git commit id to checkout'
required: true
default: 'master'
jobs:
build-linux-arm64:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up QEMU
uses: docker/setup-qemu-action@master
with:
platforms: all
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
-
name: Build
run: |
chmod +x compile_linux.sh
./compile_linux.sh arm64 Release ${{ github.event.inputs.repo }} ${{ github.event.inputs.ref }}

View File

@ -137,8 +137,10 @@ if("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin")
set(CEF_PLATFORM "macosx64") set(CEF_PLATFORM "macosx64")
endif() endif()
elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
if(CMAKE_SIZEOF_VOID_P MATCHES 8) if("${PROJECT_ARCH}" STREQUAL "amd64")
set(CEF_PLATFORM "linux64") set(CEF_PLATFORM "linux64")
elseif("${PROJECT_ARCH}" STREQUAL "arm64")
set(CEF_PLATFORM "linuxarm64")
else() else()
set(CEF_PLATFORM "linux32") set(CEF_PLATFORM "linux32")
endif() endif()

View File

@ -21,14 +21,14 @@ fi
mkdir jcef_build && cd jcef_build mkdir jcef_build && cd jcef_build
# Linux: Generate 32/64-bit Unix Makefiles. # Linux: Generate 32/64-bit Unix Makefiles.
cmake -G "Ninja" -DCMAKE_BUILD_TYPE=${BUILD_TYPE} .. cmake -G "Ninja" -DPROJECT_ARCH=${TARGETARCH} -DCMAKE_BUILD_TYPE=${BUILD_TYPE} ..
# Build native part using ninja. # Build native part using ninja.
ninja -j4 ninja -j4
#Compile JCEF java classes #Compile JCEF java classes
cd ../tools cd ../tools
chmod +x compile.sh chmod +x compile.sh
if [ ${TARGETARCH} == 'amd64' ]; then if [ ${TARGETARCH} == 'amd64' ] || [ ${TARGETARCH} == 'arm64' ]; then
./compile.sh linux64 ./compile.sh linux64
else else
./compile.sh linux32 ./compile.sh linux32
@ -36,14 +36,14 @@ fi
#Generate distribution #Generate distribution
chmod +x make_distrib.sh chmod +x make_distrib.sh
if [ ${TARGETARCH} == 'amd64' ]; then if [ ${TARGETARCH} == 'amd64' ] || [ ${TARGETARCH} == 'arm64' ]; then
./make_distrib.sh linux64 ./make_distrib.sh linux64
else else
./make_distrib.sh linux32 ./make_distrib.sh linux32
fi fi
#Pack binary_distrib #Pack binary_distrib
if [ ${TARGETARCH} == 'amd64' ]; then if [ ${TARGETARCH} == 'amd64' ] || [ ${TARGETARCH} == 'arm64' ]; then
cd ../binary_distrib/linux64 cd ../binary_distrib/linux64
if [ ${BUILD_TYPE} == 'Release' ]; then (echo "Stripping binary..." && strip bin/lib/linux64/libcef.so) fi if [ ${BUILD_TYPE} == 'Release' ]; then (echo "Stripping binary..." && strip bin/lib/linux64/libcef.so) fi
else else