JAL-3247 Improved file associations on macOS and Windows
[jalview.git] / utils / install4j / install4j_template.install4j
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>