JAL-3447 Minor improvement on file association creation
authorBen Soares <bsoares@dundee.ac.uk>
Fri, 17 Jan 2020 17:09:52 +0000 (17:09 +0000)
committerBen Soares <bsoares@dundee.ac.uk>
Fri, 17 Jan 2020 17:09:52 +0000 (17:09 +0000)
utils/install4j/auto_file_associations-i4j8.pl
utils/install4j/file_associations_auto-install4j8.xml
utils/install4j/file_associations_template-install4j8.xml

index 9b26f22..f281469 100755 (executable)
@@ -154,6 +154,7 @@ for my $shortname (@ordered) {
   my $xshortname = xml_escape($shortname);
   my $xiconfile = xml_escape($iconfile);
   my $xrole = xml_escape($role);
+  my $xROLE = xml_escape(uc($role));
   my $xprimarystring = xml_escape($primarystring);
 
   my $macentry = $mactemplate;
@@ -181,6 +182,7 @@ for my $shortname (@ordered) {
   $i4jentry =~ s/\$\$MIMETYPE\$\$/$xmimetype/g;
   $i4jentry =~ s/\$\$ICONFILE\$\$/$xiconfile/g;
   $i4jentry =~ s/\$\$PRIMARY\$\$/$xprimarystring/g;
+  $i4jentry =~ s/\$\$MACASSOCIATIONROLE\$\$/$xROLE/g;
 
   my $ext = join(",",sort(@extensions));
   my $xdisplayext = xml_escape(join(", ", map(".$_",sort(@extensions))));
index c9f5dc6..b14d32a 100644 (file)
                       <property name="description" type="string">Jalview File</property>
                       <property name="extension" type="string">jvp</property>
                       <property name="launcherId" type="string">737</property>
-                      <property name="selected" type="boolean" value="true" />
                       <property name="macIconFile">
                         <object class="com.install4j.api.beans.ExternalFile">
                           <string>Jalview-File.icns</string>
                         </object>
                       </property>
-                      <!--<property name="macMimeType" type="string">application/x-jalview+xml+zip</property>-->
                       <property name="macRole" type="enum" class="com.install4j.runtime.beans.actions.desktop.MacAssociationRole" value="EDITOR" />
                       <property name="restartFinder" type="boolean" value="true" />
+                      <property name="selected" type="boolean" value="true" />
                       <property name="unix" type="boolean" value="true" />
                       <property name="unixIconFile">
                         <object class="com.install4j.api.beans.ExternalFile">
                       <property name="description" type="string">Jalview Launch File</property>
                       <property name="extension" type="string">jvl</property>
                       <property name="launcherId" type="string">737</property>
-                      <property name="selected" type="boolean" value="true" />
                       <property name="macIconFile">
                         <object class="com.install4j.api.beans.ExternalFile">
                           <string>Jalview-Launch.icns</string>
                         </object>
                       </property>
-                      <!--<property name="macMimeType" type="string">application/x-jalview-jvl+text</property>-->
                       <property name="macRole" type="enum" class="com.install4j.runtime.beans.actions.desktop.MacAssociationRole" value="EDITOR" />
                       <property name="restartFinder" type="boolean" value="true" />
+                      <property name="selected" type="boolean" value="true" />
                       <property name="unix" type="boolean" value="true" />
                       <property name="unixIconFile">
                         <object class="com.install4j.api.beans.ExternalFile">
                       <property name="description" type="string">CIF File</property>
                       <property name="extension" type="string">cif</property>
                       <property name="launcherId" type="string">737</property>
-                      <property name="selected" type="boolean" value="false" />
                       <property name="macIconFile">
                         <object class="com.install4j.api.beans.ExternalFile">
                           <string>Jalview-File.icns</string>
                         </object>
                       </property>
-                      <!--<property name="macMimeType" type="string">chemical/x-cif</property>-->
-                      <property name="macRole" type="enum" class="com.install4j.runtime.beans.actions.desktop.MacAssociationRole" value="EDITOR" />
+                      <property name="macRole" type="enum" class="com.install4j.runtime.beans.actions.desktop.MacAssociationRole" value="VIEWER" />
                       <property name="restartFinder" type="boolean" value="true" />
+                      <property name="selected" type="boolean" value="false" />
                       <property name="unix" type="boolean" value="true" />
                       <property name="unixIconFile">
                         <object class="com.install4j.api.beans.ExternalFile">
                       <property name="description" type="string">mmCIF File</property>
                       <property name="extension" type="string">mcif,mmcif</property>
                       <property name="launcherId" type="string">737</property>
-                      <property name="selected" type="boolean" value="false" />
                       <property name="macIconFile">
                         <object class="com.install4j.api.beans.ExternalFile">
                           <string>Jalview-File.icns</string>
                         </object>
                       </property>
-                      <!--<property name="macMimeType" type="string">chemical/x-mmcif</property>-->
-                      <property name="macRole" type="enum" class="com.install4j.runtime.beans.actions.desktop.MacAssociationRole" value="EDITOR" />
+                      <property name="macRole" type="enum" class="com.install4j.runtime.beans.actions.desktop.MacAssociationRole" value="VIEWER" />
                       <property name="restartFinder" type="boolean" value="true" />
+                      <property name="selected" type="boolean" value="false" />
                       <property name="unix" type="boolean" value="true" />
                       <property name="unixIconFile">
                         <object class="com.install4j.api.beans.ExternalFile">
                       <property name="description" type="string">PDB File</property>
                       <property name="extension" type="string">ent,pdb</property>
                       <property name="launcherId" type="string">737</property>
-                      <property name="selected" type="boolean" value="false" />
                       <property name="macIconFile">
                         <object class="com.install4j.api.beans.ExternalFile">
                           <string>Jalview-File.icns</string>
                         </object>
                       </property>
-                      <!--<property name="macMimeType" type="string">chemical/x-pdb</property>-->
-                      <property name="macRole" type="enum" class="com.install4j.runtime.beans.actions.desktop.MacAssociationRole" value="EDITOR" />
+                      <property name="macRole" type="enum" class="com.install4j.runtime.beans.actions.desktop.MacAssociationRole" value="VIEWER" />
                       <property name="restartFinder" type="boolean" value="true" />
+                      <property name="selected" type="boolean" value="false" />
                       <property name="unix" type="boolean" value="true" />
                       <property name="unixIconFile">
                         <object class="com.install4j.api.beans.ExternalFile">
                       <property name="description" type="string">AMSA File</property>
                       <property name="extension" type="string">amsa</property>
                       <property name="launcherId" type="string">737</property>
-                      <property name="selected" type="boolean" value="true" />
                       <property name="macIconFile">
                         <object class="com.install4j.api.beans.ExternalFile">
                           <string>Jalview-File.icns</string>
                         </object>
                       </property>
-                      <!--<property name="macMimeType" type="string">application/x-amsa+txt</property>-->
                       <property name="macRole" type="enum" class="com.install4j.runtime.beans.actions.desktop.MacAssociationRole" value="EDITOR" />
                       <property name="restartFinder" type="boolean" value="true" />
+                      <property name="selected" type="boolean" value="true" />
                       <property name="unix" type="boolean" value="true" />
                       <property name="unixIconFile">
                         <object class="com.install4j.api.beans.ExternalFile">
                       <property name="description" type="string">Jalview Annotations File</property>
                       <property name="extension" type="string">annotations,jvannotations</property>
                       <property name="launcherId" type="string">737</property>
-                      <property name="selected" type="boolean" value="true" />
                       <property name="macIconFile">
                         <object class="com.install4j.api.beans.ExternalFile">
                           <string>Jalview-File.icns</string>
                         </object>
                       </property>
-                      <!--<property name="macMimeType" type="string">application/x-jalview-annotations+text</property>-->
                       <property name="macRole" type="enum" class="com.install4j.runtime.beans.actions.desktop.MacAssociationRole" value="EDITOR" />
                       <property name="restartFinder" type="boolean" value="true" />
+                      <property name="selected" type="boolean" value="true" />
                       <property name="unix" type="boolean" value="true" />
                       <property name="unixIconFile">
                         <object class="com.install4j.api.beans.ExternalFile">
                       <property name="description" type="string">BioJSON File</property>
                       <property name="extension" type="string">biojson</property>
                       <property name="launcherId" type="string">737</property>
-                      <property name="selected" type="boolean" value="true" />
                       <property name="macIconFile">
                         <object class="com.install4j.api.beans.ExternalFile">
                           <string>Jalview-File.icns</string>
                         </object>
                       </property>
-                      <!--<property name="macMimeType" type="string">application/x-jalview-biojson+json</property>-->
                       <property name="macRole" type="enum" class="com.install4j.runtime.beans.actions.desktop.MacAssociationRole" value="EDITOR" />
                       <property name="restartFinder" type="boolean" value="true" />
+                      <property name="selected" type="boolean" value="true" />
                       <property name="unix" type="boolean" value="true" />
                       <property name="unixIconFile">
                         <object class="com.install4j.api.beans.ExternalFile">
                       <property name="description" type="string">BLC File</property>
                       <property name="extension" type="string">blc</property>
                       <property name="launcherId" type="string">737</property>
-                      <property name="selected" type="boolean" value="true" />
                       <property name="macIconFile">
                         <object class="com.install4j.api.beans.ExternalFile">
                           <string>Jalview-File.icns</string>
                         </object>
                       </property>
-                      <!--<property name="macMimeType" type="string">application/x-blc+txt</property>-->
                       <property name="macRole" type="enum" class="com.install4j.runtime.beans.actions.desktop.MacAssociationRole" value="EDITOR" />
                       <property name="restartFinder" type="boolean" value="true" />
+                      <property name="selected" type="boolean" value="true" />
                       <property name="unix" type="boolean" value="true" />
                       <property name="unixIconFile">
                         <object class="com.install4j.api.beans.ExternalFile">
                       <property name="description" type="string">Clustal File</property>
                       <property name="extension" type="string">aln</property>
                       <property name="launcherId" type="string">737</property>
-                      <property name="selected" type="boolean" value="true" />
                       <property name="macIconFile">
                         <object class="com.install4j.api.beans.ExternalFile">
                           <string>Jalview-File.icns</string>
                         </object>
                       </property>
-                      <!--<property name="macMimeType" type="string">application/x-clustal+txt</property>-->
                       <property name="macRole" type="enum" class="com.install4j.runtime.beans.actions.desktop.MacAssociationRole" value="EDITOR" />
                       <property name="restartFinder" type="boolean" value="true" />
+                      <property name="selected" type="boolean" value="true" />
                       <property name="unix" type="boolean" value="true" />
                       <property name="unixIconFile">
                         <object class="com.install4j.api.beans.ExternalFile">
                       <property name="description" type="string">Fasta File</property>
                       <property name="extension" type="string">fa,fasta</property>
                       <property name="launcherId" type="string">737</property>
-                      <property name="selected" type="boolean" value="true" />
                       <property name="macIconFile">
                         <object class="com.install4j.api.beans.ExternalFile">
                           <string>Jalview-File.icns</string>
                         </object>
                       </property>
-                      <!--<property name="macMimeType" type="string">application/x-fasta+txt</property>-->
                       <property name="macRole" type="enum" class="com.install4j.runtime.beans.actions.desktop.MacAssociationRole" value="EDITOR" />
                       <property name="restartFinder" type="boolean" value="true" />
+                      <property name="selected" type="boolean" value="true" />
                       <property name="unix" type="boolean" value="true" />
                       <property name="unixIconFile">
                         <object class="com.install4j.api.beans.ExternalFile">
                       <property name="description" type="string">Jalview Features File</property>
                       <property name="extension" type="string">features,jvfeatures</property>
                       <property name="launcherId" type="string">737</property>
-                      <property name="selected" type="boolean" value="true" />
                       <property name="macIconFile">
                         <object class="com.install4j.api.beans.ExternalFile">
                           <string>Jalview-File.icns</string>
                         </object>
                       </property>
-                      <!--<property name="macMimeType" type="string">application/x-jalview-features+text</property>-->
                       <property name="macRole" type="enum" class="com.install4j.runtime.beans.actions.desktop.MacAssociationRole" value="EDITOR" />
                       <property name="restartFinder" type="boolean" value="true" />
+                      <property name="selected" type="boolean" value="true" />
                       <property name="unix" type="boolean" value="true" />
                       <property name="unixIconFile">
                         <object class="com.install4j.api.beans.ExternalFile">
                       <property name="description" type="string">Generic Features Format v2 File</property>
                       <property name="extension" type="string">gff2</property>
                       <property name="launcherId" type="string">737</property>
-                      <property name="selected" type="boolean" value="true" />
                       <property name="macIconFile">
                         <object class="com.install4j.api.beans.ExternalFile">
                           <string>Jalview-File.icns</string>
                         </object>
                       </property>
-                      <!--<property name="macMimeType" type="string">application/x-gff2+txt</property>-->
                       <property name="macRole" type="enum" class="com.install4j.runtime.beans.actions.desktop.MacAssociationRole" value="EDITOR" />
                       <property name="restartFinder" type="boolean" value="true" />
+                      <property name="selected" type="boolean" value="true" />
                       <property name="unix" type="boolean" value="true" />
                       <property name="unixIconFile">
                         <object class="com.install4j.api.beans.ExternalFile">
                       <property name="description" type="string">Generic Features Format v3 File</property>
                       <property name="extension" type="string">gff3</property>
                       <property name="launcherId" type="string">737</property>
-                      <property name="selected" type="boolean" value="true" />
                       <property name="macIconFile">
                         <object class="com.install4j.api.beans.ExternalFile">
                           <string>Jalview-File.icns</string>
                         </object>
                       </property>
-                      <!--<property name="macMimeType" type="string">application/x-gff3+txt</property>-->
                       <property name="macRole" type="enum" class="com.install4j.runtime.beans.actions.desktop.MacAssociationRole" value="EDITOR" />
                       <property name="restartFinder" type="boolean" value="true" />
+                      <property name="selected" type="boolean" value="true" />
                       <property name="unix" type="boolean" value="true" />
                       <property name="unixIconFile">
                         <object class="com.install4j.api.beans.ExternalFile">
                       <property name="description" type="string">JnetFile File</property>
                       <property name="extension" type="string">concise,jnet</property>
                       <property name="launcherId" type="string">737</property>
-                      <property name="selected" type="boolean" value="true" />
                       <property name="macIconFile">
                         <object class="com.install4j.api.beans.ExternalFile">
                           <string>Jalview-File.icns</string>
                         </object>
                       </property>
-                      <!--<property name="macMimeType" type="string">application/x-jalview-jnet+text</property>-->
                       <property name="macRole" type="enum" class="com.install4j.runtime.beans.actions.desktop.MacAssociationRole" value="EDITOR" />
                       <property name="restartFinder" type="boolean" value="true" />
+                      <property name="selected" type="boolean" value="true" />
                       <property name="unix" type="boolean" value="true" />
                       <property name="unixIconFile">
                         <object class="com.install4j.api.beans.ExternalFile">
                       <property name="description" type="string">MSF File</property>
                       <property name="extension" type="string">msf</property>
                       <property name="launcherId" type="string">737</property>
-                      <property name="selected" type="boolean" value="true" />
                       <property name="macIconFile">
                         <object class="com.install4j.api.beans.ExternalFile">
                           <string>Jalview-File.icns</string>
                         </object>
                       </property>
-                      <!--<property name="macMimeType" type="string">application/x-msf+txt</property>-->
                       <property name="macRole" type="enum" class="com.install4j.runtime.beans.actions.desktop.MacAssociationRole" value="EDITOR" />
                       <property name="restartFinder" type="boolean" value="true" />
+                      <property name="selected" type="boolean" value="true" />
                       <property name="unix" type="boolean" value="true" />
                       <property name="unixIconFile">
                         <object class="com.install4j.api.beans.ExternalFile">
                       <property name="description" type="string">PFAM File</property>
                       <property name="extension" type="string">pfam</property>
                       <property name="launcherId" type="string">737</property>
-                      <property name="selected" type="boolean" value="true" />
                       <property name="macIconFile">
                         <object class="com.install4j.api.beans.ExternalFile">
                           <string>Jalview-File.icns</string>
                         </object>
                       </property>
-                      <!--<property name="macMimeType" type="string">application/x-pfam+txt</property>-->
                       <property name="macRole" type="enum" class="com.install4j.runtime.beans.actions.desktop.MacAssociationRole" value="EDITOR" />
                       <property name="restartFinder" type="boolean" value="true" />
+                      <property name="selected" type="boolean" value="true" />
                       <property name="unix" type="boolean" value="true" />
                       <property name="unixIconFile">
                         <object class="com.install4j.api.beans.ExternalFile">
                       <property name="description" type="string">PHYLIP File</property>
                       <property name="extension" type="string">phy</property>
                       <property name="launcherId" type="string">737</property>
-                      <property name="selected" type="boolean" value="true" />
                       <property name="macIconFile">
                         <object class="com.install4j.api.beans.ExternalFile">
                           <string>Jalview-File.icns</string>
                         </object>
                       </property>
-                      <!--<property name="macMimeType" type="string">application/x-phylip+txt</property>-->
                       <property name="macRole" type="enum" class="com.install4j.runtime.beans.actions.desktop.MacAssociationRole" value="EDITOR" />
                       <property name="restartFinder" type="boolean" value="true" />
+                      <property name="selected" type="boolean" value="true" />
                       <property name="unix" type="boolean" value="true" />
                       <property name="unixIconFile">
                         <object class="com.install4j.api.beans.ExternalFile">
                       <property name="description" type="string">PileUp File</property>
                       <property name="extension" type="string">pileup</property>
                       <property name="launcherId" type="string">737</property>
-                      <property name="selected" type="boolean" value="true" />
                       <property name="macIconFile">
                         <object class="com.install4j.api.beans.ExternalFile">
                           <string>Jalview-File.icns</string>
                         </object>
                       </property>
-                      <!--<property name="macMimeType" type="string">application/x-pileup+txt</property>-->
                       <property name="macRole" type="enum" class="com.install4j.runtime.beans.actions.desktop.MacAssociationRole" value="EDITOR" />
                       <property name="restartFinder" type="boolean" value="true" />
+                      <property name="selected" type="boolean" value="true" />
                       <property name="unix" type="boolean" value="true" />
                       <property name="unixIconFile">
                         <object class="com.install4j.api.beans.ExternalFile">
                       <property name="description" type="string">PIR File</property>
                       <property name="extension" type="string">pir</property>
                       <property name="launcherId" type="string">737</property>
-                      <property name="selected" type="boolean" value="true" />
                       <property name="macIconFile">
                         <object class="com.install4j.api.beans.ExternalFile">
                           <string>Jalview-File.icns</string>
                         </object>
                       </property>
-                      <!--<property name="macMimeType" type="string">application/x-pir+txt</property>-->
                       <property name="macRole" type="enum" class="com.install4j.runtime.beans.actions.desktop.MacAssociationRole" value="EDITOR" />
                       <property name="restartFinder" type="boolean" value="true" />
+                      <property name="selected" type="boolean" value="true" />
                       <property name="unix" type="boolean" value="true" />
                       <property name="unixIconFile">
                         <object class="com.install4j.api.beans.ExternalFile">
                       <property name="description" type="string">RNAML File</property>
                       <property name="extension" type="string">rnaml</property>
                       <property name="launcherId" type="string">737</property>
-                      <property name="selected" type="boolean" value="true" />
                       <property name="macIconFile">
                         <object class="com.install4j.api.beans.ExternalFile">
                           <string>Jalview-File.icns</string>
                         </object>
                       </property>
-                      <!--<property name="macMimeType" type="string">application/rnaml+xml</property>-->
                       <property name="macRole" type="enum" class="com.install4j.runtime.beans.actions.desktop.MacAssociationRole" value="EDITOR" />
                       <property name="restartFinder" type="boolean" value="true" />
+                      <property name="selected" type="boolean" value="true" />
                       <property name="unix" type="boolean" value="true" />
                       <property name="unixIconFile">
                         <object class="com.install4j.api.beans.ExternalFile">
                       <property name="description" type="string">Substitution Matrix File</property>
                       <property name="extension" type="string">mat</property>
                       <property name="launcherId" type="string">737</property>
-                      <property name="selected" type="boolean" value="true" />
                       <property name="macIconFile">
                         <object class="com.install4j.api.beans.ExternalFile">
                           <string>Jalview-File.icns</string>
                         </object>
                       </property>
-                      <!--<property name="macMimeType" type="string">application/x-jalview-scorematrix+text</property>-->
                       <property name="macRole" type="enum" class="com.install4j.runtime.beans.actions.desktop.MacAssociationRole" value="EDITOR" />
                       <property name="restartFinder" type="boolean" value="true" />
+                      <property name="selected" type="boolean" value="true" />
                       <property name="unix" type="boolean" value="true" />
                       <property name="unixIconFile">
                         <object class="com.install4j.api.beans.ExternalFile">
                       <property name="description" type="string">Stockholm File</property>
                       <property name="extension" type="string">stk,sto</property>
                       <property name="launcherId" type="string">737</property>
-                      <property name="selected" type="boolean" value="true" />
                       <property name="macIconFile">
                         <object class="com.install4j.api.beans.ExternalFile">
                           <string>Jalview-File.icns</string>
                         </object>
                       </property>
-                      <!--<property name="macMimeType" type="string">application/x-stockholm+txt</property>-->
                       <property name="macRole" type="enum" class="com.install4j.runtime.beans.actions.desktop.MacAssociationRole" value="EDITOR" />
                       <property name="restartFinder" type="boolean" value="true" />
+                      <property name="selected" type="boolean" value="true" />
                       <property name="unix" type="boolean" value="true" />
                       <property name="unixIconFile">
                         <object class="com.install4j.api.beans.ExternalFile">
index ac0393a..5a311f1 100644 (file)
                       <property name="description" type="string">$$NAME$$ File</property>
                       <property name="extension" type="string">$$EXTENSION$$</property>
                       <property name="launcherId" type="string">737</property>
-                      <property name="selected" type="boolean" value="$$PRIMARY$$" />
                       <property name="macIconFile">
                         <object class="com.install4j.api.beans.ExternalFile">
                           <string>$$ICONFILE$$.icns</string>
                         </object>
                       </property>
-                      <!--<property name="macMimeType" type="string">$$MIMETYPE$$</property>-->
-                      <property name="macRole" type="enum" class="com.install4j.runtime.beans.actions.desktop.MacAssociationRole" value="EDITOR" />
+                      <property name="macRole" type="enum" class="com.install4j.runtime.beans.actions.desktop.MacAssociationRole" value="$$MACASSOCIATIONROLE$$" />
                       <property name="restartFinder" type="boolean" value="true" />
+                      <property name="selected" type="boolean" value="$$PRIMARY$$" />
                       <property name="unix" type="boolean" value="$$ADDUNIXEXTENSION$$" />
                       <property name="unixIconFile">
                         <object class="com.install4j.api.beans.ExternalFile">