Seperated scripts to install customJre both in release and debug versions

This commit is contained in:
2025-12-31 14:18:06 +00:00
parent 16d5d3d3ca
commit f6c9636db1
3 changed files with 47 additions and 0 deletions

47
installJRERelease.sh Executable file
View File

@@ -0,0 +1,47 @@
#!/usr/bin/env bash
set -e
PLATFORM=$1
if [ -z "$PLATFORM" ]; then
echo "Usage: $0 <platform: macos|linux|windows>"
exit 1
fi
PROJECT_DIR=$(pwd)
case "$PLATFORM" in
macos)
# Locate Flutter macOS build output
JRE_SRC="/Users/kevin/IdeaProjects/k3vinb5_aniyomi_bridge/jre/$PLATFORM/customjre"
if [ ! -d "$JRE_SRC" ]; then
echo "Error: JRE source folder not found: $JRE_SRC"
exit 1
fi
APP_BUNDLE="$PROJECT_DIR/build/macos/Build/Products/Release/unyo.app"
RESOURCES_DIR="$APP_BUNDLE/Contents/Resources"
mkdir -p "$RESOURCES_DIR/jre"
cp -R "$JRE_SRC" "$RESOURCES_DIR/jre/"
echo "Copied custom JRE to $RESOURCES_DIR/jre/"
;;
linux)
# Linux Flutter executable folder
JRE_SRC="/home/kevin/Projects/k3vinb5_aniyomi_bridge/jre/$PLATFORM/customjre"
if [ ! -d "$JRE_SRC" ]; then
echo "Error: JRE source folder not found: $JRE_SRC"
exit 1
fi
BUILD_DIR="$PROJECT_DIR/build/linux/x64/release/bundle"
mkdir -p "$BUILD_DIR/jre"
cp -R "$JRE_SRC" "$BUILD_DIR/jre/"
echo "Copied custom JRE to $BUILD_DIR/jre/"
;;
*)
echo "Unsupported platform: $PLATFORM"
exit 1
;;
esac
echo "JRE setup complete!"