tools/repair_obyfile.pl
changeset 8 36cb9eb36988
child 9 b5c893269cd5
equal deleted inserted replaced
7:58366ddcbc93 8:36cb9eb36988
       
     1 # Copyright (c) 2010 Symbian Foundation Ltd.
       
     2 # All rights reserved.
       
     3 # This component and the accompanying materials are made available
       
     4 # under the terms of the License "Eclipse Public License v1.0"
       
     5 # which accompanies this distribution, and is available
       
     6 # at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 #
       
     8 # Initial Contributors:
       
     9 # Symbian Foundation - initial contribution.
       
    10 #
       
    11 # Contributors:
       
    12 #
       
    13 # Description: 
       
    14 # Process file ROM log to make it suitable for re-use by buildrom.pl
       
    15 
       
    16 use strict;
       
    17 my $line;
       
    18 
       
    19 while ($line = <>)
       
    20 	{
       
    21 	# Put back original auto-btmap statements for any "mbm_rom" derived files
       
    22 	$line =~ s/data="(.*mbm)_rom"(\s+)"(.*)"/auto-bitmap=$1$2$3/;
       
    23 	
       
    24 	# Put back original __ECOM_PLUGIN lines
       
    25 	# REM expanded __ECOM_PLUGIN(\epoc32\release\ARMV5\urel,Sys\Bin,\epoc32\data\Z,Resource\Plugins, a3fFourCCConvertorPlugin.dll , a3fFourCCConvertorPlugin.dll ) 
       
    26 	if ($line =~ /^REM expanded\s+__ECOM_PLUGIN/)
       
    27 		{
       
    28 		$line =~ s/REM expanded\s+//;
       
    29 		my $discarded = <>;		# discard the derived file= line for the plugin
       
    30 		}
       
    31 	
       
    32 	if ($line =~ /REM processed spidata/)
       
    33 		{
       
    34 		next;		# discard this line - it will be regenerated by the __ECOM_PLUGIN
       
    35 		}
       
    36 	
       
    37 	$line =~ s/REM processed //;	# re-enable other directives
       
    38 	
       
    39 	if ($line =~ /^time=/)
       
    40 		{
       
    41 		$line = "time=##TODAY## 12:00:00\n";
       
    42 		}
       
    43 	
       
    44 	print $line;
       
    45 	}