X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=build.gradle;h=8d84b25a235f474c18d751d4ad548c55c9340d12;hb=refs%2Fheads%2Ftask%2FJAL-3394_install4j8_option;hp=f02d8ad04e41af02ad2a8e737d3e22313a582c8b;hpb=fa2429b3c8cd5eb56c4a56572af6e9c4adc916c9;p=jalview.git diff --git a/build.gradle b/build.gradle index f02d8ad..8d84b25 100644 --- a/build.gradle +++ b/build.gradle @@ -1057,15 +1057,16 @@ clean { install4j { def install4jHomeDir = "/opt/install4j" def hostname = "hostname".execute().text.trim() + def install4jName = (install4jVersion >= 8) ? "install4j"+install4jVersion:"install4j" if (hostname.equals("jv-bamboo")) { - install4jHomeDir = System.getProperty("user.home")+"/buildtools/install4j" + install4jHomeDir = System.getProperty("user.home")+"/buildtools/"+install4jName } else if (OperatingSystem.current().isMacOsX()) { - install4jHomeDir = '/Applications/install4j.app/Contents/Resources/app' + install4jHomeDir = '/Applications/'+install4jName+'.app/Contents/Resources/app' if (! file(install4jHomeDir).exists()) { install4jHomeDir = System.getProperty("user.home")+install4jHomeDir } } else if (OperatingSystem.current().isLinux()) { - install4jHomeDir = System.getProperty("user.home")+"/buildtools/install4j" + install4jHomeDir = System.getProperty("user.home")+"/buildtools/"+install4jName } installDir = file(install4jHomeDir) mediaTypes = Arrays.asList(install4jMediaTypes.split(",")) @@ -1088,9 +1089,10 @@ task copyInstall4jTemplate(type: Copy) { macosJavaVMTgz = System.env.HOME+"/buildtools/jre/openjdk-java_vm/install4j/tgz/macos-jre"+JAVA_VERSION+".tar.gz" windowsJavaVMDir = System.env.HOME+"/buildtools/jre/openjdk-java_vm/getdown/windows-jre"+JAVA_VERSION+"/jre" windowsJavaVMTgz = System.env.HOME+"/buildtools/jre/openjdk-java_vm/install4j/tgz/windows-jre"+JAVA_VERSION+".tar.gz" + def i4jTemplate = (install4jVersion >= 8)?install4j8Template:install4jTemplate from (install4jDir) { - include install4jTemplate - rename (install4jTemplate, install4jConfFile) + include i4jTemplate + rename (i4jTemplate, install4jConfFile) filter(ReplaceTokens, beginToken: '', endToken: '', tokens: ['9999999999': JAVA_VERSION]) filter(ReplaceTokens, beginToken: '$$', endToken: '$$', tokens: [ @@ -1116,11 +1118,20 @@ task copyInstall4jTemplate(type: Copy) { } } into install4jDir + + inputs.files(i4jTemplate) + if (install4jVersion >= 8) { + inputs.files(install4jDir+"/"+install4j8InstallerFileAssociations) + } else { + inputs.files(install4jDir+"/"+install4jInstallerFileAssociations) + inputs.files(install4jDir+"/"+install4jInfoPlistFileAssociations) + } outputs.files(install4jConf) doLast { // include file associations in installer - def installerFileAssociationsXml = file("$install4jDir/$install4jInstallerFileAssociations").text + def i4jIFA = (install4jVersion >= 8)?install4j8InstallerFileAssociations:install4jInstallerFileAssociations + def installerFileAssociationsXml = file("$install4jDir/$i4jIFA").text ant.replaceregexp( byline: false, flags: "s",