X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=build.gradle;h=a7c7f18a89e92c492ac90ced2666cbd4ed462946;hb=9e31a59b947882325ffe614bd71fb732d7952a23;hp=92d2021d24546de8124da4f50cc23fdda9bd4233;hpb=176826a5bd29270ff6155eef4cb027af2d3ae1b0;p=jalview.git diff --git a/build.gradle b/build.gradle index 92d2021..a7c7f18 100644 --- a/build.gradle +++ b/build.gradle @@ -1,4 +1,5 @@ import org.apache.tools.ant.filters.ReplaceTokens +//import org.apache.tools.ant.filters.ReplaceRegexp import org.gradle.internal.os.OperatingSystem buildscript { @@ -48,13 +49,12 @@ def compile_target_compatibility ext { // where the getdown channel will be built. // TODO: consider allowing this expression to be overrriden by -P arg - getdownWebsiteDir = jalviewDir + '/' + getdown_website_dir + '/' + JAVA_VERSION + '/' + getdownWebsiteDir = jalviewDir + '/' + getdown_website_dir + '/' + JAVA_VERSION getdownAppDir = getdownWebsiteDir + '/' + getdown_app_dir getdownJ11libDir = getdownWebsiteDir + '/' + getdown_j11lib_dir getdownResourceDir = getdownWebsiteDir + '/' + getdown_resource_dir getdownLauncher = jalviewDir + '/' + getdown_launcher getdownFilesDir = jalviewDir + '/' + getdown_files_dir + '/' + JAVA_VERSION + '/' - getdownLib1 = jalviewDir + '/' + getdown_lib1 def getdownChannel = getdown_channel_name if (getdown_channel_name.equals("COMMIT")) { getdownChannel = getGitHash() @@ -538,6 +538,8 @@ task compileLinkCheck(type: JavaCompile) { destinationDir = file("$jalviewDir/$utilsDir") source = fileTree(dir: "$jalviewDir/$utilsDir", include: ["HelpLinksChecker.java", "BufferedLineReader.java"]) + inputs.file("$jalviewDir/$utilsDir/HelpLinksChecker.java") + inputs.file("$jalviewDir/$utilsDir/HelpLinksChecker.java") outputs.file("$jalviewDir/$utilsDir/HelpLinksChecker.class") outputs.file("$jalviewDir/$utilsDir/BufferedLineReader.class") } @@ -550,7 +552,6 @@ task linkCheck(type: JavaExec) { workingDir = jalviewDir def help = "$classes/$helpDir" args = [ "$classes/$helpDir", "-nointernet" ] - //args = [ "$classesDir/$helpDir", "-nointernet" ] doFirst { helplinkscheckeroutputfile.createNewFile() @@ -647,6 +648,9 @@ task getdownWebsite() { props.put("getdown_txt_java_min_version", getdown_alt_java_min_version) props.put("getdown_txt_multi_java_location", getdown_alt_multi_java_location) + if (getdown_local == "true") { + getdown_app_base = file(getdownWebsiteDir).toURI().toString() + } props.put("getdown_txt_appbase", getdown_app_base) props.each{ prop, val -> if (prop.startsWith("getdown_txt_") && val != null) { @@ -722,7 +726,9 @@ task getdownWebsite() { } */ - getdownTextString += "code = " + file(getdownLauncher).getName() + "\n" + // getdown-launcher.jar should not be in main application class path so the main application can move it when updated. Listed as a resource so it gets updated. + //getdownTextString += "class = " + file(getdownLauncher).getName() + "\n" + getdownTextString += "resource = " + file(getdownLauncher).getName() + "\n" getdownTextString += "class = " + mainClass + "\n" def getdown_txt = file(project.ext.getdownWebsiteDir + "/getdown.txt") @@ -744,11 +750,6 @@ task getdownWebsite() { } copy { - from getdownLib1 - into project.ext.getdownFilesDir + '/' + packageDir - } - - copy { from jalviewDir + '/' + project.getProperty('getdown_txt_ui.background_image') from jalviewDir + '/' + project.getProperty('getdown_txt_ui.error_background') from jalviewDir + '/' + project.getProperty('getdown_txt_ui.progress_image') @@ -767,10 +768,10 @@ task getdownDigest(type: JavaExec) { group = "distribution" description = "Digest the getdown website folder" dependsOn getdownWebsite - classpath = files(jalviewDir + '/' + getdown_core) - classpath file(jalviewDir + '/' + getdown_lib1) + classpath = files(jalviewDir + '/' + getdown_core, jalviewDir+'/'+getdown_launcher) main = "com.threerings.getdown.tools.Digester" args project.ext.getdownWebsiteDir + inputs.dir(project.ext.getdownWebsiteDir) outputs.file(project.ext.getdownWebsiteDir + '/' + "digest2.txt") } @@ -800,6 +801,9 @@ install4j { } installDir = file(install4jHomeDir) mediaTypes = Arrays.asList(install4jMediaTypes.split(",")) + if (install4jFaster.equals("true")) { + faster = true + } } def install4jConf @@ -820,15 +824,50 @@ task copyInstall4jTemplate(type: Copy) { include install4jTemplate rename (install4jTemplate, install4jConfFile) 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]) + 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 + ] + ) 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 - inputs.files("$install4jDir/$install4jTemplate") outputs.files(install4jConf) + + doLast { + // include file associations in installer + def installerFileAssociationsXml = file("$install4jDir/$install4jInstallerFileAssociations").text + ant.replaceregexp( + byline: false, + flags: "s", + match: '', + replace: installerFileAssociationsXml, + file: install4jConf + ) + /* + // include uninstaller applescript app files in dmg + def installerDMGUninstallerXml = file("$install4jDir/$install4jDMGUninstallerAppFiles").text + ant.replaceregexp( + byline: false, + flags: "s", + match: '', + replace: installerDMGUninstallerXml, + file: install4jConf + ) + */ + } } task installers(type: com.install4j.gradle.Install4jTask) {