os/graphics/graphicsdeviceinterface/directgdi/test/scripts/copyrefimgs.pl
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/graphics/graphicsdeviceinterface/directgdi/test/scripts/copyrefimgs.pl	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,49 @@
     1.4 +#!/usr/bin/perl
     1.5 +# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.6 +# All rights reserved.
     1.7 +# This component and the accompanying materials are made available
     1.8 +# under the terms of "Eclipse Public License v1.0"
     1.9 +# which accompanies this distribution, and is available
    1.10 +# at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.11 +#
    1.12 +# Initial Contributors:
    1.13 +# Nokia Corporation - initial contribution.
    1.14 +#
    1.15 +# Contributors:
    1.16 +#
    1.17 +# Description:
    1.18 +# Script to automate copying of DirectGDI reference images to location where comparison tests can be run.
    1.19 +# 
    1.20 +#
    1.21 +
    1.22 +use strict;
    1.23 +use Cwd;
    1.24 +
    1.25 +my $srcloc = $ARGV[0] ;#or die "No argument given";
    1.26 +if (!$srcloc)
    1.27 +{
    1.28 +	print "Please specify the source directory which contains graphics component.\n";
    1.29 +	exit;
    1.30 +}
    1.31 +my $imagedir = "\\directgdi\\test\\images\\reference";
    1.32 +# Check argument given exists
    1.33 +if (! -d $srcloc.$imagedir)
    1.34 +{
    1.35 +	print "$srcloc is not a valid source code location for the graphics component.\n";
    1.36 +	exit;
    1.37 +}
    1.38 +
    1.39 +# Must be run from \epoc32\winscw\c\ or \epoc32\data\c
    1.40 +if(getcwd() !~ /c\/img/i)
    1.41 +{
    1.42 +print "This tool should be run from \\epoc32\\winscw\\c\\img\\ or \\epoc32\\data\\c\\img\\\n";
    1.43 +exit
    1.44 +}
    1.45 +
    1.46 +my $copycmd = "unzip -qo $srcloc$imagedir\\reference.zip -d .\\ref";
    1.47 +print $copycmd."\n";
    1.48 +print `$copycmd`;
    1.49 +my $copycmd2 = "unzip -qo $srcloc$imagedir\\replacements_from_directgdi\\replacement.zip -d .\\ref";
    1.50 +print $copycmd2."\n";
    1.51 +print `$copycmd2`;
    1.52 +