aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladimir Kharitonov <Vladimir.Kharitonov@jetbrains.com>2023-04-12 15:11:17 +0200
committerVladimir Kharitonov <Vladimir.Kharitonov@jetbrains.com>2023-04-18 21:46:55 +0200
commit6fcf50d0c15aa7df791d17d825e1580fc5c479c4 (patch)
tree1228cbe3547a007454f8b8374183ebec6596e4d4
parent375bb85cf89e0e98f486b8ffe8db72ba30fcd8b3 (diff)
downloadjcef-6fcf50d0c15aa7df791d17d825e1580fc5c479c4.tar.gz
[build] macOS: add debug option in the build script
-rw-r--r--cmake/DownloadCEF.cmake7
-rw-r--r--jb/tools/mac/build.sh4
-rw-r--r--jb/tools/mac/build_native_java.sh4
-rw-r--r--jb/tools/mac/create_bundle.sh2
-rw-r--r--jb/tools/mac/set_env.sh4
5 files changed, 15 insertions, 6 deletions
diff --git a/cmake/DownloadCEF.cmake b/cmake/DownloadCEF.cmake
index 7e086db..0eae14f 100644
--- a/cmake/DownloadCEF.cmake
+++ b/cmake/DownloadCEF.cmake
@@ -10,7 +10,12 @@
function(DownloadCEF platform version download_dir)
# Specify the binary distribution type and download directory.
- set(CEF_DISTRIBUTION "cef_binary_${version}_${platform}_minimal")
+ if (CMAKE_BUILD_TYPE STREQUAL "Debug")
+ set(CEF_DISTRIBUTION "cef_binary_${version}_${platform}")
+ else ()
+ set(CEF_DISTRIBUTION "cef_binary_${version}_${platform}_minimal")
+ endif ()
+
set(CEF_DOWNLOAD_DIR "${download_dir}")
# The location where we expect the extracted binary distribution.
diff --git a/jb/tools/mac/build.sh b/jb/tools/mac/build.sh
index 8c6d3c3..8c679c8 100644
--- a/jb/tools/mac/build.sh
+++ b/jb/tools/mac/build.sh
@@ -13,6 +13,7 @@ function print_usage() {
echo " ANT_HOME - Path to 'ant' home, or if not set then 'ant' must be in PATH."
echo " JNF_FRAMEWORK_PATH - [optional] When no standard location is suitable."
echo " JNF_HEADERS_PATH - [optional] When no standard location is suitable."
+ echo " CEF_BUILD_TYPE - [optional] Build type(Debug or Release)"
exit "$1"
}
@@ -35,6 +36,9 @@ help) print_usage 0 ;;
*) print_usage 1 ;;
esac
+CEF_BUILD_TYPE=${CEF_BUILD_TYPE:-Release}
+export CEF_BUILD_TYPE
+
script_dir=$(cd -- "$(dirname -- "$0")" &>/dev/null && pwd)
PATH="$script_dir:$PATH"
diff --git a/jb/tools/mac/build_native_java.sh b/jb/tools/mac/build_native_java.sh
index 4b9aa52..49572d5 100644
--- a/jb/tools/mac/build_native_java.sh
+++ b/jb/tools/mac/build_native_java.sh
@@ -24,10 +24,10 @@ cd "$OUT_DIR" || exit 1
cmake -G "Xcode" -DPROJECT_ARCH="$TARGET_ARCH" ..
echo "*** run xcodebuild..."
-xcodebuild -configuration Release
+xcodebuild -configuration ${CEF_BUILD_TYPE}
echo "*** change @rpath in libjcef.dylib..."
-cd "$OUT_DIR"/native/Release || exit 1
+cd "$OUT_DIR"/native/${CEF_BUILD_TYPE} || exit 1
install_name_tool -change @rpath/libjvm.dylib @loader_path/server/libjvm.dylib libjcef.dylib
install_name_tool -change @rpath/libjawt.dylib @loader_path/libjawt.dylib libjcef.dylib
diff --git a/jb/tools/mac/create_bundle.sh b/jb/tools/mac/create_bundle.sh
index 30a9b4b..f1ab9b7 100644
--- a/jb/tools/mac/create_bundle.sh
+++ b/jb/tools/mac/create_bundle.sh
@@ -20,7 +20,7 @@ function clean {
}
export -f clean
-RELEASE_PATH="$JCEF_ROOT_DIR"/jcef_build/native/Release
+RELEASE_PATH="$JCEF_ROOT_DIR"/jcef_build/native/${CEF_BUILD_TYPE}
ARTIFACT=jcef_mac_${TARGET_ARCH}
clean arm64
diff --git a/jb/tools/mac/set_env.sh b/jb/tools/mac/set_env.sh
index bd78016..fa91fa1 100644
--- a/jb/tools/mac/set_env.sh
+++ b/jb/tools/mac/set_env.sh
@@ -8,8 +8,8 @@ export JCEF_ROOT_DIR
echo "JCEF_ROOT_DIR is $JCEF_ROOT_DIR"
export JB_TOOLS_DIR="$JCEF_ROOT_DIR"/jb/tools
export JB_TOOLS_OS_DIR="$JB_TOOLS_DIR"/mac
-export OUT_CLS_DIR="$JCEF_ROOT_DIR"/jcef_build/native/Release
-export OUT_NATIVE_DIR="$JCEF_ROOT_DIR"/jcef_build/native/Release
+export OUT_CLS_DIR="$JCEF_ROOT_DIR"/jcef_build/native/${CEF_BUILD_TYPE}
+export OUT_NATIVE_DIR="$JCEF_ROOT_DIR"/jcef_build/native/${CEF_BUILD_TYPE}
export OS=macosx
export DEPS_ARCH=universal