55 my $sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst; |
55 my $sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst; |
56 ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = gmtime; |
56 ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = gmtime; |
57 my $copy_end=$year+1900; |
57 my $copy_end=$year+1900; |
58 |
58 |
59 my $argc=scalar(@ARGV); |
59 my $argc=scalar(@ARGV); |
|
60 |
|
61 # check whether its raptor specific |
|
62 my $is_raptor = 0; |
|
63 if ($ARGV[$argc-1] eq "raptor") # change "raptor" to something you want. |
|
64 { |
|
65 pop(@ARGV); |
|
66 $is_raptor = 1; |
|
67 $argc--; |
|
68 } |
|
69 |
60 ($argc==1 or $argc==2 or $argc==3) or die "Usage: perl dlltree.pl <filename> <dir> [-allowbad]\n"; |
70 ($argc==1 or $argc==2 or $argc==3) or die "Usage: perl dlltree.pl <filename> <dir> [-allowbad]\n"; |
61 my $infile=$ARGV[0]; |
71 my $infile=$ARGV[0]; |
62 open IN, $infile or die "Cannot open input file $infile\n"; |
72 open IN, $infile or die "Cannot open input file $infile\n"; |
63 my @in; |
73 my @in; |
64 while (<IN>) { |
74 while (<IN>) { |
793 print OUT @bldinf; |
803 print OUT @bldinf; |
794 close OUT; |
804 close OUT; |
795 open OUT, ">$dlltreename" or die "Could not open $dlltreename for output\n"; |
805 open OUT, ">$dlltreename" or die "Could not open $dlltreename for output\n"; |
796 print OUT @dlltree; |
806 print OUT @dlltree; |
797 close OUT; |
807 close OUT; |
798 my $testbatch = "$ENV{EPOCROOT}epoc32\\build"; |
808 |
799 $destpath =~ s/\//\\/go; |
809 my $testbatch =''; |
800 $testbatch.="\\" unless ($destpath =~ /^\\/); |
810 if($is_raptor) { |
801 $testbatch.=$destpath; |
811 $testbatch="$ENV{EPOCROOT}\\epoc32\\data\\z\\test\\gen\\##MAIN##.auto.bat"; |
802 $testbatch.="##MAIN##.auto.bat"; |
812 } |
803 if (!$allowbad) { |
813 else { |
804 push @iby, "data=$testbatch\t\ttest\\loader.auto.bat\n"; |
814 $testbatch = "$ENV{EPOCROOT}epoc32\\build"; |
|
815 $destpath =~ s/\//\\/go; |
|
816 $testbatch.="\\" unless ($destpath =~ /^\\/); |
|
817 $testbatch.=$destpath; |
|
818 $testbatch.="##MAIN##.auto.bat"; |
|
819 } |
|
820 if (!$allowbad){ |
|
821 push @iby, "data=$testbatch\t\ttest\\loader.auto.bat\n"; |
805 } |
822 } |
806 open OUT, ">$ibyname" or die "Could not open $ibyname for output\n"; |
823 open OUT, ">$ibyname" or die "Could not open $ibyname for output\n"; |
807 print OUT @iby; |
824 print OUT @iby; |
808 close OUT; |
825 close OUT; |
809 |
826 |