imgtools/buildrom/tools/buildrom.pl
changeset 590 360bd6b35136
parent 0 044383f39525
child 626 ac03b93ca9c4
equal deleted inserted replaced
588:c7c26511138f 590:360bd6b35136
       
     1 #!/usr/bin/perl 
     1 #
     2 #
     2 # Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
     3 # Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
     3 # All rights reserved.
     4 # All rights reserved.
     4 # This component and the accompanying materials are made available
     5 # This component and the accompanying materials are made available
     5 # under the terms of the License "Eclipse Public License v1.0"
     6 # under the terms of the License "Eclipse Public License v1.0"
    15 #
    16 #
    16 
    17 
    17 
    18 
    18 use FindBin;		# for FindBin::Bin
    19 use FindBin;		# for FindBin::Bin
    19 my $PerlLibPath;    # fully qualified pathname of the directory containing our Perl modules
    20 my $PerlLibPath;    # fully qualified pathname of the directory containing our Perl modules
       
    21 my $PerlEPOCPath;
    20 
    22 
    21 BEGIN {
    23 BEGIN {
    22 # check user has a version of perl that will cope
    24 # check user has a version of perl that will cope
    23 	require 5.005_03;
    25 	require 5.005_03;
    24 # establish the path to the Perl libraries
    26 # establish the path to the Perl libraries
    25     $PerlLibPath = $FindBin::Bin;	# X:/epoc32/tools
    27     $PerlLibPath = $FindBin::Bin;	
    26     $PerlLibPath =~ s/\//\\/g;	# X:\epoc32\tools
    28 #    $PerlLibPath =~ s/\//\\/g;
    27     $PerlLibPath .= "\\";
    29     $PerlLibPath .= "\\";
       
    30     $PerlLibPath =~ s/\\/\//g;
       
    31     
       
    32     $PerlEPOCPath = $ENV{EPOCROOT};
       
    33     $PerlEPOCPath =~ s/\\/\//g;
       
    34     $PerlEPOCPath .= "\/" unless $PerlEPOCPath =~ /\/$/;
       
    35     $PerlEPOCPath .= "epoc32\/tools\/";
    28 }
    36 }
    29 
    37 use lib $PerlEPOCPath."build/lib/";
    30 
    38 use lib $PerlEPOCPath;
    31 use  lib $PerlLibPath;
    39 use lib $PerlLibPath;
    32 #Includes the validation perl modules for XML validation against the given DTD.
       
    33 use lib "$PerlLibPath/build/lib";
       
    34 
    40 
    35 use buildrom;	# for buildrom module
    41 use buildrom;	# for buildrom module
    36 use externaltools; #To support External tool invocation
    42 use externaltools; #To support External tool invocation
       
    43 use romutl;
       
    44 use romosvariant;
    37 
    45 
       
    46 # add current path and SDK tool path to the begining of environment path
       
    47 my $epocroot=&get_epocroot;
       
    48 my $delimiter=&env_delimiter;
       
    49 $ENV{PATH}="${PerlLibPath}$delimiter${epocroot}epoc32\/tools$delimiter${epocroot}epoc32\/gcc\/bin$delimiter${epocroot}epoc32\/gcc_mingw\/bin$delimiter".$ENV{PATH};
    38 
    50 
    39 # Main block for buildrom module invocation
    51 # Main block for buildrom module invocation
    40 {
    52 {    
    41 	# Processes the buildrom command line parameters.
    53 	# Processes the buildrom command line parameters.
    42 	&process_cmdline_arguments;
    54 	&process_cmdline_arguments;
    43 	
    55 	
    44 	&image_content_processing_phase;
    56 	&image_content_processing_phase;
    45 
    57