build for linux

This commit is contained in:
Bane Stojkovic
2025-03-24 11:25:28 +01:00
parent cd4694c207
commit 5e70bbe898
5 changed files with 75 additions and 67 deletions
@@ -1,26 +1,25 @@
#!/bin/bash
#set -x # Enable debug mode
HERE="$(dirname "$(readlink -f "$0")")"
# Get the AppImage directory
if [ -n "$APPDIR" ]; then
HERE="$APPDIR/usr/bin"
else
HERE="$(cd "$(dirname "$0")" && pwd)"
fi
echo "diylc.sh: Running from directory: $HERE"
# Check if Java is available
if [ -d "$HERE/jre" ]; then
export JAVA_HOME="$HERE/jre"
export PATH="$JAVA_HOME/bin:$PATH"
JAVA="$JAVA_HOME/bin/java"
echo "diylc.sh: Using bundled JRE: $JAVA"
else
JAVA="$(which java)"
echo "diylc.sh: Using system Java: $JAVA"
fi
# Debug: Check Java existence
if [ ! -x "$JAVA" ]; then
echo "diylc.sh: ERROR - Java binary not found or not executable!"
# Use system Java
JAVA="$(which java)"
if [ -z "$JAVA" ] || [ ! -x "$JAVA" ]; then
echo "diylc.sh: ERROR - System Java not found or not executable!"
echo "diylc.sh: Please install Java 17 or later"
exit 1
fi
echo "diylc.sh: Using system Java: $JAVA"
cd "$HERE"
echo "diylc.sh: Current working directory: $(pwd)"
@@ -28,11 +27,9 @@ echo "diylc.sh: Current working directory: $(pwd)"
echo "diylc.sh: Executing DIYLCStarter with Java"
exec "$JAVA" \
-Xms512m \
-Xms1024m \
-Xmx4096m \
-cp "$HERE/../lib/diylc.jar" \
--add-exports java.desktop/com.apple.eawt.event=ALL-UNNAMED \
--add-exports java.desktop/com.apple.eio=ALL-UNNAMED \
-cp "$APPDIR/usr/lib/diylc.jar" \
--add-opens java.base/java.util=ALL-UNNAMED \
--add-opens java.base/java.lang=ALL-UNNAMED \
--add-opens java.base/java.text=ALL-UNNAMED \