common/tools/populateziptemplate.pl
changeset 456 1ba3c86ebec0
parent 455 bb24766fdbdc
child 461 874d24067366
equal deleted inserted replaced
455:bb24766fdbdc 456:1ba3c86ebec0
    98   	}	
    98   	}	
    99 	}
    99 	}
   100 	elsif ($package->{source} =~ m{/rnd/([^/]+)/([^/]+)})
   100 	elsif ($package->{source} =~ m{/rnd/([^/]+)/([^/]+)})
   101 	{
   101 	{
   102 		# RnD repository
   102 		# RnD repository
       
   103 		my $licenseType = $1;
   103 		my $name="bin_$1_$2";
   104 		my $name="bin_$1_$2";
   104 		if ($1 eq "internal")
   105 		my $postbuildName = "binaries_$2";
       
   106 		my $config = "rnd";
       
   107 		if ($licenseType eq "internal")
   105 		{
   108 		{
   106 			$name = "binaries_$2";
   109 			$name = "binaries_$2_prebuild";
       
   110 			$config = "rnd-internal";
   107 		}
   111 		}
   108 		
   112 		
   109 		# Create a zip object
   113 		# Create a zip object
   110 		push @{$zipConfig->{config}->{config}->{src}->{config}->{rnd}->{config}},
   114 		push @{$zipConfig->{config}->{config}->{$config}->{config}},
   111 		{
   115 		{
   112 			set =>
   116 			set =>
   113 			[
   117 			[
   114 				{
   118 				{
   115 					name => "root.dir",
   119 					name => "root.dir",
   126 			]
   130 			]
   127 		};
   131 		};
   128 		# Enumerate all the files on the local disk that are in this repository
   132 		# Enumerate all the files on the local disk that are in this repository
   129 		(my $dosCompatibleDst = $package->{dst}) =~ s{/}{\\}g;
   133 		(my $dosCompatibleDst = $package->{dst}) =~ s{/}{\\}g;
   130 		my @files = `dir /b/s/a-d $dosCompatibleDst 2> nul:`;
   134 		my @files = `dir /b/s/a-d $dosCompatibleDst 2> nul:`;
   131 		#print "@files\n";
       
   132 		next unless @files;
   135 		next unless @files;
   133 		# Add the files to this zip object
   136 		# Add the files to the global list of items to be excluded in the binary zips
   134 		@files = grep {
   137 		@files = grep {
       
   138 			chomp;
   135 			s{\\}{/}g;
   139 			s{\\}{/}g;
   136 			s!^[A-Z]:/$package->{dst}/!!i;
   140 			s!^[A-Z]:/$package->{dst}/!!i;
   137 			m{^epoc32/}i;
   141 			m{^epoc32/}i;
   138 		} @files;
   142 		} @files;
   139 		push @allRndFiles, @files;
   143 		push @allRndFiles, @files;
   140 		
   144 
   141 		open FILE, ">", $name ."_includefile.txt" or die "Cannot write includefile!";
   145 		if ($licenseType eq "internal")
   142 		print FILE @files;
   146 		{
   143 		close FILE;
   147 			# Add a zip object to zip this package from the epoc tree in the postbuild phase
       
   148 			push @{$zipConfig->{config}->{config}->{"rnd-postbuild"}->{config}},
       
   149 			{
       
   150 				name => $postbuildName,
       
   151 				set =>
       
   152 				[
       
   153 					{
       
   154 						name => "name",
       
   155 						value=> $postbuildName,
       
   156 					},
       
   157 					# Turn the array of files into an array of inclusion hashes
       
   158 					(map { {name => "include", value => $_ } } @files),
       
   159 				]
       
   160 			};
       
   161 		}
   144 	}
   162 	}
   145 	else
   163 	else
   146 	{
   164 	{
   147 		(my $dest2 = $package->{dst}) =~ s{[\\/]}{_slash_}g;
   165 		(my $dest2 = $package->{dst}) =~ s{[\\/]}{_slash_}g;
   148 		push @{$zipConfig->{config}->{config}->{src}->{config}->{misc}->{config}},
   166 		push @{$zipConfig->{config}->{config}->{src}->{config}->{misc}->{config}},