os/graphics/graphicsdeviceinterface/directgdi/test/scripts/copyrefimgs.pl
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 #!/usr/bin/perl
     2 # Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
     3 # All rights reserved.
     4 # This component and the accompanying materials are made available
     5 # under the terms of "Eclipse Public License v1.0"
     6 # which accompanies this distribution, and is available
     7 # at the URL "http://www.eclipse.org/legal/epl-v10.html".
     8 #
     9 # Initial Contributors:
    10 # Nokia Corporation - initial contribution.
    11 #
    12 # Contributors:
    13 #
    14 # Description:
    15 # Script to automate copying of DirectGDI reference images to location where comparison tests can be run.
    16 # 
    17 #
    18 
    19 use strict;
    20 use Cwd;
    21 
    22 my $srcloc = $ARGV[0] ;#or die "No argument given";
    23 if (!$srcloc)
    24 {
    25 	print "Please specify the source directory which contains graphics component.\n";
    26 	exit;
    27 }
    28 my $imagedir = "\\directgdi\\test\\images\\reference";
    29 # Check argument given exists
    30 if (! -d $srcloc.$imagedir)
    31 {
    32 	print "$srcloc is not a valid source code location for the graphics component.\n";
    33 	exit;
    34 }
    35 
    36 # Must be run from \epoc32\winscw\c\ or \epoc32\data\c
    37 if(getcwd() !~ /c\/img/i)
    38 {
    39 print "This tool should be run from \\epoc32\\winscw\\c\\img\\ or \\epoc32\\data\\c\\img\\\n";
    40 exit
    41 }
    42 
    43 my $copycmd = "unzip -qo $srcloc$imagedir\\reference.zip -d .\\ref";
    44 print $copycmd."\n";
    45 print `$copycmd`;
    46 my $copycmd2 = "unzip -qo $srcloc$imagedir\\replacements_from_directgdi\\replacement.zip -d .\\ref";
    47 print $copycmd2."\n";
    48 print `$copycmd2`;
    49