Move to Zulu JRE (#1675)
* Move `apt` commands behind `$CI` Same as for the windows command, no need to rerun this every time * Use fallback to avoid unbound variables * Scripts: Switch to Zulu JRE * workflows: Switch to zulu JDK * fix: Launcher requires sun.awt.* exports * Update renovate for Zulu
This commit is contained in:
+29
-31
@@ -42,6 +42,10 @@ main() {
|
||||
gcc -fPIC -I$JAVA_HOME/include -I$JAVA_HOME/include/linux -shared scripts/resources/catch_abort.c -lpthread -o scripts/resources/catch_abort.so
|
||||
fi
|
||||
|
||||
JRE_ZULU="21.44.17_21.0.8"
|
||||
JRE_RELEASE="jre${JRE_ZULU#*_}" # e.g. jre21.0.8
|
||||
ZULU_RELEASE="zulu${JRE_ZULU%_*}" # e.g. zulu21.44.17
|
||||
|
||||
case "$OS" in
|
||||
debian-all)
|
||||
RELEASE="$RELEASE_NAME.deb"
|
||||
@@ -49,11 +53,9 @@ main() {
|
||||
move_release_to_output_dir
|
||||
;;
|
||||
appimage)
|
||||
# https://github.com/adoptium/temurin21-binaries/releases/
|
||||
JRE_RELEASE="jdk-21.0.8+9"
|
||||
JRE="OpenJDK21U-jre_x64_linux_hotspot_$(echo "$JRE_RELEASE" | sed 's/jdk//;s/-//g;s/+/_/g').tar.gz"
|
||||
JRE_DIR="$JRE_RELEASE-jre"
|
||||
JRE_URL="https://github.com/adoptium/temurin21-binaries/releases/download/$JRE_RELEASE/$JRE"
|
||||
JRE="$ZULU_RELEASE-ca-$JRE_RELEASE-linux_x64.zip"
|
||||
JRE_DIR="${JRE%.*}"
|
||||
JRE_URL="https://cdn.azul.com/zulu/bin/$JRE"
|
||||
setup_jre
|
||||
|
||||
RELEASE="$RELEASE_NAME.AppImage"
|
||||
@@ -67,11 +69,9 @@ main() {
|
||||
move_release_to_output_dir
|
||||
;;
|
||||
linux-x64)
|
||||
# https://github.com/adoptium/temurin21-binaries/releases/
|
||||
JRE_RELEASE="jdk-21.0.8+9"
|
||||
JRE="OpenJDK21U-jre_x64_linux_hotspot_$(echo "$JRE_RELEASE" | sed 's/jdk//;s/-//g;s/+/_/g').tar.gz"
|
||||
JRE_DIR="$JRE_RELEASE-jre"
|
||||
JRE_URL="https://github.com/adoptium/temurin21-binaries/releases/download/$JRE_RELEASE/$JRE"
|
||||
JRE="$ZULU_RELEASE-ca-$JRE_RELEASE-linux_x64.zip"
|
||||
JRE_DIR="${JRE%.*}"
|
||||
JRE_URL="https://cdn.azul.com/zulu/bin/$JRE"
|
||||
ELECTRON="electron-$electron_version-linux-x64.zip"
|
||||
ELECTRON_URL="https://github.com/electron/electron/releases/download/$electron_version/$ELECTRON"
|
||||
download_electron
|
||||
@@ -83,11 +83,9 @@ main() {
|
||||
move_release_to_output_dir
|
||||
;;
|
||||
macOS-x64)
|
||||
# https://github.com/adoptium/temurin21-binaries/releases/
|
||||
JRE_RELEASE="jdk-21.0.8+9"
|
||||
JRE="OpenJDK21U-jre_x64_mac_hotspot_$(echo "$JRE_RELEASE" | sed 's/jdk//;s/-//g;s/+/_/g').tar.gz"
|
||||
JRE_DIR="$JRE_RELEASE-jre"
|
||||
JRE_URL="https://github.com/adoptium/temurin21-binaries/releases/download/$JRE_RELEASE/$JRE"
|
||||
JRE="$ZULU_RELEASE-ca-$JRE_RELEASE-macosx_x64.zip"
|
||||
JRE_DIR="${JRE%.*}"
|
||||
JRE_URL="https://cdn.azul.com/zulu/bin/$JRE"
|
||||
ELECTRON="electron-$electron_version-darwin-x64.zip"
|
||||
ELECTRON_URL="https://github.com/electron/electron/releases/download/$electron_version/$ELECTRON"
|
||||
download_electron
|
||||
@@ -99,11 +97,9 @@ main() {
|
||||
move_release_to_output_dir
|
||||
;;
|
||||
macOS-arm64)
|
||||
# https://github.com/adoptium/temurin21-binaries/releases/
|
||||
JRE_RELEASE="jdk-21.0.8+9"
|
||||
JRE="OpenJDK21U-jre_aarch64_mac_hotspot_$(echo "$JRE_RELEASE" | sed 's/jdk//;s/-//g;s/+/_/g').tar.gz"
|
||||
JRE_DIR="$JRE_RELEASE-jre"
|
||||
JRE_URL="https://github.com/adoptium/temurin21-binaries/releases/download/$JRE_RELEASE/$JRE"
|
||||
JRE="$ZULU_RELEASE-ca-$JRE_RELEASE-macosx_aarch64.zip"
|
||||
JRE_DIR="${JRE%.*}"
|
||||
JRE_URL="https://cdn.azul.com/zulu/bin/$JRE"
|
||||
ELECTRON="electron-$electron_version-darwin-arm64.zip"
|
||||
ELECTRON_URL="https://github.com/electron/electron/releases/download/$electron_version/$ELECTRON"
|
||||
download_electron
|
||||
@@ -115,11 +111,9 @@ main() {
|
||||
move_release_to_output_dir
|
||||
;;
|
||||
windows-x64)
|
||||
# https://github.com/adoptium/temurin21-binaries/releases/
|
||||
JRE_RELEASE="jdk-21.0.8+9"
|
||||
JRE="OpenJDK21U-jre_x64_windows_hotspot_$(echo "$JRE_RELEASE" | sed 's/jdk//;s/-//g;s/+/_/g').zip"
|
||||
JRE_DIR="$JRE_RELEASE-jre"
|
||||
JRE_URL="https://github.com/adoptium/temurin21-binaries/releases/download/$JRE_RELEASE/$JRE"
|
||||
JRE="$ZULU_RELEASE-ca-$JRE_RELEASE-win_x64.zip"
|
||||
JRE_DIR="${JRE%.*}"
|
||||
JRE_URL="https://cdn.azul.com/zulu/bin/$JRE"
|
||||
ELECTRON="electron-$electron_version-win32-x64.zip"
|
||||
ELECTRON_URL="https://github.com/electron/electron/releases/download/$electron_version/$ELECTRON"
|
||||
download_electron
|
||||
@@ -232,8 +226,10 @@ make_deb_package() {
|
||||
sed -i "s/\$pkgver/$RELEASE_VERSION/" "$RELEASE_NAME/$source_dir/debian/changelog"
|
||||
sed -i "s/\$pkgrel/1/" "$RELEASE_NAME/$source_dir/debian/changelog"
|
||||
|
||||
sudo apt update
|
||||
sudo apt install devscripts build-essential dh-exec
|
||||
if [ "${CI:-}" = true ]; then
|
||||
sudo apt update
|
||||
sudo apt install devscripts build-essential dh-exec
|
||||
fi
|
||||
cd "$RELEASE_NAME/$source_dir/"
|
||||
dpkg-buildpackage --no-sign --build=all
|
||||
cd -
|
||||
@@ -254,8 +250,10 @@ make_appimage() {
|
||||
cp "scripts/resources/appimage/AppRun" "$RELEASE_NAME/AppRun"
|
||||
chmod +x "$RELEASE_NAME/AppRun"
|
||||
|
||||
sudo apt update
|
||||
sudo apt install libfuse2
|
||||
if [ "${CI:-}" = true ]; then
|
||||
sudo apt update
|
||||
sudo apt install libfuse2
|
||||
fi
|
||||
curl -L $APPIMAGE_URL -o $APPIMAGE_TOOLNAME
|
||||
chmod +x $APPIMAGE_TOOLNAME
|
||||
ARCH=x86_64 ./$APPIMAGE_TOOLNAME "$RELEASE_NAME" "$RELEASE"
|
||||
@@ -267,7 +265,7 @@ make_windows_bundle() {
|
||||
##./bundler.sh: line 250: wine: command not found
|
||||
|
||||
## check if running under github actions
|
||||
#if [ "$CI" = true ]; then
|
||||
#if [ "${CI:-}" = true ]; then
|
||||
## change electron executable's icon
|
||||
#sudo dpkg --add-architecture i386
|
||||
#wget -qO - https://dl.winehq.org/wine-builds/winehq.key \
|
||||
@@ -298,7 +296,7 @@ make_windows_bundle() {
|
||||
}
|
||||
|
||||
make_windows_package() {
|
||||
if [ "$CI" = true ]; then
|
||||
if [ "${CI:-}" = true ]; then
|
||||
sudo apt update
|
||||
sudo apt install -y wixl
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user