+
+ 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': getdown_txt_title,
+ '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,
+ 'MACOS_BUNDLE_ID': install4j_macOS_bundle_id,
+ 'INSTALLER_NAME': install4j_installer_name,
+ '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,
+ 'UNIX_DESKTOP_ADDITIONS': install4j_unix_desktop_additions,
+ ]
+
+ destination = "${jalviewDir}/${install4jBuildDir}"