JAL-3394 improvements to the file association progress bar
authorBen Soares <bsoares@dundee.ac.uk>
Fri, 13 Dec 2019 15:46:47 +0000 (15:46 +0000)
committerBen Soares <bsoares@dundee.ac.uk>
Fri, 13 Dec 2019 15:46:47 +0000 (15:46 +0000)
utils/install4j/auto_file_associations-i4j8.pl
utils/install4j/file_associations_auto-install4j8.xml
utils/install4j/install4j8_template.install4j

index e091681..bf24b11 100755 (executable)
@@ -120,25 +120,16 @@ close(IN);
 
 my %all_associations = (%$file_associations, %$add_associations);
 
-my $num = 0;
-my $i4jcount = 0;
 my @ordered = (@put_first, @non_primary);
 for my $key (sort keys %all_associations) {
   next if grep($_ eq $key, @ordered);
   push(@ordered, $key);
 }
-for my $key (@ordered) {
-  my $a = $all_associations{$key};
-  next if (ref($a) ne "HASH");
-
-  my $extensions = $a->{extensions};
-  my @extensions = @$extensions;
-
-  $num++
-}
+my $num = $#ordered + 1;
 
 warn("--\n");
 
+my $i4jcount = 0;
 for my $shortname (@ordered) {
   my $a = $all_associations{$shortname};
   next if (ref($a) ne "HASH");
@@ -192,9 +183,9 @@ for my $shortname (@ordered) {
 
   my $ext = join(",",sort(@extensions));
   my $xdisplayext = xml_escape(join(", ", map(".$_",sort(@extensions))));
-  $i4jcount++;
   my $progresspercent = int(($i4jcount/$num)*100);
   $progresspercent = 100 if $progresspercent > 100;
+  $i4jcount++;
   my $xext = xml_escape($ext);
   my $addunixextension = "true";
 
index f6884ee..9314f6a 100644 (file)
@@ -8,9 +8,9 @@
                     </serializedBean>
                   </action>
 
-                  <action name="Jalview (.jvp) progress bar 4" id="10001" customizedId="Jalview-jvp-10001-progressbar" beanClass="com.install4j.runtime.beans.actions.control.SetProgressAction" actionElevationType="none" rollbackBarrierExitCode="0">
+                  <action name="Jalview (.jvp) progress bar 0" id="10001" customizedId="Jalview-jvp-10001-progressbar" beanClass="com.install4j.runtime.beans.actions.control.SetProgressAction" actionElevationType="none" rollbackBarrierExitCode="0">
                     <serializedBean>
-                      <property name="percentValue" type="int" value="4" />
+                      <property name="percentValue" type="int" value="0" />
                     </serializedBean>
                   </action>
 
@@ -54,9 +54,9 @@
                     </serializedBean>
                   </action>
 
-                  <action name="Jalview Launch (.jvl) progress bar 8" id="10004" customizedId="Jalview Launch-jvl-10004-progressbar" beanClass="com.install4j.runtime.beans.actions.control.SetProgressAction" actionElevationType="none" rollbackBarrierExitCode="0">
+                  <action name="Jalview Launch (.jvl) progress bar 4" id="10004" customizedId="Jalview Launch-jvl-10004-progressbar" beanClass="com.install4j.runtime.beans.actions.control.SetProgressAction" actionElevationType="none" rollbackBarrierExitCode="0">
                     <serializedBean>
-                      <property name="percentValue" type="int" value="8" />
+                      <property name="percentValue" type="int" value="4" />
                     </serializedBean>
                   </action>
 
                     </serializedBean>
                   </action>
 
-                  <action name="mmCIF (.cif) progress bar 13" id="10007" customizedId="mmCIF-cif-10007-progressbar" beanClass="com.install4j.runtime.beans.actions.control.SetProgressAction" actionElevationType="none" rollbackBarrierExitCode="0">
+                  <action name="mmCIF (.cif) progress bar 8" id="10007" customizedId="mmCIF-cif-10007-progressbar" beanClass="com.install4j.runtime.beans.actions.control.SetProgressAction" actionElevationType="none" rollbackBarrierExitCode="0">
                     <serializedBean>
-                      <property name="percentValue" type="int" value="13" />
+                      <property name="percentValue" type="int" value="8" />
                     </serializedBean>
                   </action>
 
                     </serializedBean>
                   </action>
 
-                  <action name="mmCIF (.mcif, .mmcif) progress bar 17" id="10010" customizedId="mmCIF-mcif,mmcif-10010-progressbar" beanClass="com.install4j.runtime.beans.actions.control.SetProgressAction" actionElevationType="none" rollbackBarrierExitCode="0">
+                  <action name="mmCIF (.mcif, .mmcif) progress bar 13" id="10010" customizedId="mmCIF-mcif,mmcif-10010-progressbar" beanClass="com.install4j.runtime.beans.actions.control.SetProgressAction" actionElevationType="none" rollbackBarrierExitCode="0">
                     <serializedBean>
-                      <property name="percentValue" type="int" value="17" />
+                      <property name="percentValue" type="int" value="13" />
                     </serializedBean>
                   </action>
 
                     </serializedBean>
                   </action>
 
-                  <action name="PDB (.ent, .pdb) progress bar 21" id="10013" customizedId="PDB-ent,pdb-10013-progressbar" beanClass="com.install4j.runtime.beans.actions.control.SetProgressAction" actionElevationType="none" rollbackBarrierExitCode="0">
+                  <action name="PDB (.ent, .pdb) progress bar 17" id="10013" customizedId="PDB-ent,pdb-10013-progressbar" beanClass="com.install4j.runtime.beans.actions.control.SetProgressAction" actionElevationType="none" rollbackBarrierExitCode="0">
                     <serializedBean>
-                      <property name="percentValue" type="int" value="21" />
+                      <property name="percentValue" type="int" value="17" />
                     </serializedBean>
                   </action>
 
                     </serializedBean>
                   </action>
 
-                  <action name="AMSA (.amsa) progress bar 26" id="10016" customizedId="AMSA-amsa-10016-progressbar" beanClass="com.install4j.runtime.beans.actions.control.SetProgressAction" actionElevationType="none" rollbackBarrierExitCode="0">
+                  <action name="AMSA (.amsa) progress bar 21" id="10016" customizedId="AMSA-amsa-10016-progressbar" beanClass="com.install4j.runtime.beans.actions.control.SetProgressAction" actionElevationType="none" rollbackBarrierExitCode="0">
                     <serializedBean>
-                      <property name="percentValue" type="int" value="26" />
+                      <property name="percentValue" type="int" value="21" />
                     </serializedBean>
                   </action>
 
                     </serializedBean>
                   </action>
 
-                  <action name="Jalview Annotations (.annotations, .jvannotations) progress bar 30" id="10019" customizedId="Jalview Annotations-annotations,jvannotations-10019-progressbar" beanClass="com.install4j.runtime.beans.actions.control.SetProgressAction" actionElevationType="none" rollbackBarrierExitCode="0">
+                  <action name="Jalview Annotations (.annotations, .jvannotations) progress bar 26" id="10019" customizedId="Jalview Annotations-annotations,jvannotations-10019-progressbar" beanClass="com.install4j.runtime.beans.actions.control.SetProgressAction" actionElevationType="none" rollbackBarrierExitCode="0">
                     <serializedBean>
-                      <property name="percentValue" type="int" value="30" />
+                      <property name="percentValue" type="int" value="26" />
                     </serializedBean>
                   </action>
 
                     </serializedBean>
                   </action>
 
-                  <action name="BioJSON (.biojson) progress bar 34" id="10022" customizedId="BioJSON-biojson-10022-progressbar" beanClass="com.install4j.runtime.beans.actions.control.SetProgressAction" actionElevationType="none" rollbackBarrierExitCode="0">
+                  <action name="BioJSON (.biojson) progress bar 30" id="10022" customizedId="BioJSON-biojson-10022-progressbar" beanClass="com.install4j.runtime.beans.actions.control.SetProgressAction" actionElevationType="none" rollbackBarrierExitCode="0">
                     <serializedBean>
-                      <property name="percentValue" type="int" value="34" />
+                      <property name="percentValue" type="int" value="30" />
                     </serializedBean>
                   </action>
 
                     </serializedBean>
                   </action>
 
-                  <action name="BLC (.blc) progress bar 39" id="10025" customizedId="BLC-blc-10025-progressbar" beanClass="com.install4j.runtime.beans.actions.control.SetProgressAction" actionElevationType="none" rollbackBarrierExitCode="0">
+                  <action name="BLC (.blc) progress bar 34" id="10025" customizedId="BLC-blc-10025-progressbar" beanClass="com.install4j.runtime.beans.actions.control.SetProgressAction" actionElevationType="none" rollbackBarrierExitCode="0">
                     <serializedBean>
-                      <property name="percentValue" type="int" value="39" />
+                      <property name="percentValue" type="int" value="34" />
                     </serializedBean>
                   </action>
 
                     </serializedBean>
                   </action>
 
-                  <action name="Clustal (.aln) progress bar 43" id="10028" customizedId="Clustal-aln-10028-progressbar" beanClass="com.install4j.runtime.beans.actions.control.SetProgressAction" actionElevationType="none" rollbackBarrierExitCode="0">
+                  <action name="Clustal (.aln) progress bar 39" id="10028" customizedId="Clustal-aln-10028-progressbar" beanClass="com.install4j.runtime.beans.actions.control.SetProgressAction" actionElevationType="none" rollbackBarrierExitCode="0">
                     <serializedBean>
-                      <property name="percentValue" type="int" value="43" />
+                      <property name="percentValue" type="int" value="39" />
                     </serializedBean>
                   </action>
 
                     </serializedBean>
                   </action>
 
-                  <action name="Fasta (.fa, .fasta) progress bar 47" id="10031" customizedId="Fasta-fa,fasta-10031-progressbar" beanClass="com.install4j.runtime.beans.actions.control.SetProgressAction" actionElevationType="none" rollbackBarrierExitCode="0">
+                  <action name="Fasta (.fa, .fasta) progress bar 43" id="10031" customizedId="Fasta-fa,fasta-10031-progressbar" beanClass="com.install4j.runtime.beans.actions.control.SetProgressAction" actionElevationType="none" rollbackBarrierExitCode="0">
                     <serializedBean>
-                      <property name="percentValue" type="int" value="47" />
+                      <property name="percentValue" type="int" value="43" />
                     </serializedBean>
                   </action>
 
                     </serializedBean>
                   </action>
 
-                  <action name="Jalview Features (.features, .jvfeatures) progress bar 52" id="10034" customizedId="Jalview Features-features,jvfeatures-10034-progressbar" beanClass="com.install4j.runtime.beans.actions.control.SetProgressAction" actionElevationType="none" rollbackBarrierExitCode="0">
+                  <action name="Jalview Features (.features, .jvfeatures) progress bar 47" id="10034" customizedId="Jalview Features-features,jvfeatures-10034-progressbar" beanClass="com.install4j.runtime.beans.actions.control.SetProgressAction" actionElevationType="none" rollbackBarrierExitCode="0">
                     <serializedBean>
-                      <property name="percentValue" type="int" value="52" />
+                      <property name="percentValue" type="int" value="47" />
                     </serializedBean>
                   </action>
 
                     </serializedBean>
                   </action>
 
-                  <action name="Generic Features Format v2 (.gff2) progress bar 56" id="10037" customizedId="Generic Features Format v2-gff2-10037-progressbar" beanClass="com.install4j.runtime.beans.actions.control.SetProgressAction" actionElevationType="none" rollbackBarrierExitCode="0">
+                  <action name="Generic Features Format v2 (.gff2) progress bar 52" id="10037" customizedId="Generic Features Format v2-gff2-10037-progressbar" beanClass="com.install4j.runtime.beans.actions.control.SetProgressAction" actionElevationType="none" rollbackBarrierExitCode="0">
                     <serializedBean>
-                      <property name="percentValue" type="int" value="56" />
+                      <property name="percentValue" type="int" value="52" />
                     </serializedBean>
                   </action>
 
                     </serializedBean>
                   </action>
 
-                  <action name="Generic Features Format v3 (.gff3) progress bar 60" id="10040" customizedId="Generic Features Format v3-gff3-10040-progressbar" beanClass="com.install4j.runtime.beans.actions.control.SetProgressAction" actionElevationType="none" rollbackBarrierExitCode="0">
+                  <action name="Generic Features Format v3 (.gff3) progress bar 56" id="10040" customizedId="Generic Features Format v3-gff3-10040-progressbar" beanClass="com.install4j.runtime.beans.actions.control.SetProgressAction" actionElevationType="none" rollbackBarrierExitCode="0">
                     <serializedBean>
-                      <property name="percentValue" type="int" value="60" />
+                      <property name="percentValue" type="int" value="56" />
                     </serializedBean>
                   </action>
 
                     </serializedBean>
                   </action>
 
-                  <action name="JnetFile (.concise, .jnet) progress bar 65" id="10043" customizedId="JnetFile-concise,jnet-10043-progressbar" beanClass="com.install4j.runtime.beans.actions.control.SetProgressAction" actionElevationType="none" rollbackBarrierExitCode="0">
+                  <action name="JnetFile (.concise, .jnet) progress bar 60" id="10043" customizedId="JnetFile-concise,jnet-10043-progressbar" beanClass="com.install4j.runtime.beans.actions.control.SetProgressAction" actionElevationType="none" rollbackBarrierExitCode="0">
                     <serializedBean>
-                      <property name="percentValue" type="int" value="65" />
+                      <property name="percentValue" type="int" value="60" />
                     </serializedBean>
                   </action>
 
                     </serializedBean>
                   </action>
 
-                  <action name="MSF (.msf) progress bar 69" id="10046" customizedId="MSF-msf-10046-progressbar" beanClass="com.install4j.runtime.beans.actions.control.SetProgressAction" actionElevationType="none" rollbackBarrierExitCode="0">
+                  <action name="MSF (.msf) progress bar 65" id="10046" customizedId="MSF-msf-10046-progressbar" beanClass="com.install4j.runtime.beans.actions.control.SetProgressAction" actionElevationType="none" rollbackBarrierExitCode="0">
                     <serializedBean>
-                      <property name="percentValue" type="int" value="69" />
+                      <property name="percentValue" type="int" value="65" />
                     </serializedBean>
                   </action>
 
                     </serializedBean>
                   </action>
 
-                  <action name="PFAM (.pfam) progress bar 73" id="10049" customizedId="PFAM-pfam-10049-progressbar" beanClass="com.install4j.runtime.beans.actions.control.SetProgressAction" actionElevationType="none" rollbackBarrierExitCode="0">
+                  <action name="PFAM (.pfam) progress bar 69" id="10049" customizedId="PFAM-pfam-10049-progressbar" beanClass="com.install4j.runtime.beans.actions.control.SetProgressAction" actionElevationType="none" rollbackBarrierExitCode="0">
                     <serializedBean>
-                      <property name="percentValue" type="int" value="73" />
+                      <property name="percentValue" type="int" value="69" />
                     </serializedBean>
                   </action>
 
                     </serializedBean>
                   </action>
 
-                  <action name="PHYLIP (.phy) progress bar 78" id="10052" customizedId="PHYLIP-phy-10052-progressbar" beanClass="com.install4j.runtime.beans.actions.control.SetProgressAction" actionElevationType="none" rollbackBarrierExitCode="0">
+                  <action name="PHYLIP (.phy) progress bar 73" id="10052" customizedId="PHYLIP-phy-10052-progressbar" beanClass="com.install4j.runtime.beans.actions.control.SetProgressAction" actionElevationType="none" rollbackBarrierExitCode="0">
                     <serializedBean>
-                      <property name="percentValue" type="int" value="78" />
+                      <property name="percentValue" type="int" value="73" />
                     </serializedBean>
                   </action>
 
                     </serializedBean>
                   </action>
 
-                  <action name="PileUp (.pileup) progress bar 82" id="10055" customizedId="PileUp-pileup-10055-progressbar" beanClass="com.install4j.runtime.beans.actions.control.SetProgressAction" actionElevationType="none" rollbackBarrierExitCode="0">
+                  <action name="PileUp (.pileup) progress bar 78" id="10055" customizedId="PileUp-pileup-10055-progressbar" beanClass="com.install4j.runtime.beans.actions.control.SetProgressAction" actionElevationType="none" rollbackBarrierExitCode="0">
                     <serializedBean>
-                      <property name="percentValue" type="int" value="82" />
+                      <property name="percentValue" type="int" value="78" />
                     </serializedBean>
                   </action>
 
                     </serializedBean>
                   </action>
 
-                  <action name="PIR (.pir) progress bar 86" id="10058" customizedId="PIR-pir-10058-progressbar" beanClass="com.install4j.runtime.beans.actions.control.SetProgressAction" actionElevationType="none" rollbackBarrierExitCode="0">
+                  <action name="PIR (.pir) progress bar 82" id="10058" customizedId="PIR-pir-10058-progressbar" beanClass="com.install4j.runtime.beans.actions.control.SetProgressAction" actionElevationType="none" rollbackBarrierExitCode="0">
                     <serializedBean>
-                      <property name="percentValue" type="int" value="86" />
+                      <property name="percentValue" type="int" value="82" />
                     </serializedBean>
                   </action>
 
                     </serializedBean>
                   </action>
 
-                  <action name="RNAML (.rnaml) progress bar 91" id="10061" customizedId="RNAML-rnaml-10061-progressbar" beanClass="com.install4j.runtime.beans.actions.control.SetProgressAction" actionElevationType="none" rollbackBarrierExitCode="0">
+                  <action name="RNAML (.rnaml) progress bar 86" id="10061" customizedId="RNAML-rnaml-10061-progressbar" beanClass="com.install4j.runtime.beans.actions.control.SetProgressAction" actionElevationType="none" rollbackBarrierExitCode="0">
                     <serializedBean>
-                      <property name="percentValue" type="int" value="91" />
+                      <property name="percentValue" type="int" value="86" />
                     </serializedBean>
                   </action>
 
                     </serializedBean>
                   </action>
 
-                  <action name="Substitution Matrix (.mat) progress bar 95" id="10064" customizedId="Substitution Matrix-mat-10064-progressbar" beanClass="com.install4j.runtime.beans.actions.control.SetProgressAction" actionElevationType="none" rollbackBarrierExitCode="0">
+                  <action name="Substitution Matrix (.mat) progress bar 91" id="10064" customizedId="Substitution Matrix-mat-10064-progressbar" beanClass="com.install4j.runtime.beans.actions.control.SetProgressAction" actionElevationType="none" rollbackBarrierExitCode="0">
                     <serializedBean>
-                      <property name="percentValue" type="int" value="95" />
+                      <property name="percentValue" type="int" value="91" />
                     </serializedBean>
                   </action>
 
                     </serializedBean>
                   </action>
 
-                  <action name="Stockholm (.stk, .sto) progress bar 100" id="10067" customizedId="Stockholm-stk,sto-10067-progressbar" beanClass="com.install4j.runtime.beans.actions.control.SetProgressAction" actionElevationType="none" rollbackBarrierExitCode="0">
+                  <action name="Stockholm (.stk, .sto) progress bar 95" id="10067" customizedId="Stockholm-stk,sto-10067-progressbar" beanClass="com.install4j.runtime.beans.actions.control.SetProgressAction" actionElevationType="none" rollbackBarrierExitCode="0">
                     <serializedBean>
-                      <property name="percentValue" type="int" value="100" />
+                      <property name="percentValue" type="int" value="95" />
                     </serializedBean>
                   </action>
 
index 41a6ada..134bc7d 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<install4j version="8.0.2" transformSequenceNumber="8">
+<install4j version="8.0.3" transformSequenceNumber="8">
   <directoryPresets config="." />
   <application name="Jalview" applicationId="6595-2347-1923-0725" mediaDir="../../build/install4j" lzmaCompression="true" shortName="Jalview" publisher="University of Dundee" publisherWeb="https://www.jalview.org/" version="${compiler:JALVIEW_VERSION}" allPathsRelative="true" macVolumeId="5aac4968c304f65" javaMinVersion="${compiler:JAVA_MIN_VERSION}" javaMaxVersion="9999999999${compiler:JAVA_MAX_VERSION}" allowBetaVM="true" jdkMode="jdk" jdkName="JDK 11.0">
     <searchSequence>
@@ -431,6 +431,18 @@ return console.askOkCancel(message, true);
                       <property name="extension" type="string">extensions_to_be_replaced_by_gradle</property>
                     </serializedBean>
                   </action>
+                  <action id="2542" beanClass="com.install4j.runtime.beans.actions.control.SetMessageAction" actionElevationType="none" rollbackBarrierExitCode="0">
+                    <serializedBean>
+                      <property name="statusMessage" type="string">Creating file associations</property>
+                      <property name="useDetail" type="boolean" value="true" />
+                      <property name="useStatus" type="boolean" value="true" />
+                    </serializedBean>
+                  </action>
+                  <action id="2541" beanClass="com.install4j.runtime.beans.actions.control.SetProgressAction" actionElevationType="none" rollbackBarrierExitCode="0">
+                    <serializedBean>
+                      <property name="percentValue" type="int" value="100" />
+                    </serializedBean>
+                  </action>
                 </beans>
               </group>
               <action id="2350" beanClass="com.install4j.runtime.beans.actions.desktop.UrlHandlerAction" actionElevationType="elevated" rollbackBarrierExitCode="0">