Add trickeifed classes.resource to sie generation after cp. (#1674)

This commit is contained in:
Hong Chen 2024-03-26 11:23:03 -05:00 committed by GitHub
parent e6daf35524
commit 079a4d2aff
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,6 +1,13 @@
#!/usr/bin/perl
package sie_concat;
use File::Basename ;
use FindBin qw($RealBin);
use lib "$RealBin/pm" ;
use get_paths ;
my @trick_python_paths = get_paths( "TRICK_PYTHON_PATH") ;
open(my $S_sie_resource, ">", "./S_sie.resource")
or die "cannot open S_sie.resource $!";
print $S_sie_resource "<?xml version=\"1.0\"?>\n\n<sie>\n\n";
@ -14,6 +21,17 @@ while(my $line = <$classes_resource>) {
close($classes_resource);
# Add trickified classes.resource if available
foreach my $path ( @trick_python_paths ) {
my $trickified_dir = dirname($path);
open(my $classes_resource, "<", "$trickified_dir/build/classes.resource")
or die "cannot open $trickified_dir/build/classes.resource";
while(my $line = <$classes_resource>) {
print $S_sie_resource $line;
}
close($classes_resource);
}
open(my $top_level_objects_resource, "<", "build/top_level_objects.resource")
or die "cannot open build/top_level_objects.resource";
while(my $line = <$top_level_objects_resource>) {