mirror of
https://github.com/jcefmaven/jcefbuild.git
synced 2025-11-28 02:49:22 +08:00
Compare commits
33 Commits
version/je
...
1.0.61
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
72331273d2 | ||
|
|
ff30b8d44f | ||
|
|
ea8fdd910f | ||
|
|
e4cf9046f6 | ||
|
|
af9b8de088 | ||
|
|
5c2aed1e6e | ||
|
|
1b6ca87f95 | ||
|
|
2791e80fbd | ||
|
|
69fe5607fe | ||
|
|
da859aba74 | ||
|
|
2a837a2972 | ||
|
|
0d81f8bb0e | ||
|
|
ac6e95a0fe | ||
|
|
8209cae757 | ||
|
|
ca106fb3d4 | ||
|
|
4b0b6038f5 | ||
|
|
76603285f2 | ||
|
|
2c2aad9a15 | ||
|
|
337fe4679d | ||
|
|
e4f8565721 | ||
|
|
be672489ad | ||
|
|
ff5fc9020a | ||
|
|
64bb73c837 | ||
|
|
47ff1bd3ea | ||
|
|
e9aeb06788 | ||
|
|
cf017d26fe | ||
|
|
3c775d3765 | ||
|
|
1a11a80d67 | ||
|
|
4cea794a99 | ||
|
|
5b834e3e56 | ||
|
|
93c173340a | ||
|
|
0bf27250e3 | ||
|
|
b6c0abdd15 |
6
.github/workflows/build-all.yml
vendored
6
.github/workflows/build-all.yml
vendored
@@ -207,6 +207,9 @@ jobs:
|
||||
with:
|
||||
java-version: '8'
|
||||
distribution: 'adopt'
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.10.11'
|
||||
- name: Install Apple certificate
|
||||
env:
|
||||
BUILD_CERTIFICATE_BASE64: ${{ secrets.APPLE_BUILD_CERTIFICATE_BASE64 }}
|
||||
@@ -274,6 +277,9 @@ jobs:
|
||||
with:
|
||||
java-version: '8'
|
||||
distribution: 'adopt'
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.10.11'
|
||||
- name: Install Apple certificate
|
||||
env:
|
||||
BUILD_CERTIFICATE_BASE64: ${{ secrets.APPLE_BUILD_CERTIFICATE_BASE64 }}
|
||||
|
||||
3
.github/workflows/build-macosx-amd64.yml
vendored
3
.github/workflows/build-macosx-amd64.yml
vendored
@@ -27,6 +27,9 @@ jobs:
|
||||
with:
|
||||
java-version: '8'
|
||||
distribution: 'adopt'
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.10.11'
|
||||
- name: Install Apple certificate
|
||||
env:
|
||||
BUILD_CERTIFICATE_BASE64: ${{ secrets.APPLE_BUILD_CERTIFICATE_BASE64 }}
|
||||
|
||||
3
.github/workflows/build-macosx-arm64.yml
vendored
3
.github/workflows/build-macosx-arm64.yml
vendored
@@ -27,6 +27,9 @@ jobs:
|
||||
with:
|
||||
java-version: '8'
|
||||
distribution: 'adopt'
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.10.11'
|
||||
- name: Install Apple certificate
|
||||
env:
|
||||
BUILD_CERTIFICATE_BASE64: ${{ secrets.APPLE_BUILD_CERTIFICATE_BASE64 }}
|
||||
|
||||
@@ -22,6 +22,7 @@ COPY natives /natives
|
||||
|
||||
#Copy cmake patching script
|
||||
COPY scripts/patch_cmake.py .
|
||||
COPY patch/CMakeLists.txt.patch .
|
||||
|
||||
#Copy and launch run script
|
||||
COPY scripts/run_linux.sh .
|
||||
@@ -31,7 +32,7 @@ RUN ./run_linux.sh
|
||||
#Export built files
|
||||
FROM scratch AS export-stage
|
||||
COPY --from=stage /jcef/binary_distrib.tar.gz .
|
||||
COPY --from=stage /jcef/target target
|
||||
COPY --from=stage /jcef/third_party third_party
|
||||
COPY --from=stage /jcef/buildtools buildtools
|
||||
COPY --from=stage /jcef/jcef_build jcef_build
|
||||
#COPY --from=stage /jcef/target target
|
||||
#COPY --from=stage /jcef/third_party third_party
|
||||
#COPY --from=stage /jcef/buildtools buildtools
|
||||
#COPY --from=stage /jcef/jcef_build jcef_build
|
||||
|
||||
@@ -19,9 +19,6 @@ WORKDIR /builder
|
||||
#Copy existing sources, if any
|
||||
COPY jcef /jcef
|
||||
|
||||
#Copy cmake patching script
|
||||
COPY scripts/patch_cmake.py .
|
||||
|
||||
#Copy and launch run script
|
||||
COPY scripts/run_linux_prebuild.sh .
|
||||
RUN chmod +x run_linux_prebuild.sh
|
||||
|
||||
@@ -4,6 +4,7 @@ WORKDIR C:/
|
||||
|
||||
#Copy cmake patching script
|
||||
COPY scripts/patch_cmake.py .
|
||||
COPY patch/CMakeLists.txt.patch .
|
||||
|
||||
#Copy and launch run script
|
||||
COPY scripts/run_windows.bat .
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>Java</b></td>
|
||||
<td>OpenJDK 17</td>
|
||||
<td>OpenJDK 11</td>
|
||||
<td>Oracle JDK 8</td>
|
||||
<td>Microsoft JDK 11</td>
|
||||
<td>Temurin JDK 8</td>
|
||||
@@ -27,8 +27,8 @@
|
||||
<tr>
|
||||
<td><b>Compiler</b></td>
|
||||
<td>GCC 10</td>
|
||||
<td>VS 2022</td>
|
||||
<td>VS 2022</td>
|
||||
<td>VS 2019</td>
|
||||
<td>VS 2019</td>
|
||||
<td>Xcode 13</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
@@ -70,9 +70,13 @@ if [ -f "out/buildtools/clang-format" ]; then
|
||||
fi
|
||||
|
||||
#Move jcef_build
|
||||
rm -rf jcef/jcef_build
|
||||
mv out/jcef_build jcef/jcef_build
|
||||
if [ -f "out/jcef_build" ]; then
|
||||
rm -rf jcef/jcef_build
|
||||
mv out/jcef_build jcef/jcef_build
|
||||
fi
|
||||
|
||||
#Move target to binary_distrib
|
||||
rm -rf jcef/binary_distrib
|
||||
mv out/target jcef/binary_distrib
|
||||
if [ -f "out/target" ]; then
|
||||
rm -rf jcef/binary_distrib
|
||||
mv out/target jcef/binary_distrib
|
||||
fi
|
||||
|
||||
@@ -45,10 +45,6 @@ else
|
||||
cd jcef
|
||||
fi
|
||||
|
||||
#CMake patching
|
||||
python3 ../scripts/patch_cmake.py cmake/DownloadCEF.cmake
|
||||
python3 ../scripts/patch_cmake.py CMakeLists.txt
|
||||
|
||||
# Create and enter the `jcef_build` directory.
|
||||
# The `jcef_build` directory name is required by other JCEF tooling
|
||||
# and should not be changed.
|
||||
@@ -59,9 +55,9 @@ cd jcef_build
|
||||
|
||||
# MacOS: Generate amd64/arm64 Makefiles.
|
||||
if [ ${TARGETARCH} == 'amd64' ]; then
|
||||
cmake -G "Ninja" -DPROJECT_ARCH="x86_64" -DCMAKE_OSX_ARCHITECTURES="x86_64" -DCMAKE_BUILD_TYPE=${BUILD_TYPE} ..
|
||||
cmake -G "Ninja" -DPROJECT_ARCH="x86_64" -DCMAKE_BUILD_TYPE=${BUILD_TYPE} ..
|
||||
else
|
||||
cmake -G "Ninja" -DPROJECT_ARCH="arm64" -DCMAKE_OSX_ARCHITECTURES="arm64" -DCMAKE_BUILD_TYPE=${BUILD_TYPE} ..
|
||||
cmake -G "Ninja" -DPROJECT_ARCH="arm64" -DCMAKE_BUILD_TYPE=${BUILD_TYPE} ..
|
||||
fi
|
||||
# Build native part using ninja.
|
||||
ninja -j4
|
||||
|
||||
@@ -28,6 +28,7 @@ chmod +x macosx_codesign_zip.sh
|
||||
|
||||
#Sign helpers
|
||||
echo "Signing helpers..."
|
||||
cd "$( dirname "$0" )"
|
||||
codesign --force --options runtime --entitlements "$ENTITLEMENTS_HELPER" --sign "$2" --timestamp --verbose "$APP_DIR/$APP_NAME/$FRAMEWORKS_DIR/jcef Helper.app"
|
||||
bash macosx_notarize.sh "$APP_DIR/$APP_NAME/$FRAMEWORKS_DIR/jcef Helper.app" "$2" $3 org.jcef.jcef.helper $4 $5 $6
|
||||
codesign --force --options runtime --entitlements "$ENTITLEMENTS_HELPER" --sign "$2" --timestamp --verbose "$APP_DIR/$APP_NAME/$FRAMEWORKS_DIR/jcef Helper (GPU).app"
|
||||
@@ -44,9 +45,8 @@ echo "Signing libraries and framework..."
|
||||
codesign --force --options runtime --entitlements "$ENTITLEMENTS_BROWSER" --sign "$2" --timestamp --verbose "$APP_DIR/$APP_NAME/$FRAMEWORKS_DIR/$FRAMEWORK_NAME/Libraries/libEGL.dylib"
|
||||
codesign --force --options runtime --entitlements "$ENTITLEMENTS_BROWSER" --sign "$2" --timestamp --verbose "$APP_DIR/$APP_NAME/$FRAMEWORKS_DIR/$FRAMEWORK_NAME/Libraries/libGLESv2.dylib"
|
||||
codesign --force --options runtime --entitlements "$ENTITLEMENTS_BROWSER" --sign "$2" --timestamp --verbose "$APP_DIR/$APP_NAME/$FRAMEWORKS_DIR/$FRAMEWORK_NAME/Libraries/libvk_swiftshader.dylib"
|
||||
codesign --force --options runtime --entitlements "$ENTITLEMENTS_BROWSER" --sign "$2" --timestamp --verbose "$APP_DIR/$APP_NAME/$FRAMEWORKS_DIR/$FRAMEWORK_NAME/Chromium Embedded Framework"
|
||||
codesign --force --options runtime --entitlements "$ENTITLEMENTS_BROWSER" --sign "$2" --timestamp --verbose "$APP_DIR/$APP_NAME/$FRAMEWORKS_DIR/$FRAMEWORK_NAME"
|
||||
touch "$APP_DIR/$APP_NAME/$FRAMEWORKS_DIR/$FRAMEWORK_NAME/Contents/CodeResources" # Small trick to not let the validate action fail
|
||||
bash macosx_notarize.sh "$APP_DIR/$APP_NAME/$FRAMEWORKS_DIR/$FRAMEWORK_NAME" "$2" $3 org.cef.framework $4 $5 $6
|
||||
codesign --force --options runtime --entitlements "$ENTITLEMENTS_BROWSER" --sign "$2" --timestamp --verbose "$APP_DIR/$APP_NAME/Contents/Java/libjcef.dylib"
|
||||
bash macosx_codesign_zip.sh "$APP_DIR/$APP_NAME/Contents/Java/gluegen-rt-natives-macosx-universal.jar" "natives/macosx-universal/libgluegen_rt.dylib" "$2"
|
||||
bash macosx_codesign_zip.sh "$APP_DIR/$APP_NAME/Contents/Java/jogl-all-natives-macosx-universal.jar" "natives/macosx-universal/libnativewindow_awt.dylib" "$2"
|
||||
|
||||
44
patch/CMakeLists.txt.patch
Normal file
44
patch/CMakeLists.txt.patch
Normal file
@@ -0,0 +1,44 @@
|
||||
# Determine the platform.
|
||||
if("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin")
|
||||
if("${PROJECT_ARCH}" STREQUAL "arm64")
|
||||
set(CEF_PLATFORM "macosarm64")
|
||||
else()
|
||||
set(CEF_PLATFORM "macosx64")
|
||||
endif()
|
||||
elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
|
||||
if("${PROJECT_ARCH}" STREQUAL "amd64")
|
||||
set(CEF_PLATFORM "linux64")
|
||||
elseif("${PROJECT_ARCH}" STREQUAL "arm64")
|
||||
set(CEF_PLATFORM "linuxarm64")
|
||||
elseif("${PROJECT_ARCH}" STREQUAL "arm/v6")
|
||||
set(CEF_PLATFORM "linuxarm")
|
||||
else()
|
||||
set(CEF_PLATFORM "linux32")
|
||||
endif()
|
||||
elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows")
|
||||
#Stolen from Jetbrains jcef repository for the arm64 windows build
|
||||
if(MSVC)
|
||||
include(CheckSymbolExists)
|
||||
|
||||
# MSVC predefines _M_ARM64 for compilations that target ARM64
|
||||
# and _M_AMD64 for compilations that target x86_64.
|
||||
check_symbol_exists("_M_ARM64" "" CEF_PLATFORM_WINARM64)
|
||||
check_symbol_exists("_M_AMD64" "" CEF_PLATFORM_WIN64)
|
||||
|
||||
# We also should set PROJECT_ARCH explicitly because FindCEF.cmake deduces it incorrectly for
|
||||
# cross-compilation cases.
|
||||
if(CEF_PLATFORM_WINARM64)
|
||||
set(CEF_PLATFORM "windowsarm64")
|
||||
set(PROJECT_ARCH "arm64")
|
||||
elseif(CEF_PLATFORM_WIN64)
|
||||
set(CEF_PLATFORM "windows64")
|
||||
set(PROJECT_ARCH "x86_64")
|
||||
else()
|
||||
set(CEF_PLATFORM "windows32")
|
||||
set(PROJECT_ARCH "x86")
|
||||
endif()
|
||||
else()
|
||||
message(FATAL_ERROR "Building JCEF for Windows using non-MSVC compiler is not supported.")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
PYTHON=python3
|
||||
|
||||
brew install ninja
|
||||
"$PYTHON" -m pip install --ignore-installed six
|
||||
|
||||
"$PYTHON" -m pip list
|
||||
echo "from six.moves import configparser" | "$PYTHON" && echo "Success importing stuff from six moves python module"
|
||||
|
||||
@@ -1,23 +1,35 @@
|
||||
#Small script to patch our cmake download locations
|
||||
#Usage: python patch_cmake.py <file>
|
||||
#Small script to patch CMakeLists.txt files with custom build options
|
||||
#Will replace file contents between two markers ("Determine the platform"
|
||||
#and "Add this project's cmake")
|
||||
#Usage: python patch_cmake.py <input> <patch>
|
||||
|
||||
import sys
|
||||
|
||||
input = sys.argv[1]
|
||||
patch = sys.argv[2]
|
||||
|
||||
print("Patching "+input+"...")
|
||||
print("Patching "+input+" to accept further build architectures...")
|
||||
|
||||
f = open(input, "r")
|
||||
p = open(patch, "r")
|
||||
result = ""
|
||||
inpatch = False
|
||||
for x in f:
|
||||
result += x.replace("https://cache-redirector.jetbrains.com/intellij-jbr/", "https://cef-builds.spotifycdn.com/") \
|
||||
.replace("_minimal", "") \
|
||||
.replace(".zip", ".tar.bz2") \
|
||||
.replace(".checksum", ".sha1") \
|
||||
.replace("SHA256", "SHA1") \
|
||||
.replace("x86_64", "amd64")
|
||||
if x.startswith("# Determine the platform"):
|
||||
inpatch = True
|
||||
for y in p:
|
||||
result += y
|
||||
elif x.startswith("# Add this project's cmake"):
|
||||
inpatch = False
|
||||
if inpatch == False:
|
||||
#Patch minimum cmake version to not break our builds on linux
|
||||
if x.startswith("cmake_minimum_required"):
|
||||
result += "cmake_minimum_required(VERSION 3.13)\n"
|
||||
else:
|
||||
result += x
|
||||
|
||||
f.close()
|
||||
p.close()
|
||||
|
||||
f = open(input, "w")
|
||||
f.write(result)
|
||||
|
||||
@@ -9,9 +9,6 @@ if [ ${TARGETARCH} == 'arm/v6' ]; then
|
||||
export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-armel
|
||||
fi
|
||||
|
||||
export PATH=$PATH:/usr/lib/jvm/openjdk-17/bin
|
||||
export JAVA_HOME=/usr/lib/jvm/openjdk-17
|
||||
|
||||
# Print some debug info
|
||||
echo "-------------------------------------"
|
||||
echo "JAVA_HOME: $JAVA_HOME"
|
||||
@@ -29,11 +26,10 @@ if [ ! -f "/jcef/README.md" ]; then
|
||||
else
|
||||
echo "Found existing files to build"
|
||||
cd /jcef
|
||||
fi
|
||||
fi
|
||||
|
||||
#CMake patching
|
||||
python3 /builder/patch_cmake.py cmake/DownloadCEF.cmake
|
||||
python3 /builder/patch_cmake.py CMakeLists.txt
|
||||
#CMakeLists patching
|
||||
python3 /builder/patch_cmake.py CMakeLists.txt /builder/CMakeLists.txt.patch
|
||||
|
||||
# Create and enter the `jcef_build` directory.
|
||||
# The `jcef_build` directory name is required by other JCEF tooling
|
||||
|
||||
@@ -25,10 +25,6 @@ else
|
||||
cd /jcef
|
||||
fi
|
||||
|
||||
#CMake patching
|
||||
python3 /builder/patch_cmake.py cmake/DownloadCEF.cmake
|
||||
python3 /builder/patch_cmake.py CMakeLists.txt
|
||||
|
||||
# Create and enter the `jcef_build` directory.
|
||||
# The `jcef_build` directory name is required by other JCEF tooling
|
||||
# and should not be changed.
|
||||
|
||||
@@ -12,8 +12,8 @@ if exist "jcef\README.md" (echo "Found existing files to build" && cd jcef) ^
|
||||
else (echo "Did not find files to build - cloning..." && GOTO :CLONE)
|
||||
|
||||
:BUILD
|
||||
:: CMakeLists patching
|
||||
python C:/patch_cmake.py cmake/DownloadCEF.cmake
|
||||
:: CMakeLists patching
|
||||
python C:/patch_cmake.py CMakeLists.txt C:/CMakeLists.txt.patch
|
||||
|
||||
:: Prepare build dir
|
||||
mkdir jcef_build && cd jcef_build
|
||||
|
||||
Reference in New Issue
Block a user