mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-10 17:22:09 +10:00
appimage
This commit is contained in:
@@ -34,22 +34,13 @@
|
||||
<mkdir dir="${appdir}/usr/share/metainfo" />
|
||||
|
||||
<!-- Copy app files -->
|
||||
<zipfileset dir="${jar.dir}" includes="diylc.jar" />
|
||||
<zipfileset dir="${jar.dir}/lib" prefix="lib" />
|
||||
<zipfileset dir="${jar.dir}/library/" prefix="library" />
|
||||
<zipfileset dir="templates" prefix="templates" />
|
||||
<zipfileset dir="themes" prefix="themes" />
|
||||
<zipfileset dir="fonts" prefix="fonts" />
|
||||
<zipfileset dir="lang" prefix="lang" />
|
||||
<zipfileset dir="deploy" includes="splash.png" />
|
||||
|
||||
<copy file="${jar.dir}/diylc.jar" todir="${appdir}/usr/bin" />
|
||||
<copy todir="${appdir}/usr/bin/lib">
|
||||
<copy file="${jar.dir}/diylc.jar" todir="${appdir}/usr/lib" />
|
||||
<copy todir="${appdir}/usr/lib/lib">
|
||||
<fileset dir="${jar.dir}/lib">
|
||||
<include name="*"/>
|
||||
</fileset>
|
||||
</copy>
|
||||
<copy todir="${appdir}/usr/bin/library">
|
||||
<copy todir="${appdir}/usr/lib/library">
|
||||
<fileset dir="${jar.dir}/library">
|
||||
<include name="*"/>
|
||||
</fileset>
|
||||
@@ -74,7 +65,8 @@
|
||||
<include name="*"/>
|
||||
</fileset>
|
||||
</copy>
|
||||
<copy file="appimage/diylc.sh" tofile="${appdir}/AppRun" />
|
||||
<copy file="appimage/diylc.sh" tofile="${appdir}/usr/bin/diylc.sh" />
|
||||
<copy file="appimage/AppRun" tofile="${appdir}/AppRun" />
|
||||
<copy file="deploy/splash.png" todir="${appdir}/usr/bin" />
|
||||
<chmod file="${appdir}/AppRun" perm="755" />
|
||||
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
HERE="$(dirname "$(readlink -f "$0")")"
|
||||
|
||||
exec "$HERE/usr/bin/diylc.sh" "$@"
|
||||
@@ -1,13 +1,25 @@
|
||||
#!/bin/bash
|
||||
HERE="$(dirname "$(readlink -f "$0")")"
|
||||
HERE="$(dirname \"$(readlink -f \"$0\")\")"
|
||||
|
||||
# Set JRE path inside AppImage
|
||||
if [ -d "$HERE/usr/lib/jre" ]; then
|
||||
JAVA_HOME="$HERE/../lib/jre"
|
||||
PATH="$JAVA_HOME/bin:$PATH"
|
||||
export JAVA_HOME PATH
|
||||
if [ -d "$HERE/jre" ]; then
|
||||
export JAVA_HOME="$HERE/jre"
|
||||
export PATH="$JAVA_HOME/bin:$PATH"
|
||||
JAVA="$JAVA_HOME/bin/java"
|
||||
else
|
||||
JAVA="$(which java)"
|
||||
fi
|
||||
|
||||
cd /usr/bin
|
||||
cd "$HERE"
|
||||
|
||||
exec "$JAVA_HOME/bin/java" -Xms512m -Xmx4096m -javaagent:lib/jar-loader.jar -Dorg.diylc.scriptRun=true -Dfile.encoding=UTF-8 -cp diylc.jar:lib --add-exports java.desktop/com.apple.eawt.event=ALL-UNNAMED --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.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 org.diylc.DIYLCStarter "$@"
|
||||
exec "$JAVA" \
|
||||
-javaagent:"$HERE/../lib/lib/jar-loader.jar" \
|
||||
-Xms128m \
|
||||
-Xmx4096m \
|
||||
-cp "$HERE/../lib/diylc.jar:$HERE/../lib/lib/*" \
|
||||
--add-exports java.desktop/com.apple.eawt.event=ALL-UNNAMED \
|
||||
--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 "$@"
|
||||
Reference in New Issue
Block a user