JAL-4012 what’s new and release notes (in the new styleee!) for JAL-4004, JAL-3989...
[jalview.git] / utils / install4j / auto_file_associations-i4j8.pl
index bf24b11..31a4afa 100755 (executable)
@@ -23,7 +23,7 @@ my $mimetypes = {
   scorematrix => "application/x-jalview-scorematrix+text",
   pdb => "chemical/x-pdb",
   mmcif => "chemical/x-cif",
-  mmcif2 => "chemical/x-mcif",
+  mmcif2 => "chemical/x-mmcif",
   jalview => "application/x-jalview+xml+zip",
   jvl => "application/x-jalview-jvl+text",
   annotations => "application/x-jalview-annotations+text",
@@ -37,8 +37,9 @@ my $add_associations = {
   gff3 => {shortname=>"gff3",name=>"Generic Features Format v3",extensions=>["gff3"]},
   features => {shortname=>"features",name=>"Jalview Features",extensions=>["features","jvfeatures"]},
   annotations => {shortname=>"annotations",name=>"Jalview Annotations",extensions=>["annotations","jvannotations"]},
+  mmcif => {shortname=>"mmcif",name=>"CIF",extensions=>["cif"]},
   mmcif2 => {shortname=>"mmcif2",name=>"mmCIF",extensions=>["mcif","mmcif"]},
-  jvl => {shortname=>"jvl",name=>"Jalview Launch",extensions=>["jvl"],iconfile=>"Jalview-Launch"},
+  jvl => {shortname=>"jvl",name=>"Jalview Launch",extensions=>["jvl"],iconfile=>"jvl_file"},
   jnet => {shortname=>"jnet",name=>"JnetFile",extensions=>["concise","jnet"]},
   scorematrix => {shortname=>"scorematrix",name=>"Substitution Matrix",extensions=>["mat"]},
 };
@@ -153,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;
@@ -180,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))));
@@ -213,6 +216,6 @@ close(MA);
 sub xml_escape {
   my $x = shift;
   # stolen from Pod::Simple::XMLOutStream in base distro
-  $x =~ s/([^-\n\t !\#\$\%\(\)\*\+,\.\~\/\:\;=\?\@\[\\\]\^_\`\{\|\}abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789])/'&#'.(ord($1)).';'/eg;
+  $x =~ s/([^-\n\t !\#\$\%\(\)\*\+,\.\~\/\:\;=\?\@\[\\\]\^_\`\{\|\}a-zA-Z0-9])/'&#'.(ord($1)).';'/eg;
   return $x;
 }