imgtools/romtools/rombuild/romnibus.pl
changeset 33 667e3f7728f7
parent 32 98a715b0b23a
child 38 620772202a07
equal deleted inserted replaced
32:98a715b0b23a 33:667e3f7728f7
    53 my $debug;
    53 my $debug;
    54 my $quiet;
    54 my $quiet;
    55 my $toolpath;
    55 my $toolpath;
    56 my $epoc32path;
    56 my $epoc32path;
    57 my $epocroot;
    57 my $epocroot;
       
    58 my $lc_epocroot;
    58 my $drive = "";
    59 my $drive = "";
    59 my $base_path;
    60 my $base_path;
    60 my $line;
    61 my $line;
    61 sub Variant_GetMacroHRHFile;
    62 sub Variant_GetMacroHRHFile;
    62 sub is_RVCT_build($);
    63 sub is_RVCT_build($);
   118 	$epocroot = abs_path($epocroot);
   119 	$epocroot = abs_path($epocroot);
   119 	die "ERROR: EPOCROOT must specify an existing directory.\n" if (!-d $epocroot);
   120 	die "ERROR: EPOCROOT must specify an existing directory.\n" if (!-d $epocroot);
   120 	($epocroot_vol,$epocroot_dir,$epocroot_file) = File::Spec->splitpath($epocroot);
   121 	($epocroot_vol,$epocroot_dir,$epocroot_file) = File::Spec->splitpath($epocroot);
   121 	$epocroot = File::Spec->catfile(($epocroot_vol,$epocroot_dir,$epocroot_file),undef);
   122 	$epocroot = File::Spec->catfile(($epocroot_vol,$epocroot_dir,$epocroot_file),undef);
   122 	print "EPOCROOT=$ENV{EPOCROOT} resolved as \"$epocroot\"\n";
   123 	print "EPOCROOT=$ENV{EPOCROOT} resolved as \"$epocroot\"\n";
       
   124 	$lc_epocroot = lc($epocroot);
   123 	$epoc32path = "${epocroot}epoc32";
   125 	$epoc32path = "${epocroot}epoc32";
   124 	$toolpath = File::Spec->catfile($epoc32path,"tools");
   126 	$toolpath = File::Spec->catfile($epoc32path,"tools");
   125 	push @INC, $toolpath;
   127 	push @INC, $toolpath;
   126 	nix_fixes(), unless ($on_windows);
   128 	nix_fixes(), unless ($on_windows);
   127 }
   129 }
   658 				if ($dest) {
   660 				if ($dest) {
   659 					my ($vol,$dir,$leaf) = File::Spec->splitpath($src);
   661 					my ($vol,$dir,$leaf) = File::Spec->splitpath($src);
   660 					my $lc_leaf = lc($leaf);
   662 					my $lc_leaf = lc($leaf);
   661 					my $lc_dir = lc($dir);
   663 					my $lc_dir = lc($dir);
   662 					$lc_dir =~ s/\/$//;
   664 					$lc_dir =~ s/\/$//;
   663 					my $fulldir = $lc_dir;
   665 					$lc_dir =~ s|^$lc_epocroot|$epocroot|;
       
   666 					my $fulldir = $lc_dir;	
   664 					$fulldir =~ s|//|/|g;
   667 					$fulldir =~ s|//|/|g;
   665 					$dest =~ s|\/|\\|g;
   668 					$dest =~ s|\/|\\|g;
   666 					$dest = '\\' . $dest, unless ($dest =~ /^\\/);
   669 					$dest = '\\' . $dest, unless ($dest =~ /^\\/);
   667 					unless ( -d $fulldir ) {
   670 					unless ( -d $fulldir ) {
   668 						chomp $line;
   671 						chomp $line;