From c6d9d12aca027262b088ae6a39fb917e6b6ba296 Mon Sep 17 00:00:00 2001 From: Ben Soares Date: Mon, 29 Jul 2024 19:06:45 +0100 Subject: [PATCH] JAL-3631 Ensure the DMG default vmoptions.txt has the commented properties --- build.gradle | 45 +++++++++++++++++++++++- gradle.properties | 1 + utils/install4j/default.vmoptions | 20 +++++++++++ utils/install4j/install4j10_template.install4j | 4 ++- 4 files changed, 68 insertions(+), 2 deletions(-) create mode 100644 utils/install4j/default.vmoptions diff --git a/build.gradle b/build.gradle index 3625ffc..1375997 100644 --- a/build.gradle +++ b/build.gradle @@ -2924,9 +2924,52 @@ task install4jCustomiseDS_Store { dependsOn install4jCustomiseDS_StoreAarch64 } +task install4jDMGVmoptionsFile(type: Copy) { + def inputDir = "${jalviewDir}/${install4j_utils_dir}" + def outputDir = "${jalviewDir}/${install4j_build_dir}/tmp" + + def installDateTime = getDate("yyyy-MM-dd HH:mm:ss") + " (build time)" + + from(inputDir) { + include(string("${install4j_default_vmoptions}")) + rename(string("${install4j_default_vmoptions}"), string("${install4j_default_vmoptions}.X64")) + + filter(ReplaceTokens, + beginToken: '__', + endToken: '__', + tokens: [ + 'INSTALLERFILENAME': string("${install4jmacOSArchiveX64DMGFilename}.dmg"), + 'INSTALLDATETIME': installDateTime + ] + ) + + } + + from(inputDir) { + include(string("${install4j_default_vmoptions}")) + rename(string("${install4j_default_vmoptions}"), string("${install4j_default_vmoptions}.AARCH64")) + + filter(ReplaceTokens, + beginToken: '__', + endToken: '__', + tokens: [ + 'INSTALLERFILENAME': string("${install4jmacOSArchiveAarch64DMGFilename}.dmg"), + 'INSTALLDATETIME': installDateTime + ] + ) + } + + into outputDir + + inputs.file("${inputDir}/${install4j_default_vmoptions}") + outputs.file("${outputDir}/${install4j_default_vmoptions}.X64") + outputs.file("${outputDir}/${install4j_default_vmoptions}.AARCH64") +} + task install4jDMGProcesses { dependsOn install4jDMGBackgroundImageProcess dependsOn install4jCustomiseDS_Store + dependsOn install4jDMGVmoptionsFile } task installerFiles(type: com.install4j.gradle.Install4jTask) { @@ -2993,7 +3036,7 @@ task installerFiles(type: com.install4j.gradle.Install4jTask) { '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, + 'BUILD_DIR': install4j_build_dir, 'APPLICATION_CATEGORIES': install4j_application_categories, 'APPLICATION_FOLDER': install4jApplicationFolder, 'UNIX_APPLICATION_FOLDER': install4jUnixApplicationFolder, diff --git a/gradle.properties b/gradle.properties index 041dc13..fb6be1a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -158,6 +158,7 @@ install4j_dmg_volume_icon = jalview-VolumeIcon.icns install4j_installer_icon = jalview_installer.png install4j_installer_mac_icon = jalview_installer.icns install4j_installer_windows_icon = jalview_installer.ico +install4j_default_vmoptions = default.vmoptions jalview_customise_ds_store = utils/macos_dmg/jalview_customise_dsstore.py diff --git a/utils/install4j/default.vmoptions b/utils/install4j/default.vmoptions new file mode 100644 index 0000000..4b483b0 --- /dev/null +++ b/utils/install4j/default.vmoptions @@ -0,0 +1,20 @@ +# Enter one VM parameter per line +# For example, to adjust the maximum memory usage to 512 MB, uncomment the following line: +# -Xmx512m +# To include another file, uncomment the following line: +# -include-options [path to other .vmoption file] + +# Jalview specific options below +# Jalview options added by __INSTALLERFILENAME__ at __INSTALLDATETIME__ +# +# Uncomment the following line to disable user-space updates +#-Dnouserdefaultappdir=true +# +# Uncomment the below line to set a custom path for user-space updates -- use with caution. +# A leading ~/ or %h anywhere will be substituted with the user's home path, and %u by the username. +# If not set, the default is ${installer:userDefaultAppdirBase} for ${installer:osName} +#-Dsetuserappdirpath=/tmp/jalview/%u +# +# Uncomment the following line to also disable all updates +#-Dsilent=noupdate + diff --git a/utils/install4j/install4j10_template.install4j b/utils/install4j/install4j10_template.install4j index d2e2c0a..b8de2b6 100644 --- a/utils/install4j/install4j10_template.install4j +++ b/utils/install4j/install4j10_template.install4j @@ -1,7 +1,7 @@ - + @@ -2689,6 +2689,7 @@ ${compiler:JALVIEW_APPLICATION_NAME} will now launch. + @@ -2710,6 +2711,7 @@ ${compiler:JALVIEW_APPLICATION_NAME} will now launch. + -- 1.7.10.2