common/tools/populateziptemplate.pl
author Maciej Seroka <maciejs@symbian.org>
Wed, 06 Oct 2010 15:50:01 +0100
changeset 1286 7ad2f93c7666
parent 958 72efe73cb3cf
permissions -rw-r--r--
Added BIT db interface for Test Results
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
108
d33d43677cdf Added license header
Simon Howkins <simonh@symbian.org>
parents: 102
diff changeset
     1
#!perl -w
d33d43677cdf Added license header
Simon Howkins <simonh@symbian.org>
parents: 102
diff changeset
     2
# Copyright (c) 2009 Symbian Foundation Ltd
d33d43677cdf Added license header
Simon Howkins <simonh@symbian.org>
parents: 102
diff changeset
     3
# This component and the accompanying materials are made available
d33d43677cdf Added license header
Simon Howkins <simonh@symbian.org>
parents: 102
diff changeset
     4
# under the terms of the License "Eclipse Public License v1.0"
d33d43677cdf Added license header
Simon Howkins <simonh@symbian.org>
parents: 102
diff changeset
     5
# which accompanies this distribution, and is available
d33d43677cdf Added license header
Simon Howkins <simonh@symbian.org>
parents: 102
diff changeset
     6
# at the URL "http://www.eclipse.org/legal/epl-v10.html".
d33d43677cdf Added license header
Simon Howkins <simonh@symbian.org>
parents: 102
diff changeset
     7
#
d33d43677cdf Added license header
Simon Howkins <simonh@symbian.org>
parents: 102
diff changeset
     8
# Initial Contributors:
d33d43677cdf Added license header
Simon Howkins <simonh@symbian.org>
parents: 102
diff changeset
     9
# Symbian Foundation Ltd - initial contribution.
d33d43677cdf Added license header
Simon Howkins <simonh@symbian.org>
parents: 102
diff changeset
    10
# 
d33d43677cdf Added license header
Simon Howkins <simonh@symbian.org>
parents: 102
diff changeset
    11
# Contributors:
d33d43677cdf Added license header
Simon Howkins <simonh@symbian.org>
parents: 102
diff changeset
    12
#
d33d43677cdf Added license header
Simon Howkins <simonh@symbian.org>
parents: 102
diff changeset
    13
# Description:
d33d43677cdf Added license header
Simon Howkins <simonh@symbian.org>
parents: 102
diff changeset
    14
# Populates the template for packaging src and binaries in the build
d33d43677cdf Added license header
Simon Howkins <simonh@symbian.org>
parents: 102
diff changeset
    15
73
b8d6af733d6d Add first cut of packaging solution
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    16
use strict;
b8d6af733d6d Add first cut of packaging solution
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    17
89
a8aa5d600806 Copy Text::CSV module into source and change to use it, as we can't rely on it appearing in the Perl library when Perl 5.6.1 is installed.
Simon Howkins <simonh@symbian.org>
parents: 88
diff changeset
    18
use FindBin;
a8aa5d600806 Copy Text::CSV module into source and change to use it, as we can't rely on it appearing in the Perl library when Perl 5.6.1 is installed.
Simon Howkins <simonh@symbian.org>
parents: 88
diff changeset
    19
use lib "$FindBin::Bin/lib";
73
b8d6af733d6d Add first cut of packaging solution
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    20
use Text::CSV;
b8d6af733d6d Add first cut of packaging solution
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    21
require XML::Simple;
b8d6af733d6d Add first cut of packaging solution
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    22
84
fcf94a72b33e Improved zip template generation script, to take a third argument for the required location of the output file.
Simon Howkins <simonh@symbian.org>
parents: 76
diff changeset
    23
# Raw inputs come in as parameters to the script
fcf94a72b33e Improved zip template generation script, to take a third argument for the required location of the output file.
Simon Howkins <simonh@symbian.org>
parents: 76
diff changeset
    24
# TODO: Use a proper option parsing module
73
b8d6af733d6d Add first cut of packaging solution
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    25
my $sourcesCSV = shift or die "First arg must be source csv file";
b8d6af733d6d Add first cut of packaging solution
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    26
my $template = shift or die "Second arg must be template file";
84
fcf94a72b33e Improved zip template generation script, to take a third argument for the required location of the output file.
Simon Howkins <simonh@symbian.org>
parents: 76
diff changeset
    27
my $ftl = shift or die "Third arg must be output file";
247
cfde8b1784f7 Simplified the locations of some generated files, so they are created where they need to be rather than created on one place and moved to another.
Simon Howkins <simonh@symbian.org>
parents: 111
diff changeset
    28
my $rndExcludes = shift or die "Fourth arg must be rnd-excludes file";
73
b8d6af733d6d Add first cut of packaging solution
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    29
b8d6af733d6d Add first cut of packaging solution
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    30
# Load CSV
380
d4dac57985d9 Bug 299 populateziptemplate.pl aborts if it cannot determine the license for a source component
Simon Howkins <simonh@symbian.org>
parents: 372
diff changeset
    31
open my $csvText, "<", $sourcesCSV or die "Unable to open sources.csv from $sourcesCSV";
73
b8d6af733d6d Add first cut of packaging solution
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    32
my $csv = Text::CSV->new();
b8d6af733d6d Add first cut of packaging solution
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    33
my @keys;
b8d6af733d6d Add first cut of packaging solution
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    34
my @packages;
b8d6af733d6d Add first cut of packaging solution
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    35
while (my $line = <$csvText>)
b8d6af733d6d Add first cut of packaging solution
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    36
{
b8d6af733d6d Add first cut of packaging solution
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    37
	chomp $line;
b8d6af733d6d Add first cut of packaging solution
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    38
	next unless $line;
b8d6af733d6d Add first cut of packaging solution
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    39
	unless ($csv->parse($line))
b8d6af733d6d Add first cut of packaging solution
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    40
	{
89
a8aa5d600806 Copy Text::CSV module into source and change to use it, as we can't rely on it appearing in the Perl library when Perl 5.6.1 is installed.
Simon Howkins <simonh@symbian.org>
parents: 88
diff changeset
    41
		my $err = $csv->error_input();
73
b8d6af733d6d Add first cut of packaging solution
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    42
		die "Failed to parse line '$line': $err";
b8d6af733d6d Add first cut of packaging solution
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    43
	}
b8d6af733d6d Add first cut of packaging solution
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    44
b8d6af733d6d Add first cut of packaging solution
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    45
	if (! @keys)
b8d6af733d6d Add first cut of packaging solution
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    46
	{
b8d6af733d6d Add first cut of packaging solution
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    47
		# First line - note the column names
b8d6af733d6d Add first cut of packaging solution
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    48
		@keys =  $csv->fields();
b8d6af733d6d Add first cut of packaging solution
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    49
	}
b8d6af733d6d Add first cut of packaging solution
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    50
	else
b8d6af733d6d Add first cut of packaging solution
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    51
	{
b8d6af733d6d Add first cut of packaging solution
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    52
		# Already got the keys, so get the data
b8d6af733d6d Add first cut of packaging solution
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    53
		my %package;
b8d6af733d6d Add first cut of packaging solution
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    54
		# Read into a hash slice
b8d6af733d6d Add first cut of packaging solution
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    55
		@package{@keys} = $csv->fields();
b8d6af733d6d Add first cut of packaging solution
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    56
		push @packages, \%package;
b8d6af733d6d Add first cut of packaging solution
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    57
	}
b8d6af733d6d Add first cut of packaging solution
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    58
}
b8d6af733d6d Add first cut of packaging solution
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    59
close $csvText;
b8d6af733d6d Add first cut of packaging solution
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    60
b8d6af733d6d Add first cut of packaging solution
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    61
# This controls how the XML parsing decides what should be tags and what should be attributes
b8d6af733d6d Add first cut of packaging solution
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    62
# It's been worked out mostly by trial and error :-(
b8d6af733d6d Add first cut of packaging solution
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    63
my $keyAttr = { config => "name", name => "set"};
b8d6af733d6d Add first cut of packaging solution
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    64
# Load template
b8d6af733d6d Add first cut of packaging solution
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    65
my $xml = XML::Simple->new();
372
ea854a4b723d Bug 289 Issue in populatezip.pl when doing Platform build in step preprocess-zip-config
Simon Howkins <simonh@symbian.org>
parents: 313
diff changeset
    66
my $zipConfig = $xml->XMLin($template, keyattr => $keyAttr);
73
b8d6af733d6d Add first cut of packaging solution
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    67
my @allRndFiles;
388
2ab990de5a23 Bug 299 populateziptemplate.pl aborts if it cannot determine the license for a source component
Simon Howkins <simonh@symbian.org>
parents: 380
diff changeset
    68
my $miscCount = 0;
380
d4dac57985d9 Bug 299 populateziptemplate.pl aborts if it cannot determine the license for a source component
Simon Howkins <simonh@symbian.org>
parents: 372
diff changeset
    69
73
b8d6af733d6d Add first cut of packaging solution
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    70
# For each package in CSV...
b8d6af733d6d Add first cut of packaging solution
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    71
foreach my $package (@packages)
b8d6af733d6d Add first cut of packaging solution
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    72
{
b8d6af733d6d Add first cut of packaging solution
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
    73
	warn "Warning: Package $package->{dst} does not appear on the local system\n" unless -d $package->{dst};
76
a115d49b621f Include epl/sfl category in zipfile name
Shabe Razvi <shaber@symbian.org>
parents: 73
diff changeset
    74
	$package->{dst} =~ s{^/}{}g;
958
72efe73cb3cf FIxed package config script to be able to handle utilities repo being at old URL, or new URL.
Simon Howkins <simonh@symbian.org>
parents: 954
diff changeset
    75
	if ($package->{source} =~ m{/(sfl|oss)/(MCL|FCL)/(sf|utilities|sftools|interim)/(([^/]+)/)?([^/]+)?})
313
52d855dfda13 Changed 'publish' to 'sf-publish' to only publish the zips, not all logs. Changed behaviour so that 'sf.spec.package.src.enable'=false stops the source repos from getting packaged, but not the RnD ones (which are extracted again in platform builds)
MattD <mattd@symbian.org>
parents: 261
diff changeset
    76
	{
484
5efa4ed4b4f8 Added special handling for utilities package, so it's zipped up with the items from the tools layer, rather than as a misc item.
Simon Howkins <simonh@symbian.org>
parents: 461
diff changeset
    77
		my ($license, $codeline, $thingy, $layer, $packageName) = ($1, $2, $3, $5, $6);
5efa4ed4b4f8 Added special handling for utilities package, so it's zipped up with the items from the tools layer, rather than as a misc item.
Simon Howkins <simonh@symbian.org>
parents: 461
diff changeset
    78
		# $thingy is the part of the path after the codeline. For
5efa4ed4b4f8 Added special handling for utilities package, so it's zipped up with the items from the tools layer, rather than as a misc item.
Simon Howkins <simonh@symbian.org>
parents: 461
diff changeset
    79
		# platform packages, it's "sf". For the utilities package, it's
958
72efe73cb3cf FIxed package config script to be able to handle utilities repo being at old URL, or new URL.
Simon Howkins <simonh@symbian.org>
parents: 954
diff changeset
    80
		# "sftools", or "utilities, depending on the URL used to
72efe73cb3cf FIxed package config script to be able to handle utilities repo being at old URL, or new URL.
Simon Howkins <simonh@symbian.org>
parents: 954
diff changeset
    81
		# obtain it.
484
5efa4ed4b4f8 Added special handling for utilities package, so it's zipped up with the items from the tools layer, rather than as a misc item.
Simon Howkins <simonh@symbian.org>
parents: 461
diff changeset
    82
		#
5efa4ed4b4f8 Added special handling for utilities package, so it's zipped up with the items from the tools layer, rather than as a misc item.
Simon Howkins <simonh@symbian.org>
parents: 461
diff changeset
    83
		# I can't think of anything to describe this item, hence $thingy
958
72efe73cb3cf FIxed package config script to be able to handle utilities repo being at old URL, or new URL.
Simon Howkins <simonh@symbian.org>
parents: 954
diff changeset
    84
		if ($thingy eq "utilities")
72efe73cb3cf FIxed package config script to be able to handle utilities repo being at old URL, or new URL.
Simon Howkins <simonh@symbian.org>
parents: 954
diff changeset
    85
		{
72efe73cb3cf FIxed package config script to be able to handle utilities repo being at old URL, or new URL.
Simon Howkins <simonh@symbian.org>
parents: 954
diff changeset
    86
			$layer = "tools";
72efe73cb3cf FIxed package config script to be able to handle utilities repo being at old URL, or new URL.
Simon Howkins <simonh@symbian.org>
parents: 954
diff changeset
    87
			$packageName = "utilities";
72efe73cb3cf FIxed package config script to be able to handle utilities repo being at old URL, or new URL.
Simon Howkins <simonh@symbian.org>
parents: 954
diff changeset
    88
		}
72efe73cb3cf FIxed package config script to be able to handle utilities repo being at old URL, or new URL.
Simon Howkins <simonh@symbian.org>
parents: 954
diff changeset
    89
		elsif ($thingy eq "sftools")
484
5efa4ed4b4f8 Added special handling for utilities package, so it's zipped up with the items from the tools layer, rather than as a misc item.
Simon Howkins <simonh@symbian.org>
parents: 461
diff changeset
    90
		{
5efa4ed4b4f8 Added special handling for utilities package, so it's zipped up with the items from the tools layer, rather than as a misc item.
Simon Howkins <simonh@symbian.org>
parents: 461
diff changeset
    91
			$layer = "tools";
5efa4ed4b4f8 Added special handling for utilities package, so it's zipped up with the items from the tools layer, rather than as a misc item.
Simon Howkins <simonh@symbian.org>
parents: 461
diff changeset
    92
		}
614
ebd02353c4d9 Added work-around for the QEMU package whilst it's still in an interim location, but we want to release it in a PDK.
Simon Howkins <simonh@symbian.org>
parents: 484
diff changeset
    93
		elsif ($thingy eq "interim")
ebd02353c4d9 Added work-around for the QEMU package whilst it's still in an interim location, but we want to release it in a PDK.
Simon Howkins <simonh@symbian.org>
parents: 484
diff changeset
    94
		{
ebd02353c4d9 Added work-around for the QEMU package whilst it's still in an interim location, but we want to release it in a PDK.
Simon Howkins <simonh@symbian.org>
parents: 484
diff changeset
    95
			if ($layer eq "QEMU")
ebd02353c4d9 Added work-around for the QEMU package whilst it's still in an interim location, but we want to release it in a PDK.
Simon Howkins <simonh@symbian.org>
parents: 484
diff changeset
    96
			{
ebd02353c4d9 Added work-around for the QEMU package whilst it's still in an interim location, but we want to release it in a PDK.
Simon Howkins <simonh@symbian.org>
parents: 484
diff changeset
    97
				$packageName = $layer;
656
4fd3846740b0 Move QEMU into adaptation layer when packaged
Shabe Razvi <shaber@symbian.org>
parents: 644
diff changeset
    98
				$layer = "adaptation";
614
ebd02353c4d9 Added work-around for the QEMU package whilst it's still in an interim location, but we want to release it in a PDK.
Simon Howkins <simonh@symbian.org>
parents: 484
diff changeset
    99
			}
ebd02353c4d9 Added work-around for the QEMU package whilst it's still in an interim location, but we want to release it in a PDK.
Simon Howkins <simonh@symbian.org>
parents: 484
diff changeset
   100
			else
ebd02353c4d9 Added work-around for the QEMU package whilst it's still in an interim location, but we want to release it in a PDK.
Simon Howkins <simonh@symbian.org>
parents: 484
diff changeset
   101
			{
ebd02353c4d9 Added work-around for the QEMU package whilst it's still in an interim location, but we want to release it in a PDK.
Simon Howkins <simonh@symbian.org>
parents: 484
diff changeset
   102
				warn "ERROR: Don't know how to deal with interim package $layer\n";
ebd02353c4d9 Added work-around for the QEMU package whilst it's still in an interim location, but we want to release it in a PDK.
Simon Howkins <simonh@symbian.org>
parents: 484
diff changeset
   103
				goto MISC_PACKAGE;
ebd02353c4d9 Added work-around for the QEMU package whilst it's still in an interim location, but we want to release it in a PDK.
Simon Howkins <simonh@symbian.org>
parents: 484
diff changeset
   104
			}
ebd02353c4d9 Added work-around for the QEMU package whilst it's still in an interim location, but we want to release it in a PDK.
Simon Howkins <simonh@symbian.org>
parents: 484
diff changeset
   105
		}
484
5efa4ed4b4f8 Added special handling for utilities package, so it's zipped up with the items from the tools layer, rather than as a misc item.
Simon Howkins <simonh@symbian.org>
parents: 461
diff changeset
   106
		elsif (!defined $packageName)
5efa4ed4b4f8 Added special handling for utilities package, so it's zipped up with the items from the tools layer, rather than as a misc item.
Simon Howkins <simonh@symbian.org>
parents: 461
diff changeset
   107
		{
5efa4ed4b4f8 Added special handling for utilities package, so it's zipped up with the items from the tools layer, rather than as a misc item.
Simon Howkins <simonh@symbian.org>
parents: 461
diff changeset
   108
			goto MISC_PACKAGE;
5efa4ed4b4f8 Added special handling for utilities package, so it's zipped up with the items from the tools layer, rather than as a misc item.
Simon Howkins <simonh@symbian.org>
parents: 461
diff changeset
   109
		}
5efa4ed4b4f8 Added special handling for utilities package, so it's zipped up with the items from the tools layer, rather than as a misc item.
Simon Howkins <simonh@symbian.org>
parents: 461
diff changeset
   110
		
5efa4ed4b4f8 Added special handling for utilities package, so it's zipped up with the items from the tools layer, rather than as a misc item.
Simon Howkins <simonh@symbian.org>
parents: 461
diff changeset
   111
  		push @{$zipConfig->{config}->{config}->{src}->{config}->{$license}->{config}},
313
52d855dfda13 Changed 'publish' to 'sf-publish' to only publish the zips, not all logs. Changed behaviour so that 'sf.spec.package.src.enable'=false stops the source repos from getting packaged, but not the RnD ones (which are extracted again in platform builds)
MattD <mattd@symbian.org>
parents: 261
diff changeset
   112
  		{
52d855dfda13 Changed 'publish' to 'sf-publish' to only publish the zips, not all logs. Changed behaviour so that 'sf.spec.package.src.enable'=false stops the source repos from getting packaged, but not the RnD ones (which are extracted again in platform builds)
MattD <mattd@symbian.org>
parents: 261
diff changeset
   113
  			set =>
52d855dfda13 Changed 'publish' to 'sf-publish' to only publish the zips, not all logs. Changed behaviour so that 'sf.spec.package.src.enable'=false stops the source repos from getting packaged, but not the RnD ones (which are extracted again in platform builds)
MattD <mattd@symbian.org>
parents: 261
diff changeset
   114
  			[
52d855dfda13 Changed 'publish' to 'sf-publish' to only publish the zips, not all logs. Changed behaviour so that 'sf.spec.package.src.enable'=false stops the source repos from getting packaged, but not the RnD ones (which are extracted again in platform builds)
MattD <mattd@symbian.org>
parents: 261
diff changeset
   115
  				{
52d855dfda13 Changed 'publish' to 'sf-publish' to only publish the zips, not all logs. Changed behaviour so that 'sf.spec.package.src.enable'=false stops the source repos from getting packaged, but not the RnD ones (which are extracted again in platform builds)
MattD <mattd@symbian.org>
parents: 261
diff changeset
   116
  					name => "name",
484
5efa4ed4b4f8 Added special handling for utilities package, so it's zipped up with the items from the tools layer, rather than as a misc item.
Simon Howkins <simonh@symbian.org>
parents: 461
diff changeset
   117
  					value=> join "_", "src", $license, $layer, $packageName,
313
52d855dfda13 Changed 'publish' to 'sf-publish' to only publish the zips, not all logs. Changed behaviour so that 'sf.spec.package.src.enable'=false stops the source repos from getting packaged, but not the RnD ones (which are extracted again in platform builds)
MattD <mattd@symbian.org>
parents: 261
diff changeset
   118
  				},
52d855dfda13 Changed 'publish' to 'sf-publish' to only publish the zips, not all logs. Changed behaviour so that 'sf.spec.package.src.enable'=false stops the source repos from getting packaged, but not the RnD ones (which are extracted again in platform builds)
MattD <mattd@symbian.org>
parents: 261
diff changeset
   119
  				{
52d855dfda13 Changed 'publish' to 'sf-publish' to only publish the zips, not all logs. Changed behaviour so that 'sf.spec.package.src.enable'=false stops the source repos from getting packaged, but not the RnD ones (which are extracted again in platform builds)
MattD <mattd@symbian.org>
parents: 261
diff changeset
   120
  					name => "include",
52d855dfda13 Changed 'publish' to 'sf-publish' to only publish the zips, not all logs. Changed behaviour so that 'sf.spec.package.src.enable'=false stops the source repos from getting packaged, but not the RnD ones (which are extracted again in platform builds)
MattD <mattd@symbian.org>
parents: 261
diff changeset
   121
  					value => "$package->{dst}/**",
52d855dfda13 Changed 'publish' to 'sf-publish' to only publish the zips, not all logs. Changed behaviour so that 'sf.spec.package.src.enable'=false stops the source repos from getting packaged, but not the RnD ones (which are extracted again in platform builds)
MattD <mattd@symbian.org>
parents: 261
diff changeset
   122
  				},
52d855dfda13 Changed 'publish' to 'sf-publish' to only publish the zips, not all logs. Changed behaviour so that 'sf.spec.package.src.enable'=false stops the source repos from getting packaged, but not the RnD ones (which are extracted again in platform builds)
MattD <mattd@symbian.org>
parents: 261
diff changeset
   123
  			]
52d855dfda13 Changed 'publish' to 'sf-publish' to only publish the zips, not all logs. Changed behaviour so that 'sf.spec.package.src.enable'=false stops the source repos from getting packaged, but not the RnD ones (which are extracted again in platform builds)
MattD <mattd@symbian.org>
parents: 261
diff changeset
   124
  		};
767
69d150dcf917 Now creates src-by-layer entries on the fly, so it doesn't create release zips with no content.
Simon Howkins <simonh@symbian.org>
parents: 670
diff changeset
   125
		$zipConfig->{config}->{config}->{"src-by-layer"}->{config}->{$license."-$layer"} =
69d150dcf917 Now creates src-by-layer entries on the fly, so it doesn't create release zips with no content.
Simon Howkins <simonh@symbian.org>
parents: 670
diff changeset
   126
		{
69d150dcf917 Now creates src-by-layer entries on the fly, so it doesn't create release zips with no content.
Simon Howkins <simonh@symbian.org>
parents: 670
diff changeset
   127
			set => 
69d150dcf917 Now creates src-by-layer entries on the fly, so it doesn't create release zips with no content.
Simon Howkins <simonh@symbian.org>
parents: 670
diff changeset
   128
			[
69d150dcf917 Now creates src-by-layer entries on the fly, so it doesn't create release zips with no content.
Simon Howkins <simonh@symbian.org>
parents: 670
diff changeset
   129
				{
69d150dcf917 Now creates src-by-layer entries on the fly, so it doesn't create release zips with no content.
Simon Howkins <simonh@symbian.org>
parents: 670
diff changeset
   130
					name => "name",
69d150dcf917 Now creates src-by-layer entries on the fly, so it doesn't create release zips with no content.
Simon Howkins <simonh@symbian.org>
parents: 670
diff changeset
   131
					value => join "_", "src", $license, $layer,
69d150dcf917 Now creates src-by-layer entries on the fly, so it doesn't create release zips with no content.
Simon Howkins <simonh@symbian.org>
parents: 670
diff changeset
   132
				},
69d150dcf917 Now creates src-by-layer entries on the fly, so it doesn't create release zips with no content.
Simon Howkins <simonh@symbian.org>
parents: 670
diff changeset
   133
				{
69d150dcf917 Now creates src-by-layer entries on the fly, so it doesn't create release zips with no content.
Simon Howkins <simonh@symbian.org>
parents: 670
diff changeset
   134
					name => "include",
69d150dcf917 Now creates src-by-layer entries on the fly, so it doesn't create release zips with no content.
Simon Howkins <simonh@symbian.org>
parents: 670
diff changeset
   135
					value => join "_", "src", $license, $layer, "*.zip",
69d150dcf917 Now creates src-by-layer entries on the fly, so it doesn't create release zips with no content.
Simon Howkins <simonh@symbian.org>
parents: 670
diff changeset
   136
				},
69d150dcf917 Now creates src-by-layer entries on the fly, so it doesn't create release zips with no content.
Simon Howkins <simonh@symbian.org>
parents: 670
diff changeset
   137
			]
69d150dcf917 Now creates src-by-layer entries on the fly, so it doesn't create release zips with no content.
Simon Howkins <simonh@symbian.org>
parents: 670
diff changeset
   138
		};
73
b8d6af733d6d Add first cut of packaging solution
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
   139
	}
b8d6af733d6d Add first cut of packaging solution
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
   140
	elsif ($package->{source} =~ m{/rnd/([^/]+)/([^/]+)})
b8d6af733d6d Add first cut of packaging solution
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
   141
	{
b8d6af733d6d Add first cut of packaging solution
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
   142
		# RnD repository
456
1ba3c86ebec0 Bug 350 RnD binary zips missing all content outside epoc32 tree
Simon Howkins <simonh@symbian.org>
parents: 455
diff changeset
   143
		my $licenseType = $1;
670
6e80d1c1b9d9 Bug 479: RnD package zips contain content not releaseable to public
Simon Howkins <simonh@symbian.org>
parents: 656
diff changeset
   144
		my $binName="bin_$1_$2";
6e80d1c1b9d9 Bug 479: RnD package zips contain content not releaseable to public
Simon Howkins <simonh@symbian.org>
parents: 656
diff changeset
   145
		my $srcName="src_$1_$2";
456
1ba3c86ebec0 Bug 350 RnD binary zips missing all content outside epoc32 tree
Simon Howkins <simonh@symbian.org>
parents: 455
diff changeset
   146
		my $postbuildName = "binaries_$2";
1ba3c86ebec0 Bug 350 RnD binary zips missing all content outside epoc32 tree
Simon Howkins <simonh@symbian.org>
parents: 455
diff changeset
   147
		my $config = "rnd";
1ba3c86ebec0 Bug 350 RnD binary zips missing all content outside epoc32 tree
Simon Howkins <simonh@symbian.org>
parents: 455
diff changeset
   148
		if ($licenseType eq "internal")
455
bb24766fdbdc Bug 349 R&D kit zip file naming convention not followed
Simon Howkins <simonh@symbian.org>
parents: 388
diff changeset
   149
		{
670
6e80d1c1b9d9 Bug 479: RnD package zips contain content not releaseable to public
Simon Howkins <simonh@symbian.org>
parents: 656
diff changeset
   150
			$binName = "binaries_$2_prebuild";
456
1ba3c86ebec0 Bug 350 RnD binary zips missing all content outside epoc32 tree
Simon Howkins <simonh@symbian.org>
parents: 455
diff changeset
   151
			$config = "rnd-internal";
455
bb24766fdbdc Bug 349 R&D kit zip file naming convention not followed
Simon Howkins <simonh@symbian.org>
parents: 388
diff changeset
   152
		}
261
a0e85954c23c Fix packaging issues. Released zips now delivered in zips\release folder.
Shabe Razvi <shaber@symbian.org>
parents: 247
diff changeset
   153
		
73
b8d6af733d6d Add first cut of packaging solution
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
   154
		# Create a zip object
456
1ba3c86ebec0 Bug 350 RnD binary zips missing all content outside epoc32 tree
Simon Howkins <simonh@symbian.org>
parents: 455
diff changeset
   155
		push @{$zipConfig->{config}->{config}->{$config}->{config}},
73
b8d6af733d6d Add first cut of packaging solution
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
   156
		{
b8d6af733d6d Add first cut of packaging solution
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
   157
			set =>
b8d6af733d6d Add first cut of packaging solution
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
   158
			[
b8d6af733d6d Add first cut of packaging solution
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
   159
				{
88
28463bb10fde Package RnD binaries from rnd root location to reduce size of include list
Shabe Razvi <shaber@symbian.org>
parents: 84
diff changeset
   160
					name => "root.dir",
28463bb10fde Package RnD binaries from rnd root location to reduce size of include list
Shabe Razvi <shaber@symbian.org>
parents: 84
diff changeset
   161
					value=> "\${build.drive}/$package->{dst}",
28463bb10fde Package RnD binaries from rnd root location to reduce size of include list
Shabe Razvi <shaber@symbian.org>
parents: 84
diff changeset
   162
				},
28463bb10fde Package RnD binaries from rnd root location to reduce size of include list
Shabe Razvi <shaber@symbian.org>
parents: 84
diff changeset
   163
				{
73
b8d6af733d6d Add first cut of packaging solution
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
   164
					name => "name",
670
6e80d1c1b9d9 Bug 479: RnD package zips contain content not releaseable to public
Simon Howkins <simonh@symbian.org>
parents: 656
diff changeset
   165
					value=> "$binName",
73
b8d6af733d6d Add first cut of packaging solution
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
   166
				},
88
28463bb10fde Package RnD binaries from rnd root location to reduce size of include list
Shabe Razvi <shaber@symbian.org>
parents: 84
diff changeset
   167
				{
28463bb10fde Package RnD binaries from rnd root location to reduce size of include list
Shabe Razvi <shaber@symbian.org>
parents: 84
diff changeset
   168
					name => "include",
670
6e80d1c1b9d9 Bug 479: RnD package zips contain content not releaseable to public
Simon Howkins <simonh@symbian.org>
parents: 656
diff changeset
   169
					value=> "epoc32/**",
6e80d1c1b9d9 Bug 479: RnD package zips contain content not releaseable to public
Simon Howkins <simonh@symbian.org>
parents: 656
diff changeset
   170
				},
6e80d1c1b9d9 Bug 479: RnD package zips contain content not releaseable to public
Simon Howkins <simonh@symbian.org>
parents: 656
diff changeset
   171
				{
6e80d1c1b9d9 Bug 479: RnD package zips contain content not releaseable to public
Simon Howkins <simonh@symbian.org>
parents: 656
diff changeset
   172
					name => "include",
6e80d1c1b9d9 Bug 479: RnD package zips contain content not releaseable to public
Simon Howkins <simonh@symbian.org>
parents: 656
diff changeset
   173
					value=> "*.txt",
88
28463bb10fde Package RnD binaries from rnd root location to reduce size of include list
Shabe Razvi <shaber@symbian.org>
parents: 84
diff changeset
   174
				},
73
b8d6af733d6d Add first cut of packaging solution
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
   175
			]
b8d6af733d6d Add first cut of packaging solution
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
   176
		};
90
5b27412eeaf0 Removed obsolete variable (@includes).
Simon Howkins <simonh@symbian.org>
parents: 89
diff changeset
   177
		# Enumerate all the files on the local disk that are in this repository
5b27412eeaf0 Removed obsolete variable (@includes).
Simon Howkins <simonh@symbian.org>
parents: 89
diff changeset
   178
		(my $dosCompatibleDst = $package->{dst}) =~ s{/}{\\}g;
5b27412eeaf0 Removed obsolete variable (@includes).
Simon Howkins <simonh@symbian.org>
parents: 89
diff changeset
   179
		my @files = `dir /b/s/a-d $dosCompatibleDst 2> nul:`;
5b27412eeaf0 Removed obsolete variable (@includes).
Simon Howkins <simonh@symbian.org>
parents: 89
diff changeset
   180
		next unless @files;
456
1ba3c86ebec0 Bug 350 RnD binary zips missing all content outside epoc32 tree
Simon Howkins <simonh@symbian.org>
parents: 455
diff changeset
   181
		# Add the files to the global list of items to be excluded in the binary zips
670
6e80d1c1b9d9 Bug 479: RnD package zips contain content not releaseable to public
Simon Howkins <simonh@symbian.org>
parents: 656
diff changeset
   182
		foreach (@files)
6e80d1c1b9d9 Bug 479: RnD package zips contain content not releaseable to public
Simon Howkins <simonh@symbian.org>
parents: 656
diff changeset
   183
		{
456
1ba3c86ebec0 Bug 350 RnD binary zips missing all content outside epoc32 tree
Simon Howkins <simonh@symbian.org>
parents: 455
diff changeset
   184
			chomp;
90
5b27412eeaf0 Removed obsolete variable (@includes).
Simon Howkins <simonh@symbian.org>
parents: 89
diff changeset
   185
			s{\\}{/}g;
5b27412eeaf0 Removed obsolete variable (@includes).
Simon Howkins <simonh@symbian.org>
parents: 89
diff changeset
   186
			s!^[A-Z]:/$package->{dst}/!!i;
670
6e80d1c1b9d9 Bug 479: RnD package zips contain content not releaseable to public
Simon Howkins <simonh@symbian.org>
parents: 656
diff changeset
   187
		}
6e80d1c1b9d9 Bug 479: RnD package zips contain content not releaseable to public
Simon Howkins <simonh@symbian.org>
parents: 656
diff changeset
   188
		my @srcFiles = grep { !m{^epoc32/} and !m{^[^/]+\.txt$}i and !m{^\.hg} } @files;
6e80d1c1b9d9 Bug 479: RnD package zips contain content not releaseable to public
Simon Howkins <simonh@symbian.org>
parents: 656
diff changeset
   189
		if (@srcFiles)
6e80d1c1b9d9 Bug 479: RnD package zips contain content not releaseable to public
Simon Howkins <simonh@symbian.org>
parents: 656
diff changeset
   190
		{
6e80d1c1b9d9 Bug 479: RnD package zips contain content not releaseable to public
Simon Howkins <simonh@symbian.org>
parents: 656
diff changeset
   191
			# Create a zip object for the source
6e80d1c1b9d9 Bug 479: RnD package zips contain content not releaseable to public
Simon Howkins <simonh@symbian.org>
parents: 656
diff changeset
   192
			push @{$zipConfig->{config}->{config}->{$config}->{config}},
6e80d1c1b9d9 Bug 479: RnD package zips contain content not releaseable to public
Simon Howkins <simonh@symbian.org>
parents: 656
diff changeset
   193
			{
6e80d1c1b9d9 Bug 479: RnD package zips contain content not releaseable to public
Simon Howkins <simonh@symbian.org>
parents: 656
diff changeset
   194
				set =>
6e80d1c1b9d9 Bug 479: RnD package zips contain content not releaseable to public
Simon Howkins <simonh@symbian.org>
parents: 656
diff changeset
   195
				[
6e80d1c1b9d9 Bug 479: RnD package zips contain content not releaseable to public
Simon Howkins <simonh@symbian.org>
parents: 656
diff changeset
   196
					{
6e80d1c1b9d9 Bug 479: RnD package zips contain content not releaseable to public
Simon Howkins <simonh@symbian.org>
parents: 656
diff changeset
   197
						name => "root.dir",
6e80d1c1b9d9 Bug 479: RnD package zips contain content not releaseable to public
Simon Howkins <simonh@symbian.org>
parents: 656
diff changeset
   198
						value=> "\${build.drive}/$package->{dst}",
6e80d1c1b9d9 Bug 479: RnD package zips contain content not releaseable to public
Simon Howkins <simonh@symbian.org>
parents: 656
diff changeset
   199
					},
6e80d1c1b9d9 Bug 479: RnD package zips contain content not releaseable to public
Simon Howkins <simonh@symbian.org>
parents: 656
diff changeset
   200
					{
6e80d1c1b9d9 Bug 479: RnD package zips contain content not releaseable to public
Simon Howkins <simonh@symbian.org>
parents: 656
diff changeset
   201
						name => "name",
6e80d1c1b9d9 Bug 479: RnD package zips contain content not releaseable to public
Simon Howkins <simonh@symbian.org>
parents: 656
diff changeset
   202
						value=> "$srcName",
6e80d1c1b9d9 Bug 479: RnD package zips contain content not releaseable to public
Simon Howkins <simonh@symbian.org>
parents: 656
diff changeset
   203
					},
6e80d1c1b9d9 Bug 479: RnD package zips contain content not releaseable to public
Simon Howkins <simonh@symbian.org>
parents: 656
diff changeset
   204
					{
6e80d1c1b9d9 Bug 479: RnD package zips contain content not releaseable to public
Simon Howkins <simonh@symbian.org>
parents: 656
diff changeset
   205
						name => "include",
6e80d1c1b9d9 Bug 479: RnD package zips contain content not releaseable to public
Simon Howkins <simonh@symbian.org>
parents: 656
diff changeset
   206
						value=> "**",
6e80d1c1b9d9 Bug 479: RnD package zips contain content not releaseable to public
Simon Howkins <simonh@symbian.org>
parents: 656
diff changeset
   207
					},
6e80d1c1b9d9 Bug 479: RnD package zips contain content not releaseable to public
Simon Howkins <simonh@symbian.org>
parents: 656
diff changeset
   208
					{
6e80d1c1b9d9 Bug 479: RnD package zips contain content not releaseable to public
Simon Howkins <simonh@symbian.org>
parents: 656
diff changeset
   209
						name => "exclude",
6e80d1c1b9d9 Bug 479: RnD package zips contain content not releaseable to public
Simon Howkins <simonh@symbian.org>
parents: 656
diff changeset
   210
						value=> "epoc32/**",
6e80d1c1b9d9 Bug 479: RnD package zips contain content not releaseable to public
Simon Howkins <simonh@symbian.org>
parents: 656
diff changeset
   211
					},
6e80d1c1b9d9 Bug 479: RnD package zips contain content not releaseable to public
Simon Howkins <simonh@symbian.org>
parents: 656
diff changeset
   212
					{
6e80d1c1b9d9 Bug 479: RnD package zips contain content not releaseable to public
Simon Howkins <simonh@symbian.org>
parents: 656
diff changeset
   213
						name => "exclude",
6e80d1c1b9d9 Bug 479: RnD package zips contain content not releaseable to public
Simon Howkins <simonh@symbian.org>
parents: 656
diff changeset
   214
						value=> ".hg/**",
6e80d1c1b9d9 Bug 479: RnD package zips contain content not releaseable to public
Simon Howkins <simonh@symbian.org>
parents: 656
diff changeset
   215
					},
6e80d1c1b9d9 Bug 479: RnD package zips contain content not releaseable to public
Simon Howkins <simonh@symbian.org>
parents: 656
diff changeset
   216
					{
6e80d1c1b9d9 Bug 479: RnD package zips contain content not releaseable to public
Simon Howkins <simonh@symbian.org>
parents: 656
diff changeset
   217
						name => "exclude",
6e80d1c1b9d9 Bug 479: RnD package zips contain content not releaseable to public
Simon Howkins <simonh@symbian.org>
parents: 656
diff changeset
   218
						value=> ".hg_archival.txt",
6e80d1c1b9d9 Bug 479: RnD package zips contain content not releaseable to public
Simon Howkins <simonh@symbian.org>
parents: 656
diff changeset
   219
					},
6e80d1c1b9d9 Bug 479: RnD package zips contain content not releaseable to public
Simon Howkins <simonh@symbian.org>
parents: 656
diff changeset
   220
				]
6e80d1c1b9d9 Bug 479: RnD package zips contain content not releaseable to public
Simon Howkins <simonh@symbian.org>
parents: 656
diff changeset
   221
			};
6e80d1c1b9d9 Bug 479: RnD package zips contain content not releaseable to public
Simon Howkins <simonh@symbian.org>
parents: 656
diff changeset
   222
		}
6e80d1c1b9d9 Bug 479: RnD package zips contain content not releaseable to public
Simon Howkins <simonh@symbian.org>
parents: 656
diff changeset
   223
		@files = grep {
90
5b27412eeaf0 Removed obsolete variable (@includes).
Simon Howkins <simonh@symbian.org>
parents: 89
diff changeset
   224
			m{^epoc32/}i;
5b27412eeaf0 Removed obsolete variable (@includes).
Simon Howkins <simonh@symbian.org>
parents: 89
diff changeset
   225
		} @files;
5b27412eeaf0 Removed obsolete variable (@includes).
Simon Howkins <simonh@symbian.org>
parents: 89
diff changeset
   226
		push @allRndFiles, @files;
456
1ba3c86ebec0 Bug 350 RnD binary zips missing all content outside epoc32 tree
Simon Howkins <simonh@symbian.org>
parents: 455
diff changeset
   227
1ba3c86ebec0 Bug 350 RnD binary zips missing all content outside epoc32 tree
Simon Howkins <simonh@symbian.org>
parents: 455
diff changeset
   228
		if ($licenseType eq "internal")
1ba3c86ebec0 Bug 350 RnD binary zips missing all content outside epoc32 tree
Simon Howkins <simonh@symbian.org>
parents: 455
diff changeset
   229
		{
1ba3c86ebec0 Bug 350 RnD binary zips missing all content outside epoc32 tree
Simon Howkins <simonh@symbian.org>
parents: 455
diff changeset
   230
			# Add a zip object to zip this package from the epoc tree in the postbuild phase
1ba3c86ebec0 Bug 350 RnD binary zips missing all content outside epoc32 tree
Simon Howkins <simonh@symbian.org>
parents: 455
diff changeset
   231
			push @{$zipConfig->{config}->{config}->{"rnd-postbuild"}->{config}},
1ba3c86ebec0 Bug 350 RnD binary zips missing all content outside epoc32 tree
Simon Howkins <simonh@symbian.org>
parents: 455
diff changeset
   232
			{
1ba3c86ebec0 Bug 350 RnD binary zips missing all content outside epoc32 tree
Simon Howkins <simonh@symbian.org>
parents: 455
diff changeset
   233
				name => $postbuildName,
1ba3c86ebec0 Bug 350 RnD binary zips missing all content outside epoc32 tree
Simon Howkins <simonh@symbian.org>
parents: 455
diff changeset
   234
				set =>
1ba3c86ebec0 Bug 350 RnD binary zips missing all content outside epoc32 tree
Simon Howkins <simonh@symbian.org>
parents: 455
diff changeset
   235
				[
1ba3c86ebec0 Bug 350 RnD binary zips missing all content outside epoc32 tree
Simon Howkins <simonh@symbian.org>
parents: 455
diff changeset
   236
					{
1ba3c86ebec0 Bug 350 RnD binary zips missing all content outside epoc32 tree
Simon Howkins <simonh@symbian.org>
parents: 455
diff changeset
   237
						name => "name",
1ba3c86ebec0 Bug 350 RnD binary zips missing all content outside epoc32 tree
Simon Howkins <simonh@symbian.org>
parents: 455
diff changeset
   238
						value=> $postbuildName,
1ba3c86ebec0 Bug 350 RnD binary zips missing all content outside epoc32 tree
Simon Howkins <simonh@symbian.org>
parents: 455
diff changeset
   239
					},
1ba3c86ebec0 Bug 350 RnD binary zips missing all content outside epoc32 tree
Simon Howkins <simonh@symbian.org>
parents: 455
diff changeset
   240
					# Turn the array of files into an array of inclusion hashes
1ba3c86ebec0 Bug 350 RnD binary zips missing all content outside epoc32 tree
Simon Howkins <simonh@symbian.org>
parents: 455
diff changeset
   241
					(map { {name => "include", value => $_ } } @files),
1ba3c86ebec0 Bug 350 RnD binary zips missing all content outside epoc32 tree
Simon Howkins <simonh@symbian.org>
parents: 455
diff changeset
   242
				]
1ba3c86ebec0 Bug 350 RnD binary zips missing all content outside epoc32 tree
Simon Howkins <simonh@symbian.org>
parents: 455
diff changeset
   243
			};
1ba3c86ebec0 Bug 350 RnD binary zips missing all content outside epoc32 tree
Simon Howkins <simonh@symbian.org>
parents: 455
diff changeset
   244
		}
73
b8d6af733d6d Add first cut of packaging solution
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
   245
	}
b8d6af733d6d Add first cut of packaging solution
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
   246
	else
b8d6af733d6d Add first cut of packaging solution
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
   247
	{
484
5efa4ed4b4f8 Added special handling for utilities package, so it's zipped up with the items from the tools layer, rather than as a misc item.
Simon Howkins <simonh@symbian.org>
parents: 461
diff changeset
   248
MISC_PACKAGE:
388
2ab990de5a23 Bug 299 populateziptemplate.pl aborts if it cannot determine the license for a source component
Simon Howkins <simonh@symbian.org>
parents: 380
diff changeset
   249
		(my $dest2 = $package->{dst}) =~ s{[\\/]}{_slash_}g;
2ab990de5a23 Bug 299 populateziptemplate.pl aborts if it cannot determine the license for a source component
Simon Howkins <simonh@symbian.org>
parents: 380
diff changeset
   250
		push @{$zipConfig->{config}->{config}->{src}->{config}->{misc}->{config}},
2ab990de5a23 Bug 299 populateziptemplate.pl aborts if it cannot determine the license for a source component
Simon Howkins <simonh@symbian.org>
parents: 380
diff changeset
   251
		{
2ab990de5a23 Bug 299 populateziptemplate.pl aborts if it cannot determine the license for a source component
Simon Howkins <simonh@symbian.org>
parents: 380
diff changeset
   252
			set =>
2ab990de5a23 Bug 299 populateziptemplate.pl aborts if it cannot determine the license for a source component
Simon Howkins <simonh@symbian.org>
parents: 380
diff changeset
   253
			[
2ab990de5a23 Bug 299 populateziptemplate.pl aborts if it cannot determine the license for a source component
Simon Howkins <simonh@symbian.org>
parents: 380
diff changeset
   254
				{
2ab990de5a23 Bug 299 populateziptemplate.pl aborts if it cannot determine the license for a source component
Simon Howkins <simonh@symbian.org>
parents: 380
diff changeset
   255
					name => "name",
2ab990de5a23 Bug 299 populateziptemplate.pl aborts if it cannot determine the license for a source component
Simon Howkins <simonh@symbian.org>
parents: 380
diff changeset
   256
					value=> "src_misc_$dest2"."_$miscCount",
2ab990de5a23 Bug 299 populateziptemplate.pl aborts if it cannot determine the license for a source component
Simon Howkins <simonh@symbian.org>
parents: 380
diff changeset
   257
				},
2ab990de5a23 Bug 299 populateziptemplate.pl aborts if it cannot determine the license for a source component
Simon Howkins <simonh@symbian.org>
parents: 380
diff changeset
   258
				{
2ab990de5a23 Bug 299 populateziptemplate.pl aborts if it cannot determine the license for a source component
Simon Howkins <simonh@symbian.org>
parents: 380
diff changeset
   259
					name => "include",
2ab990de5a23 Bug 299 populateziptemplate.pl aborts if it cannot determine the license for a source component
Simon Howkins <simonh@symbian.org>
parents: 380
diff changeset
   260
					value => "$package->{dst}/**",
2ab990de5a23 Bug 299 populateziptemplate.pl aborts if it cannot determine the license for a source component
Simon Howkins <simonh@symbian.org>
parents: 380
diff changeset
   261
				},
2ab990de5a23 Bug 299 populateziptemplate.pl aborts if it cannot determine the license for a source component
Simon Howkins <simonh@symbian.org>
parents: 380
diff changeset
   262
			]
2ab990de5a23 Bug 299 populateziptemplate.pl aborts if it cannot determine the license for a source component
Simon Howkins <simonh@symbian.org>
parents: 380
diff changeset
   263
		};
2ab990de5a23 Bug 299 populateziptemplate.pl aborts if it cannot determine the license for a source component
Simon Howkins <simonh@symbian.org>
parents: 380
diff changeset
   264
		$miscCount++;
2ab990de5a23 Bug 299 populateziptemplate.pl aborts if it cannot determine the license for a source component
Simon Howkins <simonh@symbian.org>
parents: 380
diff changeset
   265
		warn "Warning: Cannot determine license for '$package->{source}' - it will be packaged as 'src_misc_$dest2"."_$miscCount'\n";
73
b8d6af733d6d Add first cut of packaging solution
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
   266
	}
b8d6af733d6d Add first cut of packaging solution
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
   267
}
b8d6af733d6d Add first cut of packaging solution
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
   268
b8d6af733d6d Add first cut of packaging solution
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
   269
# Turn the RnD source inclusion lists into a binary exclusion list
b8d6af733d6d Add first cut of packaging solution
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
   270
my @excludes = map { {name => "exclude", value => "$_"} } @allRndFiles;
b8d6af733d6d Add first cut of packaging solution
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
   271
push @{$zipConfig->{config}->{config}->{bin}->{config}->{set}}, @excludes;
b8d6af733d6d Add first cut of packaging solution
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
   272
372
ea854a4b723d Bug 289 Issue in populatezip.pl when doing Platform build in step preprocess-zip-config
Simon Howkins <simonh@symbian.org>
parents: 313
diff changeset
   273
$xml->XMLout($zipConfig, OutputFile => $ftl, XMLDecl => 1, RootName => 'build', keyattr => $keyAttr);
73
b8d6af733d6d Add first cut of packaging solution
Shabe Razvi <shaber@symbian.org>
parents:
diff changeset
   274
111
5b0bc2f89660 Add postbuild RnD packaging. Add .whatlog to os tools build.
Shabe Razvi <shaber@symbian.org>
parents: 108
diff changeset
   275
# Output all rnd files into exclude list for later
247
cfde8b1784f7 Simplified the locations of some generated files, so they are created where they need to be rather than created on one place and moved to another.
Simon Howkins <simonh@symbian.org>
parents: 111
diff changeset
   276
open my $fh, ">", $rndExcludes or die "Cannot write exlude file!";
644
7d99049bc47b Fixed generation of rnd excludes file, so there are the necessary new-lines.
Simon Howkins <simonh@symbian.org>
parents: 614
diff changeset
   277
foreach (@allRndFiles)
7d99049bc47b Fixed generation of rnd excludes file, so there are the necessary new-lines.
Simon Howkins <simonh@symbian.org>
parents: 614
diff changeset
   278
{
7d99049bc47b Fixed generation of rnd excludes file, so there are the necessary new-lines.
Simon Howkins <simonh@symbian.org>
parents: 614
diff changeset
   279
	print $fh "$_\n";
7d99049bc47b Fixed generation of rnd excludes file, so there are the necessary new-lines.
Simon Howkins <simonh@symbian.org>
parents: 614
diff changeset
   280
}
247
cfde8b1784f7 Simplified the locations of some generated files, so they are created where they need to be rather than created on one place and moved to another.
Simon Howkins <simonh@symbian.org>
parents: 111
diff changeset
   281
close $fh;
380
d4dac57985d9 Bug 299 populateziptemplate.pl aborts if it cannot determine the license for a source component
Simon Howkins <simonh@symbian.org>
parents: 372
diff changeset
   282