Return-Path: X-Original-To: apmail-incubator-ooo-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-ooo-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C3147C438 for ; Fri, 25 May 2012 10:21:00 +0000 (UTC) Received: (qmail 77834 invoked by uid 500); 25 May 2012 10:21:00 -0000 Delivered-To: apmail-incubator-ooo-commits-archive@incubator.apache.org Received: (qmail 77723 invoked by uid 500); 25 May 2012 10:21:00 -0000 Mailing-List: contact ooo-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ooo-dev@incubator.apache.org Delivered-To: mailing list ooo-commits@incubator.apache.org Received: (qmail 77713 invoked by uid 99); 25 May 2012 10:20:59 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 May 2012 10:20:59 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 May 2012 10:20:57 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id CCE492388865; Fri, 25 May 2012 10:20:37 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1342559 - in /incubator/ooo/trunk/main: packimages/pack/makefile.mk solenv/bin/packimages.pl Date: Fri, 25 May 2012 10:20:37 -0000 To: ooo-commits@incubator.apache.org From: arielch@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120525102037.CCE492388865@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: arielch Date: Fri May 25 10:20:36 2012 New Revision: 1342559 URL: http://svn.apache.org/viewvc?rev=1342559&view=rev Log: Make packimages verbose Modified: incubator/ooo/trunk/main/packimages/pack/makefile.mk incubator/ooo/trunk/main/solenv/bin/packimages.pl Modified: incubator/ooo/trunk/main/packimages/pack/makefile.mk URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/packimages/pack/makefile.mk?rev=1342559&r1=1342558&r2=1342559&view=diff ============================================================================== --- incubator/ooo/trunk/main/packimages/pack/makefile.mk (original) +++ incubator/ooo/trunk/main/packimages/pack/makefile.mk Fri May 25 10:20:36 2012 @@ -30,6 +30,15 @@ TARGET=packimages RSCCUSTOMIMG*=$(PRJ) .INCLUDE: target.mk + +.IF "$(VERBOSE_PACKIMG)"=="TRUE" +VERBOSESWITCH=-vv +.ELIF "$(VERBOSE)"=="TRUE" +VERBOSESWITCH=-v +.ELSE +VERBOSESWITCH= +.ENDIF + IMAGES := $(COMMONBIN)$/images.zip SORTED_LIST=$(RES)$/img$/sorted.lst # Custom sets, at 24x24 & 16x16 fall-back to industrial preferentially @@ -54,10 +63,10 @@ $(RES)$/img$/commandimagelist.ilst .PHON $(PERL) $(SOLARENV)$/bin$/diffmv.pl $@.$(INPATH) $@ $(COMMONBIN)$/images.zip .PHONY: $(RES)$/img$/commandimagelist.ilst - $(PERL) $(SOLARENV)$/bin$/packimages.pl -g $(SOLARSRC)$/$(RSCDEFIMG) -m $(SOLARSRC)$/$(RSCDEFIMG) -c $(RSCCUSTOMIMG) -l $(SOLARCOMMONRESDIR)$/img -s $(SORTED_LIST) -l $(RES)$/img -o $@ + $(PERL) $(SOLARENV)$/bin$/packimages.pl $(VERBOSESWITCH) -g $(SOLARSRC)$/$(RSCDEFIMG) -m $(SOLARSRC)$/$(RSCDEFIMG) -c $(RSCCUSTOMIMG) -l $(SOLARCOMMONRESDIR)$/img -s $(SORTED_LIST) -l $(RES)$/img -o $@ images_% : $(RES)$/img$/commandimagelist.ilst - $(PERL) $(SOLARENV)$/bin$/packimages.pl -g $(SOLARSRC)$/$(RSCDEFIMG) -m $(SOLARSRC)$/$(RSCDEFIMG) -c $(RSCCUSTOMIMG) -c $(SOLARSRC)$/ooo_custom_images$/$(@:s/images_//) -c $(MISC)$/$(@:s/images_//) $(CUSTOM_PREFERRED_FALLBACK_1) $(CUSTOM_PREFERRED_FALLBACK_2) -l $(SOLARCOMMONRESDIR)$/img -l $(RES)$/img -s $(SORTED_LIST) -o $(COMMONBIN)$/$@.zip + $(PERL) $(SOLARENV)$/bin$/packimages.pl $(VERBOSESWITCH) -g $(SOLARSRC)$/$(RSCDEFIMG) -m $(SOLARSRC)$/$(RSCDEFIMG) -c $(RSCCUSTOMIMG) -c $(SOLARSRC)$/ooo_custom_images$/$(@:s/images_//) -c $(MISC)$/$(@:s/images_//) $(CUSTOM_PREFERRED_FALLBACK_1) $(CUSTOM_PREFERRED_FALLBACK_2) -l $(SOLARCOMMONRESDIR)$/img -l $(RES)$/img -s $(SORTED_LIST) -o $(COMMONBIN)$/$@.zip # make sure to have one to keep packing happy $(COMMONBIN)$/images_brand.zip: Modified: incubator/ooo/trunk/main/solenv/bin/packimages.pl URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/solenv/bin/packimages.pl?rev=1342559&r1=1342558&r2=1342559&view=diff ============================================================================== --- incubator/ooo/trunk/main/solenv/bin/packimages.pl (original) +++ incubator/ooo/trunk/main/solenv/bin/packimages.pl Fri May 25 10:20:36 2012 @@ -98,7 +98,7 @@ sub parse_options '-h' => \$opt_help, '-o=s' => \$out_file, '-g=s' => \$global_path, - '-s=s' => \$sort_file, + '-s=s' => \$sort_file, '-m=s' => \$module_path, '-c=s' => \@custom_path_list, '-e=s' => \$custom_path_extended, @@ -113,6 +113,10 @@ sub parse_options usage(); exit(1); } + + # if extra-verbose, set also verbose + if ($extra_verbose) { $verbose = 1; } + #define intermediate output file $tmp_out_file="$out_file"."$$".$ENV{INPATH}; # Sanity checks. @@ -218,22 +222,22 @@ sub find_custom my $custom_hash_ref = shift; my $keep_back; for my $path (@custom_path) { - find({ wanted => \&wanted, no_chdir => 0 }, $path); - foreach ( @custom_list ) { - if ( /^\Q$path\E\/(.*)$/ ) { - $keep_back=$1; - if (!defined $custom_hash_ref->{$keep_back}) { - $custom_hash_ref->{$keep_back} = $path; - } - } - } + find({ wanted => \&wanted, no_chdir => 0 }, $path); + foreach ( @custom_list ) { + if ( /^\Q$path\E\/(.*)$/ ) { + $keep_back=$1; + if (!defined $custom_hash_ref->{$keep_back}) { + $custom_hash_ref->{$keep_back} = $path; + } + } + } } } sub wanted { my $file = $_; - + if ( $file =~ /.*\.png$/ && -f $file ) { push @custom_list, $File::Find::name; } @@ -284,14 +288,14 @@ sub is_file_newer { my $test_hash_ref = shift; my $reference_stamp = 0; - + print_message("checking timestamps ...") if $verbose; if ( -e $out_file ) { $reference_stamp = (stat($out_file))[9]; print_message("found $out_file with $reference_stamp ...") if $verbose; } return 1 if $reference_stamp == 0; - + foreach ( sort keys %{$test_hash_ref} ) { my $path = $test_hash_ref->{$_}; $path .= "/" if "$path" ne ""; @@ -308,8 +312,8 @@ sub optimize_zip_layout($) my $zip_hash_ref = shift; if (!defined $sort_file) { - print_message("no sort file - sorting alphabetically ...") if $verbose; - return sort keys %{$zip_hash_ref}; + print_message("no sort file - sorting alphabetically ...") if $verbose; + return sort keys %{$zip_hash_ref}; } print_message("sorting from $sort_file ...") if $verbose; @@ -318,21 +322,21 @@ sub optimize_zip_layout($) my @sorted; open ($orderh, $sort_file) || die "Can't open $sort_file: $!"; while (<$orderh>) { - /^\#.*/ && next; # comments - s/[\r\n]*$//; - /^\s*$/ && next; - my $file = $_; - if (!defined $zip_hash_ref->{$file}) { - print "unknown file '$file'\n" if ($extra_verbose); - } else { - push @sorted, $file; - $included{$file} = 1; - } + /^\#.*/ && next; # comments + s/[\r\n]*$//; + /^\s*$/ && next; + my $file = $_; + if (!defined $zip_hash_ref->{$file}) { + print "unknown file '$file'\n" if ($extra_verbose); + } else { + push @sorted, $file; + $included{$file} = 1; + } } close ($orderh); for my $img (sort keys %{$zip_hash_ref}) { - push @sorted, $img if (!$included{$img}); + push @sorted, $img if (!$included{$img}); } print_message("done sort ...") if $verbose;