fix appimage

This commit is contained in:
Bane Stojkovic
2025-03-07 23:06:12 +01:00
parent 5f20c1cd6e
commit dd6dd7daf8
4 changed files with 225 additions and 6 deletions
+6 -2
View File
@@ -1,4 +1,8 @@
#!/bin/bash
HERE="$(dirname "$(readlink -f "$0")")"
#set -x # Enable debug mode (prints each command before execution)
exec "$HERE/usr/bin/diylc.sh" "$@"
HERE="$(dirname "$(readlink -f "$0")")"
echo "AppRun: Running from directory: $HERE"
echo "AppRun: Executing $HERE/usr/bin/diylc.sh with args: $@"
exec "$HERE/usr/bin/diylc.sh" "$@"
+23 -4
View File
@@ -1,16 +1,31 @@
#!/bin/bash
HERE="$(dirname \"$(readlink -f \"$0\")\")"
#set -x # Enable debug mode
# Set JRE path inside AppImage
HERE="$(dirname "$(readlink -f "$0")")"
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!"
exit 1
fi
cd "$HERE"
echo "diylc.sh: Current working directory: $(pwd)"
# Debug: Print command before execution
echo "diylc.sh: Executing DIYLCStarter with Java"
exec "$JAVA" \
-javaagent:"$HERE/../lib/lib/jar-loader.jar" \
@@ -21,5 +36,9 @@ exec "$JAVA" \
--add-exports java.desktop/com.apple.eio=ALL-UNNAMED \
--add-opens java.base/java.util=ALL-UNNAMED \
--add-opens java.base/java.lang=ALL-UNNAMED \
--add-opens java.base/java.util=ALL-UNNAMED \
org.diylc.DIYLCStarter "$@"
--add-opens java.base/java.text=ALL-UNNAMED \
--add-opens java.desktop/java.awt=ALL-UNNAMED \
--add-opens java.desktop/java.awt.font=ALL-UNNAMED \
--add-opens java.desktop/java.awt.geom=ALL-UNNAMED \
-Dorg.diylc.scriptRun=true \
org.diylc.DIYLCStarter "$@"