JAL-3247 Improved file associations on macOS and Windows
authorBen Soares <bsoares@dundee.ac.uk>
Thu, 2 May 2019 15:55:57 +0000 (16:55 +0100)
committerBen Soares <bsoares@dundee.ac.uk>
Thu, 2 May 2019 15:55:57 +0000 (16:55 +0100)
utils/install4j/Info_plist_file_associations.txt [deleted file]
utils/install4j/Info_plist_file_associations.xml [new file with mode: 0644]
utils/install4j/Jalview-Version-Locator.icns [new file with mode: 0644]
utils/install4j/Jalview-Version-Locator.ico [new file with mode: 0644]
utils/install4j/Jalview-Version-Locator.png [new file with mode: 0644]
utils/install4j/install4j_template.install4j

diff --git a/utils/install4j/Info_plist_file_associations.txt b/utils/install4j/Info_plist_file_associations.txt
deleted file mode 100644 (file)
index d4a5190..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-       <key>CFBundleDocumentTypes</key>
-       <array>
-               <dict>
-                       <key>CFBundleTypeExtensions</key>
-                       <array>
-                               <string>jvp</string>
-                       </array>
-                       <key>CFBundleTypeIconFile</key>
-                       <string>Jalview-File</string>
-                       <key>CFBundleTypeMIMETypes</key>
-                       <array>
-                               <string>application/x-jalview-project</string>
-                       </array>
-                       <key>CFBundleTypeName</key>
-                       <string>Jalview Project File</string>
-                       <key>CFBundleTypeRole</key>
-                       <string>Editor</string>
-                       <key>LSIsAppleDefaultForType</key>
-                       <true/>
-               </dict>
-               <dict>
-                       <key>CFBundleTypeExtensions</key>
-                       <array>
-                               <string>jvl</string>
-                       </array>
-                       <key>CFBundleTypeIconFile</key>
-                       <string>Jalview-Version-Locator</string>
-                       <key>CFBundleTypeMIMETypes</key>
-                       <array>
-                               <string>application/x-jalview-version-locator</string>
-                       </array>
-                       <key>CFBundleTypeName</key>
-                       <string>Jalview Version Locator</string>
-                       <key>CFBundleTypeRole</key>
-                       <string>Editor</string>
-                       <key>LSIsAppleDefaultForType</key>
-                       <true/>
-               </dict>
-  </array>
-
diff --git a/utils/install4j/Info_plist_file_associations.xml b/utils/install4j/Info_plist_file_associations.xml
new file mode 100644 (file)
index 0000000..bcf4783
--- /dev/null
@@ -0,0 +1,39 @@
+<key>CFBundleDocumentTypes</key>
+<array>
+<dict>
+<key>CFBundleTypeExtensions</key>
+<array>
+<string>jvp</string>
+</array>
+<key>CFBundleTypeName</key>
+<string>Jalview Project File</string>
+<key>CFBundleTypeIconFile</key>
+<string>Jalview-File.icns</string>
+<key>CFBundleTypeRole</key>
+<string>Editor</string>
+<key>CFBundleTypeMIMETypes</key>
+<array>
+<string>application/x-jalview-project</string>
+</array>
+<key>LSIsAppleDefaultForType</key>
+<true/>
+</dict>
+<dict>
+<key>CFBundleTypeExtensions</key>
+<array>
+<string>jvl</string>
+</array>
+<key>CFBundleTypeName</key>
+<string>Jalview Version Locator</string>
+<key>CFBundleTypeIconFile</key>
+<string>Jalview-Version-Locator.icns</string>
+<key>CFBundleTypeRole</key>
+<string>Editor</string>
+<key>CFBundleTypeMIMETypes</key>
+<array>
+<string>application/x-jalview-version-locator</string>
+</array>
+<key>LSIsAppleDefaultForType</key>
+<true/>
+</dict>
+</array>
diff --git a/utils/install4j/Jalview-Version-Locator.icns b/utils/install4j/Jalview-Version-Locator.icns
new file mode 100644 (file)
index 0000000..506b5a1
Binary files /dev/null and b/utils/install4j/Jalview-Version-Locator.icns differ
diff --git a/utils/install4j/Jalview-Version-Locator.ico b/utils/install4j/Jalview-Version-Locator.ico
new file mode 100644 (file)
index 0000000..4a2545b
Binary files /dev/null and b/utils/install4j/Jalview-Version-Locator.ico differ
diff --git a/utils/install4j/Jalview-Version-Locator.png b/utils/install4j/Jalview-Version-Locator.png
new file mode 100644 (file)
index 0000000..cb2ce97
Binary files /dev/null and b/utils/install4j/Jalview-Version-Locator.png differ
index 12cff87..861a81a 100644 (file)
@@ -7,6 +7,7 @@
       <additionalLanguages />
     </languages>
     <searchSequence>
+      <registry />
       <directory location="${compiler:JRE_DIR}" />
     </searchSequence>
     <variables>
@@ -93,7 +94,7 @@
           <versionLine x="85" y="109" text="version ${compiler:sys.version}" fontSize="8" fontColor="0,0,0" bold="false" />
         </text>
       </splashScreen>
-      <java mainClass="com.threerings.getdown.launcher.GetdownApp" mainMode="1" vmParameters="" arguments="." allowVMPassthroughParameters="true" preferredVM="" bundleRuntime="true">
+      <java mainClass="com.threerings.getdown.launcher.GetdownApp" mainMode="1" vmParameters="" arguments=". noappid" allowVMPassthroughParameters="true" preferredVM="" bundleRuntime="true">
         <classPath>
           <archive location="getdown-launcher.jar" failOnError="true" />
         </classPath>
       <customScript mode="1" file="">
         <content />
       </customScript>
-      <infoPlist mode="2" file="./Info_plist_file_associations.txt">
+      <infoPlist mode="2" file="./Info_plist_file_associations.xml">
         <content />
       </infoPlist>
       <iconImageFiles>
           <versionLine x="85" y="109" text="version ${compiler:sys.version}" fontSize="8" fontColor="0,0,0" bold="false" />
         </text>
       </splashScreen>
-      <java mainClass="com.threerings.getdown.launcher.GetdownApp" mainMode="1" vmParameters="" arguments="." allowVMPassthroughParameters="true" preferredVM="" bundleRuntime="true">
+      <java mainClass="com.threerings.getdown.launcher.GetdownApp" mainMode="1" vmParameters="" arguments=". noappid" allowVMPassthroughParameters="true" preferredVM="" bundleRuntime="true">
         <classPath>
           <archive location="getdown-launcher.jar" failOnError="true" />
         </classPath>
       <customScript mode="1" file="">
         <content />
       </customScript>
-      <infoPlist mode="2" file="./Info_plist_file_associations.txt">
+      <infoPlist mode="2" file="./Info_plist_file_associations.xml">
         <content />
       </infoPlist>
       <iconImageFiles>
@@ -688,7 +689,13 @@ return console.askOkCancel(message, true);
               <action name="" id="576" customizedId="" beanClass="com.install4j.runtime.beans.actions.desktop.AddToDockAction" enabled="true" commentSet="false" comment="" actionElevationType="none" rollbackBarrier="false" rollbackBarrierExitCode="0" multiExec="false" failureStrategy="1" errorMessage="">
                 <serializedBean>
                   <java class="java.beans.XMLDecoder">
-                    <object class="com.install4j.runtime.beans.actions.desktop.AddToDockAction" />
+                    <object class="com.install4j.runtime.beans.actions.desktop.AddToDockAction">
+                      <void property="executable">
+                        <object class="java.io.File">
+                          <string>Jalview.app</string>
+                        </object>
+                      </void>
+                    </object>
                   </java>
                 </serializedBean>
                 <condition>context.getBooleanVariable("addToDockAction")</condition>
@@ -742,18 +749,12 @@ return console.askOkCancel(message, true);
                       </void>
                       <void property="macIconFile">
                         <object class="com.install4j.api.beans.ExternalFile">
-                          <string>../../resources/images/JalviewVersionLocator.png</string>
-                        </object>
-                      </void>
-                      <void property="macRole">
-                        <object class="java.lang.Enum" method="valueOf">
-                          <class>com.install4j.runtime.beans.actions.desktop.MacAssociationRole</class>
-                          <string>EDITOR</string>
+                          <string>./Jalview-Version-Locator.icns</string>
                         </object>
                       </void>
                       <void property="windowsIconFile">
                         <object class="com.install4j.api.beans.ExternalFile">
-                          <string>../../resources/images/JalviewVersionLocator.png</string>
+                          <string>./Jalview-Version-Locator.ico</string>
                         </object>
                       </void>
                     </object>
@@ -1740,6 +1741,8 @@ return console.askYesNo(message, true);
         <file name=".background/jalview_dmg_background.png" file="./jalview_dmg_background.png" />
         <file name=".DS_Store" file="./DS_Store" />
         <symlink name="Jalview.app/Contents/Resources/app/${compiler:JRE_DIR}/Contents/MacOS/libjli.dylib" target="../Home/lib/jli/libjli.dylib" />
+        <file name="Jalview.app/Contents/Resources/Jalview-File.icns" file="./Jalview-File.icns" />
+        <file name="Jalview.app/Contents/Resources/Jalview-Version-Locator.icns" file="Jalview-Version-Locator.icns" />
       </topLevelFiles>
     </macosArchive>
     <windows name="Network Windows" id="1272" customizedId="" mediaFileName="${compiler:sys.shortName}-NETWORK_${compiler:sys.platform}_${compiler:sys.version}-j$$JAVA_INTEGER_VERSION$$" installDir="${compiler:sys.shortName}" overridePrincipalLanguage="false" jreBitType="64" runPostProcessor="true" postProcessor="${compiler:JSIGN_SH} $EXECUTABLE" failOnPostProcessorError="false" useLegacyMediaFileIds="false" legacyMediaFileIds="" downloadURL="" includeAllDownloadableComponents="false" includedJRE="$$WINDOWS_JAVA_VM_TGZ$$" manualJREEntry="true" bundleType="1" jreURL="" jreShared="false" directDownload="false" installOnlyIfNecessary="false" customInstallBaseDir="~/AppData/Local" contentFilesType="1" verifyIntegrity="true">
@@ -1787,12 +1790,16 @@ return console.askYesNo(message, true);
         <file name=".background/jalview_dmg_background.png" file="./jalview_dmg_background.png" />
         <file name=".DS_Store" file="./DS_Store" />
         <symlink name="Jalview.app/Contents/Resources/app/${compiler:JRE_DIR}/Contents/MacOS/libjli.dylib" target="../Home/lib/jli/libjli.dylib" />
+        <file name="Jalview.app/Contents/Resources/Jalview-Version-Locator.icns" file="Jalview-Version-Locator.icns" />
+        <file name="Jalview.app/Contents/Resources/Jalview-File.icns" file="Jalview-File.icns" />
       </topLevelFiles>
     </macosArchive>
     <unixInstaller name="Unix Installer" id="1595" customizedId="" mediaFileName="${compiler:sys.shortName}-OFFLINE_${compiler:sys.platform}_installer_${compiler:sys.version}-j$$JAVA_INTEGER_VERSION$$" installDir="${compiler:sys.shortName}" overridePrincipalLanguage="false" jreBitType="all" runPostProcessor="false" postProcessor="" failOnPostProcessorError="false" useLegacyMediaFileIds="false" legacyMediaFileIds="" downloadURL="" includeAllDownloadableComponents="false" includedJRE="" manualJREEntry="false" bundleType="1" jreURL="" jreShared="false" directDownload="false" installOnlyIfNecessary="false" customInstallBaseDir="" contentFilesType="1">
       <excludedComponents />
       <includedDownloadableComponents />
-      <excludedLaunchers />
+      <excludedLaunchers>
+        <launcher id="1402" />
+      </excludedLaunchers>
       <excludedBeans />
       <overriddenPrincipalLanguage id="en" customLocalizationFile="" />
       <exclude>
@@ -1816,7 +1823,9 @@ return console.askYesNo(message, true);
         <component id="1156" />
       </excludedComponents>
       <includedDownloadableComponents />
-      <excludedLaunchers />
+      <excludedLaunchers>
+        <launcher id="1402" />
+      </excludedLaunchers>
       <excludedBeans />
       <overriddenPrincipalLanguage id="en" customLocalizationFile="" />
       <exclude />
@@ -1827,7 +1836,7 @@ return console.askYesNo(message, true);
       </autoUpdate>
     </unixArchive>
   </mediaSets>
-  <buildIds buildAll="false">
+  <buildIds buildAll="true">
     <mediaSet refId="153" />
     <mediaSet refId="570" />
     <mediaSet refId="743" />
@@ -1835,6 +1844,8 @@ return console.askYesNo(message, true);
     <mediaSet refId="1272" />
     <mediaSet refId="1274" />
     <mediaSet refId="1595" />
+    <mediaSet refId="1596" />
+    <mediaSet refId="1695" />
   </buildIds>
   <buildOptions verbose="false" faster="false" disableSigning="false" disableJreBundling="false" debug="false" />
 </install4j>