mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-10 17:22:09 +10:00
fix appimage
This commit is contained in:
@@ -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" "$@"
|
||||
|
||||
@@ -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 "$@"
|
||||
|
||||
Reference in New Issue
Block a user