From 72b08700a827b2f3d02f433977800be407935c84 Mon Sep 17 00:00:00 2001 From: Ben Soares Date: Thu, 11 Mar 2021 18:05:26 +0000 Subject: [PATCH] JAL-3830 Improved for .app dir name with spaces, e.g. Jalview Local. Tested on mac to be working. --- utils/install4j/macos_jalview | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/utils/install4j/macos_jalview b/utils/install4j/macos_jalview index 771d15b..aabdba8 100755 --- a/utils/install4j/macos_jalview +++ b/utils/install4j/macos_jalview @@ -19,13 +19,10 @@ fi # This would open the Jalview application as if double clicking, with the supplied args # open -a ${APP} --args $OPEN "$@" -### or... +### but we don't want to run getdown in case of autoupdates or changing the working dir, so ... -APPDIR=${APP}/Contents/Resources/app -JAVA=${APPDIR}/jre/Contents/Home/bin/java -CLASSPATH=""; for x in $(grep -e 'code = ' ${APP}/Contents/Resources/app/getdown.txt | sed -e 's/^code = //;'); do [ -n "$CLASSPATH" ] && CLASSPATH="${CLASSPATH}:"; CLASSPATH="${CLASSPATH}${APPDIR}/${x}"; done +APPDIR="${APP}/Contents/Resources/app" +JAVA="${APPDIR}/jre/Contents/Home/bin/java" +CLASSPATH=""; for x in $(grep -e 'code = ' "${APP}/Contents/Resources/app/getdown.txt" | sed -e 's/^code\s*=\s*//;'); do [ -n "$CLASSPATH" ] && CLASSPATH="${CLASSPATH}:"; CLASSPATH="${CLASSPATH}${APPDIR}/${x}"; done -#TODO add a -workingdir DIR argument for jalview.bin.Jalview to set user.dir. This will fix JAL-3523 -echo $JAVA -cp "$CLASSPATH" jalview.bin.Launcher $OPEN "$@" -$JAVA -cp "$CLASSPATH" jalview.bin.Launcher $OPEN "$@" -# -workingdir "$WDIR" +"$JAVA" -cp "$CLASSPATH" jalview.bin.Launcher $OPEN "$@" -- 1.7.10.2