Changeset View
Changeset View
Standalone View
Standalone View
source/tools/entity/checkrefs.pl
Show First 20 Lines • Show All 429 Lines • ▼ Show 20 Lines | |||||
sub add_gui_xml | sub add_gui_xml | ||||
{ | { | ||||
print "Loading GUI XML...\n"; | print "Loading GUI XML...\n"; | ||||
my @guifiles = find_files('gui', 'xml'); | my @guifiles = find_files('gui', 'xml'); | ||||
for my $f (sort @guifiles) | for my $f (sort @guifiles) | ||||
{ | { | ||||
push @files, $f; | push @files, $f; | ||||
if ($f =~ /^gui\/page_/) | # GUI page definitions are assumed to be named page_[something].xml and alone in that. | ||||
if ($f =~ /\/page_[^.\/]+\.xml$/) | |||||
{ | { | ||||
push @roots, $f; | push @roots, $f; | ||||
my $xml = XMLin(vfs_to_physical($f), ForceArray => [qw(include)], KeyAttr => []) or die "Failed to parse '$f': $!"; | my $xml = XMLin(vfs_to_physical($f), ForceArray => [qw(include)], KeyAttr => []) or die "Failed to parse '$f': $!"; | ||||
for my $include (@{$xml->{include}}) | for my $include (@{$xml->{include}}) | ||||
{ | { | ||||
# If including an entire directory, find all the *.xml files | # If including an entire directory, find all the *.xml files | ||||
if ($include =~ /\/$/) | if ($include =~ /\/$/) | ||||
▲ Show 20 Lines • Show All 258 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator