into getdownResourceDir
}
}
+
+ def getdownWrapperScripts = [ getdown_mac_wrapper_script, getdown_unix_wrapper_script ]
+ getdownWrapperScripts.each{ script ->
+ def s = file( "${jalviewDir}/utils/getdown/${script}" )
+ if (s.exists()) {
+ copy {
+ from s
+ into getdownWebsiteDir
+ }
+ getdownTextString += "resource = ${script}\n"
+ }
+ }
def codeFiles = []
fileTree(file(package_dir)).each{ f ->
'WINDOWS_APPLICATION_ID': install4jWinApplicationId,
'MACOS_DMG_DS_STORE': install4jDMGDSStore,
'MACOS_DMG_BG_IMAGE': install4jDMGBackgroundImage,
- 'MACOS_DMG_WRAPPER_SCRIPT': install4j_dmg_wrapper_script,
+ 'MACOS_DMG_WRAPPER_LINK': install4j_dmg_wrapper_link,
+ 'MACOS_WRAPPER_SCRIPT': getdown_mac_wrapper_script,
'INSTALLER_NAME': install4jInstallerName,
'INSTALL4J_UTILS_DIR': install4j_utils_dir,
'GETDOWN_WEBSITE_DIR': getdown_website_dir,
install4j_background = jalview_logo_background_fade-640x480.png
install4j_dmg_background = jalview_dmg_background-NON-RELEASE.png
install4j_dmg_ds_store = jalview_dmg_DS_Store
-install4j_dmg_wrapper_script = utils/install4j/macos_jalview
+install4j_dmg_wrapper_link = jalviewc
+getdown_mac_wrapper_script = jalviewc-macos
+getdown_unix_wrapper_script = jalviewc
OSX_KEYSTORE =
OSX_KEYPASS =
--- /dev/null
+#!/usr/bin/env bash
+
+ARG1=$1
+WDIR="$( pwd )"
+DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
+
+# check to see if $1 is set and is not start of other cli set args
+OPEN=""
+if [ -n "$ARG1" -a "$ARG1" = "${ARG1#-}" -a \! "$ARG1" = "open" ]; then
+ # first argument exists and does not start with a "-" and is not "open"
+ OPEN="-open"
+fi
+
+APPDIR="${DIR}"
+JAVA="${APPDIR}/jre/bin/java"
+GETDOWNTXT="${APPDIR}/getdown.txt"
+if [ -e "$GETDOWNTXT" ]; then
+ CLASSPATH=""
+ for x in $(grep -e 'code = ' "${GETDOWNTXT}" | sed -e 's/^code\s*=\s*//;'); do
+ [ -n "$CLASSPATH" ] && CLASSPATH="${CLASSPATH}:"
+ CLASSPATH="${CLASSPATH}${APPDIR}/${x}"
+ done
+else
+ echo "Cannot find getdown.txt" >&2
+ exit 1
+fi
+
+"$JAVA" -cp "$CLASSPATH" jalview.bin.Launcher $OPEN "$@"
--- /dev/null
+#!/usr/bin/env bash
+
+ARG1=$1
+DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
+APP=${DIR%/Contents/*}
+
+if [ "${APP}" = "${APP%.app}" ]; then
+ echo "Could not find .app dir" >&2
+ exit 1
+fi
+
+# check to see if $1 is set and is not start of other cli set args
+OPEN=""
+if [ -n "$ARG1" -a "$ARG1" = "${ARG1#-}" -a \! "$ARG1" = "open" ]; then
+ # first argument exists and does not start with a "-" and is not "open"
+ OPEN="-open"
+fi
+
+APPDIR="${APP}/Contents/Resources/app"
+JAVA="${APPDIR}/jre/Contents/Home/bin/java"
+GETDOWNTXT="${APPDIR}/getdown.txt"
+# always check grep and sed regexes on macOS -- they're not the same
+if [ -e "$GETDOWNTXT" ]; then
+ CLASSPATH=""
+ for x in $(grep -e 'code = ' "${GETDOWNTXT}" | sed -e 's/^code\s*=\s*//;'); do
+ [ -n "$CLASSPATH" ] && CLASSPATH="${CLASSPATH}:"
+ CLASSPATH="${CLASSPATH}${APPDIR}/${x}"
+ done
+else
+ echo "Cannot find getdown.txt" >&2
+ exit 1
+fi
+
+"$JAVA" -cp "$CLASSPATH" jalview.bin.Launcher $OPEN "$@"
<variable name="WINDOWS_APPLICATION_ID" value="6595-2347-1923-0725" />
<variable name="MACOS_DMG_DS_STORE" value="jalview_dmg_DS_Store" />
<variable name="MACOS_DMG_BG_IMAGE" />
- <variable name="MACOS_DMG_WRAPPER_SCRIPT" />
+ <variable name="MACOS_DMG_WRAPPER_LINK" />
+ <variable name="MACOS_WRAPPER_SCRIPT" />
<variable name="INSTALLER_NAME" value="Jalview Installer" />
<variable name="INSTALL4J_UTILS_DIR" value="utils/install4j" />
<variable name="GETDOWN_WEBSITE_DIR" value="getdown/website" />
<file name=".DS_Store" file="${compiler:JALVIEW_DIR}/${compiler:MACOS_DMG_DS_STORE}" />
<file name="${compiler:JALVIEW_APPLICATION_NAME}.app/Contents/Resources/Jalview-File.icns" file="${compiler:JALVIEW_DIR}/${compiler:INSTALL4J_UTILS_DIR}/Jalview-File.icns" />
<file name="${compiler:JALVIEW_APPLICATION_NAME}.app/Contents/Resources/Jalview-Launch.icns" file="${compiler:JALVIEW_DIR}/${compiler:INSTALL4J_UTILS_DIR}/Jalview-Launch.icns" />
- <file name="${compiler:JALVIEW_APPLICATION_NAME}.app/Contents/MacOS/jalview" file="${compiler:JALVIEW_DIR}/${compiler:MACOS_DMG_WRAPPER_SCRIPT}" />
+ <symlink name="${compiler:JALVIEW_APPLICATION_NAME}.app/Contents/MacOS/${compiler:MACOS_DMG_WRAPPER_LINK}" target="../Resources/app/${compiler:MACOS_WRAPPER_SCRIPT}" />
</topLevelFiles>
</macosArchive>
<unixInstaller name="Linux x64 Shell Installer" id="1595" mediaFileName="${compiler:UNIX_APPLICATION_FOLDER}-${compiler:JALVIEW_VERSION}-linux_x64-java_${compiler:JAVA_INTEGER_VERSION}" installDir="${compiler:UNIX_APPLICATION_FOLDER}" customInstallBaseDir="~/opt/">
+++ /dev/null
-#!/usr/bin/env bash
-
-ARG1=$1
-WDIR="$( pwd )"
-DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
-APP=${DIR%/Contents/MacOS}
-
-if [ "${APP}" = "${APP%.app}" ]; then
- echo "Could not find .app dir" >&2
- exit 1
-fi
-
-# check to see if $1 is set and is not start of other cli set args
-OPEN=""
-if [ -n "$ARG1" -a "$ARG1" = "${ARG1#-}" ]; then
- # first argument exists and does not start with a "-"
- OPEN="-open"
-fi
-
-# This would open the Jalview application as if double clicking, with the supplied args
-# open -a ${APP} --args $OPEN "$@"
-### 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\s*=\s*//;'); do [ -n "$CLASSPATH" ] && CLASSPATH="${CLASSPATH}:"; CLASSPATH="${CLASSPATH}${APPDIR}/${x}"; done
-
-"$JAVA" -cp "$CLASSPATH" jalview.bin.Launcher $OPEN "$@"