From e978baf3e628c2fb6f952d8265ef0498ae828658 Mon Sep 17 00:00:00 2001 From: Ben Soares Date: Fri, 13 Dec 2019 15:46:47 +0000 Subject: [PATCH] JAL-3394 improvements to the file association progress bar --- utils/install4j/auto_file_associations-i4j8.pl | 15 +--- .../file_associations_auto-install4j8.xml | 92 ++++++++++---------- utils/install4j/install4j8_template.install4j | 14 ++- 3 files changed, 62 insertions(+), 59 deletions(-) diff --git a/utils/install4j/auto_file_associations-i4j8.pl b/utils/install4j/auto_file_associations-i4j8.pl index e091681..bf24b11 100755 --- a/utils/install4j/auto_file_associations-i4j8.pl +++ b/utils/install4j/auto_file_associations-i4j8.pl @@ -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"; diff --git a/utils/install4j/file_associations_auto-install4j8.xml b/utils/install4j/file_associations_auto-install4j8.xml index f6884ee..9314f6a 100644 --- a/utils/install4j/file_associations_auto-install4j8.xml +++ b/utils/install4j/file_associations_auto-install4j8.xml @@ -8,9 +8,9 @@ - + - + @@ -54,9 +54,9 @@ - + - + @@ -100,9 +100,9 @@ - + - + @@ -146,9 +146,9 @@ - + - + @@ -192,9 +192,9 @@ - + - + @@ -238,9 +238,9 @@ - + - + @@ -284,9 +284,9 @@ - + - + @@ -330,9 +330,9 @@ - + - + @@ -376,9 +376,9 @@ - + - + @@ -422,9 +422,9 @@ - + - + @@ -468,9 +468,9 @@ - + - + @@ -514,9 +514,9 @@ - + - + @@ -560,9 +560,9 @@ - + - + @@ -606,9 +606,9 @@ - + - + @@ -652,9 +652,9 @@ - + - + @@ -698,9 +698,9 @@ - + - + @@ -744,9 +744,9 @@ - + - + @@ -790,9 +790,9 @@ - + - + @@ -836,9 +836,9 @@ - + - + @@ -882,9 +882,9 @@ - + - + @@ -928,9 +928,9 @@ - + - + @@ -974,9 +974,9 @@ - + - + @@ -1020,9 +1020,9 @@ - + - + diff --git a/utils/install4j/install4j8_template.install4j b/utils/install4j/install4j8_template.install4j index 41a6ada..134bc7d 100644 --- a/utils/install4j/install4j8_template.install4j +++ b/utils/install4j/install4j8_template.install4j @@ -1,5 +1,5 @@ - + @@ -431,6 +431,18 @@ return console.askOkCancel(message, true); extensions_to_be_replaced_by_gradle + + + Creating file associations + + + + + + + + + -- 1.7.10.2