git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
JAL-3393 New DS_Store with slightly bigger Finder window (in case of Path bar, Status...
[jalview.git]
/
utils
/
install4j
/
auto_file_associations.pl
diff --git
a/utils/install4j/auto_file_associations.pl
b/utils/install4j/auto_file_associations.pl
index
ad08a92
..
e59044f
100755
(executable)
--- a/
utils/install4j/auto_file_associations.pl
+++ b/
utils/install4j/auto_file_associations.pl
@@
-3,7
+3,7
@@
use strict;
my $fileformats = $ARGV[0];
use strict;
my $fileformats = $ARGV[0];
-$fileformats = "../../src/jalview/io/FileFormats.java" unless $fileformats;
+$fileformats = "../../src/jalview/io/FileFormat.java" unless $fileformats;
# default mimetype will be text/x-$shortname
# TODO: find an actual extension for mat, see JAL-Xxxxx for outstanding issues too
# default mimetype will be text/x-$shortname
# TODO: find an actual extension for mat, see JAL-Xxxxx for outstanding issues too
@@
-38,6
+38,7
@@
my $add_associations = {
my $add_extensions = {
blc => ["blc"],
};
my $add_extensions = {
blc => ["blc"],
};
+my @put_first = qw(jalview jvl);
my $mactemplatefile = "file_associations_template-Info_plist.xml";
my $i4jtemplatefile = "file_associations_template-install4j.xml";
my $mactemplatefile = "file_associations_template-Info_plist.xml";
my $i4jtemplatefile = "file_associations_template-install4j.xml";
@@
-94,15
+95,19
@@
while(my $line = <IN>) {
name => $name,
extensions => \@extensions
};
name => $name,
extensions => \@extensions
};
+ warn("Adding file association for $shortname\n");
}
}
close(IN);
my %all_associations = (%$file_associations, %$add_associations);
}
}
close(IN);
my %all_associations = (%$file_associations, %$add_associations);
-for my $fa (sort keys %all_associations) {
- my $shortname = $fa;
- my $a = $all_associations{$fa};
+for my $shortname (@put_first, sort keys %all_associations) {
+ my $a = $all_associations{$shortname};
+ if (ref($a) ne "HASH") {
+ next;
+ }
+
my $name = $a->{name};
my $extensions = $a->{extensions};
my $mimetype = $mimetypes->{$shortname};
my $name = $a->{name};
my $extensions = $a->{extensions};
my $mimetype = $mimetypes->{$shortname};
@@
-146,6
+151,8
@@
for my $fa (sort keys %all_associations) {
print IA $i4jextentry;
}
print IA $i4jextentry;
}
+
+ delete $all_associations{$shortname};
}
close(IA);
}
close(IA);