Skip to content

Commit

Permalink
Add trickeifed classes.resource to sie generation after cp. (#1674)
Browse files Browse the repository at this point in the history
  • Loading branch information
hchen99 authored Mar 26, 2024
1 parent e6daf35 commit 079a4d2
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions libexec/trick/sie_concat
Original file line number Diff line number Diff line change
@@ -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";
Expand All @@ -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>) {
Expand Down

0 comments on commit 079a4d2

Please sign in to comment.