Update filter_obyfile.pl to handle patchdata and some more alias cases.
authorWilliam Roberts <williamr@symbian.org>
Sun, 10 Oct 2010 20:19:54 +0100
changeset 17 1d230a71c389
parent 16 58fdbe891c31
child 18 142e13d70737
Update filter_obyfile.pl to handle patchdata and some more alias cases.
syborg_stem/notes.txt
tools/filter_obyfile.pl
--- a/syborg_stem/notes.txt	Sun Oct 10 20:19:00 2010 +0100
+++ b/syborg_stem/notes.txt	Sun Oct 10 20:19:54 2010 +0100
@@ -8,6 +8,6 @@
 findstr FEATURES original\syborg.tmp1.oby >syborg_stem_features.iby
 perl tools\repair_obyfile.pl original\syborg.rom.oby >syborg_stem\syborg_stem_rom.oby
 dir /s/b \build_info\logs\releaseables | perl tools\packages_in_rom.pl original\syborg.dir >syborg_stem\rom_content.csv
-perl tools\static_dependencies.pl syborg_stem\rom_contents.csv >syborg_stem\static_dependencies.txt
+perl tools\static_dependencies.pl syborg_stem\rom_content.csv >syborg_stem\static_dependencies.txt
 
 buildrom syborg_stem_rom.oby -fm=featuredatabase.xml -k -nosymbols -loglevel1 -v
--- a/tools/filter_obyfile.pl	Sun Oct 10 20:19:00 2010 +0100
+++ b/tools/filter_obyfile.pl	Sun Oct 10 20:19:54 2010 +0100
@@ -177,18 +177,22 @@
 		{
 		my ($emudir, $romdir, $dataz, $resourcedir, $exename, $rscname) = split /\s*,\s*/, $1;
 		my $romfile = $romdir. "\\". $exename;
+
+		$lc_romfiles{lc $romfile} = $romfile;	# for alias processing
+
 		if ($deletions{$romfile})
 			{
-			print STDERR "Deleted __ECOM_PLUGIN for $romfile\n";
+			# print STDERR "Deleted __ECOM_PLUGIN for $romfile\n";
 			$deletion_count++;
 			next;
 			}		
 		}
-	if ($line =~ /alias\s+(\S+)\s+(\S+)\s*$/)
+	if ($line =~ /^\s*alias\s+(\S+)\s+(\S+)\s*$/)
 		{
 		my $romfile = $1;
 		my $newname = $2;
 		
+		$romfile =~ s/^\\sys/sys/;	# remove leading \, to match $romfile convention
 		$romfile = $lc_romfiles{lc $romfile};
 		if ($deletions{$romfile})
 			{
@@ -198,6 +202,20 @@
 			}
 		}
 	
+	# patchdata  sys\bin\eiksrv.dll addr 0x0000c944 4 5
+	if ($line =~ /^\s*patchdata\s*(\S+)/)
+		{
+		my $romfile = $1;
+		$romfile =~ s/^\\//;	# remove leading \, to match $romfile convention
+		$romfile = $lc_romfiles{lc $romfile};
+		
+		print STDERR "deleting patchdata line for $romfile\n";
+		if ($deletions{$romfile})
+			{
+			# don't count these lines as deletions - they are just extra lines relating to deleted files.
+			next;
+			}
+		}
 	print $line,"\n";
 	}