From: Ben Soares Date: Thu, 19 Dec 2019 16:44:44 +0000 (+0000) Subject: JAL-3210 Bringing in improvements to build.gradle X-Git-Url: http://source.jalview.org/gitweb/?p=jalview.git;a=commitdiff_plain;h=f3213c0763f9a1d1b911ad5d64074b971f5b8e8b;hp=ed71244bc1c77e2168a8eb64a3ef8100cb56e2c1 JAL-3210 Bringing in improvements to build.gradle --- diff --git a/build.gradle b/build.gradle index c451100..36c78a2 100644 --- a/build.gradle +++ b/build.gradle @@ -3,8 +3,9 @@ import org.gradle.internal.os.OperatingSystem import org.gradle.plugins.ide.eclipse.model.Output import org.gradle.plugins.ide.eclipse.model.Library import java.security.MessageDigest - import groovy.transform.ExternalizeMethods +import groovy.util.XmlParser +import groovy.xml.XmlUtil buildscript { dependencies { @@ -17,7 +18,7 @@ plugins { id 'application' id 'eclipse' id 'com.github.johnrengelman.shadow' version '4.0.3' - id 'com.install4j.gradle' version '7.0.9' + id 'com.install4j.gradle' version '8.0.2' id 'com.dorongold.task-tree' version '1.4' // only needed to display task dependency tree with gradle task1 [task2 ...] taskTree } @@ -83,12 +84,12 @@ ext { } else { println("HEADLESS BUILD") } - + J2S_ENABLED = (project.hasProperty('j2s.compiler.status') && project['j2s.compiler.status'] != null && project['j2s.compiler.status'] == "enable") if (J2S_ENABLED) { println("J2S ENABLED") } - + /* *-/ System.properties.sort { it.key }.each { key, val -> println("SYSTEM PROPERTY ${key}='${val}'") @@ -123,7 +124,7 @@ ext { getdownDir = string("") reportRsyncCmd = false buildDist = true - buildProperties = string("${resourceDir}/${build_properties_file}") + buildProperties = build_properties_file getdownLauncher = string("${jalviewDir}/${getdown_lib_dir}/${getdown_launcher}") switch (CHANNEL) { @@ -133,7 +134,7 @@ ext { getdown_channel_name = string("${bamboo_planKey}/${JAVA_VERSION}") getdown_app_base = string("${bamboo_channelbase}/${bamboo_planKey}${bamboo_getdown_channel_suffix}/${JAVA_VERSION}") getdown_app_dir = getdown_app_dir_alt - buildProperties = string("${resourceDir}/${build_properties_file}") + buildProperties = string("${classesDir}/${build_properties_file}") break case "RELEASE": @@ -141,7 +142,7 @@ ext { getdownDir = string("${getdown_channel_name}/${JAVA_VERSION}") getdown_app_base = string("${getdown_channel_base}/${getdownDir}") getdown_app_dir = getdown_app_dir_release - buildProperties = string("${resourceDir}/${build_properties_file}") + buildProperties = string("${classesDir}/${build_properties_file}") reportRsyncCommand = true break @@ -155,7 +156,7 @@ ext { exit } else { packageDir = string("${ARCHIVEDIR}/${packageDir}") - buildProperties = string("${ARCHIVEDIR}/${resource_dir}/${build_properties_file}") + buildProperties = string("${ARCHIVEDIR}/${classes_dir}/${build_properties_file}") buildDist = false } reportRsyncCommand = true @@ -171,7 +172,7 @@ ext { exit } else { packageDir = string("${ARCHIVEDIR}/${packageDir}") - buildProperties = string("${ARCHIVEDIR}/${resource_dir}/${build_properties_file}") + buildProperties = string("${ARCHIVEDIR}/${classes_dir}/${build_properties_file}") buildDist = false } reportRsyncCommand = true @@ -183,7 +184,7 @@ ext { getdownDir = string("${getdown_channel_name}/${JAVA_VERSION}") getdown_app_base = string("${getdown_channel_base}/${getdownDir}") getdown_app_dir = getdown_app_dir_alt - buildProperties = string("${resourceDir}/${build_properties_file}") + buildProperties = string("${classesDir}/${build_properties_file}") reportRsyncCommand = true break @@ -192,7 +193,7 @@ ext { getdownDir = string("${getdown_channel_name}/${JAVA_VERSION}") getdown_app_base = string("${getdown_channel_base}/${getdownDir}") getdown_app_dir = getdown_app_dir_alt - buildProperties = string("${resourceDir}/${build_properties_file}") + buildProperties = string("${classesDir}/${build_properties_file}") reportRsyncCommand = true break @@ -201,14 +202,14 @@ ext { getdownDir = string("${getdown_channel_name}/${JAVA_VERSION}") getdown_app_base = string("${getdown_channel_base}/${getdownDir}") getdown_app_dir = getdown_app_dir_alt - buildProperties = string("${resourceDir}/${build_properties_file}") + buildProperties = string("${classesDir}/${build_properties_file}") reportRsyncCommand = true break case "LOCAL": getdown_app_base = file(getdownWebsiteDir).toURI().toString() getdown_app_dir = getdown_app_dir_alt - buildProperties = string("${resourceDir}/${build_properties_file}") + buildProperties = string("${classesDir}/${build_properties_file}") getdownLauncher = string("${jalviewDir}/${getdown_lib_dir}/${getdown_launcher_local}") break @@ -288,20 +289,26 @@ ext { // 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") - install4jDir = string("${jalviewDir}/${install4jResourceDir}") - install4jConfFileName = string("jalview-installers-java${JAVA_VERSION}.install4j") - install4jConfFile = string("${install4jDir}/${install4jConfFileName}") + install4jDir = string("${jalviewDir}/${install4j_utils_dir}") + install4jConfFileName = string("jalview-install4j-conf.install4j") + install4jConfFile = file("${install4jDir}/${install4jConfFileName}") + install4jHomeDir = install4j_home_dir + if (install4jHomeDir.startsWith("~/")) { + install4jHomeDir = System.getProperty("user.home") + install4jHomeDir.substring(1) + } + buildingHTML = string("${jalviewDir}/${docDir}/building.html") helpFile = string("${classesDir}/${help_dir}/help.jhm") helpParentDir = string("${jalviewDir}/${help_parent_dir}") - helpDir = string("${help_dir}") - helpSourceDir = string("${helpParentDir}/${helpDir}") + helpSourceDir = string("${helpParentDir}/${help_dir}") relativeBuildDir = file(jalviewDirAbsolutePath).toPath().relativize(buildDir.toPath()) @@ -339,11 +346,13 @@ sourceSets { resources { srcDirs resourceDir + srcDirs += helpParentDir } jar.destinationDir = file("${jalviewDir}/${packageDir}") compileClasspath = files(sourceSets.main.java.outputDir) + //compileClasspath += files(sourceSets.main.resources.srcDirs) compileClasspath += fileTree(dir: "${jalviewDir}/${libDir}", include: ["*.jar"]) runtimeClasspath = compileClasspath @@ -451,9 +460,9 @@ eclipse { } cp.entries.removeAll(removeTheseToo) - cp.entries += new Output("${eclipse_bin_dir}/main") - if (file(helpSourceDir).isDirectory()) { - cp.entries += new Library(fileReference(helpSourceDir)) + //cp.entries += new Output("${eclipse_bin_dir}/main") + if (file(helpParentDir).isDirectory()) { + cp.entries += new Library(fileReference(helpParentDir)) } if (file(resourceDir).isDirectory()) { cp.entries += new Library(fileReference(resourceDir)) @@ -461,7 +470,7 @@ eclipse { HashMap alreadyAddedLibPath = new HashMap<>(); - sourceSets.main.compileClasspath.findAll { it.name.endsWith(".jar") }.each { + sourceSets.main.compileClasspath.findAll { it.name.endsWith(".jar") }.any { //don't want to add outputDir as eclipse is using its own output dir in bin/main if (it.isDirectory() || ! it.exists()) { // don't add dirs to classpath, especially if they don't exist @@ -481,7 +490,6 @@ eclipse { } } - //fileTree(dir: "$jalviewDir/$utilsDir", include: ["test*/*.jar"]).each { sourceSets.test.compileClasspath.findAll { it.name.endsWith(".jar") }.any { //no longer want to add outputDir as eclipse is using its own output dir in bin/main if (it.isDirectory() || ! it.exists()) { @@ -670,8 +678,6 @@ task setGitVals { task createBuildProperties(type: WriteProperties) { - group = "build" - description = "Create the ${buildProperties} file" dependsOn setGitVals inputs.dir(sourceDir) inputs.dir(resourceDir) @@ -687,13 +693,6 @@ task createBuildProperties(type: WriteProperties) { } -clean { - doFirst { - delete buildProperties - } -} - - task cleanBuildingHTML(type: Delete) { doFirst { delete buildingHTML @@ -754,7 +753,7 @@ task syncDocs(type: Sync) { task copyHelp(type: Copy) { def inputDir = helpSourceDir - def outputDir = "${classesDir}/${helpDir}" + def outputDir = "${classesDir}/${help_dir}" from(inputDir) { exclude '**/*.gif' exclude '**/*.jpg' @@ -789,7 +788,6 @@ task syncLib(type: Sync) { task syncResources(type: Sync) { - dependsOn createBuildProperties from resourceDir include "**/*.*" into "${classesDir}" @@ -837,7 +835,7 @@ task buildIndices(type: JavaExec) { dependsOn copyHelp classpath = sourceSets.main.compileClasspath main = "com.sun.java.help.search.Indexer" - workingDir = "${classesDir}/${helpDir}" + workingDir = "${classesDir}/${help_dir}" def argDir = "html" args = [ argDir ] inputs.dir("${workingDir}/${argDir}") @@ -873,8 +871,7 @@ task linkCheck(type: JavaExec) { classpath = files("${jalviewDir}/${utilsDir}") main = "HelpLinksChecker" workingDir = jalviewDir - def help = "${classesDir}/${helpDir}" - args = [ "${classesDir}/${helpDir}", "-nointernet" ] + args = [ "${classesDir}/${help_dir}", "-nointernet" ] def outFOS = new FileOutputStream(helpLinksCheckerOutFile, false) // false == don't append def errFOS = outFOS @@ -885,13 +882,13 @@ task linkCheck(type: JavaExec) { outFOS, errorOutput) - inputs.dir("${classesDir}/${helpDir}") + inputs.dir("${classesDir}/${help_dir}") outputs.file(helpLinksCheckerOutFile) } // import the pubhtmlhelp target ant.properties.basedir = "${jalviewDir}" -ant.properties.helpBuildDir = "${jalviewDirAbsolutePath}/${classes_dir}/${helpDir}" +ant.properties.helpBuildDir = "${jalviewDirAbsolutePath}/${classes_dir}/${help_dir}" ant.importBuild "${utilsDir}/publishHelp.xml" @@ -901,7 +898,6 @@ task cleanPackageDir(type: Delete) { } } - jar { dependsOn linkCheck dependsOn buildIndices @@ -1208,98 +1204,56 @@ clean { install4j { - def install4jHomeDir = "/opt/install4j" - def hostname = "hostname".execute().text.trim() - if (hostname.equals("jv-bamboo")) { - install4jHomeDir = System.getProperty("user.home")+"/buildtools/install4j" - } else if (OperatingSystem.current().isMacOsX()) { - install4jHomeDir = '/Applications/install4j.app/Contents/Resources/app' - if (! file(install4jHomeDir).exists()) { - install4jHomeDir = System.getProperty("user.home")+install4jHomeDir - } - } else if (OperatingSystem.current().isLinux()) { + if (file(install4jHomeDir).exists()) { + // good to go! + } else if (file(System.getProperty("user.home")+"/buildtools/install4j").exists()) { install4jHomeDir = System.getProperty("user.home")+"/buildtools/install4j" + } else if (file("/Applications/install4j.app/Contents/Resources/app").exists()) { + install4jHomeDir = "/Applications/install4j.app/Contents/Resources/app" } - installDir = file(install4jHomeDir) - mediaTypes = Arrays.asList(install4jMediaTypes.split(",")) - if (install4jFaster.equals("true")) { - faster = true - } + installDir(file(install4jHomeDir)) + + mediaTypes = Arrays.asList(install4j_media_types.split(",")) } -task copyInstall4jTemplate(type: Copy) { - from (install4jDir) { - include install4jTemplate - rename (install4jTemplate, install4jConfFileName) - filter(ReplaceTokens, - beginToken: '', - endToken: '', - tokens: [ - '9999999999': JAVA_VERSION - ] - ) - filter(ReplaceTokens, - beginToken: '$$', - endToken: '$$', - tokens: [ - 'JAVA_VERSION': JAVA_VERSION, - 'JAVA_INTEGER_VERSION': JAVA_INTEGER_VERSION, - 'VERSION': JALVIEW_VERSION, - 'MACOS_JAVA_VM_DIR': macosJavaVMDir, - 'MACOS_JAVA_VM_TGZ': macosJavaVMTgz, - 'WINDOWS_JAVA_VM_DIR': windowsJavaVMDir, - 'WINDOWS_JAVA_VM_TGZ': windowsJavaVMTgz, - 'INSTALL4JINFOPLISTFILEASSOCIATIONS': install4jInfoPlistFileAssociations, - 'COPYRIGHT_MESSAGE': install4jCopyrightMessage, - 'MACOS_BUNDLE_ID': install4jMacOSBundleId, - 'GETDOWN_RESOURCE_DIR': getdown_resource_dir, - 'GETDOWN_DIST_DIR': getdown_app_dir, - 'GETDOWN_ALT_DIR': getdown_app_dir_alt, - 'GETDOWN_INSTALL_DIR': getdown_install_dir - ] - ) - if (OSX_KEYPASS == "") { - filter(ReplaceTokens, - beginToken: 'codeSigning macEnabled="', - endToken: '"', - tokens: [ - 'true': 'codeSigning macEnabled="false"' - ] - ) - filter(ReplaceTokens, - beginToken: 'runPostProcessor="true" ', - endToken: 'Processor', - tokens: [ - 'post': 'runPostProcessor="false" postProcessor' - ] - ) - } - } - into install4jDir - outputs.files(install4jConfFile) +task copyInstall4jTemplate { + def install4jTemplateFile = file("${install4jDir}/${install4j_template}") + def install4jFileAssociationsFile = file("${install4jDir}/${install4j_installer_file_associations}") + inputs.file(install4jTemplateFile) + inputs.file(install4jFileAssociationsFile) + outputs.file(install4jConfFile) doLast { - // include file associations in installer - def installerFileAssociationsXml = file("${install4jDir}/${install4jInstallerFileAssociations}").text - ant.replaceregexp( - byline: false, - flags: "s", - match: '', - replace: installerFileAssociationsXml, - file: install4jConfFile - ) - /* - // include uninstaller applescript app files in dmg - def installerDMGUninstallerXml = file("$install4jDir/$install4jDMGUninstallerAppFiles").text - ant.replaceregexp( - byline: false, - flags: "s", - match: '', - replace: installerDMGUninstallerXml, - file: install4jConfFile - ) - */ + def install4jConfigXml = new XmlParser().parse(install4jTemplateFile) + + // turn off code signing if no OSX_KEYPASS + if (OSX_KEYPASS == "") { + install4jConfigXml.'**'.codeSigning.each { codeSigning -> + codeSigning.'@macEnabled' = "false" + } + install4jConfigXml.'**'.windows.each { windows -> + windows.'@runPostProcessor' = "false" + } + } + + // put file association actions where placeholder action is + def install4jFileAssociationsText = install4jFileAssociationsFile.text + def fileAssociationActions = new XmlParser().parseText("${install4jFileAssociationsText}") + install4jConfigXml.'**'.action.any { a -> + if (a.'@name' == 'EXTENSIONS_REPLACED_BY_GRADLE') { + def parent = a.parent() + parent.remove(a) + fileAssociationActions.each { faa -> + parent.append(faa) + } + // don't need to continue in .any loop once replacements have been made + return true + } + } + + // write install4j file + install4jConfFile.text = XmlUtil.serialize(install4jConfigXml) } } @@ -1314,15 +1268,59 @@ clean { task installers(type: com.install4j.gradle.Install4jTask) { group = "distribution" description = "Create the install4j installers" + dependsOn setGitVals dependsOn getdown dependsOn copyInstall4jTemplate - projectFile = file(install4jConfFile) - variables = [majorVersion: version.substring(2, 11), build: 001, OSX_KEYSTORE: OSX_KEYSTORE, JSIGN_SH: JSIGN_SH] - destination = "${jalviewDir}/${install4jBuildDir}/${JAVA_VERSION}" + + projectFile = install4jConfFile + + // create an md5 for the input files to use as version for install4j conf file + def digest = MessageDigest.getInstance("MD5") + digest.update( + (file("${install4jDir}/${install4j_template}").text + + file("${install4jDir}/${install4j_info_plist_file_associations}").text + + file("${install4jDir}/${install4j_installer_file_associations}").text).bytes) + def filesMd5 = new BigInteger(1, digest.digest()).toString(16) + if (filesMd5.length() >= 8) { + filesMd5 = filesMd5.substring(0,8) + } + def install4jTemplateVersion = "${JALVIEW_VERSION}_F${filesMd5}_C${gitHash}" + + variables = [ + 'OSX_KEYSTORE': OSX_KEYSTORE, + 'JSIGN_SH': JSIGN_SH, + 'JRE_DIR': getdown_app_dir_java, + 'INSTALLER_TEMPLATE_VERSION': install4jTemplateVersion, + 'JALVIEW_VERSION': JALVIEW_VERSION, + 'JAVA_MIN_VERSION': JAVA_MIN_VERSION, + 'JAVA_MAX_VERSION': JAVA_MAX_VERSION, + 'JAVA_VERSION': JAVA_VERSION, + 'JAVA_INTEGER_VERSION': JAVA_INTEGER_VERSION, + 'VERSION': JALVIEW_VERSION, + 'MACOS_JAVA_VM_DIR': macosJavaVMDir, + 'MACOS_JAVA_VM_TGZ': macosJavaVMTgz, + 'WINDOWS_JAVA_VM_DIR': windowsJavaVMDir, + 'WINDOWS_JAVA_VM_TGZ': windowsJavaVMTgz, + 'COPYRIGHT_MESSAGE': install4j_copyright_message, + 'MACOS_BUNDLE_ID': install4j_macOS_bundle_id, + 'GETDOWN_RESOURCE_DIR': getdown_resource_dir, + 'GETDOWN_DIST_DIR': getdown_app_dir, + 'GETDOWN_ALT_DIR': getdown_app_dir_alt, + 'GETDOWN_INSTALL_DIR': getdown_install_dir, + 'INFO_PLIST_FILE_ASSOCIATIONS_FILE': install4j_info_plist_file_associations, + ] + + destination = "${jalviewDir}/${install4j_build_dir}/${JAVA_VERSION}" buildSelected = true + if (install4j_faster.equals("true") || CHANNEL.startsWith("DEVELOP") || CHANNEL.startsWith("LOCAL")) { + // this doesn't seem to work + faster = true + disableSigning = true + } + if (OSX_KEYPASS) { - macKeystorePassword=OSX_KEYPASS + macKeystorePassword = OSX_KEYPASS } doFirst { @@ -1331,13 +1329,14 @@ task installers(type: com.install4j.gradle.Install4jTask) { inputs.dir(getdownWebsiteDir) inputs.file(install4jConfFile) + inputs.file("${install4jDir}/${install4j_info_plist_file_associations}") inputs.dir(macosJavaVMDir) inputs.dir(windowsJavaVMDir) - outputs.dir("${jalviewDir}/${install4jBuildDir}/${JAVA_VERSION}") + outputs.dir("${jalviewDir}/${install4j_build_dir}/${JAVA_VERSION}") } -task sourceDist (type: Tar) { +task sourceDist(type: Tar) { def VERSION_UNDERSCORES = JALVIEW_VERSION.replaceAll("\\.", "_") def outputFileName = "${project.name}_${VERSION_UNDERSCORES}.tar.gz" @@ -1415,15 +1414,19 @@ task sourceDist (type: Tar) { } -task helppages { +task helppages { dependsOn copyHelp dependsOn pubhtmlhelp - inputs.dir("${classesDir}/${helpDir}") - outputs.dir("${buildDir}/distributions/${helpDir}") + inputs.dir("${classesDir}/${help_dir}") + outputs.dir("${buildDir}/distributions/${help_dir}") } + + +// JALVIEWJS STUFF HERE + task j2sSetHeadlessBuild { doFirst { IN_ECLIPSE = false diff --git a/gradle.properties b/gradle.properties index b64eb11..96070f3 100644 --- a/gradle.properties +++ b/gradle.properties @@ -66,7 +66,10 @@ getdown_build_properties = build_properties getdown_txt_title = Jalview getdown_txt_allow_offline = true getdown_txt_max_concurrent_downloads = 10 -getdown_txt_jalview.jvmmempc = 90 +# now got better defaults when not set +#getdown_txt_jalview.jvmmempc = 90 +# now got better defaults when not set +#getdown_txt_jalview.jvmmemmax = 32G getdown_txt_multi_jvmarg = -Dgetdownappdir=%APPDIR% getdown_txt_strict_comments = true getdown_txt_title = Jalview @@ -89,7 +92,7 @@ getdown_txt_ui.progress_text = 000000 getdown_txt_ui.status = 20, 380, 600, 58 getdown_txt_ui.status_text = 000066 #getdown_txt_ui.text_shadow = FFFFFF -getdown_txt_ui.install_error = http://www.jalview.org/faq/getdownerror +getdown_txt_ui.install_error = https://www.jalview.org/faq/getdownerror getdown_txt_ui.mac_dock_icon = resources/images/jalview_logos.ico getdown_alt_java8_min_version = 01080000 getdown_alt_java8_max_version = 01089999 @@ -105,21 +108,20 @@ 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 -j8libDir = j8lib -j11libDir = j11lib j11modDir = j11mod j11modules = com.sun.istack.runtime,com.sun.xml.bind,com.sun.xml.fastinfoset,com.sun.xml.streambuffer,com.sun.xml.txw2,com.sun.xml.ws.policy,java.activation,java.annotation,java.base,java.compiler,java.datatransfer,java.desktop,java.logging,java.management,java.management.rmi,java.naming,java.prefs,java.rmi,java.scripting,java.security.sasl,java.sql,java.xml,java.xml.bind,java.xml.soap,java.xml.ws,javax.jws,jdk.httpserver,jdk.jsobject,jdk.unsupported,jdk.xml.dom,org.jvnet.mimepull,org.jvnet.staxex,javax.servlet.api,java.ws.rs -install4jCopyrightMessage = ... -install4jMacOSBundleId = org.jalview.jalview-desktop -install4jResourceDir = utils/install4j -install4jTemplate = install4j_template.install4j -install4jInfoPlistFileAssociations = file_associations_auto-Info_plist.xml -install4jInstallerFileAssociations = file_associations_auto-install4j.xml -install4jDMGUninstallerAppFiles = uninstall_old_jalview_files.xml -install4jBuildDir = build/install4j -install4jMediaTypes = windows,macosArchive,linuxRPM,linuxDeb,unixArchive,unixInstaller -install4jFaster = false +install4j_home_dir = ~/buildtools/install4j8 +install4j_copyright_message = ... +install4j_macOS_bundle_id = org.jalview.jalview-desktop +install4j_utils_dir = utils/install4j +install4j_template = install4j8_template.install4j +install4j_info_plist_file_associations = file_associations_auto-Info_plist.xml +install4j_installer_file_associations = file_associations_auto-install4j8.xml +#install4j_DMG_uninstaller_app_files = uninstall_old_jalview_files.xml +install4j_build_dir = build/install4j +install4j_media_types = windows,macosArchive,linuxRPM,linuxDeb,unixArchive,unixInstaller +install4j_faster = false OSX_KEYSTORE = OSX_KEYPASS = @@ -129,10 +131,11 @@ pandoc_exec = /usr/local/bin/pandoc,/usr/bin/pandoc dev = false CHANNEL=LOCAL -getdown_channel_base = http://www.jalview.org/getdown +getdown_channel_base = https://www.jalview.org/getdown getdown_channel_name = SCRATCH-DEFAULT getdown_app_dir_release = release getdown_app_dir_alt = alt +getdown_app_dir_java = jre getdown_install_dir = install getdown_rsync_dest = /Volumes/jalview/docroot/getdown reportRsyncCommand = diff --git a/utils/install4j/file_associations_auto-Info_plist.xml b/utils/install4j/file_associations_auto-Info_plist.xml index da2633b..67f5ba0 100644 --- a/utils/install4j/file_associations_auto-Info_plist.xml +++ b/utils/install4j/file_associations_auto-Info_plist.xml @@ -26,9 +26,9 @@ jvl CFBundleTypeName -Jalview Version Locator File +Jalview Launch File CFBundleTypeIconFile -Jalview-Version-Locator.icns +Jalview-Launch.icns CFBundleTypeRole Editor CFBundleTypeMIMETypes @@ -42,76 +42,76 @@ CFBundleTypeExtensions -amsa +cif CFBundleTypeName -AMSA File +mmCIF File CFBundleTypeIconFile Jalview-File.icns CFBundleTypeRole -Editor +Viewer CFBundleTypeMIMETypes -text/x-amsa +chemical/x-cif LSIsAppleDefaultForType - + CFBundleTypeExtensions -annotations -jvannotations +mcif +mmcif CFBundleTypeName -Jalview Annotations File +mmCIF File CFBundleTypeIconFile Jalview-File.icns CFBundleTypeRole -Editor +Viewer CFBundleTypeMIMETypes -application/x-jalview-annotations+text +chemical/x-mcif LSIsAppleDefaultForType - + CFBundleTypeExtensions -biojson +pdb +ent CFBundleTypeName -BioJSON File +PDB File CFBundleTypeIconFile Jalview-File.icns CFBundleTypeRole -Editor +Viewer CFBundleTypeMIMETypes -application/x-jalview-biojson+json +chemical/x-pdb LSIsAppleDefaultForType - + CFBundleTypeExtensions -BLC -blc +amsa CFBundleTypeName -BLC File +AMSA File CFBundleTypeIconFile Jalview-File.icns CFBundleTypeRole Editor CFBundleTypeMIMETypes -text/x-blc +application/x-amsa+txt LSIsAppleDefaultForType @@ -120,17 +120,18 @@ CFBundleTypeExtensions -aln +annotations +jvannotations CFBundleTypeName -Clustal File +Jalview Annotations File CFBundleTypeIconFile Jalview-File.icns CFBundleTypeRole Editor CFBundleTypeMIMETypes -text/x-clustal +application/x-jalview-annotations+text LSIsAppleDefaultForType @@ -139,18 +140,17 @@ CFBundleTypeExtensions -fa -fasta +biojson CFBundleTypeName -Fasta File +BioJSON File CFBundleTypeIconFile Jalview-File.icns CFBundleTypeRole Editor CFBundleTypeMIMETypes -text/x-fasta +application/x-jalview-biojson+json LSIsAppleDefaultForType @@ -159,18 +159,17 @@ CFBundleTypeExtensions -features -jvfeatures +blc CFBundleTypeName -Jalview Features File +BLC File CFBundleTypeIconFile Jalview-File.icns CFBundleTypeRole Editor CFBundleTypeMIMETypes -application/x-jalview-features+text +application/x-blc+txt LSIsAppleDefaultForType @@ -179,17 +178,17 @@ CFBundleTypeExtensions -gff2 +aln CFBundleTypeName -Generic Features Format v2 File +Clustal File CFBundleTypeIconFile Jalview-File.icns CFBundleTypeRole Editor CFBundleTypeMIMETypes -text/x-gff2 +application/x-clustal+txt LSIsAppleDefaultForType @@ -198,17 +197,18 @@ CFBundleTypeExtensions -gff3 +fa +fasta CFBundleTypeName -Generic Features Format v3 File +Fasta File CFBundleTypeIconFile Jalview-File.icns CFBundleTypeRole Editor CFBundleTypeMIMETypes -text/x-gff3 +application/x-fasta+txt LSIsAppleDefaultForType @@ -217,18 +217,18 @@ CFBundleTypeExtensions -concise -jnet +features +jvfeatures CFBundleTypeName -JnetFile File +Jalview Features File CFBundleTypeIconFile Jalview-File.icns CFBundleTypeRole Editor CFBundleTypeMIMETypes -application/x-jalview-jnet+text +application/x-jalview-features+text LSIsAppleDefaultForType @@ -237,17 +237,17 @@ CFBundleTypeExtensions -cif +gff2 CFBundleTypeName -mmCIF File +Generic Features Format v2 File CFBundleTypeIconFile Jalview-File.icns CFBundleTypeRole Editor CFBundleTypeMIMETypes -chemical/x-cif +application/x-gff2+txt LSIsAppleDefaultForType @@ -256,18 +256,17 @@ CFBundleTypeExtensions -mcif -mmcif +gff3 CFBundleTypeName -mmCIF File +Generic Features Format v3 File CFBundleTypeIconFile Jalview-File.icns CFBundleTypeRole Editor CFBundleTypeMIMETypes -chemical/x-mcif +application/x-gff3+txt LSIsAppleDefaultForType @@ -276,17 +275,18 @@ CFBundleTypeExtensions -msf +concise +jnet CFBundleTypeName -MSF File +JnetFile File CFBundleTypeIconFile Jalview-File.icns CFBundleTypeRole Editor CFBundleTypeMIMETypes -text/x-msf +application/x-jalview-jnet+text LSIsAppleDefaultForType @@ -295,18 +295,17 @@ CFBundleTypeExtensions -pdb -ent +msf CFBundleTypeName -PDB File +MSF File CFBundleTypeIconFile Jalview-File.icns CFBundleTypeRole Editor CFBundleTypeMIMETypes -chemical/x-pdb +application/x-msf+txt LSIsAppleDefaultForType @@ -325,7 +324,7 @@ Editor CFBundleTypeMIMETypes -text/x-pfam +application/x-pfam+txt LSIsAppleDefaultForType @@ -344,7 +343,7 @@ Editor CFBundleTypeMIMETypes -text/x-phylip +application/x-phylip+txt LSIsAppleDefaultForType @@ -363,7 +362,7 @@ Editor CFBundleTypeMIMETypes -text/x-pileup +application/x-pileup+txt LSIsAppleDefaultForType @@ -382,7 +381,7 @@ Editor CFBundleTypeMIMETypes -text/x-pir +application/x-pir+txt LSIsAppleDefaultForType @@ -440,7 +439,7 @@ Editor CFBundleTypeMIMETypes -text/x-stockholm +application/x-stockholm+txt LSIsAppleDefaultForType diff --git a/utils/install4j/file_associations_auto-install4j8.xml b/utils/install4j/file_associations_auto-install4j8.xml new file mode 100644 index 0000000..9314f6a --- /dev/null +++ b/utils/install4j/file_associations_auto-install4j8.xml @@ -0,0 +1,1058 @@ + + + + Jalview (.jvp) + Creating file associations... + + + + + + + + + + + + + + Jalview File + jvp + 737 + + + + Jalview-File.icns + + + + + + + + + Jalview-File.png + + + application/x-jalview+xml+zip + + + Jalview-File.ico + + + + + + + + + + Jalview Launch (.jvl) + Creating file associations... + + + + + + + + + + + + + + Jalview Launch File + jvl + 737 + + + + Jalview-Launch.icns + + + + + + + + + Jalview-Launch.png + + + application/x-jalview-jvl+text + + + Jalview-Launch.ico + + + + + + + + + + mmCIF (.cif) + Creating file associations... + + + + + + + + + + + + + + mmCIF File + cif + 737 + + + + Jalview-File.icns + + + + + + + + + Jalview-File.png + + + chemical/x-cif + + + Jalview-File.ico + + + + + + + + + + mmCIF (.mcif, .mmcif) + Creating file associations... + + + + + + + + + + + + + + mmCIF File + mcif,mmcif + 737 + + + + Jalview-File.icns + + + + + + + + + Jalview-File.png + + + chemical/x-mcif + + + Jalview-File.ico + + + + + + + + + + PDB (.ent, .pdb) + Creating file associations... + + + + + + + + + + + + + + PDB File + ent,pdb + 737 + + + + Jalview-File.icns + + + + + + + + + Jalview-File.png + + + chemical/x-pdb + + + Jalview-File.ico + + + + + + + + + + AMSA (.amsa) + Creating file associations... + + + + + + + + + + + + + + AMSA File + amsa + 737 + + + + Jalview-File.icns + + + + + + + + + Jalview-File.png + + + application/x-amsa+txt + + + Jalview-File.ico + + + + + + + + + + Jalview Annotations (.annotations, .jvannotations) + Creating file associations... + + + + + + + + + + + + + + Jalview Annotations File + annotations,jvannotations + 737 + + + + Jalview-File.icns + + + + + + + + + Jalview-File.png + + + application/x-jalview-annotations+text + + + Jalview-File.ico + + + + + + + + + + BioJSON (.biojson) + Creating file associations... + + + + + + + + + + + + + + BioJSON File + biojson + 737 + + + + Jalview-File.icns + + + + + + + + + Jalview-File.png + + + application/x-jalview-biojson+json + + + Jalview-File.ico + + + + + + + + + + BLC (.blc) + Creating file associations... + + + + + + + + + + + + + + BLC File + blc + 737 + + + + Jalview-File.icns + + + + + + + + + Jalview-File.png + + + application/x-blc+txt + + + Jalview-File.ico + + + + + + + + + + Clustal (.aln) + Creating file associations... + + + + + + + + + + + + + + Clustal File + aln + 737 + + + + Jalview-File.icns + + + + + + + + + Jalview-File.png + + + application/x-clustal+txt + + + Jalview-File.ico + + + + + + + + + + Fasta (.fa, .fasta) + Creating file associations... + + + + + + + + + + + + + + Fasta File + fa,fasta + 737 + + + + Jalview-File.icns + + + + + + + + + Jalview-File.png + + + application/x-fasta+txt + + + Jalview-File.ico + + + + + + + + + + Jalview Features (.features, .jvfeatures) + Creating file associations... + + + + + + + + + + + + + + Jalview Features File + features,jvfeatures + 737 + + + + Jalview-File.icns + + + + + + + + + Jalview-File.png + + + application/x-jalview-features+text + + + Jalview-File.ico + + + + + + + + + + Generic Features Format v2 (.gff2) + Creating file associations... + + + + + + + + + + + + + + Generic Features Format v2 File + gff2 + 737 + + + + Jalview-File.icns + + + + + + + + + Jalview-File.png + + + application/x-gff2+txt + + + Jalview-File.ico + + + + + + + + + + Generic Features Format v3 (.gff3) + Creating file associations... + + + + + + + + + + + + + + Generic Features Format v3 File + gff3 + 737 + + + + Jalview-File.icns + + + + + + + + + Jalview-File.png + + + application/x-gff3+txt + + + Jalview-File.ico + + + + + + + + + + JnetFile (.concise, .jnet) + Creating file associations... + + + + + + + + + + + + + + JnetFile File + concise,jnet + 737 + + + + Jalview-File.icns + + + + + + + + + Jalview-File.png + + + application/x-jalview-jnet+text + + + Jalview-File.ico + + + + + + + + + + MSF (.msf) + Creating file associations... + + + + + + + + + + + + + + MSF File + msf + 737 + + + + Jalview-File.icns + + + + + + + + + Jalview-File.png + + + application/x-msf+txt + + + Jalview-File.ico + + + + + + + + + + PFAM (.pfam) + Creating file associations... + + + + + + + + + + + + + + PFAM File + pfam + 737 + + + + Jalview-File.icns + + + + + + + + + Jalview-File.png + + + application/x-pfam+txt + + + Jalview-File.ico + + + + + + + + + + PHYLIP (.phy) + Creating file associations... + + + + + + + + + + + + + + PHYLIP File + phy + 737 + + + + Jalview-File.icns + + + + + + + + + Jalview-File.png + + + application/x-phylip+txt + + + Jalview-File.ico + + + + + + + + + + PileUp (.pileup) + Creating file associations... + + + + + + + + + + + + + + PileUp File + pileup + 737 + + + + Jalview-File.icns + + + + + + + + + Jalview-File.png + + + application/x-pileup+txt + + + Jalview-File.ico + + + + + + + + + + PIR (.pir) + Creating file associations... + + + + + + + + + + + + + + PIR File + pir + 737 + + + + Jalview-File.icns + + + + + + + + + Jalview-File.png + + + application/x-pir+txt + + + Jalview-File.ico + + + + + + + + + + RNAML (.rnaml) + Creating file associations... + + + + + + + + + + + + + + RNAML File + rnaml + 737 + + + + Jalview-File.icns + + + + + + + + + Jalview-File.png + + + application/rnaml+xml + + + Jalview-File.ico + + + + + + + + + + Substitution Matrix (.mat) + Creating file associations... + + + + + + + + + + + + + + Substitution Matrix File + mat + 737 + + + + Jalview-File.icns + + + + + + + + + Jalview-File.png + + + application/x-jalview-scorematrix+text + + + Jalview-File.ico + + + + + + + + + + Stockholm (.stk, .sto) + Creating file associations... + + + + + + + + + + + + + + Stockholm File + stk,sto + 737 + + + + Jalview-File.icns + + + + + + + + + Jalview-File.png + + + application/x-stockholm+txt + + + Jalview-File.ico + + + + + + diff --git a/utils/install4j/install4j8_template.install4j b/utils/install4j/install4j8_template.install4j new file mode 100644 index 0000000..134bc7d --- /dev/null +++ b/utils/install4j/install4j8_template.install4j @@ -0,0 +1,1197 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2350 + 2450 + + ${compiler:file("${compiler:INFO_PLIST_FILE_ASSOCIATIONS_FILE}")} + + + + + + + + + + + + + 2350 + 2450 + + ${compiler:file("${compiler:INFO_PLIST_FILE_ASSOCIATIONS_FILE}")} + + + + + + + + + + + + + + + + + + 255 + 255 + 255 + 255 + + + + + + + + + + 255 + 255 + 255 + 255 + + + + + + ../../resources/images/jalview_logo_background_fade-640x480.png + + + + + 5 + 10 + 10 + 10 + + + + + imageAnchor + imageEdgeBackgroundColor + imageFile + + + + + + + + + + labelText + + + + + + + + + + + + + + + + + + + + + + + + 255 + 255 + 255 + 255 + + + + + + + + + + 25 + 143 + 220 + 255 + + + + + + ../../resources/images/jalview_logo_background_fade-640x480.png + + + + + 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 + + + + + + + + + + ${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 + + + + + Creating file associations + + + + + + + + + + + + + + 737 + jalview + + + + + 737 + jalviews + + + + + + + ${i18n:WizardPreparing} + + + + + + + + + + ${compiler:sys.shortName} + + + ${compiler:sys.shortName} + + + + + ../../resources/images/jalview_logos.ico + + + + + ../../resources/images/JalviewLogo_Huge.png + + + + !context.getBooleanVariable("sys.programGroupDisabled") + + + + + ${compiler:sys.shortName} + + + ${compiler:sys.shortName} + + + ${compiler:sys.fullName} + + + ../../resources/images/JalviewLogo_Huge.png + + + + + ../../resources/images/jalview_logos.ico + + + + context.getBooleanVariable("createDesktopLinkAction") + + + + + + Jalview.app + + + + context.getBooleanVariable("addToDockAction") + + + + + + ${form:finishedMessage} + + + + + ${i18n:CreateDesktopIcon} + + createDesktopLinkAction + + + + + ${i18n:AddToDock} + + addToDockAction + + Util.isMacOS() + + + + + + + + ${i18n:UninstallerMenuEntry(${compiler:sys.fullName})} + + + + + + + + + 255 + 255 + 255 + 255 + + + + + + + + + + 192 + 192 + 192 + 255 + + + + + + ../../resources/images/jalview_logo_background_fade-640x480.png + + + + + 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 + + + + + ${compiler:GETDOWN_DIST_DIR} + + + + + ${compiler:GETDOWN_ALT_DIR} + + + + + ${compiler:GETDOWN_RESOURCE_DIR} + + + + + getdown-launcher.jar + + + + + getdown-launcher-old.jar + + + + + getdown-launcher-new.jar + + + + + *.jarv + + + + + gettingdown.lock + + + + + *.log + + + + + *.txt + + + + + *_new + + + + + digest.txt + + + + + digest2.txt + + + + + getdown-launcher.jarv + + + + + getdown-launcher-new.jarv + + + + + channel_launch.jvl + + + + + launcher.log + + + + + proxy.txt + + + + + META-INF + + + + + install/getdown-launcher.jar + + + + + install/getdown.txt + + + + + install/build_properties + + + + + build_properties + + + + + install + + + + + dist + + + + + release + + + + + alt + + + + + resource + + + + + + + + + + + + + + + + ${i18n:UninstallerPreparing} + + + + + + + + + + ${form:successMessage} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +