JAL-3577 Moved application Categories for freedesktop menus into correct place in...
authorBen Soares <bsoares@dundee.ac.uk>
Mon, 6 Apr 2020 14:49:30 +0000 (15:49 +0100)
committerBen Soares <bsoares@dundee.ac.uk>
Mon, 6 Apr 2020 14:49:30 +0000 (15:49 +0100)
build.gradle
gradle.properties
utils/install4j/install4j8_template.install4j

index f5a2182..3080ed8 100644 (file)
@@ -280,7 +280,11 @@ ext {
                                     .replaceAll("[^\\w\\-\\.]", "_") // replace other non [alphanumeric,_,-,.]
                                     .replaceAll("_+", "") // collapse __
                                     //.replaceAll("_*-_*", "-") // collapse _-_
-  install4jUnixApplicationFolder = install4jInternalId
+  install4jUnixApplicationFolder = install4jApplicationName
+                                    .replaceAll(" ","_")
+                                    .replaceAll("[^\\w\\-\\.]", "_") // replace other non [alphanumeric,_,-,.]
+                                    .replaceAll("_+", "_") // collapse __
+                                    .replaceAll("_*-_*", "-") // collapse _-_
                                     .toLowerCase()
 
   getdownAppDir = string("${getdownWebsiteDir}/${getdownAppDistDir}")
@@ -1453,7 +1457,7 @@ task installers(type: com.install4j.gradle.Install4jTask) {
     '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,
+    'APPLICATION_CATEGORIES': install4j_application_categories,
     'APPLICATION_FOLDER': install4jApplicationFolder,
     'UNIX_APPLICATION_FOLDER': install4jUnixApplicationFolder,
     'EXECUTABLE_NAME': install4jExecutableName,
index c31a59b..782a495 100644 (file)
@@ -122,7 +122,7 @@ install4j_installer_file_associations = file_associations_auto-install4j8.xml
 install4j_build_dir = build/install4j
 install4j_media_types = windows,macosArchive,unixArchive,unixInstaller
 install4j_faster = false
-install4j_unix_desktop_additions = Categories=Science;Biology;Java;
+install4j_application_categories = Science;Biology;Java;
 install4j_release_win_application_id = 6595-2347-1923-0725
 
 OSX_KEYSTORE =
index 9788523..2252a91 100644 (file)
@@ -43,7 +43,7 @@
       <variable name="GETDOWN_ALT_DIR" value="alt" />
       <variable name="GETDOWN_INSTALL_DIR" value="install" />
       <variable name="INFO_PLIST_FILE_ASSOCIATIONS_FILE" value="file_associations_auto-Info_plist.xml" />
-      <variable name="UNIX_DESKTOP_ADDITIONS" value="Categories=Science;Biology;Java;" />
+      <variable name="APPLICATION_CATEGORIES" value="Science;Biology;Java;" />
       <variable name="APPLICATION_FOLDER" value="Jalview" />
       <variable name="UNIX_APPLICATION_FOLDER" value="jalview" />
       <variable name="EXECUTABLE_NAME" value="jalview" />
         <id>2450</id>
         <id>2641</id>
       </macStaticAssociationActions>
-      <desktopFile>${compiler:UNIX_DESKTOP_ADDITIONS}</desktopFile>
       <infoPlist>${compiler:file("${compiler:INFO_PLIST_FILE_ASSOCIATIONS_FILE}")}</infoPlist>
       <iconImageFiles>
         <file path="${compiler:JALVIEW_DIR}/resources/images/JalviewLogo_Huge.png" />
@@ -391,6 +390,7 @@ return console.askOkCancel(message, true);
               <action id="18" beanClass="com.install4j.runtime.beans.actions.desktop.CreateProgramGroupAction" actionElevationType="elevated" rollbackBarrierExitCode="0">
                 <serializedBean>
                   <property name="allUsers" type="boolean" value="false" />
+                  <property name="categories" type="string">${compiler:APPLICATION_CATEGORIES}</property>
                   <property name="programGroupName" type="string">${compiler:JALVIEW_NAME}</property>
                   <property name="uninstallerMenuName" type="string">${i18n:UninstallerMenuEntry(${compiler:sys.fullName})}</property>
                 </serializedBean>
@@ -484,6 +484,7 @@ return console.askOkCancel(message, true);
               <action id="2012" beanClass="com.install4j.runtime.beans.actions.desktop.CreateStartMenuEntryAction" actionElevationType="elevated" rollbackBarrierExitCode="0">
                 <serializedBean>
                   <property name="allUsers" type="boolean" value="false" />
+                  <property name="categories" type="string">${compiler:APPLICATION_CATEGORIES}</property>
                   <property name="entryName" type="string">${compiler:JALVIEW_APPLICATION_NAME}</property>
                   <property name="file">
                     <object class="java.io.File">