appfw/apparchitecture/tef/testpkg/preparesis_stub.pl
branchRCL_3
changeset 62 924385140d98
equal deleted inserted replaced
58:0818dd463d41 62:924385140d98
       
     1 #
       
     2 # Copyright (c) 2005-2010 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 the License "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 #
       
    16 # -----------------------------------------------------------------------
       
    17 
       
    18 # sis files for
       
    19 my $stubpkgdir = "stub_sis";
       
    20 
       
    21 my $stubdir = "stubsis";
       
    22 
       
    23 die "EPOCROOT not defined" if !defined ($ENV{EPOCROOT});
       
    24 my $makesis = "$ENV{EPOCROOT}epoc32\\tools\\makesis.exe";
       
    25 my $option = "-s";
       
    26 my $signsis = "$ENV{EPOCROOT}epoc32\\tools\\signsis.exe";
       
    27 if ( ! -x $makesis || ! -x $signsis ) {
       
    28    die "$makesis and $signsis are not executable";
       
    29 }
       
    30 
       
    31 my $sign_cert = "$ENV{EPOCROOT}epoc32\\tools\\Nokia_RnDCert_02.der";
       
    32 my $sign_key = "$ENV{EPOCROOT}epoc32\\tools\\Nokia_RnDCert_02.key";
       
    33 
       
    34 # export path for stub sis files
       
    35 system("mkdir $stubdir\\");
       
    36 my $target_winscw = "$ENV{EPOCROOT}epoc32\\release\\winscw\\udeb\\z\\system\\install\\";
       
    37 my $target_armv5 = "$ENV{EPOCROOT}epoc32\\data\\z\\system\\install\\";
       
    38 system("mkdir $target_winscw\\");
       
    39 system("mkdir $target_armv5\\");
       
    40 
       
    41 # get list of package files for stub
       
    42 opendir DIR, $stubpkgdir;
       
    43 my @pkgfiles = grep (/\.pkg/, readdir(DIR));
       
    44 closedir DIR;
       
    45 
       
    46 # create each stub sis file
       
    47 my $target;	# needs to be seen by continue
       
    48 my $target2;
       
    49 foreach my $entry (@pkgfiles)
       
    50 	{
       
    51 	print "\n";
       
    52 	$entry =~ s/\.pkg//;	# remove .pkg suffix
       
    53 	my $pkg_file = "$stubpkgdir\\$entry.pkg";
       
    54 	
       
    55 	$target = "$target_winscw\\$entry.sis";
       
    56 	$target2 = "$target_armv5\\$entry.sis";
       
    57 
       
    58 	my $make_cmd = "$makesis $option $pkg_file $stubdir\\$entry.sis";
       
    59 	print "$make_cmd\n";
       
    60 	system($make_cmd);
       
    61 
       
    62 	my $copy_cmd = "copy /y $stubdir\\$entry.sis $target";
       
    63 	print "\n$copy_cmd\n";
       
    64 	system($copy_cmd);
       
    65 
       
    66 	my $copy_cmd = "copy /y $stubdir\\$entry.sis $target2";
       
    67 	print "\n$copy_cmd\n";
       
    68 	system($copy_cmd);
       
    69 	}
       
    70 
       
    71 
       
    72 
       
    73 # -----------------------------------------------------------------------
       
    74