+
+ 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}"
+ // make install4jBuildDir relative to jalviewDir
+ def install4jBuildDir = "${install4j_build_dir}/${JAVA_VERSION}"
+
+ variables = [
+ 'JALVIEW_NAME': jalview_name,
+ 'JALVIEW_APPLICATION_NAME': install4jApplicationName,
+ 'JALVIEW_DIR': "../..",
+ '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,
+ '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,
+ 'BUNDLE_ID': install4jBundleId,
+ 'INTERNAL_ID': install4jInternalId,
+ 'WINDOWS_APPLICATION_ID': install4jWinApplicationId,
+ 'MACOS_DS_STORE': install4jDSStore,
+ 'MACOS_DMG_BG_IMAGE': install4jDMGBackgroundImage,
+ 'INSTALLER_NAME': install4jInstallerName,
+ 'INSTALL4J_UTILS_DIR': install4j_utils_dir,
+ 'GETDOWN_WEBSITE_DIR': getdown_website_dir,
+ 'GETDOWN_FILES_DIR': getdown_files_dir,
+ 'GETDOWN_RESOURCE_DIR': getdown_resource_dir,
+ 'GETDOWN_DIST_DIR': getdownAppDistDir,
+ 'GETDOWN_ALT_DIR': getdown_app_dir_alt,
+ 'GETDOWN_INSTALL_DIR': getdown_install_dir,
+ 'INFO_PLIST_FILE_ASSOCIATIONS_FILE': install4j_info_plist_file_associations,
+ 'BUILD_DIR': install4jBuildDir,
+ 'APPLICATION_CATEGORIES': install4j_application_categories,
+ 'APPLICATION_FOLDER': install4jApplicationFolder,
+ 'UNIX_APPLICATION_FOLDER': install4jUnixApplicationFolder,
+ 'EXECUTABLE_NAME': install4jExecutableName,
+ 'EXTRA_SCHEME': install4jExtraScheme,
+ ]
+
+ //println("INSTALL4J VARIABLES:")
+ //variables.each{k,v->println("${k}=${v}")}
+
+ destination = "${jalviewDir}/${install4jBuildDir}"