}
////
// Set JALVIEW_VERSION if it is not already set
- if (findProperty(JALVIEW_VERSION)==null || "".equals(JALVIEW_VERSION)) {
+ if (findProperty("JALVIEW_VERSION")==null || "".equals(JALVIEW_VERSION)) {
JALVIEW_VERSION = releaseProps.get("jalview.version")
}
buildDist = true
// the following values might be overridden by the CHANNEL switch
+ channelPropertiesFile = string("${channel_properties_dir}/release_properties")
getdownChannelName = CHANNEL.toLowerCase()
getdownDir = string("${getdownChannelName}/${JAVA_VERSION}")
getdownAppBase = string("${getdown_channel_base}/${getdownDir}")
getdownLauncher = string("${jalviewDir}/${getdown_lib_dir}/${getdown_launcher}")
getdownAppDistDir = getdown_app_dir_alt
+ buildProperties = string("${resourceDir}/${build_properties_file}")
+ getdownImagesDir = getdown_images_dir
+ getdownBgColour = "FFFFFF"
+ getdownFgColour = "000000"
+ getdownLightFgColour = "000066"
reportRsyncCommand = false
jvlChannelName = CHANNEL.toLowerCase()
install4jSuffix = CHANNEL.substring(0, 1).toUpperCase() + CHANNEL.substring(1).toLowerCase(); // BUILD -> Build
install4jInstallerName = "${jalview_name} Non-Release Installer"
install4jExecutableName = jalview_name.replaceAll("[^\\w]+", "_").toLowerCase()
install4jExtraScheme = "jalviewx"
+ install4jMacIconsFile = string("${install4j_utils_dir}/${install4j_mac_icons_file}")
+ install4jWindowsIconsFile = string("${install4j_utils_dir}/${install4j_windows_icons_file}")
+ install4jPngIconFile = string("${install4j_utils_dir}/${install4j_png_icon_file}")
switch (CHANNEL) {
case "BUILD":
def htmlFilePath = mdFile.getPath().replaceAll(/\..*?$/, ".html")
def htmlFile = file(htmlFilePath)
+ println("Creating ${htmlFilePath}")
htmlFile.text = htmlText
}
}
task convertMdFiles {
dependsOn copyDocs
- def mdFiles = fileTree(dir: docBuildDir, include: "*.md")
+ def mdFiles = fileTree(dir: docBuildDir, include: "**/*.md")
def cssFile = file("${jalviewDir}/${flexmark_css}")
doLast {
inputs.dir(inputDir)
outputs.dir(outputDir)
}
-
+task copyChannelProperties(type: Copy) {
+ def propsFile = file(channelPropertiesFile)
+ rename(propsFile.getName(), "channel_properties")
+ from channelPropertiesFile
+ into resourceDir
+}
task createBuildProperties(type: WriteProperties) {
dependsOn copyResources
}
+task buildIndices(type: JavaExec) {
+ dependsOn copyHelp
+ classpath = sourceSets.main.compileClasspath
+ main = "com.sun.java.help.search.Indexer"
+ workingDir = "${helpBuildDir}/${help_dir}"
+ def argDir = "html"
+ args = [ argDir ]
+ inputs.dir("${workingDir}/${argDir}")
+
+ outputs.dir("${classesDir}/doc")
+ outputs.dir("${classesDir}/help")
+ outputs.file("${workingDir}/JavaHelpSearch/DOCS")
+ outputs.file("${workingDir}/JavaHelpSearch/DOCS.TAB")
+ outputs.file("${workingDir}/JavaHelpSearch/OFFSETS")
+ outputs.file("${workingDir}/JavaHelpSearch/POSITIONS")
+ outputs.file("${workingDir}/JavaHelpSearch/SCHEMA")
+ outputs.file("${workingDir}/JavaHelpSearch/TMAP")
+}
+
task prepare {
dependsOn copyResources
dependsOn copyDocs
dependsOn copyHelp
dependsOn createBuildProperties
dependsOn convertMdFiles
+ dependsOn buildIndices
}
}
-task buildIndices(type: JavaExec) {
- dependsOn copyHelp
- classpath = sourceSets.main.compileClasspath
- main = "com.sun.java.help.search.Indexer"
- workingDir = "${helpBuildDir}/${help_dir}"
- def argDir = "html"
- args = [ argDir ]
- inputs.dir("${workingDir}/${argDir}")
-
- outputs.dir("${classesDir}/doc")
- outputs.dir("${classesDir}/help")
- outputs.file("${workingDir}/JavaHelpSearch/DOCS")
- outputs.file("${workingDir}/JavaHelpSearch/DOCS.TAB")
- outputs.file("${workingDir}/JavaHelpSearch/OFFSETS")
- outputs.file("${workingDir}/JavaHelpSearch/POSITIONS")
- outputs.file("${workingDir}/JavaHelpSearch/SCHEMA")
- outputs.file("${workingDir}/JavaHelpSearch/TMAP")
-}
-
-
task compileLinkCheck(type: JavaCompile) {
options.fork = true
classpath = files("${jalviewDir}/${utils_dir}")
task linkCheck(type: JavaExec) {
- dependsOn prepare, compileLinkCheck
+ dependsOn prepare
+ dependsOn compileLinkCheck
def helpLinksCheckerOutFile = file("${jalviewDir}/${utils_dir}/HelpLinksChecker.out")
classpath = files("${jalviewDir}/${utils_dir}")
jar {
- dependsOn linkCheck
- dependsOn buildIndices
- dependsOn createBuildProperties
dependsOn prepare
+ dependsOn linkCheck
manifest {
attributes "Main-Class": main_class,
if (getdownAltMultiJavaLocation != null && getdownAltMultiJavaLocation.length() > 0) {
props.put("getdown_txt_multi_java_location", getdownAltMultiJavaLocation)
}
+ if (getdownImagesDir != null && file(getdownImagesDir).exists()) {
+ props.put("getdown_txt_ui.background_image", "${getdownImagesDir}/${getdown_background_image}")
+ props.put("getdown_txt_ui.instant_background_image", "${getdownImagesDir}/${getdown_instant_background_image}")
+ props.put("getdown_txt_ui.error_background", "${getdownImagesDir}/${getdown_error_background}")
+ props.put("getdown_txt_ui.progress_image", "${getdownImagesDir}/${getdown_progress_image}")
+ props.put("getdown_txt_ui.icon", "${getdownImagesDir}/${getdown_icon}")
+ props.put("getdown_txt_ui.mac_dock_icon", "${getdownImagesDir}/${getdown_mac_dock_icon}")
+ props.put("getdown_txt_ui.background", getdownBgColour)
+ props.put("getdown_txt_ui.progress_text", getdownFgColour)
+ props.put("getdown_txt_ui.status_text", getdownLightFgColour)
+ }
props.put("getdown_txt_title", jalview_name)
props.put("getdown_txt_ui.name", install4jApplicationName)
'UNIX_APPLICATION_FOLDER': install4jUnixApplicationFolder,
'EXECUTABLE_NAME': install4jExecutableName,
'EXTRA_SCHEME': install4jExtraScheme,
+ 'MAC_ICONS_FILE': install4jMacIconsFile,
+ 'WINDOWS_ICONS_FILE': install4jWindowsIconsFile,
+ 'PNG_ICON_FILE': install4jPngIconFile,
+
]
//println("INSTALL4J VARIABLES:")