From: Ben Soares Date: Fri, 4 Nov 2022 17:58:36 +0000 (+0000) Subject: Merge branch 'merge/JAL-4054+JAL-4064' into ben-big-merge X-Git-Tag: Release_2_11_3_0~23^2~4^2~16 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=51c011768a77932d6c0aebd2d686a04fabaa2589;hp=26cd0e575e86884dee2d8cafab1effa05c3842d3;p=jalview.git Merge branch 'merge/JAL-4054+JAL-4064' into ben-big-merge --- diff --git a/build.gradle b/build.gradle index bde50b5..851c5f6 100644 --- a/build.gradle +++ b/build.gradle @@ -47,7 +47,7 @@ plugins { id 'eclipse' id "com.diffplug.gradle.spotless" version "3.28.0" id 'com.github.johnrengelman.shadow' version '4.0.3' - id 'com.install4j.gradle' version '9.0.6' + id 'com.install4j.gradle' version '10.0.3' id 'com.dorongold.task-tree' version '2.1.0' // only needed to display task dependency tree with gradle task1 [task2 ...] taskTree id 'com.palantir.git-version' version '0.13.0' apply false } @@ -483,16 +483,10 @@ ext { // for install4j JAVA_MIN_VERSION = JAVA_VERSION JAVA_MAX_VERSION = JAVA_VERSION - def jreInstallsDir = string(jre_installs_dir) + jreInstallsDir = string(jre_installs_dir) if (jreInstallsDir.startsWith("~/")) { jreInstallsDir = System.getProperty("user.home") + jreInstallsDir.substring(1) } - macosJavaVMDir = string("${jreInstallsDir}/jre-${JAVA_INTEGER_VERSION}-mac-x64/jre") - windowsJavaVMDir = string("${jreInstallsDir}/jre-${JAVA_INTEGER_VERSION}-windows-x64/jre") - linuxJavaVMDir = string("${jreInstallsDir}/jre-${JAVA_INTEGER_VERSION}-linux-x64/jre") - macosJavaVMTgz = string("${jreInstallsDir}/tgz/jre_${JAVA_INTEGER_VERSION}_mac_x64.tar.gz") - windowsJavaVMTgz = string("${jreInstallsDir}/tgz/jre_${JAVA_INTEGER_VERSION}_windows_x64.tar.gz") - linuxJavaVMTgz = string("${jreInstallsDir}/tgz/jre_${JAVA_INTEGER_VERSION}_linux_x64.tar.gz") install4jDir = string("${jalviewDir}/${install4j_utils_dir}") install4jConfFileName = string("jalview-install4j-conf.install4j") install4jConfFile = file("${install4jDir}/${install4jConfFileName}") @@ -2411,12 +2405,6 @@ task installerFiles(type: com.install4j.gradle.Install4jTask) { 'JAVA_VERSION': JAVA_VERSION, 'JAVA_INTEGER_VERSION': JAVA_INTEGER_VERSION, 'VERSION': JALVIEW_VERSION, - 'MACOS_JAVA_VM_DIR': macosJavaVMDir, - 'WINDOWS_JAVA_VM_DIR': windowsJavaVMDir, - 'LINUX_JAVA_VM_DIR': linuxJavaVMDir, - 'MACOS_JAVA_VM_TGZ': macosJavaVMTgz, - 'WINDOWS_JAVA_VM_TGZ': windowsJavaVMTgz, - 'LINUX_JAVA_VM_TGZ': linuxJavaVMTgz, 'COPYRIGHT_MESSAGE': install4j_copyright_message, 'BUNDLE_ID': install4jBundleId, 'INTERNAL_ID': install4jInternalId, @@ -2446,8 +2434,29 @@ task installerFiles(type: com.install4j.gradle.Install4jTask) { 'WINDOWS_ICONS_FILE': install4jWindowsIconsFile, 'PNG_ICON_FILE': install4jPngIconFile, 'BACKGROUND': install4jBackground, + ] + def varNameMap = [ + 'mac': 'MACOS', + 'windows': 'WINDOWS', + 'linux': 'LINUX' + ] + + // these are the bundled OS/architecture VMs needed by install4j + def osArch = [ + [ "mac", "x64" ], + [ "mac", "aarch64" ], + [ "windows", "x64" ], + [ "linux", "x64" ], + [ "linux", "aarch64" ] ] + osArch.forEach { os, arch -> + variables[ sprintf("%s_%s_JAVA_VM_DIR", varNameMap[os], arch.toUpperCase(Locale.ROOT)) ] = sprintf("%s/jre-%s-%s-%s/jre", jreInstallsDir, JAVA_INTEGER_VERSION, os, arch) + // N.B. For some reason install4j requires the below filename to have underscores and not hyphens + // otherwise running `gradle installers` generates a non-useful error: + // `install4j: compilation failed. Reason: java.lang.NumberFormatException: For input string: "windows"` + variables[ sprintf("%s_%s_JAVA_VM_TGZ", varNameMap[os], arch.toUpperCase(Locale.ROOT)) ] = sprintf("%s/tgz/jre_%s_%s_%s.tar.gz", jreInstallsDir, JAVA_INTEGER_VERSION, os, arch) + } //println("INSTALL4J VARIABLES:") //variables.each{k,v->println("${k}=${v}")} @@ -2481,8 +2490,6 @@ task installerFiles(type: com.install4j.gradle.Install4jTask) { inputs.dir(getdownAppBaseDir) inputs.file(install4jConfFile) inputs.file("${install4jDir}/${install4j_info_plist_file_associations}") - inputs.dir(macosJavaVMDir) - inputs.dir(windowsJavaVMDir) outputs.dir("${jalviewDir}/${install4j_build_dir}/${JAVA_VERSION}") } diff --git a/gradle.properties b/gradle.properties index acb65e9..e42f8b5 100644 --- a/gradle.properties +++ b/gradle.properties @@ -129,14 +129,14 @@ flexmark_css = utils/doc/github.css channel_properties_dir = utils/channels channel_props = channel.props -install4j_home_dir = ~/buildtools/install4j9 +install4j_home_dir = ~/buildtools/install4j10 install4j_copyright_message = ... install4j_bundle_id = org.jalview.jalview-desktop install4j_utils_dir = utils/install4j install4j_images_dir = utils/install4j -install4j_template = install4j9_template.install4j +install4j_template = install4j10_template.install4j install4j_info_plist_file_associations = file_associations_auto-Info_plist.xml -install4j_installer_file_associations = file_associations_auto-install4j8.xml +install4j_installer_file_associations = file_associations_auto-install4j10.xml #install4j_DMG_uninstaller_app_files = uninstall_old_jalview_files.xml install4j_build_dir = build/install4j install4j_executable_name = jalviewg diff --git a/utils/download_jdks.sh b/utils/download_jdks.sh index cf8634a..b6e8379 100755 --- a/utils/download_jdks.sh +++ b/utils/download_jdks.sh @@ -15,26 +15,64 @@ ### Edited to use adoptium domain to gain access to Java 17 (LTS) versions. BASE=https://api.adoptium.net/v3/binary/latest +ZULU_BASE=https://cdn.azul.com/zulu/bin RELEASE_TYPE=ga JVM_IMPL=hotspot HEAP_SIZE=normal VENDOR=eclipse IMAGE_TYPE=jdk +TAR=tar +ZIP=zip +UNZIP=unzip + +STRIP_MAC_APP_BUNDLING=false +# archives not needed for JDKs +CREATE_ARCHIVES="" +# need zip with top-level jre dir for getdown updates. need tgz without top-level jre dir for install4j bundling RM=/bin/rm # unzip-strip from https://superuser.com/questions/518347/equivalent-to-tars-strip-components-1-in-unzip -unzip-strip() ( +unzip-strip() { local zip=$1 local dest=${2:-.} - local temp=$(mktemp -d) && unzip -qq -d "$temp" "$zip" && mkdir -p "$dest" && + local temp=$(mktemp -d) && $UNZIP -qq -d "$temp" "$zip" && mkdir -p "$dest" && shopt -s dotglob && local f=("$temp"/*) && if (( ${#f[@]} == 1 )) && [[ -d "${f[0]}" ]] ; then mv "$temp"/*/* "$dest" else mv "$temp"/* "$dest" fi && rmdir "$temp"/* "$temp" -) +} + +dl_zulu() { + local OS="$1" + local ARCH="$2" + local VERSION="$3" + local TARFILE="$4" + declare -A osmap + osmap[mac]=macosx + osmap[windows]=win + osmap[linux]=linux + ZOS="${osmap[$OS]}" + echo "- Looking for download from Azul" + LATEST_DL_URL_FILE=$(wget -q -O - "${ZULU_BASE}/" | perl -n -e 'm/]*href="(([^"]*\/)?zulu[^"]*-ca-'"${IMAGE_TYPE}""${VERSION}"'\.[^"]*-'"${ZOS}"'_'"${ARCH}"'.tar.gz)"[^"]*>/ && print "$1\n";' | tail -1) + local URL="${ZULU_BASE}/${LATEST_DL_URL_FILE}" + if [ -z "${LATEST_DL_URL_FILE}" ]; then + echo "- No ${IMAGE_TYPE}-${FEATURE_VERSION} download for ${OS}-${ARCH} '${URL}' found at Azul" + return 1 + fi + echo "- Found at Azul. Downloading '${URL}'" + wget -q -O "${TARFILE}" "${URL}" "${TARFILE}" + echo RETURN=$? + if [ "$?" != 0 ]; then + echo "- Download from Azul failed" + return 1 + fi + return 0 +} + +declare -A DOWNLOAD_SUMMARY for FEATURE_VERSION in 8 11 17; do for OS_ARCH in mac:x64 mac:aarch64 windows:x64 linux:x64 linux:arm linux:aarch64; do @@ -42,13 +80,30 @@ for FEATURE_VERSION in 8 11 17; do ARCH=${OS_ARCH#*:} NAME="${IMAGE_TYPE}-${FEATURE_VERSION}-${OS}-${ARCH}" TARFILE="${NAME}.tgz" + DOWNLOAD_SUMMARY["${OS_ARCH}-${IMAGE_TYPE}-${FEATURE_VERSION}"]="None" + STRIP_COMPONENTS=1 + MAC_STRIP_COMPONENTS=3 echo "* Downloading ${TARFILE}" URL="${BASE}/${FEATURE_VERSION}/${RELEASE_TYPE}/${OS}/${ARCH}/${IMAGE_TYPE}/${JVM_IMPL}/${HEAP_SIZE}/${VENDOR}" wget -q -O "${TARFILE}" "${URL}" if [ "$?" != 0 ]; then - echo "- No ${IMAGE_TYPE}-${FEATURE_VERSION} download for ${OS}-${ARCH} '${URL}'" + echo "- No ${IMAGE_TYPE}-${FEATURE_VERSION} download for ${OS}-${ARCH} '${URL}' at Adoptium" $RM -f "${TARFILE}" - continue; + + # Try Azul Zulu (not an API, a bit messier, but has Java 8 JRE for mac:aarch64 + dl_zulu "${OS}" "${ARCH}" "${FEATURE_VERSION}" "${TARFILE}" + + if [ "$?" != 0 ]; then + DOWNLOAD_SUMMARY["${OS_ARCH}-${IMAGE_TYPE}-${FEATURE_VERSION}"]="None" + continue; + fi + STRIP_COMPONENTS=2 + MAC_STRIP_COMPONENTS=4 + DOWNLOAD_SUMMARY["${OS_ARCH}-${IMAGE_TYPE}-${FEATURE_VERSION}"]="Azul" + echo "Set ${OS_ARCH}-${IMAGE_TYPE}-${FEATURE_VERSION}=Azul" + else + DOWNLOAD_SUMMARY["${OS_ARCH}-${IMAGE_TYPE}-${FEATURE_VERSION}"]="Adoptium" + echo "Set ${OS_ARCH}-${IMAGE_TYPE}-${FEATURE_VERSION}=Adoptium" fi echo "Unpacking ${TARFILE}" JREDIR="${NAME}/${IMAGE_TYPE}" @@ -60,14 +115,58 @@ for FEATURE_VERSION in 8 11 17; do RET=$? else echo "using tar" - tar --strip-components=1 -C "${JREDIR}" -zxf "${TARFILE}" - RET=$? + if [ x$OS = xmac -a x$STRIP_MAC_APP_BUNDLING = xtrue ]; then + echo "Running $TAR --strip-components=\"${MAC_STRIP_COMPONENTS}\" -C \"${JREDIR}\" -zxf \"${TARFILE}\" \"*/Contents/Home\"" + $TAR --strip-components="${MAC_STRIP_COMPONENTS}" -C "${JREDIR}" -zxf "${TARFILE}" "*/Contents/Home" + RET=$? + else + $TAR --strip-components="${STRIP_COMPONENTS}" -C "${JREDIR}" -zxf "${TARFILE}" + RET=$? + fi fi if [ "$RET" != 0 ]; then echo "Error unpacking ${TARFILE}" exit 1 fi $RM "${TARFILE}" + if [ \! -z "$CREATE_ARCHIVES" ]; then + for CREATEARCHIVE in ${CREATE_ARCHIVES}; do + ARCHIVEDIR=$CREATEARCHIVE + case $CREATEARCHIVE in + zip) + EXT=${CREATEARCHIVE} + echo "Creating ${NAME}.${EXT} for getdown updates" + [ \! -d ${ARCHIVEDIR} ] && mkdir -p "${ARCHIVEDIR}" + ABSARCHIVEDIR="${PWD}/$ARCHIVEDIR" + ZIPFILE="${ABSARCHIVEDIR}/${NAME}.${CREATEARCHIVE}" + [ -e "${ZIPFILE}" ] && $RM "${ZIPFILE}" + cd ${NAME} + $ZIP -X -r "${ZIPFILE}" "${IMAGE_TYPE}" + cd - + ;; + tgz) + EXT=tar.gz + echo "Creating ${NAME}.${EXT} for install4j bundling" + [ \! -d ${ARCHIVEDIR} ] && mkdir -p "${ARCHIVEDIR}" + $TAR -C "${JREDIR}" -zcf "${ARCHIVEDIR}/${NAME}.${EXT}" . + # make symbolic link with _ instead of - for install4j9 + NEWNAME=${NAME//-/_} + echo "Linking from ${NEWNAME}.${EXT} for install4j9" + [ -e "${ARCHIVEDIR}/${NEWNAME}.${EXT}" ] && $RM "${ARCHIVEDIR}/${NEWNAME}.${EXT}" + ln -s "${NAME}.${EXT}" "${ARCHIVEDIR}/${NEWNAME}.${EXT}" + ;; + *) + echo "Archiving as '${CREATEARCHIVE}' file not supported" + ;; + esac + done + fi done done +echo "" +echo "Download Summary" +for OA in "${!DOWNLOAD_SUMMARY[@]}"; do + echo "$OA: ${DOWNLOAD_SUMMARY[$OA]}" +done + diff --git a/utils/download_jres.sh b/utils/download_jres.sh index 26442ea..c1a5a0d 100755 --- a/utils/download_jres.sh +++ b/utils/download_jres.sh @@ -15,6 +15,7 @@ ### Edited to use adoptium domain to gain access to Java 17 (LTS) versions. BASE=https://api.adoptium.net/v3/binary/latest +ZULU_BASE=https://cdn.azul.com/zulu/bin RELEASE_TYPE=ga JVM_IMPL=hotspot HEAP_SIZE=normal @@ -31,7 +32,7 @@ CREATE_ARCHIVES="zip tgz" RM=/bin/rm # unzip-strip from https://superuser.com/questions/518347/equivalent-to-tars-strip-components-1-in-unzip -unzip-strip() ( +unzip-strip() { local zip=$1 local dest=${2:-.} local temp=$(mktemp -d) && $UNZIP -qq -d "$temp" "$zip" && mkdir -p "$dest" && @@ -41,7 +42,36 @@ unzip-strip() ( else mv "$temp"/* "$dest" fi && rmdir "$temp"/* "$temp" -) +} + +dl_zulu() { + local OS="$1" + local ARCH="$2" + local VERSION="$3" + local TARFILE="$4" + declare -A osmap + osmap[mac]=macosx + osmap[windows]=win + osmap[linux]=linux + ZOS="${osmap[$OS]}" + echo "- Looking for download from Azul" + LATEST_DL_URL_FILE=$(wget -q -O - "${ZULU_BASE}/" | perl -n -e 'm/]*href="(([^"]*\/)?zulu[^"]*-ca-'"${IMAGE_TYPE}""${VERSION}"'\.[^"]*-'"${ZOS}"'_'"${ARCH}"'.tar.gz)"[^"]*>/ && print "$1\n";' | tail -1) + local URL="${ZULU_BASE}/${LATEST_DL_URL_FILE}" + if [ -z "${LATEST_DL_URL_FILE}" ]; then + echo "- No ${IMAGE_TYPE}-${FEATURE_VERSION} download for ${OS}-${ARCH} '${URL}' found at Azul" + return 1 + fi + echo "- Found at Azul. Downloading '${URL}'" + wget -q -O "${TARFILE}" "${URL}" "${TARFILE}" + echo RETURN=$? + if [ "$?" != 0 ]; then + echo "- Download from Azul failed" + return 1 + fi + return 0 +} + +declare -A DOWNLOAD_SUMMARY for FEATURE_VERSION in 8 11 17; do for OS_ARCH in mac:x64 mac:aarch64 windows:x64 linux:x64 linux:arm linux:aarch64; do @@ -49,13 +79,30 @@ for FEATURE_VERSION in 8 11 17; do ARCH=${OS_ARCH#*:} NAME="${IMAGE_TYPE}-${FEATURE_VERSION}-${OS}-${ARCH}" TARFILE="${NAME}.tgz" + DOWNLOAD_SUMMARY["${OS_ARCH}-${IMAGE_TYPE}-${FEATURE_VERSION}"]="None" + STRIP_COMPONENTS=1 + MAC_STRIP_COMPONENTS=3 echo "* Downloading ${TARFILE}" URL="${BASE}/${FEATURE_VERSION}/${RELEASE_TYPE}/${OS}/${ARCH}/${IMAGE_TYPE}/${JVM_IMPL}/${HEAP_SIZE}/${VENDOR}" wget -q -O "${TARFILE}" "${URL}" if [ "$?" != 0 ]; then - echo "- No ${IMAGE_TYPE}-${FEATURE_VERSION} download for ${OS}-${ARCH} '${URL}'" + echo "- No ${IMAGE_TYPE}-${FEATURE_VERSION} download for ${OS}-${ARCH} '${URL}' at Adoptium" $RM -f "${TARFILE}" - continue; + + # Try Azul Zulu (not an API, a bit messier, but has Java 8 JRE for mac:aarch64 + dl_zulu "${OS}" "${ARCH}" "${FEATURE_VERSION}" "${TARFILE}" + + if [ "$?" != 0 ]; then + DOWNLOAD_SUMMARY["${OS_ARCH}-${IMAGE_TYPE}-${FEATURE_VERSION}"]="None" + continue; + fi + STRIP_COMPONENTS=2 + MAC_STRIP_COMPONENTS=4 + DOWNLOAD_SUMMARY["${OS_ARCH}-${IMAGE_TYPE}-${FEATURE_VERSION}"]="Azul" + echo "Set ${OS_ARCH}-${IMAGE_TYPE}-${FEATURE_VERSION}=Azul" + else + DOWNLOAD_SUMMARY["${OS_ARCH}-${IMAGE_TYPE}-${FEATURE_VERSION}"]="Adoptium" + echo "Set ${OS_ARCH}-${IMAGE_TYPE}-${FEATURE_VERSION}=Adoptium" fi echo "Unpacking ${TARFILE}" JREDIR="${NAME}/${IMAGE_TYPE}" @@ -68,10 +115,11 @@ for FEATURE_VERSION in 8 11 17; do else echo "using tar" if [ x$OS = xmac -a x$STRIP_MAC_APP_BUNDLING = xtrue ]; then - $TAR --strip-components=3 -C "${JREDIR}" -zxf "${TARFILE}" "*/Contents/Home" + echo "Running $TAR --strip-components=\"${MAC_STRIP_COMPONENTS}\" -C \"${JREDIR}\" -zxf \"${TARFILE}\" \"*/Contents/Home\"" + $TAR --strip-components="${MAC_STRIP_COMPONENTS}" -C "${JREDIR}" -zxf "${TARFILE}" "*/Contents/Home" RET=$? else - $TAR --strip-components=1 -C "${JREDIR}" -zxf "${TARFILE}" + $TAR --strip-components="${STRIP_COMPONENTS}" -C "${JREDIR}" -zxf "${TARFILE}" RET=$? fi fi @@ -115,3 +163,9 @@ for FEATURE_VERSION in 8 11 17; do done done +echo "" +echo "Download Summary" +for OA in "${!DOWNLOAD_SUMMARY[@]}"; do + echo "$OA: ${DOWNLOAD_SUMMARY[$OA]}" +done + diff --git a/utils/install4j/auto_file_associations-i4j10.pl b/utils/install4j/auto_file_associations-i4j10.pl new file mode 100755 index 0000000..f7e17a1 --- /dev/null +++ b/utils/install4j/auto_file_associations-i4j10.pl @@ -0,0 +1,227 @@ +#!/usr/bin/env perl + +use strict; + +my $i4jversion = 10; +if ($ARGV[0] eq "-v") { + shift @ARGV; + $i4jversion = shift @ARGV; + die("-v i4jversion must be an integer [probably 7 or 8]") unless $i4jversion =~ m/^\d+$/; +} + +my $fileformats = $ARGV[0]; +$fileformats = "../../src/jalview/io/FileFormat.java" unless $fileformats; + +# default mimetype will be text/x-$shortname +# TODO: find an actual extension for mat, see JAL-Xxxxx for outstanding issues too +# TODO: look up standard mime type used for BLASTfmt matrices, etc +my $mimetypes = { + rnaml => "application/rnaml+xml", + biojson => "application/x-jalview-biojson+json", + jnet => "application/x-jalview-jnet+text", + features => "application/x-jalview-features+text", + scorematrix => "application/x-jalview-scorematrix+text", + pdb => "chemical/x-pdb", + mmcif => "chemical/x-cif", + mmcif2 => "chemical/x-mmcif", + jalview => "application/x-jalview+xml+zip", + jvl => "application/x-jalview-jvl+text", + annotations => "application/x-jalview-annotations+text", +}; + +my @dontaddshortname = qw(features json); +my @dontaddextension = qw(html xml json jar mfa fastq); +my $add_associations = { + biojson => {shortname=>"biojson",name=>"BioJSON",extensions=>["biojson"]}, + gff2 => {shortname=>"gff2",name=>"Generic Features Format v2",extensions=>["gff2"]}, + gff3 => {shortname=>"gff3",name=>"Generic Features Format v3",extensions=>["gff3"]}, + features => {shortname=>"features",name=>"Jalview Features",extensions=>["features","jvfeatures"]}, + annotations => {shortname=>"annotations",name=>"Jalview Annotations",extensions=>["annotations","jvannotations"]}, + mmcif => {shortname=>"mmcif",name=>"CIF",extensions=>["cif"]}, + mmcif2 => {shortname=>"mmcif2",name=>"mmCIF",extensions=>["mcif","mmcif"]}, + jvl => {shortname=>"jvl",name=>"Jalview Launch",extensions=>["jvl"],iconfile=>"jvl_file"}, + jnet => {shortname=>"jnet",name=>"JnetFile",extensions=>["concise","jnet"]}, + scorematrix => {shortname=>"scorematrix",name=>"Substitution Matrix",extensions=>["mat"]}, +}; +my $add_extensions = { + blc => ["blc"], +}; +my @put_first = qw(jalview jvl); +my @owner = @put_first; + +my @non_primary = qw(mmcif mmcif2 pdb); + +my $v = ($i4jversion >= 8)?$i4jversion:""; +my $i4jtemplatefile = "file_associations_template-install4j${v}.xml"; +my $i4jtemplate; +my $mactemplatefile = "file_associations_template-Info_plist.xml"; +my $mactemplate; + +open(MT,"<$mactemplatefile") or die("Could not open '$mactemplatefile' for reading"); +while(){ + $mactemplate .= $_; +} +close(MT); +open(IT,"<$i4jtemplatefile") or die("Could not open '$i4jtemplatefile' for reading"); +while(){ + $i4jtemplate .= $_; +} +close(IT); +my $macauto; +my $i4jauto; + +my $macautofile = $mactemplatefile; +$macautofile =~ s/template/auto$1/; + +my $i4jautofile = $i4jtemplatefile; +$i4jautofile =~ s/template/auto$1/; + +for my $key (sort keys %$add_associations) { + my $a = $add_associations->{$key}; + warn("Known file association for $a->{shortname} (".join(",",@{$a->{extensions}}).")\n"); +} + +open(MA,">$macautofile") or die ("Could not open '$macautofile' for writing"); +print MA "CFBundleDocumentTypes\n\n\n"; + +open(IA,">$i4jautofile") or die ("Could not open '$i4jautofile' for writing"); + +open(IN, "<$fileformats") or die ("Could not open '$fileformats' for reading"); +my $id = 10000; +my $file_associations = {}; +while(my $line = ) { + $line =~ s/\s+/ /g; + $line =~ s/(^ | $)//g; + if ($line =~ m/^(\w+) ?\( ?"([^"]*)" ?, ?"([^"]*)" ?, ?(true|false) ?, ?(true|false) ?\)$/i) { + my $shortname = lc($1); + next if (grep($_ eq $shortname, @dontaddshortname)); + my $name = $2; + my $extensions = $3; + $extensions =~ s/\s+//g; + my @possextensions = map(lc($_),split(m/,/,$extensions)); + my @extensions; + my $addext = $add_extensions->{$shortname}; + if (ref($addext) eq "ARRAY") { + push(@possextensions, @$addext); + } + for my $possext (@possextensions) { + next if grep($_ eq $possext, @extensions); + next if grep($_ eq $possext, @dontaddextension); + push(@extensions,$possext); + } + next unless scalar(@extensions); + $file_associations->{$shortname} = { + shortname => $shortname, + name => $name, + extensions => \@extensions + }; + warn("Reading file association for $shortname (".join(",",@extensions).")\n"); + } +} +close(IN); + +my %all_associations = (%$file_associations, %$add_associations); + +my @ordered = (@put_first, @non_primary); +for my $key (sort keys %all_associations) { + next if grep($_ eq $key, @ordered); + push(@ordered, $key); +} +my $num = $#ordered + 1; + +warn("--\n"); + +my $i4jcount = 0; +for my $shortname (@ordered) { + my $a = $all_associations{$shortname}; + next if (ref($a) ne "HASH"); + + my $name = $a->{name}; + my $extensions = $a->{extensions}; + my $mimetype = $mimetypes->{$shortname}; + $mimetype = "application/x-$shortname+txt" unless $mimetype; + + my $iconfile = $a->{iconfile}; + $iconfile = "Jalview-File" unless $iconfile; + + my $owner = grep($_ eq $shortname, @owner); + my $primary = (! grep($_ eq $shortname, @non_primary)); + my $primarystring = $primary?"true":"false"; + #my $role = $owner?"Owner":($primary?"Editor":"Viewer"); + my $role = $primary?"Editor":"Viewer"; + my $rank = $owner?"Owner":($primary?"Default":"Alternate"); + + my @extensions = @$extensions; + + my $xname = xml_escape($name); + my $xmimetype = xml_escape($mimetype); + my $xshortname = xml_escape($shortname); + my $xiconfile = xml_escape($iconfile); + my $xrole = xml_escape($role); + my $xROLE = xml_escape(uc($role)); + my $xrank = xml_escape($rank); + my $xprimarystring = xml_escape($primarystring); + + my $macentry = $mactemplate; + $macentry =~ s/\$\$NAME\$\$/$xname/g; + $macentry =~ s/\$\$SHORTNAME\$\$/$xshortname/g; + $macentry =~ s/\$\$MIMETYPE\$\$/$xmimetype/g; + $macentry =~ s/\$\$ICONFILE\$\$/$xiconfile/g; + $macentry =~ s/\$\$ROLE\$\$/$xrole/g; + $macentry =~ s/\$\$RANK\$\$/$xrank/g; + $macentry =~ s/\$\$PRIMARY\$\$/$xprimarystring/g; + while ($macentry =~ m/\$\$([^\$]*)EXTENSIONS([^\$]*)\$\$/) { + my $pre = $1; + my $post = $2; + my $macextensions; + for my $ext (@extensions) { + my $xext = xml_escape($ext); + $macextensions .= $pre.$xext.$post; + } + $macentry =~ s/\$\$${pre}EXTENSIONS${post}\$\$/$macextensions/g; + } + print MA $macentry; + + my $i4jentry = $i4jtemplate; + $i4jentry =~ s/\$\$NAME\$\$/$xname/g; + $i4jentry =~ s/\$\$SHORTNAME\$\$/$xshortname/g; + $i4jentry =~ s/\$\$MIMETYPE\$\$/$xmimetype/g; + $i4jentry =~ s/\$\$ICONFILE\$\$/$xiconfile/g; + $i4jentry =~ s/\$\$PRIMARY\$\$/$xprimarystring/g; + $i4jentry =~ s/\$\$MACASSOCIATIONROLE\$\$/$xROLE/g; + + my $ext = join(",",sort(@extensions)); + my $xdisplayext = xml_escape(join(", ", map(".$_",sort(@extensions)))); + my $progresspercent = int(($i4jcount/$num)*100); + $progresspercent = 100 if $progresspercent > 100; + $i4jcount++; + my $xext = xml_escape($ext); + my $addunixextension = "true"; + + $i4jentry =~ s/\$\$ADDUNIXEXTENSION\$\$/$addunixextension/g; + $i4jentry =~ s/\$\$EXTENSION\$\$/$xext/g; + $i4jentry =~ s/\$\$DISPLAYEXTENSION\$\$/$xdisplayext/g; + $i4jentry =~ s/\$\$PROGRESSPERCENT\$\$/$progresspercent/g; + $i4jentry =~ s/\$\$ID\$\$/$id/g; + $id++; + $i4jentry =~ s/\$\$ID1\$\$/$id/g; + $id++; + $i4jentry =~ s/\$\$ID2\$\$/$id/g; + $id++; + + print IA $i4jentry; + + delete $all_associations{$shortname}; + warn("Writing entry for $name (".join(",",@$extensions).": $mimetype)\n"); +} + +close(IA); +print MA "\n"; +close(MA); + +sub xml_escape { + my $x = shift; + # stolen from Pod::Simple::XMLOutStream in base distro + $x =~ s/([^-\n\t !\#\$\%\(\)\*\+,\.\~\/\:\;=\?\@\[\\\]\^_\`\{\|\}a-zA-Z0-9])/'&#'.(ord($1)).';'/eg; + return $x; +} diff --git a/utils/install4j/file_associations_auto-Info_plist.xml b/utils/install4j/file_associations_auto-Info_plist.xml index 0b927a8..2e23321 100644 --- a/utils/install4j/file_associations_auto-Info_plist.xml +++ b/utils/install4j/file_associations_auto-Info_plist.xml @@ -12,6 +12,8 @@ Jalview-File.icns CFBundleTypeRole Editor +LSHandlerRank +Owner CFBundleTypeMIMETypes application/x-jalview+xml+zip @@ -31,6 +33,8 @@ jvl_file.icns CFBundleTypeRole Editor +LSHandlerRank +Owner CFBundleTypeMIMETypes application/x-jalview-jvl+text @@ -50,6 +54,8 @@ Jalview-File.icns CFBundleTypeRole Viewer +LSHandlerRank +Alternate CFBundleTypeMIMETypes chemical/x-cif @@ -70,6 +76,8 @@ Jalview-File.icns CFBundleTypeRole Viewer +LSHandlerRank +Alternate CFBundleTypeMIMETypes chemical/x-mmcif @@ -90,6 +98,8 @@ Jalview-File.icns CFBundleTypeRole Viewer +LSHandlerRank +Alternate CFBundleTypeMIMETypes chemical/x-pdb @@ -109,6 +119,8 @@ Jalview-File.icns CFBundleTypeRole Editor +LSHandlerRank +Default CFBundleTypeMIMETypes application/x-amsa+txt @@ -129,6 +141,8 @@ Jalview-File.icns CFBundleTypeRole Editor +LSHandlerRank +Default CFBundleTypeMIMETypes application/x-jalview-annotations+text @@ -148,6 +162,8 @@ Jalview-File.icns CFBundleTypeRole Editor +LSHandlerRank +Default CFBundleTypeMIMETypes application/x-jalview-biojson+json @@ -167,6 +183,8 @@ Jalview-File.icns CFBundleTypeRole Editor +LSHandlerRank +Default CFBundleTypeMIMETypes application/x-blc+txt @@ -186,6 +204,8 @@ Jalview-File.icns CFBundleTypeRole Editor +LSHandlerRank +Default CFBundleTypeMIMETypes application/x-clustal+txt @@ -205,6 +225,8 @@ Jalview-File.icns CFBundleTypeRole Editor +LSHandlerRank +Default CFBundleTypeMIMETypes application/x-embl+txt @@ -225,6 +247,8 @@ Jalview-File.icns CFBundleTypeRole Editor +LSHandlerRank +Default CFBundleTypeMIMETypes application/x-fasta+txt @@ -245,6 +269,8 @@ Jalview-File.icns CFBundleTypeRole Editor +LSHandlerRank +Default CFBundleTypeMIMETypes application/x-jalview-features+text @@ -265,6 +291,8 @@ Jalview-File.icns CFBundleTypeRole Editor +LSHandlerRank +Default CFBundleTypeMIMETypes application/x-genbank+txt @@ -284,6 +312,8 @@ Jalview-File.icns CFBundleTypeRole Editor +LSHandlerRank +Default CFBundleTypeMIMETypes application/x-gff2+txt @@ -303,6 +333,8 @@ Jalview-File.icns CFBundleTypeRole Editor +LSHandlerRank +Default CFBundleTypeMIMETypes application/x-gff3+txt @@ -323,6 +355,8 @@ Jalview-File.icns CFBundleTypeRole Editor +LSHandlerRank +Default CFBundleTypeMIMETypes application/x-jalview-jnet+text @@ -342,6 +376,8 @@ Jalview-File.icns CFBundleTypeRole Editor +LSHandlerRank +Default CFBundleTypeMIMETypes application/x-msf+txt @@ -361,6 +397,8 @@ Jalview-File.icns CFBundleTypeRole Editor +LSHandlerRank +Default CFBundleTypeMIMETypes application/x-pfam+txt @@ -380,6 +418,8 @@ Jalview-File.icns CFBundleTypeRole Editor +LSHandlerRank +Default CFBundleTypeMIMETypes application/x-phylip+txt @@ -399,6 +439,8 @@ Jalview-File.icns CFBundleTypeRole Editor +LSHandlerRank +Default CFBundleTypeMIMETypes application/x-pileup+txt @@ -418,6 +460,8 @@ Jalview-File.icns CFBundleTypeRole Editor +LSHandlerRank +Default CFBundleTypeMIMETypes application/x-pir+txt @@ -437,6 +481,8 @@ Jalview-File.icns CFBundleTypeRole Editor +LSHandlerRank +Default CFBundleTypeMIMETypes application/rnaml+xml @@ -456,6 +502,8 @@ Jalview-File.icns CFBundleTypeRole Editor +LSHandlerRank +Default CFBundleTypeMIMETypes application/x-jalview-scorematrix+text @@ -476,6 +524,8 @@ Jalview-File.icns CFBundleTypeRole Editor +LSHandlerRank +Default CFBundleTypeMIMETypes application/x-stockholm+txt diff --git a/utils/install4j/file_associations_auto-install4j10.xml b/utils/install4j/file_associations_auto-install4j10.xml new file mode 100644 index 0000000..ee70251 --- /dev/null +++ b/utils/install4j/file_associations_auto-install4j10.xml @@ -0,0 +1,1125 @@ + + + + Jalview (.jvp) + Creating file associations... + + + + + + + + + + + + + + Jalview File + jvp + JALVIEW + + + + + + + Jalview-File.png + + + application/x-jalview+xml+zip + + + Jalview-File.ico + + + + + + + + + + Jalview Launch (.jvl) + Creating file associations... + + + + + + + + + + + + + + Jalview Launch File + jvl + JALVIEW + + + + + + + jvl_file.png + + + application/x-jalview-jvl+text + + + jvl_file.ico + + + + + + + + + + CIF (.cif) + Creating file associations... + + + + + + + + + + + + + + CIF File + cif + JALVIEW + + + + + + + Jalview-File.png + + + chemical/x-cif + + + Jalview-File.ico + + + + + + + + + + mmCIF (.mcif, .mmcif) + Creating file associations... + + + + + + + + + + + + + + mmCIF File + mcif,mmcif + JALVIEW + + + + + + + Jalview-File.png + + + chemical/x-mmcif + + + Jalview-File.ico + + + + + + + + + + PDB (.ent, .pdb) + Creating file associations... + + + + + + + + + + + + + + PDB File + ent,pdb + JALVIEW + + + + + + + Jalview-File.png + + + chemical/x-pdb + + + Jalview-File.ico + + + + + + + + + + AMSA (.amsa) + Creating file associations... + + + + + + + + + + + + + + AMSA File + amsa + JALVIEW + + + + + + + Jalview-File.png + + + application/x-amsa+txt + + + Jalview-File.ico + + + + + + + + + + Jalview Annotations (.annotations, .jvannotations) + Creating file associations... + + + + + + + + + + + + + + Jalview Annotations File + annotations,jvannotations + JALVIEW + + + + + + + Jalview-File.png + + + application/x-jalview-annotations+text + + + Jalview-File.ico + + + + + + + + + + BioJSON (.biojson) + Creating file associations... + + + + + + + + + + + + + + BioJSON File + biojson + JALVIEW + + + + + + + Jalview-File.png + + + application/x-jalview-biojson+json + + + Jalview-File.ico + + + + + + + + + + BLC (.blc) + Creating file associations... + + + + + + + + + + + + + + BLC File + blc + JALVIEW + + + + + + + Jalview-File.png + + + application/x-blc+txt + + + Jalview-File.ico + + + + + + + + + + Clustal (.aln) + Creating file associations... + + + + + + + + + + + + + + Clustal File + aln + JALVIEW + + + + + + + Jalview-File.png + + + application/x-clustal+txt + + + Jalview-File.ico + + + + + + + + + + ENA Flatfile (.txt) + Creating file associations... + + + + + + + + + + + + + + ENA Flatfile File + txt + JALVIEW + + + + + + + Jalview-File.png + + + application/x-embl+txt + + + Jalview-File.ico + + + + + + + + + + Fasta (.fa, .fasta) + Creating file associations... + + + + + + + + + + + + + + Fasta File + fa,fasta + JALVIEW + + + + + + + Jalview-File.png + + + application/x-fasta+txt + + + Jalview-File.ico + + + + + + + + + + Jalview Features (.features, .jvfeatures) + Creating file associations... + + + + + + + + + + + + + + Jalview Features File + features,jvfeatures + JALVIEW + + + + + + + Jalview-File.png + + + application/x-jalview-features+text + + + Jalview-File.ico + + + + + + + + + + GenBank Flatfile (.gb, .gbk) + Creating file associations... + + + + + + + + + + + + + + GenBank Flatfile File + gb,gbk + JALVIEW + + + + + + + Jalview-File.png + + + application/x-genbank+txt + + + Jalview-File.ico + + + + + + + + + + Generic Features Format v2 (.gff2) + Creating file associations... + + + + + + + + + + + + + + Generic Features Format v2 File + gff2 + JALVIEW + + + + + + + Jalview-File.png + + + application/x-gff2+txt + + + Jalview-File.ico + + + + + + + + + + Generic Features Format v3 (.gff3) + Creating file associations... + + + + + + + + + + + + + + Generic Features Format v3 File + gff3 + JALVIEW + + + + + + + Jalview-File.png + + + application/x-gff3+txt + + + Jalview-File.ico + + + + + + + + + + JnetFile (.concise, .jnet) + Creating file associations... + + + + + + + + + + + + + + JnetFile File + concise,jnet + JALVIEW + + + + + + + Jalview-File.png + + + application/x-jalview-jnet+text + + + Jalview-File.ico + + + + + + + + + + MSF (.msf) + Creating file associations... + + + + + + + + + + + + + + MSF File + msf + JALVIEW + + + + + + + Jalview-File.png + + + application/x-msf+txt + + + Jalview-File.ico + + + + + + + + + + PFAM (.pfam) + Creating file associations... + + + + + + + + + + + + + + PFAM File + pfam + JALVIEW + + + + + + + Jalview-File.png + + + application/x-pfam+txt + + + Jalview-File.ico + + + + + + + + + + PHYLIP (.phy) + Creating file associations... + + + + + + + + + + + + + + PHYLIP File + phy + JALVIEW + + + + + + + Jalview-File.png + + + application/x-phylip+txt + + + Jalview-File.ico + + + + + + + + + + PileUp (.pileup) + Creating file associations... + + + + + + + + + + + + + + PileUp File + pileup + JALVIEW + + + + + + + Jalview-File.png + + + application/x-pileup+txt + + + Jalview-File.ico + + + + + + + + + + PIR (.pir) + Creating file associations... + + + + + + + + + + + + + + PIR File + pir + JALVIEW + + + + + + + Jalview-File.png + + + application/x-pir+txt + + + Jalview-File.ico + + + + + + + + + + RNAML (.rnaml) + Creating file associations... + + + + + + + + + + + + + + RNAML File + rnaml + JALVIEW + + + + + + + Jalview-File.png + + + application/rnaml+xml + + + Jalview-File.ico + + + + + + + + + + Substitution Matrix (.mat) + Creating file associations... + + + + + + + + + + + + + + Substitution Matrix File + mat + JALVIEW + + + + + + + Jalview-File.png + + + application/x-jalview-scorematrix+text + + + Jalview-File.ico + + + + + + + + + + Stockholm (.stk, .sto) + Creating file associations... + + + + + + + + + + + + + + Stockholm File + stk,sto + JALVIEW + + + + + + + Jalview-File.png + + + application/x-stockholm+txt + + + Jalview-File.ico + + + + + + diff --git a/utils/install4j/file_associations_template-Info_plist.xml b/utils/install4j/file_associations_template-Info_plist.xml index a260658..afac20c 100644 --- a/utils/install4j/file_associations_template-Info_plist.xml +++ b/utils/install4j/file_associations_template-Info_plist.xml @@ -9,6 +9,8 @@ $$ $$ICONFILE$$.icns CFBundleTypeRole $$ROLE$$ +LSHandlerRank +$$RANK$$ CFBundleTypeMIMETypes $$MIMETYPE$$ diff --git a/utils/install4j/file_associations_template-install4j10.xml b/utils/install4j/file_associations_template-install4j10.xml new file mode 100644 index 0000000..8663ed9 --- /dev/null +++ b/utils/install4j/file_associations_template-install4j10.xml @@ -0,0 +1,45 @@ + + + + $$NAME$$ ($$DISPLAYEXTENSION$$) + Creating file associations... + + + + + + + + + + + + + + $$NAME$$ File + $$EXTENSION$$ + JALVIEW + + + + + + + $$ICONFILE$$.png + + + $$MIMETYPE$$ + + + $$ICONFILE$$.ico + + + + + + diff --git a/utils/install4j/install4j10_template.install4j b/utils/install4j/install4j10_template.install4j new file mode 100644 index 0000000..77cd42e --- /dev/null +++ b/utils/install4j/install4j10_template.install4j @@ -0,0 +1,1496 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + *.dylib + *.so + *.jnilib + unpack200 + tnameserv + servertool + rmiregistry + rmid + policytool + pack200 + orbd + keytool + jjs + java + jspawnhelper + libfreetype.dylib.6 + applet + jaotc + jfr + jrunscript + libjli.dylib + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${compiler:file("${compiler:INFO_PLIST_FILE_ASSOCIATIONS_FILE}")} + + + + + + + + + + + + + + + + + + + + + + + + 255 + 255 + 255 + 255 + + + 49 + 52 + 53 + 255 + + + + + + + + + + + 255 + 255 + 255 + 255 + + + + + + ${compiler:JALVIEW_DIR}/${compiler:BACKGROUND} + + + + + 5 + 10 + 10 + 10 + + + + + imageAnchor + imageEdgeBackgroundColor + imageFile + + + + + + + + + + labelText + + + + + + + + + + + + + + + + + String userHome = (String)context.getVariable("sys.userHome"); + +ArrayList<String> tryPaths = new ArrayList<> (); +tryPaths.add(userHome + File.separator + "bin"); +tryPaths.add(userHome + File.separator + ".local" + File.separator + "bin"); +tryPaths.add(userHome + File.separator + "local" + File.separator + "bin"); +tryPaths.add(userHome + File.separator + "opt" + File.separator + "bin"); + +if (Util.isMacOS()) { // && root permission? + tryPaths.add(File.separator + "usr" + File.separator + "local" + File.separator + "bin"); +} + +for (int i = 0; i < tryPaths.size(); i++) { + String tryPath = tryPaths.get(i); + File unixUserBinDir = new File(tryPath); + if (unixUserBinDir.exists()) { + return tryPath; + } +} + +return null; + + + + unixUserBinDir + + Util.isLinux() || Util.isUnixInstaller() || Util.isMacOS() + + + + + + String javaHome = System.getProperty("java.home"); +String appName = ((String)context.getCompilerVariable("JALVIEW_APPLICATION_NAME")) + ".app"; +int i = javaHome.indexOf(appName); +String wrapperLink = null; +if (i > -1) { + wrapperLink = javaHome.substring(0, i) + appName + File.separator + "Contents" + File.separator + "MacOS" + File.separator + ((String)context.getCompilerVariable("WRAPPER_LINK")); +} +return wrapperLink; + + + + macWrapperLinkLocation + + Util.isMacOS() + + + + + + + + + + + + + + 255 + 255 + 255 + 255 + + + 49 + 52 + 53 + 255 + + + + + + + + + + + + 25 + 143 + 220 + 255 + + + 0 + 74 + 151 + 255 + + + + + + + ${compiler:JALVIEW_DIR}/${compiler:BACKGROUND} + + + + + 5 + 10 + 10 + 10 + + + + + imageAnchor + imageEdgeBackgroundColor + imageFile + + + + + + + + + sys.installationDir + + + context.getBooleanVariable("sys.confirmedUpdateInstallation") + + + + + + ${form:welcomeMessage} + + !context.isConsole() + + + + + + String message = context.getMessage("ConsoleWelcomeLabel", context.getApplicationName()); +return console.askOkCancel(message, true); + + + + + + + + updateCheck + + + + + ${i18n:ClickNext} + + + + + + !context.getBooleanVariable("sys.confirmedUpdateInstallation") + + + + + sys.installationDir + + + context.getVariable("sys.responseFile") == null + + + + + + ${i18n:SelectDirLabel(${compiler:sys.fullName})} + + + + + + + + allowSpacesOnUnix + checkFreeSpace + checkWritable + existingDirWarning + manualEntryAllowed + showFreeDiskSpace + showRequiredDiskSpace + standardValidation + suggestAppDir + validateApplicationId + validationScript + + + + + + + + + ${i18n:SelectComponentsLabel2} + + !context.isConsole() + + + + + + + selectionChangedScript + + + + + + + + + ${i18n:SelectAssociationsLabel} + + + + + + + + + + showSelectionButtons + selectionButtonPosition + + + + + + + + + + + ${compiler:APPLICATION_CATEGORIES} + + + + Examples + + + examples + + + + + + ${compiler:JALVIEW_NAME} + ${i18n:UninstallerMenuEntry(${compiler:sys.fullName})} + + !context.getBooleanVariable("sys.programGroupDisabled") + + + + + ${compiler:APPLICATION_CATEGORIES} + ${compiler:JALVIEW_NAME} + ${i18n:UninstallerMenuEntry(${compiler:sys.fullName})} + + !context.getBooleanVariable("sys.programGroupDisabled") + + + + ${compiler:sys.fullName} ${compiler:sys.version} + + + + + + + + + + + + true + + + + 121 + + + + + + + + Creating file associations... + + + + + + + + + + + + + + This action, identified by its name "EXTENSIONS_REPLACED_BY_GRADLE", will be replaced by gradle with the contents of file 'file_associations_auto_install4j.xml'. + extensions_to_be_replaced_by_gradle + JALVIEW + + + + + + + Finished creating file associations + + + + + + + + + + + + + + JALVIEW + jalview + + + + + JALVIEW + jalviews + + + + + JALVIEW + ${compiler:EXTRA_SCHEME} + + + + + + + ${i18n:WizardPreparing} + + + + + + + + + + ${compiler:APPLICATION_CATEGORIES} + ${compiler:JALVIEW_APPLICATION_NAME} + + + ${installer:sys.contentDir}/${compiler:EXECUTABLE_NAME} + + + + + ${compiler:JALVIEW_DIR}/${compiler:WINDOWS_ICONS_FILE} + + + ${compiler:JALVIEW_NAME} + + + ${compiler:JALVIEW_DIR}/${compiler:PNG_ICON_FILE} + + + + !context.getBooleanVariable("sys.programGroupDisabled") + + + + + ${compiler:JALVIEW_APPLICATION_NAME} + + + ${installer:sys.contentDir}/${compiler:EXECUTABLE_NAME} + + + ${compiler:JALVIEW_APPLICATION_NAME} + + + ${compiler:JALVIEW_DIR}/${compiler:PNG_ICON_FILE} + + + + + ${compiler:JALVIEW_DIR}/${compiler:WINDOWS_ICONS_FILE} + + + + context.getBooleanVariable("createDesktopLinkAction") + + + + + + ${compiler:JALVIEW_APPLICATION_NAME}.app + + + + context.getBooleanVariable("addToDockAction") + + + + + + ${compiler:WRAPPER_SCRIPT_BIN_DIR}/${compiler:BASH_WRAPPER_SCRIPT} + + + + + ${compiler:WRAPPER_SCRIPT_BIN_DIR}/${compiler:WRAPPER_LINK} + + + + Util.isLinux() || Util.isUnixInstaller() || Util.isMacOS() + + + + + ${installer:sys.contentDir}\${compiler:WRAPPER_SCRIPT_BIN_DIR} + Path + + context.getBooleanVariable("appendToPathAction") + + + + + + ${installer:sys.contentDir}/${compiler:WRAPPER_SCRIPT_BIN_DIR}/${compiler:BASH_WRAPPER_SCRIPT} + + + + + ${installer:unixUserBinDir}/${compiler:WRAPPER_LINK} + + + + context.getBooleanVariable("makeSymbolicLinkAction") && ( Util.isLinux() || Util.isUnixInstaller() ) && ( context.getVariable("unixUserBinDir") != null ) + + + + + + ${installer:macWrapperLinkLocation} + + + + + ${installer:unixUserBinDir}/${compiler:WRAPPER_LINK} + + + + context.getBooleanVariable("makeSymbolicLinkAction") && Util.isMacOS() && ( context.getVariable("unixUserBinDir") != null ) && ( context.getVariable("macWrapperLinkLocation") != null ) + + + + + + ${form:finishedMessage} + + + + + ${i18n:CreateDesktopIcon} + + createDesktopLinkAction + + !Util.isMacOS() + + + + ${i18n:AddToDock} + + addToDockAction + + Util.isMacOS() + + + + Add ${compiler:JALVIEW_APPLICATION_NAME}'s bin folder to the Path environment variable + + appendToPathAction + + Util.isWindows() + + + + Make a ${compiler:WRAPPER_LINK} symbolic link in ${installer:unixUserBinDir} + + makeSymbolicLinkAction + + ( Util.isLinux() || Util.isUnixInstaller() || ( Util.isMacOS() && ( context.getVariable("macWrapperLinkLocation") != null ) ) ) && ( context.getVariable("unixUserBinDir") != null ) + + + + + + + + ${i18n:UninstallerMenuEntry(${compiler:sys.fullName})} + + + + + + + + + + 255 + 255 + 255 + 255 + + + 49 + 52 + 53 + 255 + + + + + + + + + + + 192 + 192 + 192 + 255 + + + + + + ${compiler:JALVIEW_DIR}/${compiler:BACKGROUND} + + + + + 5 + 10 + 10 + 10 + + + + + imageAnchor + imageEdgeBackgroundColor + imageFile + + + + + + + + + + + + + + + + + + ${form:welcomeMessage} + + !context.isConsole() + + + + + + String message = context.getMessage("ConfirmUninstall", context.getApplicationName()); +return console.askYesNo(message, true); + + + + + + + + + + + + + + + + + + + + + + + + + + jre + + + + + jre.jar + + + + + .install4j + + + + + getdown-launcher.jar + + + + + getdown-launcher-old.jar + + + + + getdown-launcher-new.jar + + + + + gettingdown.lock + + + + + jre.zip + + + + + digest.txt + + + + + digest2.txt + + + + + getdown-launcher.jarv + + + + + getdown-launcher-new.jarv + + + + + launcher.log + + + + + proxy.txt + + + + + build_properties + + + + + channel_launch*.jvl + + + + + jalview*.jvl + + + + + *.jarv + + + + + *.log + + + + + *.txt + + + + + *_new + + + + + hs_err_*.* + + + + + ${compiler:GETDOWN_DIST_DIR} + + + + + ${compiler:GETDOWN_ALT_DIR} + + + + + ${compiler:GETDOWN_RESOURCE_DIR} + + + + + META-INF + + + + + install + + + + + resource + + + + + dist + + + + + release + + + + + alt + + + + + dev + + + + + build + + + + + alt_* + + + + + dev_* + + + + + build_* + + + + + ${compiler:WRAPPER_SCRIPT_BIN_DIR} + + + + + bin + + + + + channel.props + + + + + channel.propsv + + + + + + + + + + + + + + + + ${i18n:UninstallerPreparing} + + + + + + + + + + ${form:successMessage} + + + + + + + + + + + . + + + ${compiler:WRAPPER_LINK}_setup + ${compiler:sys.fullName} + + + + + + + + + + + + + + Running ${i18n:SetupAppTitle} + + + + + + + + + ${i18n:FinishedLabel(${compiler:JALVIEW_APPLICATION_NAME})} + + + + + ${i18n:AddToDock} + + addToDockAction + + Util.isMacOS() + + + + Make a ${compiler:WRAPPER_LINK} symbolic link in ${installer:unixUserBinDir} + + makeSymbolicLinkAction + + ( Util.isLinux() || Util.isUnixInstaller() || ( Util.isMacOS() && ( context.getVariable("macWrapperLinkLocation") != null ) ) ) && ( context.getVariable("unixUserBinDir") != null ) + + + + +${i18n:ClickFinish} + +${compiler:JALVIEW_APPLICATION_NAME} will now launch. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/utils/install4j/install4j9_template.install4j b/utils/install4j/install4j9_template.install4j index 23ff9c9..979b1a9 100644 --- a/utils/install4j/install4j9_template.install4j +++ b/utils/install4j/install4j9_template.install4j @@ -1,5 +1,5 @@ - + @@ -23,18 +23,22 @@ - - - - - - + + + + + + + + + + - - + + @@ -86,25 +90,20 @@ - - - + + - - - + + - - - - + + - @@ -112,9 +111,8 @@ - - - + + @@ -122,26 +120,6 @@ - - - - - - - - - - - - - - - - - - - - @@ -1421,31 +1399,35 @@ ${compiler:JALVIEW_APPLICATION_NAME} will now launch. - - - - - - + + + - - - - + + - + - - - - - - + + + + + + + + + + + + + + + + - - + @@ -1457,59 +1439,57 @@ ${compiler:JALVIEW_APPLICATION_NAME} will now launch. - - - - - - - + + + + + + + + + + + + + + + - - - - + + - + - - - - - - + + + - - - - + + - + - - - - - - + + + - - - - + + - + + +