From 641e9e7f1b5678250678b0fbd13c9dbfebd67eb5 Mon Sep 17 00:00:00 2001 From: Ben Soares Date: Mon, 6 Apr 2020 13:27:56 +0100 Subject: [PATCH] JAL-3577 Added existing and new Application IDs for Windows. Fixed Desktop shortcut and Menu entry. --- build.gradle | 19 +++++++++++------ gradle.properties | 1 + utils/install4j/install4j8_template.install4j | 28 ++++++++++++++----------- 3 files changed, 30 insertions(+), 18 deletions(-) diff --git a/build.gradle b/build.gradle index e9c9da4..227e59a 100644 --- a/build.gradle +++ b/build.gradle @@ -260,20 +260,26 @@ ext { if (install4jSuffix == "") { install4jApplicationName = "${jalview_name}" install4jBundleId = "${install4j_bundle_id}" + install4jWinApplicationId = install4j_release_win_application_id } else { install4jApplicationName = "${jalview_name} ${install4jSuffix}" install4jBundleId = "${install4j_bundle_id}-" + install4jSuffix.toLowerCase() + // add int hash of install4jSuffix to the last part of the application_id + def id = install4j_release_win_application_id + def idsplitreverse = id.split("-").reverse() + idsplitreverse[0] = idsplitreverse[0].toInteger() + install4jSuffix.hashCode() + install4jWinApplicationId = idsplitreverse.reverse().join("-") } // sanitise folder and id names // install4jApplicationFolder = e.g. "Jalview Build" install4jApplicationFolder = install4jApplicationName - .replaceAll("[\"'~:/\\\\]", "_") // replace all awkward filename chars " ' ~ : / \ + .replaceAll("[\"'~:/\\\\\\s]", "_") // replace all awkward filename chars " ' ~ : / \ .replaceAll("_+", "_") // collapse __ - install4jInternalId = install4jApplicationFolder + install4jInternalId = install4jApplicationName .replaceAll(" ","_") .replaceAll("[^\\w\\-\\.]", "_") // replace other non [alphanumeric,_,-,.] - .replaceAll("_+", "_") // collapse __ - .replaceAll("_*-_*", "-") // collapse _-_ + .replaceAll("_+", "") // collapse __ + //.replaceAll("_*-_*", "-") // collapse _-_ install4jUnixApplicationFolder = install4jInternalId .toLowerCase() @@ -1434,6 +1440,7 @@ task installers(type: com.install4j.gradle.Install4jTask) { '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, @@ -1453,8 +1460,8 @@ task installers(type: com.install4j.gradle.Install4jTask) { 'EXTRA_SCHEME': install4jExtraScheme, ] - //println("INSTALL4J VARIABLES:") - //variables.each{k,v->println("${k}=${v}")} + println("INSTALL4J VARIABLES:") + variables.each{k,v->println("${k}=${v}")} destination = "${jalviewDir}/${install4jBuildDir}" buildSelected = true diff --git a/gradle.properties b/gradle.properties index 832026c..c31a59b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -123,6 +123,7 @@ install4j_build_dir = build/install4j install4j_media_types = windows,macosArchive,unixArchive,unixInstaller install4j_faster = false install4j_unix_desktop_additions = Categories=Science;Biology;Java; +install4j_release_win_application_id = 6595-2347-1923-0725 OSX_KEYSTORE = OSX_KEYPASS = diff --git a/utils/install4j/install4j8_template.install4j b/utils/install4j/install4j8_template.install4j index 9d71fc4..9788523 100644 --- a/utils/install4j/install4j8_template.install4j +++ b/utils/install4j/install4j8_template.install4j @@ -1,7 +1,7 @@ - + - + @@ -31,6 +31,7 @@ + @@ -115,7 +116,7 @@ - + @@ -389,6 +390,8 @@ return console.askOkCancel(message, true); + + ${compiler:JALVIEW_NAME} ${i18n:UninstallerMenuEntry(${compiler:sys.fullName})} !context.getBooleanVariable("sys.programGroupDisabled") @@ -481,10 +484,10 @@ return console.askOkCancel(message, true); - ${compiler:sys.shortName} + ${compiler:JALVIEW_APPLICATION_NAME} - ${compiler:sys.shortName} + ${installer:sys.contentDir}/${compiler:EXECUTABLE_NAME} @@ -492,6 +495,7 @@ return console.askOkCancel(message, true); ${compiler:JALVIEW_DIR}/resources/images/jalview_logos.ico + ${compiler:JALVIEW_NAME} ${compiler:JALVIEW_DIR}/resources/images/JalviewLogo_Huge.png @@ -503,13 +507,13 @@ return console.askOkCancel(message, true); - ${compiler:sys.shortName} + ${compiler:JALVIEW_APPLICATION_NAME} - ${compiler:sys.shortName} + ${installer:sys.contentDir}/${compiler:EXECUTABLE_NAME} - ${compiler:sys.fullName} + ${compiler:JALVIEW_APPLICATION_NAME} ${compiler:JALVIEW_DIR}/resources/images/JalviewLogo_Huge.png @@ -527,7 +531,7 @@ return console.askOkCancel(message, true); - ${compiler:APPLICATION_FOLDER}.app + ${compiler:JALVIEW_APPLICATION_NAME}.app @@ -1109,9 +1113,9 @@ return console.askYesNo(message, true); - - - + + + -- 1.7.10.2