Update filter_obyfile.pl to handle patchdata and some more alias cases.
--- 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";
}