common/tools/populateziptemplate.pl
changeset 111 5b0bc2f89660
parent 108 d33d43677cdf
child 247 cfde8b1784f7
equal deleted inserted replaced
110:6c981bc63bab 111:5b0bc2f89660
   116 		my @files = `dir /b/s/a-d $dosCompatibleDst 2> nul:`;
   116 		my @files = `dir /b/s/a-d $dosCompatibleDst 2> nul:`;
   117 		#print "@files\n";
   117 		#print "@files\n";
   118 		next unless @files;
   118 		next unless @files;
   119 		# Add the files to this zip object
   119 		# Add the files to this zip object
   120 		@files = grep {
   120 		@files = grep {
   121 			chomp;
       
   122 			s{\\}{/}g;
   121 			s{\\}{/}g;
   123 			s!^[A-Z]:/$package->{dst}/!!i;
   122 			s!^[A-Z]:/$package->{dst}/!!i;
   124 			m{^epoc32/}i;
   123 			m{^epoc32/}i;
   125 		} @files;
   124 		} @files;
   126 		push @allRndFiles, @files;
   125 		push @allRndFiles, @files;
       
   126 		
       
   127 		open FILE, ">", $name ."_includefile.txt" or die "Cannot write includefile!";
       
   128 		print FILE @files;
       
   129 		close FILE;
   127 	}
   130 	}
   128 	else
   131 	else
   129 	{
   132 	{
   130 		die "Cannot determine license for '$package->{source}'";
   133 		die "Cannot determine license for '$package->{source}'";
   131 	}
   134 	}
   135 my @excludes = map { {name => "exclude", value => "$_"} } @allRndFiles;
   138 my @excludes = map { {name => "exclude", value => "$_"} } @allRndFiles;
   136 push @{$zipConfig->{config}->{config}->{bin}->{config}->{set}}, @excludes;
   139 push @{$zipConfig->{config}->{config}->{bin}->{config}->{set}}, @excludes;
   137 
   140 
   138 $xml->XMLout($zipConfig, OutputFile => $ftl, XMLDecl => 1, RootName => 'build', KeyAttr => $keyAttr);
   141 $xml->XMLout($zipConfig, OutputFile => $ftl, XMLDecl => 1, RootName => 'build', KeyAttr => $keyAttr);
   139 
   142 
       
   143 # Output all rnd files into exclude list for later
       
   144 open FILE, "> rnd_excludefile.txt" or die "Cannot write exludefile!";
       
   145 print FILE @allRndFiles;
       
   146 close FILE;