diff --git a/.gitignore b/.gitignore index 7fb91f6c..6e296a35 100644 --- a/.gitignore +++ b/.gitignore @@ -12,5 +12,6 @@ server/tachiserver-data/ # bundle asset downlaods OpenJDK*.* +zulu*jre* electron-*.* rcedit-* diff --git a/CHANGELOG.md b/CHANGELOG.md index be75d8bd..269649ac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,7 +19,9 @@ - (r852-r853) `CONTRIBUTING.md`: Add a note about this maintaining this file changelog - (r855) `CONTRIBUTING.md`: text cleanup - (r859) `CONTRIBUTING.md`: remove dumb rule -- (r862) `windows-bundler-sh`: update jre +- (r862) `windows-bundler.sh`: update jre +- (r864) add linux and macOS bundler script and launcher scripts +- (r865) fix macOS bundler script and launcher scripts ## Tachidesk-WebUI diff --git a/scripts/resources/tachidesk-browser-launcher-macOS.sh b/scripts/resources/Tachidesk Browser Launcher.command similarity index 70% rename from scripts/resources/tachidesk-browser-launcher-macOS.sh rename to scripts/resources/Tachidesk Browser Launcher.command index edc041fd..c4a272b1 100755 --- a/scripts/resources/tachidesk-browser-launcher-macOS.sh +++ b/scripts/resources/Tachidesk Browser Launcher.command @@ -1,3 +1,3 @@ -#!/bin/sh +cd "`dirname "$0"`" ./jre/Contents/Home/bin/java -jar Tachidesk.jar \ No newline at end of file diff --git a/scripts/resources/tachidesk-debug-launcher-macOS.sh b/scripts/resources/Tachidesk Debug Launcher.command similarity index 84% rename from scripts/resources/tachidesk-debug-launcher-macOS.sh rename to scripts/resources/Tachidesk Debug Launcher.command index ae8f5184..79514fb5 100755 --- a/scripts/resources/tachidesk-debug-launcher-macOS.sh +++ b/scripts/resources/Tachidesk Debug Launcher.command @@ -1,3 +1,3 @@ -#!/bin/sh +cd "`dirname "$0"`" ./jre/Contents/Home/bin/java -Dsuwayomi.tachidesk.config.server.debugLogsEnabled=true -jar Tachidesk.jar diff --git a/scripts/resources/tachidesk-electron-launcher-macOS.sh b/scripts/resources/Tachidesk Electron Launcher.command similarity index 91% rename from scripts/resources/tachidesk-electron-launcher-macOS.sh rename to scripts/resources/Tachidesk Electron Launcher.command index 79cf9e2c..a611702c 100755 --- a/scripts/resources/tachidesk-electron-launcher-macOS.sh +++ b/scripts/resources/Tachidesk Electron Launcher.command @@ -1,3 +1,3 @@ -#!/bin/sh +cd "`dirname "$0"`" ./jre/Contents/Home/bin/java "-Dsuwayomi.tachidesk.config.server.webUIInterface=electron" "-Dsuwayomi.tachidesk.config.server.electronPath=electron/Electron.app/Contents/MacOS/Electron" -jar Tachidesk.jar \ No newline at end of file diff --git a/scripts/resources/tachidesk-browser-launcher-linux.sh b/scripts/resources/tachidesk-browser-launcher.sh similarity index 100% rename from scripts/resources/tachidesk-browser-launcher-linux.sh rename to scripts/resources/tachidesk-browser-launcher.sh diff --git a/scripts/resources/tachidesk-debug-launcher-linux.sh b/scripts/resources/tachidesk-debug-launcher.sh similarity index 100% rename from scripts/resources/tachidesk-debug-launcher-linux.sh rename to scripts/resources/tachidesk-debug-launcher.sh diff --git a/scripts/resources/tachidesk-electron-launcher-linux.sh b/scripts/resources/tachidesk-electron-launcher.sh similarity index 100% rename from scripts/resources/tachidesk-electron-launcher-linux.sh rename to scripts/resources/tachidesk-electron-launcher.sh diff --git a/scripts/unix-bundler.sh b/scripts/unix-bundler.sh index 64892a94..30f2cf2d 100755 --- a/scripts/unix-bundler.sh +++ b/scripts/unix-bundler.sh @@ -12,12 +12,20 @@ if [ $1 = "linux-x64" ]; then jre="OpenJDK8U-jre_x64_linux_hotspot_8u302b08.tar.gz" jre_release="jdk8u302-b08" jre_url="https://github.com/adoptium/temurin8-binaries/releases/download/$jre_release/$jre" + jre_dir="$jre_release-jre" electron="electron-$electron_version-linux-x64.zip" elif [ $1 = "macOS-x64" ]; then jre="OpenJDK8U-jre_x64_mac_hotspot_8u302b08.tar.gz" jre_release="jdk8u302-b08" jre_url="https://github.com/adoptium/temurin8-binaries/releases/download/$jre_release/$jre" + jre_dir="$jre_release-jre" electron="electron-$electron_version-darwin-x64.zip" +elif [ $1 = "macOS-arm64" ]; then + jre="zulu8.56.0.23-ca-jre8.0.302-macosx_aarch64.tar.gz" + jre_release="zulu8.56.0.23-ca-jre8.0.302-macosx_aarch64" + jre_url="https://cdn.azul.com/zulu/bin/$jre" + jre_dir="$jre_release" + electron="electron-$electron_version-darwin-arm64.zip" else echo "Unsupported arch value: $1" exit 1 @@ -25,7 +33,6 @@ fi arch="$1" os=$(echo $arch | cut -d '-' -f1) -jre_dir="$jre_release-jre" echo "creating $arch bundle" @@ -53,9 +60,15 @@ unzip $electron -d $release_name/electron # copy artifacts cp $jar $release_name/Tachidesk.jar -cp "resources/tachidesk-browser-launcher-$os.sh" "$release_name/tachidesk-browser-launcher.sh" -cp "resources/tachidesk-debug-launcher-$os.sh" "$release_name/tachidesk-debug-launcher.sh" -cp "resources/tachidesk-electron-launcher-$os.sh" "$release_name/tachidesk-electron-launcher.sh" +if [ $os = linux ]; then + cp "resources/tachidesk-browser-launcher.sh" $release_name + cp "resources/tachidesk-debug-launcher.sh" $release_name + cp "resources/tachidesk-electron-launcher.sh" $release_name +elif [ $os = macOS ]; then + cp "resources/Tachidesk Browser Launcher.command" $release_name + cp "resources/Tachidesk Debug Launcher.command" $release_name + cp "resources/Tachidesk Electron Launcher.command" $release_name +fi archive_name="" if [ $os = linux ]; then