// for install4j
JAVA_MIN_VERSION = JAVA_VERSION
JAVA_MAX_VERSION = JAVA_VERSION
- macosJavaVMDir = string("${System.env.HOME}/buildtools/jre/openjdk-java_vm/getdown/macos-jre${JAVA_VERSION}/jre")
- macosJavaVMTgz = string("${System.env.HOME}/buildtools/jre/openjdk-java_vm/install4j/tgz/macos-jre${JAVA_VERSION}.tar.gz")
- windowsJavaVMDir = string("${System.env.HOME}/buildtools/jre/openjdk-java_vm/getdown/windows-jre${JAVA_VERSION}/jre")
- windowsJavaVMTgz = string("${System.env.HOME}/buildtools/jre/openjdk-java_vm/install4j/tgz/windows-jre${JAVA_VERSION}.tar.gz")
+ def 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")
+ macosJavaVMTgz = string("${jreInstallsDir}/tgz/jre-${JAVA_INTEGER_VERSION}-mac-x64.tar.gz")
+ windowsJavaVMDir = string("${jreInstallsDir}/jre-${JAVA_INTEGER_VERSION}-windows-x64/jre")
+ windowsJavaVMTgz = string("${jreInstallsDir}/tgz/jre-${JAVA_INTEGER_VERSION}-windows-x64.tar.gz")
+ linuxJavaVMDir = string("${jreInstallsDir}/jre-${JAVA_INTEGER_VERSION}-linux-x64/jre")
+ 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}")
}
def hostname = "hostname".execute().text.trim()
- if ((pandoc == null || ! file(pandoc).exists()) && hostname.equals("jv-bamboo")) {
+ def buildtoolsPandoc = System.getProperty("user.home")+"/buildtools/pandoc/bin/pandoc"
+ if ((pandoc == null || ! file(pandoc).exists()) && file(buildtoolsPandoc).exists()) {
pandoc = System.getProperty("user.home")+"/buildtools/pandoc/bin/pandoc"
}
}
def install4jTemplateVersion = "${JALVIEW_VERSION}_F${filesMd5}_C${gitHash}"
+ println("WINDOWS_JAVA_VM_TGZ=${windowsJavaVMTgz}")
variables = [
'OSX_KEYSTORE': OSX_KEYSTORE,
'JSIGN_SH': JSIGN_SH,
'JAVA_INTEGER_VERSION': JAVA_INTEGER_VERSION,
'VERSION': JALVIEW_VERSION,
'MACOS_JAVA_VM_DIR': macosJavaVMDir,
- 'MACOS_JAVA_VM_TGZ': macosJavaVMTgz,
'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,
'MACOS_BUNDLE_ID': install4j_macOS_bundle_id,
'GETDOWN_RESOURCE_DIR': getdown_resource_dir,
getdown_alt_java11_max_version =
#getdown_alt_java11_txt_multi_java_location = [windows-amd64] /getdown/jre/windows-jre11.jar,[linux-amd64] /getdown/jre/linux-jre11.tgz,[mac os x] /getdown/jre/macos-jre11.tgz
#getdown_alt_java8_txt_multi_java_location = [windows-amd64] /getdown/jre/windows-jre1.8.tgz,[linux-amd64] /getdown/jre/linux-jre1.8.tgz,[mac os x] /getdown/jre/macos-jre1.8.tgz
-JRE_installs = /Users/bsoares/Java/installs
-Windows_JRE8 = OpenJDK8U-jdk_x64_windows_hotspot_8u202b08/jdk8u202-b08
-Mac_JRE8 = OpenJDK8U-jre_x64_mac_hotspot_8u202b08/jdk8u202-b08-jre/Contents/Home
-Linux_JRE8 = OpenJDK8U-jre_x64_linux_hotspot_8u202b08/jdk8u202-b08-jre
-Windows_JRE11 = OpenJDK11-jre_x64_windows_hotspot_11_28/jdk-11+28-jre
-Mac_JRE11 = OpenJDK11-jre_x64_mac_hotspot_11_28/jdk-11+28-jre/Contents/Home
-Linux_JRE11 = OpenJDK11-jre_x64_linux_hotspot_11_28/jdk-11+28-jre
+jre_installs_dir = ~/buildtools/jre
j8libDir = j8lib
j11libDir = j11lib
--- /dev/null
+#!/usr/bin/env bash
+
+# see https://api.adoptopenjdk.net/swagger-ui/#/Binary/get_v3_binary_latest__feature_version___release_type___os___arch___image_type___jvm_impl___heap_size___vendor_
+
+
+### bs 2020-01-22
+### This is a script to download and update the JREs used in the windows, mac (and maybe linux) installations, and update channel
+### It creates a structure with
+### ./jre-VERSION-OS-ARCH/jre/...
+### as used by getdown
+### and
+### ./tgz/jre-VERSION-OS-ARCH.tgz
+### which is an archive of the _contents_ of ./jre-VERSION-OS-ARCH/jre/ and used by install4j for the installer
+
+BASE=https://api.adoptopenjdk.net/v3/binary/latest
+RELEASE_TYPE=ga
+JVM_IMPL=hotspot
+HEAP_SIZE=normal
+VENDOR=adoptopenjdk
+IMAGE_TYPE=jre
+
+RM=/bin/rm
+
+# unzip-strip from https://superuser.com/questions/518347/equivalent-to-tars-strip-components-1-in-unzip
+unzip-strip() (
+ local zip=$1
+ local dest=${2:-.}
+ 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"
+)
+
+for FEATURE_VERSION in 8 11; do
+ for OS in linux mac windows; do
+ for ARCH in x64 x32 arm; do
+ #for ARCH in aarch64 arm x32 x64; do
+ NAME="${IMAGE_TYPE}-${FEATURE_VERSION}-${OS}-${ARCH}"
+ TARFILE="${NAME}.tgz"
+ 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}'"
+ $RM -f "${TARFILE}"
+ continue;
+ fi
+ echo "Unpacking ${TARFILE}"
+ JREDIR="${NAME}/jre"
+ [ x$NAME != x -a -e "${JREDIR}" ] && $RM -rf "${JREDIR}"
+ mkdir -p "${JREDIR}"
+ if [ x$OS = xwindows ]; then
+ echo "using unzip"
+ unzip-strip "${TARFILE}" "${JREDIR}"
+ RET=$?
+ else
+ echo "using tar"
+ tar --strip-components=1 -C "${JREDIR}" -zxf "${TARFILE}"
+ RET=$?
+ fi
+ if [ "$RET" != 0 ]; then
+ echo "Error unpacking ${TARFILE}"
+ exit 1
+ fi
+ $RM "${TARFILE}"
+ echo "Creating .tar.gz for install4j bundling and updates"
+ TGZDIR=tgz
+ mkdir -p "${TGZDIR}"
+ tar -C "${JREDIR}" -zcf "${TGZDIR}/${NAME}.tar.gz" .
+ done
+ done
+done
+
<?xml version="1.0" encoding="UTF-8"?>
-<install4j version="8.0.3" transformSequenceNumber="8">
+<install4j version="8.0.4" transformSequenceNumber="8">
<directoryPresets config="." />
- <application name="Jalview" applicationId="6595-2347-1923-0725" mediaDir="../../build/install4j" lzmaCompression="true" shortName="Jalview" publisher="University of Dundee" publisherWeb="https://www.jalview.org/" version="${compiler:JALVIEW_VERSION}" allPathsRelative="true" macVolumeId="5aac4968c304f65" javaMinVersion="${compiler:JAVA_MIN_VERSION}" javaMaxVersion="9999999999${compiler:JAVA_MAX_VERSION}" allowBetaVM="true" jdkMode="jdk" jdkName="JDK 11.0">
+ <application name="Jalview" applicationId="6595-2347-1923-0725" mediaDir="${compiler:BUILD_DIR}" lzmaCompression="true" shortName="Jalview" publisher="University of Dundee" publisherWeb="https://www.jalview.org/" version="${compiler:JALVIEW_VERSION}" allPathsRelative="true" macVolumeId="5aac4968c304f65" javaMinVersion="${compiler:JAVA_MIN_VERSION}" javaMaxVersion="9999999999${compiler:JAVA_MAX_VERSION}" allowBetaVM="true" jdkMode="jdk" jdkName="JDK 11.0">
<searchSequence>
<directory location="${compiler:JRE_DIR}" />
<registry />
<variable name="JAVA_VERSION" value="11" />
<variable name="JAVA_INTEGER_VERSION" value="11" />
<variable name="VERSION" value="DEVELOPMENT" />
- <variable name="MACOS_JAVA_VM_DIR" value="~/buildtools/jre/openjdk-java_vm/getdown/macos-jre11/jre" />
- <variable name="MACOS_JAVA_VM_TGZ" value="~/buildtools/jre/openjdk-java_vm/install4j/tgz/macos-jre11.tar.gz" />
- <variable name="WINDOWS_JAVA_VM_DIR" value="~/buildtools/jre/openjdk-java_vm/getdown/windows-jre11/jre" />
- <variable name="WINDOWS_JAVA_VM_TGZ" value="~/buildtools/jre/openjdk-java_vm/install4j/tgz/windows-jre11.tar.gz" />
+ <variable name="MACOS_JAVA_VM_DIR" value="~/buildtools/jre/jre-${compiler:JAVA_INTEGER_VERSION}-mac-x64/jre" />
+ <variable name="WINDOWS_JAVA_VM_DIR" value="~/buildtools/jre/jre-${compiler:JAVA_INTEGER_VERSION}-windows-x64/jre" />
+ <variable name="LINUX_JAVA_VM_DIR" value="~/buildtools/jre/jre-${compiler:JAVA_INTEGER_VERSION}-linux-x64/jre" />
+ <variable name="MACOS_JAVA_VM_TGZ" value="~/buildtools/jre/tgz/jre-${compiler:JAVA_INTEGER_VERSION}-mac-x64.tar.gz" />
+ <variable name="WINDOWS_JAVA_VM_TGZ" value="~/buildtools/jre/tgz/jre-${compiler:JAVA_INTEGER_VERSION}-windows-x64.tar.gz" />
+ <variable name="LINUX_JAVA_VM_TGZ" value="~/buildtools/jre/tgz/jre-${compiler:JAVA_INTEGER_VERSION}-linux-x64.tar.gz" />
<variable name="COPYRIGHT_MESSAGE" value="..." />
<variable name="MACOS_BUNDLE_ID" value="org.jalview.jalview-desktop" />
<variable name="GETDOWN_RESOURCE_DIR" value="resource" />
<variable name="GETDOWN_ALT_DIR" value="alt" />
<variable name="GETDOWN_INSTALL_DIR" value="install" />
<variable name="INFO_PLIST_FILE_ASSOCIATIONS_FILE" value="file_associations_auto-Info_plist.xml" />
+ <variable name="BUILD_DIR" value="../../build/install4j" />
</variables>
<codeSigning macEnabled="true" macPkcs12File="${compiler:OSX_KEYSTORE}" />
</application>
<entry filesetId="1873" />
<entry filesetId="2105" />
</exclude>
+ <jreBundle jreBundleSource="preCreated" includedJre="${compiler:LINUX_JAVA_VM_TGZ}" manualJreEntry="true" />
</unixInstaller>
<unixArchive name="Unix .tar.gz Archive" id="1596" mediaFileName="${compiler:sys.shortName}-${compiler:JALVIEW_VERSION}-${compiler:sys.platform}-java_${compiler:JAVA_INTEGER_VERSION}">
<excludedComponents>
<entry filesetId="882" />
<entry filesetId="1873" />
</exclude>
+ <jreBundle jreBundleSource="preCreated" includedJre="${compiler:LINUX_JAVA_VM_TGZ}" manualJreEntry="true" />
</unixArchive>
</mediaSets>
<buildIds>