From fc16a1d08744da21b818561aeb6d0eae9a1b97c3 Mon Sep 17 00:00:00 2001 From: Fritz Windisch Date: Mon, 7 Aug 2023 15:59:20 +0200 Subject: [PATCH] Begin build scripts for jetbrains cef --- DockerfileLinux | 1 - DockerfileWindows | 1 - macosx_codesign.sh | 1 + patch/CMakeLists.txt.patch | 44 -------------------------------------- scripts/run_linux.sh | 5 +---- scripts/run_windows.bat | 2 -- 6 files changed, 2 insertions(+), 52 deletions(-) delete mode 100644 patch/CMakeLists.txt.patch diff --git a/DockerfileLinux b/DockerfileLinux index cb380f9..72f74ff 100644 --- a/DockerfileLinux +++ b/DockerfileLinux @@ -22,7 +22,6 @@ 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 . diff --git a/DockerfileWindows b/DockerfileWindows index 6ac59fb..4206f34 100644 --- a/DockerfileWindows +++ b/DockerfileWindows @@ -4,7 +4,6 @@ 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 . diff --git a/macosx_codesign.sh b/macosx_codesign.sh index 9523a90..85a1ae6 100755 --- a/macosx_codesign.sh +++ b/macosx_codesign.sh @@ -45,6 +45,7 @@ codesign --force --options runtime --entitlements "$ENTITLEMENTS_BROWSER" --sign 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" +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" diff --git a/patch/CMakeLists.txt.patch b/patch/CMakeLists.txt.patch deleted file mode 100644 index 18187f7..0000000 --- a/patch/CMakeLists.txt.patch +++ /dev/null @@ -1,44 +0,0 @@ -# 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() - diff --git a/scripts/run_linux.sh b/scripts/run_linux.sh index 78ba962..e773556 100644 --- a/scripts/run_linux.sh +++ b/scripts/run_linux.sh @@ -26,10 +26,7 @@ if [ ! -f "/jcef/README.md" ]; then else echo "Found existing files to build" cd /jcef -fi - -#CMakeLists patching -python3 /builder/patch_cmake.py CMakeLists.txt /builder/CMakeLists.txt.patch +fi # Create and enter the `jcef_build` directory. # The `jcef_build` directory name is required by other JCEF tooling diff --git a/scripts/run_windows.bat b/scripts/run_windows.bat index 6496b8e..263394f 100644 --- a/scripts/run_windows.bat +++ b/scripts/run_windows.bat @@ -12,8 +12,6 @@ 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 CMakeLists.txt C:/CMakeLists.txt.patch :: Prepare build dir mkdir jcef_build && cd jcef_build