releaseAutomation/fcls4releasenotes.pl
author Arnaud Lenoir <arnaudl@symbian.org>
Fri, 06 Nov 2009 16:00:20 +0000
changeset 104 b3c9be6eba35
parent 103 b39734cad470
permissions -rw-r--r--
Added the links to the website for each package (may need some improvements).
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
99
5adea361d896 Bug 881: "Automatic creation of release note content broken by config change"
Simon Howkins <simonh@symbian.org>
parents: 98
diff changeset
     1
#!perl -w
80
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
     2
# Copyright (c) 2009 Symbian Foundation Ltd
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
     3
# This component and the accompanying materials are made available
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
     4
# under the terms of the License "Eclipse Public License v1.0"
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
     5
# which accompanies this distribution, and is available
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
     6
# at the URL "http://www.eclipse.org/legal/epl-v10.html".
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
     7
#
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
     8
# Initial Contributors:
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
     9
# Symbian Foundation Ltd - initial contribution.
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
    10
#
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
    11
# Contributors:
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
    12
# Arnaud Lenoir
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
    13
#
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
    14
# Description:
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
    15
# Task 243 - Generate FCLs details between 2 PDKs to be included as part of the release notes
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
    16
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
    17
# Here is the location for the naming convention for the PDKs: http://developer.symbian.org/wiki/index.php/Build_and_Integration
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
    18
99
5adea361d896 Bug 881: "Automatic creation of release note content broken by config change"
Simon Howkins <simonh@symbian.org>
parents: 98
diff changeset
    19
use strict;
5adea361d896 Bug 881: "Automatic creation of release note content broken by config change"
Simon Howkins <simonh@symbian.org>
parents: 98
diff changeset
    20
use Getopt::Long;
5adea361d896 Bug 881: "Automatic creation of release note content broken by config change"
Simon Howkins <simonh@symbian.org>
parents: 98
diff changeset
    21
80
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
    22
#
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
    23
# Configuration data and constants for the script
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
    24
#
102
5407bb741e43 Changed the hard-coded default for the releases location, so at least tonight's candidate build will work OK.
Simon Howkins <simonh@symbian.org>
parents: 99
diff changeset
    25
my $default_pdk_loc='//v800020/Publish/Releases/';
80
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
    26
print "default_pdk_loc=$default_pdk_loc\n";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
    27
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
    28
# Nb of arguments to be passed to the script to work. If that need to change, just modify nb_arg_to_pass!
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
    29
my $nb_arg_to_pass=2;
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
    30
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
    31
# Name of the file that contains the data we need to extract for this script
99
5adea361d896 Bug 881: "Automatic creation of release note content broken by config change"
Simon Howkins <simonh@symbian.org>
parents: 98
diff changeset
    32
my $build_bom_zip_file_to_extract="build_BOM.zip";
5adea361d896 Bug 881: "Automatic creation of release note content broken by config change"
Simon Howkins <simonh@symbian.org>
parents: 98
diff changeset
    33
my $build_logs_zip_file_to_extract="build_logs.zip";
81
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
    34
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
    35
# Name of the file we need to work on to extract the data necessary for the Release Notes from build_BOM.zip
99
5adea361d896 Bug 881: "Automatic creation of release note content broken by config change"
Simon Howkins <simonh@symbian.org>
parents: 98
diff changeset
    36
my $name_of_file_to_compare="build-info.xml";
81
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
    37
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
    38
# File used to extract path and component name for a package from build_logs.zip
98
9edb472725a0 Removed commented code, code which had no effect on the output, some unnecessary \s, and a couple of other basic simplifications.
Simon Howkins <simonh@symbian.org>
parents: 91
diff changeset
    39
my $pckg_extraction_data_file_name = "PkgComponentAnalysisSummary.csv";
81
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
    40
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
    41
# When using the script as part of the build system, we don't have access to the zip files yet, therefore we need to have a look for the file directly
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
    42
# This is working only when using pdkloc2 only. In any other cases we are not bothered!!!!!
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
    43
my $bom_dir="BOM";
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
    44
my $analysis_dir="analysis";
80
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
    45
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
    46
# Pattern used to search for PDKs
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
    47
my $pdk_start_pattern="PDK_";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
    48
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
    49
# Pattern used to extract info from the xml file
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
    50
my $starting_pattern_for_xml_extraction="<name>Sources</name>";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
    51
my $ending_pattern_for_xml_extraction="</project>";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
    52
# Pattern to extract data from the line in the file
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
    53
# Branch type. If not a branch type, we are not interested
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
    54
my $branch_type_extraction_pattern="(MCL|FCL)";
104
b3c9be6eba35 Added the links to the website for each package (may need some improvements).
Arnaud Lenoir <arnaudl@symbian.org>
parents: 103
diff changeset
    55
my $license_type_extraction_pattern="(SFL|OSS)";
80
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
    56
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
    57
my $mcl_cste="MCL";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
    58
my $fcl_cste="FCL";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
    59
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
    60
# package name
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
    61
#/imgeditor/#:86a88f39b644</baseline>
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
    62
# # is used to define the changeset number for mercurial.
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
    63
# Therefore if we have a look what is before "/#", we should always find the package name!!
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
    64
my $package_extraction_pattern = "([^/]+)/?#";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
    65
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
    66
# When that "boolean value is set to 1 or true, then the line we read in the file can be search for the information we want to extract
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
    67
# If $starting_pattern_for_xml_extraction true, then set extraction_from_xml_is_allowed to true/1
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
    68
# If $ending_pattern_for_xml_extraction false, then reset extraction_from_xml_is_allowed to false/0
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
    69
# $ending_pattern_for_xml_extraction is called several times in the program, but this is not a problem as we don't set it to false/0 and therefore do nothing!
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
    70
my $extraction_from_xml_is_allowed=0;
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
    71
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
    72
# Temporary location used to do the work
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
    73
my $working_drive="c:";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
    74
my $working_directory="temp";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
    75
my $working_sub_directory="fcl_extraction";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
    76
my $working_pdk1_directory="pdk1";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
    77
my $working_pdk2_directory="pdk2";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
    78
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
    79
# Name of the file that we are creating to hold the information necessary for the Release Notes
82
dbc58074ae06 Synchronised the output filename to match the other parts of the system generating release note content.
Simon Howkins <simonh@symbian.org>
parents: 81
diff changeset
    80
my $name_of_file_to_publish="releaseNotes.wiki.txt";
80
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
    81
#Location for that file
81
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
    82
# This values need to be overwritten!!!
80
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
    83
my $location_of_file_to_publish="c:\\temp";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
    84
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
    85
#
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
    86
# End configuration data for the script
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
    87
#
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
    88
99
5adea361d896 Bug 881: "Automatic creation of release note content broken by config change"
Simon Howkins <simonh@symbian.org>
parents: 98
diff changeset
    89
# Arguments / Data used for the script
5adea361d896 Bug 881: "Automatic creation of release note content broken by config change"
Simon Howkins <simonh@symbian.org>
parents: 98
diff changeset
    90
my $help = 0;
5adea361d896 Bug 881: "Automatic creation of release note content broken by config change"
Simon Howkins <simonh@symbian.org>
parents: 98
diff changeset
    91
my $publishDir;
80
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
    92
99
5adea361d896 Bug 881: "Automatic creation of release note content broken by config change"
Simon Howkins <simonh@symbian.org>
parents: 98
diff changeset
    93
my @PDK = ({}, {});
81
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
    94
99
5adea361d896 Bug 881: "Automatic creation of release note content broken by config change"
Simon Howkins <simonh@symbian.org>
parents: 98
diff changeset
    95
GetOptions((
5adea361d896 Bug 881: "Automatic creation of release note content broken by config change"
Simon Howkins <simonh@symbian.org>
parents: 98
diff changeset
    96
	'pdknb1=s' => \$PDK[0]->{number},
5adea361d896 Bug 881: "Automatic creation of release note content broken by config change"
Simon Howkins <simonh@symbian.org>
parents: 98
diff changeset
    97
	'pdknb2=s' => \$PDK[1]->{number},
5adea361d896 Bug 881: "Automatic creation of release note content broken by config change"
Simon Howkins <simonh@symbian.org>
parents: 98
diff changeset
    98
	'pdkname1=s' => \$PDK[0]->{name},
5adea361d896 Bug 881: "Automatic creation of release note content broken by config change"
Simon Howkins <simonh@symbian.org>
parents: 98
diff changeset
    99
	'pdkname2=s' => \$PDK[1]->{name},
5adea361d896 Bug 881: "Automatic creation of release note content broken by config change"
Simon Howkins <simonh@symbian.org>
parents: 98
diff changeset
   100
	'pdkloc1=s' => \$PDK[0]->{loc},
5adea361d896 Bug 881: "Automatic creation of release note content broken by config change"
Simon Howkins <simonh@symbian.org>
parents: 98
diff changeset
   101
	'pdkloc2=s' => \$PDK[1]->{loc},
5adea361d896 Bug 881: "Automatic creation of release note content broken by config change"
Simon Howkins <simonh@symbian.org>
parents: 98
diff changeset
   102
	'publish=s' => \$publishDir,
5adea361d896 Bug 881: "Automatic creation of release note content broken by config change"
Simon Howkins <simonh@symbian.org>
parents: 98
diff changeset
   103
	'help!' => \$help,
5adea361d896 Bug 881: "Automatic creation of release note content broken by config change"
Simon Howkins <simonh@symbian.org>
parents: 98
diff changeset
   104
));
5adea361d896 Bug 881: "Automatic creation of release note content broken by config change"
Simon Howkins <simonh@symbian.org>
parents: 98
diff changeset
   105
5adea361d896 Bug 881: "Automatic creation of release note content broken by config change"
Simon Howkins <simonh@symbian.org>
parents: 98
diff changeset
   106
if ($help)
80
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   107
{
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   108
	helpme();
99
5adea361d896 Bug 881: "Automatic creation of release note content broken by config change"
Simon Howkins <simonh@symbian.org>
parents: 98
diff changeset
   109
	exit(0);
80
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   110
}
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   111
99
5adea361d896 Bug 881: "Automatic creation of release note content broken by config change"
Simon Howkins <simonh@symbian.org>
parents: 98
diff changeset
   112
foreach my $pdkCount (0 .. $#PDK)
5adea361d896 Bug 881: "Automatic creation of release note content broken by config change"
Simon Howkins <simonh@symbian.org>
parents: 98
diff changeset
   113
{
103
b39734cad470 Corrected new argument checking.
Simon Howkins <simonh@symbian.org>
parents: 102
diff changeset
   114
	if (0 == scalar (grep { defined $_ } values %{$PDK[$pdkCount]}))
99
5adea361d896 Bug 881: "Automatic creation of release note content broken by config change"
Simon Howkins <simonh@symbian.org>
parents: 98
diff changeset
   115
	{
5adea361d896 Bug 881: "Automatic creation of release note content broken by config change"
Simon Howkins <simonh@symbian.org>
parents: 98
diff changeset
   116
		print "No data provided to identify PDK", $pdkCount + 1, "\n";
5adea361d896 Bug 881: "Automatic creation of release note content broken by config change"
Simon Howkins <simonh@symbian.org>
parents: 98
diff changeset
   117
		helpme();
5adea361d896 Bug 881: "Automatic creation of release note content broken by config change"
Simon Howkins <simonh@symbian.org>
parents: 98
diff changeset
   118
		exit (1);
5adea361d896 Bug 881: "Automatic creation of release note content broken by config change"
Simon Howkins <simonh@symbian.org>
parents: 98
diff changeset
   119
	}
5adea361d896 Bug 881: "Automatic creation of release note content broken by config change"
Simon Howkins <simonh@symbian.org>
parents: 98
diff changeset
   120
	if (scalar (grep { defined $_ } values %{$PDK[$pdkCount]}) > 1)
5adea361d896 Bug 881: "Automatic creation of release note content broken by config change"
Simon Howkins <simonh@symbian.org>
parents: 98
diff changeset
   121
	{
5adea361d896 Bug 881: "Automatic creation of release note content broken by config change"
Simon Howkins <simonh@symbian.org>
parents: 98
diff changeset
   122
		print "Multiple data provided to identify PDK", $pdkCount + 1, "\n";
5adea361d896 Bug 881: "Automatic creation of release note content broken by config change"
Simon Howkins <simonh@symbian.org>
parents: 98
diff changeset
   123
		print values %{$PDK[$pdkCount]};
5adea361d896 Bug 881: "Automatic creation of release note content broken by config change"
Simon Howkins <simonh@symbian.org>
parents: 98
diff changeset
   124
		helpme();
5adea361d896 Bug 881: "Automatic creation of release note content broken by config change"
Simon Howkins <simonh@symbian.org>
parents: 98
diff changeset
   125
		exit (1);
5adea361d896 Bug 881: "Automatic creation of release note content broken by config change"
Simon Howkins <simonh@symbian.org>
parents: 98
diff changeset
   126
	}
5adea361d896 Bug 881: "Automatic creation of release note content broken by config change"
Simon Howkins <simonh@symbian.org>
parents: 98
diff changeset
   127
}
80
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   128
99
5adea361d896 Bug 881: "Automatic creation of release note content broken by config change"
Simon Howkins <simonh@symbian.org>
parents: 98
diff changeset
   129
my $pdknb1 = $PDK[0]->{number} || "";
5adea361d896 Bug 881: "Automatic creation of release note content broken by config change"
Simon Howkins <simonh@symbian.org>
parents: 98
diff changeset
   130
my $pdkname1 = $PDK[0]->{name} || "";
5adea361d896 Bug 881: "Automatic creation of release note content broken by config change"
Simon Howkins <simonh@symbian.org>
parents: 98
diff changeset
   131
my $pdkloc1 = $PDK[0]->{loc} || "";
80
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   132
99
5adea361d896 Bug 881: "Automatic creation of release note content broken by config change"
Simon Howkins <simonh@symbian.org>
parents: 98
diff changeset
   133
my $pdknb2 = $PDK[1]->{number} || "";
5adea361d896 Bug 881: "Automatic creation of release note content broken by config change"
Simon Howkins <simonh@symbian.org>
parents: 98
diff changeset
   134
my $pdkname2 = $PDK[1]->{name} || "";
5adea361d896 Bug 881: "Automatic creation of release note content broken by config change"
Simon Howkins <simonh@symbian.org>
parents: 98
diff changeset
   135
my $pdkloc2 = $PDK[1]->{loc} || "";
80
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   136
98
9edb472725a0 Removed commented code, code which had no effect on the output, some unnecessary \s, and a couple of other basic simplifications.
Simon Howkins <simonh@symbian.org>
parents: 91
diff changeset
   137
print "pdknb1=$pdknb1\n";
9edb472725a0 Removed commented code, code which had no effect on the output, some unnecessary \s, and a couple of other basic simplifications.
Simon Howkins <simonh@symbian.org>
parents: 91
diff changeset
   138
print "pdknb2=$pdknb2\n";
9edb472725a0 Removed commented code, code which had no effect on the output, some unnecessary \s, and a couple of other basic simplifications.
Simon Howkins <simonh@symbian.org>
parents: 91
diff changeset
   139
print "pdkname1=$pdkname1\n";
9edb472725a0 Removed commented code, code which had no effect on the output, some unnecessary \s, and a couple of other basic simplifications.
Simon Howkins <simonh@symbian.org>
parents: 91
diff changeset
   140
print "pdkname2=$pdkname2\n";
9edb472725a0 Removed commented code, code which had no effect on the output, some unnecessary \s, and a couple of other basic simplifications.
Simon Howkins <simonh@symbian.org>
parents: 91
diff changeset
   141
print "pdkloc1=$pdkloc1\n";
9edb472725a0 Removed commented code, code which had no effect on the output, some unnecessary \s, and a couple of other basic simplifications.
Simon Howkins <simonh@symbian.org>
parents: 91
diff changeset
   142
print "pdkloc2=$pdkloc2\n";
9edb472725a0 Removed commented code, code which had no effect on the output, some unnecessary \s, and a couple of other basic simplifications.
Simon Howkins <simonh@symbian.org>
parents: 91
diff changeset
   143
print "help=$help\n";
80
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   144
99
5adea361d896 Bug 881: "Automatic creation of release note content broken by config change"
Simon Howkins <simonh@symbian.org>
parents: 98
diff changeset
   145
# Use the specified release location if supplied
5adea361d896 Bug 881: "Automatic creation of release note content broken by config change"
Simon Howkins <simonh@symbian.org>
parents: 98
diff changeset
   146
$default_pdk_loc = $publishDir || $default_pdk_loc;
5adea361d896 Bug 881: "Automatic creation of release note content broken by config change"
Simon Howkins <simonh@symbian.org>
parents: 98
diff changeset
   147
$default_pdk_loc =~ s{([^/\\])$}{$1\\};
80
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   148
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   149
# First PDK to check
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   150
my $pdk_path1="";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   151
my $pdk_complete_name1=0;
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   152
my $pdk_complete_path1=0;
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   153
my $pdk_path1_exist=0;
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   154
my $pdk_zip1_exit=0; # Not necessary
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   155
my $pdk1_correct_name_to_use="";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   156
my $loc1_contains_the_zip_file_we_need=0;
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   157
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   158
# Second PDK to check
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   159
my $pdk_path2="";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   160
my $pdk_complete_name2=0;
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   161
my $pdk_complete_path2=0;
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   162
my $pdk_path2_exist=0;
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   163
my $pdk_zip2_exist=0; # Not necessary
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   164
my $pdk2_correct_name_to_use="";
81
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   165
my $loc2_contains_the_zip_file_we_need=0;		# Used to indicate that we have found the build_BOM.zip file
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   166
my $loc2_contains_the_xml_csv_files_we_need=0;	# Used to indicate that we have found the build-info.xml and PkgComponentAnalysisSummary.csv
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   167
my $nb_of_xml_csv_files_we_need=2;	# Used to define the number of files we need to have a look at when we are not looking for zip files.
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   168
my $nb_of_zip_files_we_need=2;	# Used to define the number of files we need to have a look at when we are looking for zip files.
80
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   169
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   170
# Default directory management
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   171
my @directories_list_default_location=();
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   172
my $nb_dir_in_default_loc;
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   173
my @pdk_dir_list_in_default_location=();
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   174
my @pdks_with_valid_zip_in_default_loc=();
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   175
my $nb_pdks_with_valid_zip_in_default_loc=0;
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   176
my @find_pdk_for_corresponding_nb1=();
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   177
my $nb_of_pdk_for_corresponding_nb1=0;
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   178
my @find_pdk_for_corresponding_nb2=();
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   179
my $nb_of_pdk_for_corresponding_nb2=0;
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   180
my @find_pdk_for_corresponding_name1=();
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   181
my $nb_of_pdk_for_corresponding_name1=0;
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   182
my @find_pdk_for_corresponding_name2=();
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   183
my $nb_of_pdk_for_corresponding_name2=0;
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   184
my @read_files_in_loc=();
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   185
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   186
# Data / statistics to be displayed in the release notes
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   187
# We consider that pdk1 is the old version and pdk2 is the new version.
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   188
# Note that for the moment, the scripts is not able to make sure that the old version of the pdk is set as pdk1 and the new version of the pdk is set as pdk2!!!!!
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   189
# Can be done for pdknb and pdkname but not for pdkloc as for the moment, no way to find out the pdk version from the build-info.xmL!!!!
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   190
# Totals
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   191
my $total_packages_pdk1=0;		# Nb of packages included in the pdk1
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   192
my $total_packages_pdk2=0;		# Nb of packages included in the pdk2
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   193
my $total_packages_added=0;		# Nb of packages added in the pdk2
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   194
my $total_packages_removed=0;	# Nb of packages removed from the pdk2
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   195
my $total_new_fcl=0;			# Nb of packages that are now on fcl in pdk2 (means were mcl in pdk1 and are now fcl in pdk2)
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   196
my $total_no_more_fcl=0;		# Nb of packages that are no more on fcl in pdk2 (means were fcl in pdk1 and are now mcl in pdk2)
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   197
my $total_still_fcl=0;			# Nb of packages that are still on fcl in pdk2 (means were fcl in pdk1 and are still fcl in pdk2)
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   198
my $total_very_good_mcl=0;		# Nb of packages that are very good on mcl in pdk1 and pdk2 (means were on mcl in pdk1 and are still mcl in pdk2)
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   199
# Tables
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   200
my @pdk1_sorting_table;			# Table for pdk1 that is used to sort out and compare the 2 pdks
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   201
my @pdk2_sorting_table;			# Table for pdk2 that is used to sort out and compare the 2 pdks
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   202
my @packages_added_table;		# Table that contains the packages that have been added to pdk2
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   203
my @packages_removed_table;		# Table that contains the packages that have been deleted from pdk2
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   204
my @new_fcl_table;				# Table containing the packages that are now on fcl in pdk2 (means were mcl in pdk1 and are now fcl in pdk2)
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   205
my @no_more_fcl_table;			# Table containing the packages that are no more on fcl in pdk2 (means were fcl in pdk1 and are now mcl in pdk2)
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   206
my @still_fcl_table;			# Table containing the packages that are still on fcl in pdk2 (means were fcl in pdk1 and are still fcl in pdk2)
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   207
my @very_good_mcl_table;		# Table containing the packages that are very good on mcl in pdk1 and pdk2 (means were on mcl in pdk1 and are still mcl in pdk2)
81
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   208
my %pckg_path_name_array;		# Table containing the path for each packages
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   209
my %pckg_name_array;			# Table containing the real meaning name for each packages, not the name of the package in the directory structure
104
b3c9be6eba35 Added the links to the website for each package (may need some improvements).
Arnaud Lenoir <arnaudl@symbian.org>
parents: 103
diff changeset
   210
my %pckg_license_array;			# Table containing the type of license (oss or sfl) for each packages
b3c9be6eba35 Added the links to the website for each package (may need some improvements).
Arnaud Lenoir <arnaudl@symbian.org>
parents: 103
diff changeset
   211
my %pckg_branch_array;			# Table containing the type of branch (MCL or FCL) for each packages
80
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   212
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   213
if($pdknb1)
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   214
{
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   215
	$pdk_path1 = $default_pdk_loc;
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   216
	$pdk_complete_name1=1;
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   217
	$pdk_complete_path1=1;
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   218
}
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   219
if($pdknb2)
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   220
{
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   221
	$pdk_path2 = $default_pdk_loc;
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   222
	$pdk_complete_name2=1;
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   223
	$pdk_complete_path2=1;
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   224
}
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   225
if($pdkname1)
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   226
{
99
5adea361d896 Bug 881: "Automatic creation of release note content broken by config change"
Simon Howkins <simonh@symbian.org>
parents: 98
diff changeset
   227
	$pdk_path1 = $default_pdk_loc;	
5adea361d896 Bug 881: "Automatic creation of release note content broken by config change"
Simon Howkins <simonh@symbian.org>
parents: 98
diff changeset
   228
	$pdk_complete_path1=1;	
80
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   229
}
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   230
if($pdkname2)
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   231
{
99
5adea361d896 Bug 881: "Automatic creation of release note content broken by config change"
Simon Howkins <simonh@symbian.org>
parents: 98
diff changeset
   232
	$pdk_path2 = $default_pdk_loc;	
5adea361d896 Bug 881: "Automatic creation of release note content broken by config change"
Simon Howkins <simonh@symbian.org>
parents: 98
diff changeset
   233
	$pdk_complete_path2=1;
80
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   234
}
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   235
if($pdkloc1)
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   236
{
99
5adea361d896 Bug 881: "Automatic creation of release note content broken by config change"
Simon Howkins <simonh@symbian.org>
parents: 98
diff changeset
   237
	$pdk_path1 = $pdkloc1;
80
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   238
}
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   239
if($pdkloc2)
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   240
{
99
5adea361d896 Bug 881: "Automatic creation of release note content broken by config change"
Simon Howkins <simonh@symbian.org>
parents: 98
diff changeset
   241
	$pdk_path2 = $pdkloc2;
80
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   242
}
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   243
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   244
print "pdk_path1=$pdk_path1\n";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   245
print "pdk_complete_name1=$pdk_complete_name1\n";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   246
print "pdk_complete_path1=$pdk_complete_path1\n";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   247
print "\n";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   248
print "pdk_path2=$pdk_path2\n";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   249
print "pdk_complete_name2=$pdk_complete_name2\n";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   250
print "pdk_complete_path2=$pdk_complete_path2\n";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   251
print "\n\n";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   252
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   253
# Get directory listing of all directories in the default location $default_pdk_loc
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   254
extract_dir_default_loc();
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   255
extract_pdk_in_default_loc();
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   256
extract_pdk_with_valid_zip_in_default_loc();
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   257
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   258
# Compose path if necessary.
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   259
print "\n";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   260
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   261
my $find_val=0;
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   262
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   263
if ($pdk_complete_path1)
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   264
{
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   265
	if ($pdk_complete_name1)
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   266
	{
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   267
		print "We have the PDK number, we need to define if possible the PDK name and therefore the path to the PDK\n";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   268
		# Have a look in the default directory if there is a PDK with that number. If none or more than one with the same id, returns the list of PDKs with that same number
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   269
		foreach $find_val (@pdks_with_valid_zip_in_default_loc)
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   270
		{
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   271
			if($find_val =~ /$pdknb1/i)
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   272
			{
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   273
				$find_pdk_for_corresponding_nb1[$nb_of_pdk_for_corresponding_nb1++]=$find_val;
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   274
			}
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   275
		}
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   276
		print "Table find_pdk_for_corresponding_nb1 is:\n";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   277
		display_array_one_line_at_the_time(@find_pdk_for_corresponding_nb1);
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   278
		
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   279
		if($nb_of_pdk_for_corresponding_nb1==1)
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   280
		{
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   281
			print "There is only $nb_of_pdk_for_corresponding_nb1 PDK with the name corresponding to the PDK number given, we can keep going!\n";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   282
		}
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   283
		else
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   284
		{
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   285
			print "There is $nb_of_pdk_for_corresponding_nb1 PDKs with the same name, please select one in the list above and run the perl script again with the right PDK name\n";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   286
			exit(0);
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   287
		}
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   288
		
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   289
		#extract PDK name if only one
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   290
		$pdk1_correct_name_to_use = $find_pdk_for_corresponding_nb1[0];
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   291
		$pdk_path1 .= $find_pdk_for_corresponding_nb1[0];
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   292
		print "pdknb1 = $pdknb1\n";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   293
	}
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   294
	else
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   295
	{
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   296
		print "We have the PDK Name therefore we can define the path to the PDK\n";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   297
90
e45faf323a50 Correct problem with the name entered as parameter because it was exiting if 2 PDKs starting with the same name
Arnaud Lenoir
parents: 87
diff changeset
   298
		$pdk1_correct_name_to_use = $pdkname1;
e45faf323a50 Correct problem with the name entered as parameter because it was exiting if 2 PDKs starting with the same name
Arnaud Lenoir
parents: 87
diff changeset
   299
		$pdk_path1 .= $pdkname1;
80
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   300
	}
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   301
	print "The PDK used is: $pdk1_correct_name_to_use\n";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   302
	print "pdk_path1 = $pdk_path1\n";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   303
}
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   304
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   305
$find_val=0;
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   306
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   307
if ($pdk_complete_path2)
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   308
{
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   309
	if ($pdk_complete_name2)
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   310
	{
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   311
		print "We have the PDK number, we need to define if possible the PDK name and therefore the path to the PDK\n";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   312
		# Have a look in the default directory if there is a PDK with that number. If none or more than one with the same id, returns the list of PDKs with that same number
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   313
		foreach $find_val (@pdks_with_valid_zip_in_default_loc)
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   314
		{
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   315
			if($find_val =~ /$pdknb2/i)
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   316
			{
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   317
				$find_pdk_for_corresponding_nb2[$nb_of_pdk_for_corresponding_nb2++]=$find_val;
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   318
			}
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   319
		}
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   320
		print "Table find_pdk_for_corresponding_nb is:\n";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   321
		display_array_one_line_at_the_time(@find_pdk_for_corresponding_nb2);
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   322
		
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   323
		if($nb_of_pdk_for_corresponding_nb2==1)
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   324
		{
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   325
			print "There is only $nb_of_pdk_for_corresponding_nb2 PDK with the name corresponding to the PDK number given, we can keep going!\n";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   326
		}
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   327
		else
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   328
		{
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   329
			print "There is $nb_of_pdk_for_corresponding_nb2 PDKs with the same name, please select one in the list above and run the perl script again with the right PDK name\n";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   330
			exit(0);
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   331
		}
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   332
		
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   333
		#extract PDK name if only one
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   334
		$pdk2_correct_name_to_use = $find_pdk_for_corresponding_nb2[0];
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   335
		$pdk_path2 .= $find_pdk_for_corresponding_nb2[0];
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   336
		print "pdknb2 = $pdknb2\n";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   337
	}
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   338
	else
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   339
	{
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   340
		print "We have the PDK Name therefore we can define the path to the PDK\n";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   341
	
90
e45faf323a50 Correct problem with the name entered as parameter because it was exiting if 2 PDKs starting with the same name
Arnaud Lenoir
parents: 87
diff changeset
   342
		$pdk2_correct_name_to_use = $pdkname2;
e45faf323a50 Correct problem with the name entered as parameter because it was exiting if 2 PDKs starting with the same name
Arnaud Lenoir
parents: 87
diff changeset
   343
		$pdk_path2 .= $pdkname2;
80
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   344
	}
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   345
	print "The PDK used is: $pdk2_correct_name_to_use\n";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   346
	print "pdk_path2 = $pdk_path2\n";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   347
}
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   348
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   349
# Find out if the locations are correct or not. We just need to make sure that the location contains the build_BOM.zip, if it's the case, then bingo! If not, exit the program.
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   350
my $loc_var;
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   351
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   352
if($pdkloc1)
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   353
{
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   354
	# Get the list of file in the location choosen.
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   355
	opendir(LOC1_DIR, $pdkloc1);
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   356
	@read_files_in_loc = readdir(LOC1_DIR);
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   357
	close(LOC1_DIR);
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   358
	
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   359
	foreach $loc_var (@read_files_in_loc)
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   360
	{
81
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   361
		if($loc_var =~ /$build_bom_zip_file_to_extract$/)
80
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   362
		{
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   363
			print "We found the file: $loc_var\n";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   364
			
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   365
			$pdk1_correct_name_to_use = "PDK1";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   366
			$pdk_path1 = $pdkloc1;
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   367
			
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   368
			print "The PDK used is: $pdk1_correct_name_to_use\n";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   369
			print "pdk_path1 = $pdk_path1\n";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   370
			$loc1_contains_the_zip_file_we_need=1;
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   371
			
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   372
			# As we have found the file, we can probably break!
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   373
		}
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   374
	}
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   375
	if(!$loc1_contains_the_zip_file_we_need)
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   376
	{
81
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   377
		print "We can't find the file $build_bom_zip_file_to_extract in the location $pdkloc2 and therefore we can't go any further!!\n";
80
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   378
		exit(0);
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   379
	}
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   380
}
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   381
print "\n";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   382
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   383
if($pdkloc2)
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   384
{
81
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   385
	# Have a look at the zip files in the location choosen.
80
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   386
	opendir(LOC2_DIR, $pdkloc2);
81
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   387
	@read_files_in_loc = readdir(LOC2_DIR);	# Need to have a look at the sub directories too!!!!!!
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   388
	close(LOC2_DIR);	
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   389
	print "List of files in the directory: @read_files_in_loc\n";
80
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   390
	
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   391
	foreach $loc_var (@read_files_in_loc)
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   392
	{
81
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   393
		# Have a look for build_bom.zip and build_logs.zip
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   394
		if( ($loc_var =~ /$build_bom_zip_file_to_extract$/) || ($loc_var =~ /$build_logs_zip_file_to_extract$/) )
80
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   395
		{
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   396
			print "We found the file: $loc_var\n";
81
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   397
			$loc2_contains_the_zip_file_we_need++;
80
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   398
		}
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   399
	}
81
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   400
	
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   401
	if(!$loc2_contains_the_zip_file_we_need) # If we have the zip file, no need to have a look for the csv and xml files!
80
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   402
	{
81
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   403
		my $local_var_path;
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   404
		
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   405
		print "We are checking for xml file\n";
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   406
		$local_var_path = "$pdkloc2\\$bom_dir";
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   407
		print "local_var_path = $local_var_path\n";
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   408
		
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   409
		opendir(LOCBOM_DIR, $local_var_path);
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   410
		@read_files_in_loc = readdir(LOCBOM_DIR);
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   411
		close(LOCBOM_DIR);
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   412
		
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   413
		print "List of files in the directory: @read_files_in_loc\n";
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   414
		
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   415
		foreach $loc_var (@read_files_in_loc)
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   416
		{			
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   417
			if($loc_var =~ /$name_of_file_to_compare$/)
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   418
			{
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   419
				print "We are in the case of the build and instead of looking for zip files, we need to have a look for $name_of_file_to_compare\n";
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   420
				
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   421
				print "We found the file: $loc_var\n";
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   422
				
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   423
				$loc2_contains_the_xml_csv_files_we_need++;
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   424
			}
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   425
		}
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   426
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   427
		print "We are checking for csv file\n";
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   428
		$local_var_path = "$pdkloc2\\$analysis_dir";
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   429
		print "local_var_path = $local_var_path\n";
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   430
		
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   431
		opendir(LOCANALYSIS_DIR, $local_var_path);
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   432
		@read_files_in_loc = readdir(LOCANALYSIS_DIR);
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   433
		close(LOCANALYSIS_DIR);
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   434
		
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   435
		print "List of files in the directory: @read_files_in_loc\n";
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   436
		
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   437
		foreach $loc_var (@read_files_in_loc)
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   438
		{
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   439
			if($loc_var =~ /$pckg_extraction_data_file_name$/)
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   440
			{
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   441
				print "We are in the case of the build and instead of looking for zip files, we need to have a look for $pckg_extraction_data_file_name\n";
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   442
				
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   443
				print "We found the file: $loc_var\n";
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   444
				
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   445
				$loc2_contains_the_xml_csv_files_we_need++;
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   446
			}
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   447
		}
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   448
	}
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   449
	if(($loc2_contains_the_zip_file_we_need==$nb_of_zip_files_we_need) || ($loc2_contains_the_xml_csv_files_we_need==$nb_of_xml_csv_files_we_need))
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   450
	{
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   451
		$pdk2_correct_name_to_use = "PDK2";
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   452
		$pdk_path2 = $pdkloc2;
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   453
		
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   454
		print "The PDK used is: $pdk2_correct_name_to_use\n";
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   455
		print "pdk_path2 = $pdk_path2\n";
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   456
		
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   457
		if($loc2_contains_the_xml_csv_files_we_need==$nb_of_xml_csv_files_we_need)
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   458
		{
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   459
			$location_of_file_to_publish=$pdkloc2;
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   460
			print "location_of_file_to_publish=$location_of_file_to_publish\n";
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   461
		}
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   462
	}
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   463
	else
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   464
	{
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   465
		if($loc2_contains_the_xml_csv_files_we_need<=$nb_of_xml_csv_files_we_need)
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   466
		{
98
9edb472725a0 Removed commented code, code which had no effect on the output, some unnecessary \s, and a couple of other basic simplifications.
Simon Howkins <simonh@symbian.org>
parents: 91
diff changeset
   467
			print "We can't find the files $name_of_file_to_compare and/or $pckg_extraction_data_file_name in the location $pdkloc2 and therefore we can't go any further!!\n";
81
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   468
		}
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   469
		else
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   470
		{
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   471
			print "We can't find the files $build_bom_zip_file_to_extract in the location $pdkloc2 and therefore we can't go any further!!\n";
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   472
		}
80
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   473
		exit(0);
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   474
	}
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   475
}
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   476
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   477
print "\n";
81
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   478
print "If we are here, this means that both $build_bom_zip_file_to_extract have been found and we can start the real work to compare the 2 files to extract what we need!\n";
80
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   479
print "This is the value for the path we are looking at for pdk_path1: $pdk_path1\n";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   480
print "This is the value for the path we are looking at for pdk_path2: $pdk_path2\n";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   481
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   482
# When we are at this point, we know we have 2 build_BOM.zip files that we can compare them!!!!
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   483
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   484
my $system_cmd = "";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   485
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   486
my $working_dir="$working_drive\\$working_directory\\$working_sub_directory";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   487
my $working_dir1="$working_drive\\$working_directory\\$working_sub_directory\\$working_pdk1_directory";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   488
my $working_dir2="$working_drive\\$working_directory\\$working_sub_directory\\$working_pdk2_directory";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   489
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   490
# 1st step is to extract the 2 zip files to allow us to have access to build-info.xml
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   491
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   492
# Extract just one file from the zip file using "7z e -r -oOutput_Directory"
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   493
#7z e -r build_BOM.zip build-info.xml
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   494
# Where 7z is the unzip program
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   495
# Where e is for extraction of a file
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   496
# Where -r is for recursive to make sure we have a look in the subdirectories
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   497
# Where -oOutput_Directory is the directory where we want the files to be unzipped
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   498
#
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   499
# Where $working_sub_directory is the directory where we will be carry the work to be done for the script.
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   500
# Where $working_pdk1_directory is the subdirectory destination for the PDK1
81
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   501
# Where $build_bom_zip_file_to_extract is the name of the zip file (in our case: build_BOM.zip)
80
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   502
# Where $pdk_path1 is the place where the zip file to unzip is
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   503
# where $name_of_file_to_compare is the name of the file we want to extract from the zip file (in our case: build-info.xml)
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   504
# Example: 7z e -r -oc:\temp\fcl_extraction\pdk1 C:\temp\Task243Test\PDK_1\build_BOM.zip build-info.xml
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   505
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   506
# Extract file from 1st PDK
81
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   507
$system_cmd = "7z e -r -o$working_dir1 $pdk_path1\\$build_bom_zip_file_to_extract $name_of_file_to_compare";
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   508
print "Exec: $system_cmd\n";
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   509
system($system_cmd);
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   510
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   511
print "\n";
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   512
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   513
# Extract the information contained in PkgComponentAnalysisSummary.csv for path a nd package name used by PDK1.
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   514
$system_cmd = "7z e -r -o$working_dir1 $pdk_path1\\$build_logs_zip_file_to_extract $pckg_extraction_data_file_name";
80
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   515
print "Exec: $system_cmd\n";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   516
system($system_cmd);
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   517
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   518
print "\n";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   519
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   520
# Extract file from 2nd PDK
81
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   521
if($loc2_contains_the_xml_csv_files_we_need==$nb_of_xml_csv_files_we_need)
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   522
{
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   523
	my $local_file_path;
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   524
	print "We are copying the files $name_of_file_to_compare and $pckg_extraction_data_file_name from $pdk_path2 to $working_dir2\n";
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   525
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   526
	print "Create directory $working_dir2\n";
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   527
	$system_cmd = "mkdir $working_dir2";
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   528
	print "Exec: $system_cmd\n";
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   529
	system($system_cmd);
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   530
	
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   531
	print "We are going to copy $name_of_file_to_compare to $working_dir2\n";
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   532
	$local_file_path = "$pdk_path2\\$bom_dir\\$name_of_file_to_compare";
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   533
	$system_cmd = "xcopy $local_file_path $working_dir2 \/F";
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   534
	print "Exec: $system_cmd\n";
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   535
	system($system_cmd);
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   536
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   537
	print "\n";
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   538
	
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   539
	# Extract the information contained in PkgComponentAnalysisSummary.csv for path and package name used by PDK1.
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   540
	print "We are going to copy $pckg_extraction_data_file_name to $working_dir2\n";
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   541
	$local_file_path = "$pdk_path2\\$analysis_dir\\$pckg_extraction_data_file_name";
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   542
	$system_cmd = "xcopy $local_file_path $working_dir2 \/F";
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   543
	print "Exec: $system_cmd\n";
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   544
	system($system_cmd);
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   545
}
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   546
else
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   547
{
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   548
	print "We are looking for zip files, then we extract them\n";
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   549
	$system_cmd = "7z e -r -o$working_dir2 $pdk_path2\\$build_bom_zip_file_to_extract $name_of_file_to_compare";
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   550
	print "Exec: $system_cmd\n";
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   551
	system($system_cmd);
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   552
	
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   553
	print "\n";
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   554
	
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   555
	# Extract the information contained in PkgComponentAnalysisSummary.csv for path and package name used by PDK1.
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   556
	$system_cmd = "7z e -r -o$working_dir2 $pdk_path2\\$build_logs_zip_file_to_extract $pckg_extraction_data_file_name";
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   557
	print "Exec: $system_cmd\n";
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   558
	system($system_cmd);
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   559
}
80
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   560
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   561
# 2nd step is to extract the information we need from the 2 files build-info.xml
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   562
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   563
# Create 2 hash arrays that will contain the name of the package as key and the value associated as MCL or FCL
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   564
my %build_info_xml1;
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   565
my %build_info_xml2;
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   566
my @sorting_build_info_xml1;
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   567
my @sorting_build_info_xml2;
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   568
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   569
my $key;
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   570
# Define the path for the files to work on
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   571
my $path_to_pdk1_file_to_work_on="$working_dir1\\$name_of_file_to_compare";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   572
my $path_to_pdk2_file_to_work_on="$working_dir2\\$name_of_file_to_compare";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   573
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   574
print "\n";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   575
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   576
my $count_packages=0;
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   577
my @not_sorted_table;
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   578
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   579
# Keep only what we need and keep it safe somewhere.
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   580
# pdk1
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   581
%build_info_xml1 = extract_packages_and_branch_type_from_file($path_to_pdk1_file_to_work_on);
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   582
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   583
print "%build_info_xml1:\n";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   584
# Define the number of packages for pdk1
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   585
$total_packages_pdk1 = keys %build_info_xml1;
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   586
print "\nThere is $total_packages_pdk1 packages for $pdk1_correct_name_to_use\n";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   587
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   588
# 3rd a) step is to sort out the 2 files / table
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   589
# Sort out the tables to facilitate the checking of the different packages
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   590
@not_sorted_table = keys %build_info_xml1;
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   591
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   592
# ascendant alphabetical sort
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   593
@pdk1_sorting_table = sort { lc($a) cmp lc($b) } @not_sorted_table;
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   594
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   595
print "\n";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   596
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   597
# pdk2
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   598
%build_info_xml2 = extract_packages_and_branch_type_from_file($path_to_pdk2_file_to_work_on);
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   599
print "%build_info_xml2:\n";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   600
# Define the number of packages for pdk2
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   601
$total_packages_pdk2 = keys %build_info_xml2;
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   602
print "\nThere is $total_packages_pdk2 packages for $pdk2_correct_name_to_use\n";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   603
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   604
# 3rd b) step is to sort out the 2 files / table
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   605
# Sort out the tables to facilitate the checking of the different packages
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   606
@not_sorted_table = keys %build_info_xml2;
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   607
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   608
# ascendant alphabetical sort
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   609
@pdk2_sorting_table = sort { lc($a) cmp lc($b) } @not_sorted_table;
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   610
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   611
print "\n";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   612
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   613
# 4th step is to compare both data and export it to a file or something similar that is good for media wiki.
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   614
# Compare both files to find out the difference between each packages FCL, MCL, added or deleted packages
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   615
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   616
my $tab_counter1=0;
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   617
my $tab_counter2=0;
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   618
my $compare_2_tables;
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   619
my $value_package_pdk1;
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   620
my $value_package_pdk2;
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   621
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   622
while (($tab_counter1 < $total_packages_pdk1) && ($tab_counter2 < $total_packages_pdk2)) # or should it be ||
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   623
{
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   624
	# $a cmp $b
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   625
	# if $a > $b value returned is 1
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   626
	# if $a = $b value returned is 0
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   627
	# if $a < $b value returned is -1
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   628
	
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   629
	$compare_2_tables = ( $pdk1_sorting_table[$tab_counter1] cmp $pdk2_sorting_table[$tab_counter2] );
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   630
	
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   631
	if(!$compare_2_tables)	# Compare if the the packages in the tables(index) are the same or not, if $compare_2_tables=0, then equal
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   632
	{
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   633
		$value_package_pdk1 = $build_info_xml1{$pdk1_sorting_table[$tab_counter1]};
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   634
		$value_package_pdk2 = $build_info_xml2{$pdk2_sorting_table[$tab_counter2]};
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   635
		
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   636
		if(($value_package_pdk1 eq $mcl_cste) && ($value_package_pdk2 eq $fcl_cste))
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   637
		{
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   638
			$new_fcl_table[$total_new_fcl++] = $pdk1_sorting_table[$tab_counter1];
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   639
		}
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   640
		else
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   641
		{
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   642
			if(($value_package_pdk1 eq $fcl_cste) && ($value_package_pdk2 eq $mcl_cste))
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   643
			{
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   644
				$no_more_fcl_table[$total_no_more_fcl++] = $pdk1_sorting_table[$tab_counter1];
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   645
			}
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   646
			else
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   647
			{
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   648
				if(($value_package_pdk1 eq $fcl_cste) && ($value_package_pdk2 eq $fcl_cste))
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   649
				{
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   650
					$still_fcl_table[$total_still_fcl++] = $pdk1_sorting_table[$tab_counter1];
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   651
				}
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   652
				else
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   653
				{
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   654
					#print "the package was MCL and is still MCL - VERY GOOD\n";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   655
					$very_good_mcl_table[$total_very_good_mcl++] = $pdk1_sorting_table[$tab_counter1];
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   656
				}
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   657
			}
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   658
		}
104
b3c9be6eba35 Added the links to the website for each package (may need some improvements).
Arnaud Lenoir <arnaudl@symbian.org>
parents: 103
diff changeset
   659
		# Build up the list of branch for each package to be used to regenerate links at the end
b3c9be6eba35 Added the links to the website for each package (may need some improvements).
Arnaud Lenoir <arnaudl@symbian.org>
parents: 103
diff changeset
   660
		$pckg_branch_array{$pdk2_sorting_table[$tab_counter2]} = $value_package_pdk2; # copy the value from 2 script parameters at it should be the newest version
b3c9be6eba35 Added the links to the website for each package (may need some improvements).
Arnaud Lenoir <arnaudl@symbian.org>
parents: 103
diff changeset
   661
		#print "package & branch: $pdk2_sorting_table[$tab_counter2] is $value_package_pdk2\n";
b3c9be6eba35 Added the links to the website for each package (may need some improvements).
Arnaud Lenoir <arnaudl@symbian.org>
parents: 103
diff changeset
   662
80
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   663
		$tab_counter1++;
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   664
		$tab_counter2++;
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   665
	}
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   666
	else
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   667
	{
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   668
		# The values are not the same, therefore it must be an added or deleted package
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   669
		if($compare_2_tables<0)	# If $compare_2_tables=-1, then pdk1 is smaller than pdk2, which means that it has been deleted from pdk2
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   670
		{
104
b3c9be6eba35 Added the links to the website for each package (may need some improvements).
Arnaud Lenoir <arnaudl@symbian.org>
parents: 103
diff changeset
   671
			# Build up the list of branch for each package to be used to regenerate links at the end
b3c9be6eba35 Added the links to the website for each package (may need some improvements).
Arnaud Lenoir <arnaudl@symbian.org>
parents: 103
diff changeset
   672
			$pckg_branch_array{$pdk1_sorting_table[$tab_counter1]} = $value_package_pdk1; # copy the value from 2 script parameters at it should be the newest version
b3c9be6eba35 Added the links to the website for each package (may need some improvements).
Arnaud Lenoir <arnaudl@symbian.org>
parents: 103
diff changeset
   673
80
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   674
			$packages_removed_table[$total_packages_removed++]=$pdk1_sorting_table[$tab_counter1++];
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   675
		}
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   676
		else
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   677
		{
104
b3c9be6eba35 Added the links to the website for each package (may need some improvements).
Arnaud Lenoir <arnaudl@symbian.org>
parents: 103
diff changeset
   678
			# Build up the list of branch for each package to be used to regenerate links at the end
b3c9be6eba35 Added the links to the website for each package (may need some improvements).
Arnaud Lenoir <arnaudl@symbian.org>
parents: 103
diff changeset
   679
			$pckg_branch_array{$pdk2_sorting_table[$tab_counter2]} = $value_package_pdk2; # copy the value from 2 script parameters at it should be the newest version
b3c9be6eba35 Added the links to the website for each package (may need some improvements).
Arnaud Lenoir <arnaudl@symbian.org>
parents: 103
diff changeset
   680
80
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   681
			# If $compare_2_tables=1, then pdk1 is bigger than pdk2, which means that it has been added to pdk2
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   682
			$packages_added_table[$total_packages_added++]=$pdk2_sorting_table[$tab_counter2++];
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   683
		}
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   684
	}
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   685
}
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   686
81
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   687
# Build list of files path and name based on csv file generated by the build system (analysis part)
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   688
extract_package_detail("$working_dir2\\$pckg_extraction_data_file_name");
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   689
extract_package_detail("$working_dir1\\$pckg_extraction_data_file_name");
80
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   690
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   691
print "\nPrint all the values related to our calculations\n";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   692
print "total_packages_pdk1=$total_packages_pdk1\n";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   693
print "total_packages_pdk2=$total_packages_pdk2\n";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   694
print "\n";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   695
print "total_packages_added=$total_packages_added\n";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   696
print "total_packages_removed=$total_packages_removed\n";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   697
print "total_new_fcl=$total_new_fcl\n";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   698
print "total_no_more_fcl=$total_no_more_fcl\n";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   699
print "total_still_fcl=$total_still_fcl\n";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   700
print "total_very_good_mcl=$total_very_good_mcl\n";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   701
print "\n";
104
b3c9be6eba35 Added the links to the website for each package (may need some improvements).
Arnaud Lenoir <arnaudl@symbian.org>
parents: 103
diff changeset
   702
print "Licence type for a package=\n";
b3c9be6eba35 Added the links to the website for each package (may need some improvements).
Arnaud Lenoir <arnaudl@symbian.org>
parents: 103
diff changeset
   703
#display_hash_array_one_line_at_the_time(%pckg_license_array);
b3c9be6eba35 Added the links to the website for each package (may need some improvements).
Arnaud Lenoir <arnaudl@symbian.org>
parents: 103
diff changeset
   704
print "\n";
b3c9be6eba35 Added the links to the website for each package (may need some improvements).
Arnaud Lenoir <arnaudl@symbian.org>
parents: 103
diff changeset
   705
print "Branch type for a package=\n";
b3c9be6eba35 Added the links to the website for each package (may need some improvements).
Arnaud Lenoir <arnaudl@symbian.org>
parents: 103
diff changeset
   706
#display_hash_array_one_line_at_the_time(%pckg_branch_array);
b3c9be6eba35 Added the links to the website for each package (may need some improvements).
Arnaud Lenoir <arnaudl@symbian.org>
parents: 103
diff changeset
   707
print "\n";
80
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   708
# Checking that the packages have been assigned properly.
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   709
# !!!! Need to verify the formula. Not sure that is correct!!!!!!
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   710
print "Verification for the total packages between the 2 pdks\n";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   711
print "Formula used is: total_packages_pdk2 = total_packages_pdk1 + total_packages_added - total_packages_removed\n";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   712
print "$total_packages_pdk2 = $total_packages_pdk1 + $total_packages_added - $total_packages_removed\n";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   713
print "\n";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   714
print "Formula used is: total_packages_pdk1 = total_very_good_mcl + total_new_fcl + total_no_more_fcl + total_still_fcl= total\n";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   715
print "$total_packages_pdk1 = $total_very_good_mcl + $total_new_fcl + $total_no_more_fcl + $total_still_fcl = ", ($total_very_good_mcl + $total_new_fcl + $total_no_more_fcl + $total_still_fcl), "\n";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   716
print "\n";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   717
print "Formula used is: total_packages_pdk2 = total_very_good_mcl + total_new_fcl + total_no_more_fcl + total_still_fcl + total_packages_added = total\n";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   718
print "$total_packages_pdk2 = $total_very_good_mcl + $total_new_fcl + $total_no_more_fcl + $total_still_fcl + $total_packages_added - $total_packages_removed= ", ($total_very_good_mcl + $total_new_fcl + $total_no_more_fcl + $total_still_fcl + $total_packages_added - $total_packages_removed), "\n";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   719
print "\n";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   720
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   721
# 5th step is to create a txt file ready to be used for the release notes in a media wiki format.
98
9edb472725a0 Removed commented code, code which had no effect on the output, some unnecessary \s, and a couple of other basic simplifications.
Simon Howkins <simonh@symbian.org>
parents: 91
diff changeset
   722
my $path_to_file_to_publish="$location_of_file_to_publish/$name_of_file_to_publish";
81
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   723
open(FCLCOMPARISONFILE, ">$path_to_file_to_publish");	# !!!!! First time we are accessing the file, therefore create it or replace it, AFTR THAT WE NEED TO APPEND IT ONLY!!!!!
80
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   724
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   725
my $val;
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   726
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   727
# Enter the beginning of the section for general information about the pdk and it's predecessor.
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   728
print FCLCOMPARISONFILE <<"EOT";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   729
== Packages ==
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   730
99
5adea361d896 Bug 881: "Automatic creation of release note content broken by config change"
Simon Howkins <simonh@symbian.org>
parents: 98
diff changeset
   731
This section provides general information on the packages included in the platform.
82
dbc58074ae06 Synchronised the output filename to match the other parts of the system generating release note content.
Simon Howkins <simonh@symbian.org>
parents: 81
diff changeset
   732
99
5adea361d896 Bug 881: "Automatic creation of release note content broken by config change"
Simon Howkins <simonh@symbian.org>
parents: 98
diff changeset
   733
This is an analysis of '''$pdk2_correct_name_to_use''' compared to the baseline of '''$pdk1_correct_name_to_use'''.
82
dbc58074ae06 Synchronised the output filename to match the other parts of the system generating release note content.
Simon Howkins <simonh@symbian.org>
parents: 81
diff changeset
   734
80
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   735
EOT
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   736
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   737
82
dbc58074ae06 Synchronised the output filename to match the other parts of the system generating release note content.
Simon Howkins <simonh@symbian.org>
parents: 81
diff changeset
   738
print FCLCOMPARISONFILE "Number total of packages in $pdk1_correct_name_to_use is: '''$total_packages_pdk1'''\n\n";
dbc58074ae06 Synchronised the output filename to match the other parts of the system generating release note content.
Simon Howkins <simonh@symbian.org>
parents: 81
diff changeset
   739
print FCLCOMPARISONFILE "Number total of packages in $pdk2_correct_name_to_use is: '''$total_packages_pdk2'''\n\n";
80
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   740
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   741
print FCLCOMPARISONFILE "=== Packages added ===\n\n";
82
dbc58074ae06 Synchronised the output filename to match the other parts of the system generating release note content.
Simon Howkins <simonh@symbian.org>
parents: 81
diff changeset
   742
print FCLCOMPARISONFILE "Number total of packages added in $pdk2_correct_name_to_use is: '''$total_packages_added'''\n\n";
80
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   743
foreach $val (@packages_added_table)
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   744
{
81
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   745
	if($pckg_name_array{$val})
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   746
	{
104
b3c9be6eba35 Added the links to the website for each package (may need some improvements).
Arnaud Lenoir <arnaudl@symbian.org>
parents: 103
diff changeset
   747
		print FCLCOMPARISONFILE "''' $pckg_name_array{$val} ([https://developer.symbian.org/$pckg_license_array{$val}/$pckg_branch_array{$val}/$pckg_path_name_array{$val}/graph  $pckg_path_name_array{$val}]) '''\n\n";
81
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   748
	}
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   749
	else
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   750
	{
104
b3c9be6eba35 Added the links to the website for each package (may need some improvements).
Arnaud Lenoir <arnaudl@symbian.org>
parents: 103
diff changeset
   751
		print FCLCOMPARISONFILE "''' $val ([https://developer.symbian.org/$pckg_license_array{$val}/$pckg_branch_array{$val}/$pckg_path_name_array{$val}/graph  $pckg_path_name_array{$val}]) '''\n\n";
81
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   752
	}
80
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   753
}
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   754
82
dbc58074ae06 Synchronised the output filename to match the other parts of the system generating release note content.
Simon Howkins <simonh@symbian.org>
parents: 81
diff changeset
   755
print FCLCOMPARISONFILE "=== Packages removed ===\n\n";
99
5adea361d896 Bug 881: "Automatic creation of release note content broken by config change"
Simon Howkins <simonh@symbian.org>
parents: 98
diff changeset
   756
print FCLCOMPARISONFILE "Number total of packages removed in $pdk2_correct_name_to_use is: '''$total_packages_removed'''\n\n";
80
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   757
foreach $val (@packages_removed_table)
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   758
{
81
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   759
	if($pckg_name_array{$val})
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   760
	{
104
b3c9be6eba35 Added the links to the website for each package (may need some improvements).
Arnaud Lenoir <arnaudl@symbian.org>
parents: 103
diff changeset
   761
		print FCLCOMPARISONFILE "''' $pckg_name_array{$val} ([https://developer.symbian.org/$pckg_license_array{$val}/$pckg_branch_array{$val}/$pckg_path_name_array{$val}/graph  $pckg_path_name_array{$val}]) '''\n\n";
81
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   762
	}
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   763
	else
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   764
	{
104
b3c9be6eba35 Added the links to the website for each package (may need some improvements).
Arnaud Lenoir <arnaudl@symbian.org>
parents: 103
diff changeset
   765
		print FCLCOMPARISONFILE "''' $val ([https://developer.symbian.org/$pckg_license_array{$val}/$pckg_branch_array{$val}/$pckg_path_name_array{$val}/graph  $pckg_path_name_array{$val}]) '''\n\n";
81
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   766
	}
80
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   767
}
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   768
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   769
# Enter the beginning of the section for the FCL
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   770
print FCLCOMPARISONFILE <<"EOT";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   771
== FCLs ==
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   772
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   773
'''$pdk2_correct_name_to_use''' was built using the FCL versions of the packages listed below: for each one we list the changes in the FCL which are not in the MCL.
82
dbc58074ae06 Synchronised the output filename to match the other parts of the system generating release note content.
Simon Howkins <simonh@symbian.org>
parents: 81
diff changeset
   774
dbc58074ae06 Synchronised the output filename to match the other parts of the system generating release note content.
Simon Howkins <simonh@symbian.org>
parents: 81
diff changeset
   775
The previous PDK also involved some FCLs, so we indicate which problems are now fixed in the MCL, and which FCLs are new to this build.
80
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   776
104
b3c9be6eba35 Added the links to the website for each package (may need some improvements).
Arnaud Lenoir <arnaudl@symbian.org>
parents: 103
diff changeset
   777
Cloning the source from Mercurial is made more awkward by using a mixture of MCLs and FCLs, but we provide a tool to help - see [[How to build the Platform]] for details.
80
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   778
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   779
EOT
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   780
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   781
# Packages that were on MCL and that are now on FCL
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   782
foreach $val (@new_fcl_table)
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   783
{
81
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   784
	if($pckg_name_array{$val})
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   785
	{
104
b3c9be6eba35 Added the links to the website for each package (may need some improvements).
Arnaud Lenoir <arnaudl@symbian.org>
parents: 103
diff changeset
   786
		print FCLCOMPARISONFILE "=== $pckg_name_array{$val} ([https://developer.symbian.org/$pckg_license_array{$val}/$pckg_branch_array{$val}/$pckg_path_name_array{$val}/graph  $pckg_path_name_array{$val}]) -- NEW ===\n\n";
81
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   787
		# TO DO!!!!
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   788
		# Needs to be recovered from Mercurial. How????
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   789
		#[http://developer.symbian.org/bugs/show_bug.cgi?id=156 Bug 156]: Add a missing bld.inf, to renable compilation of the package
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   790
		#[http://developer.symbian.org/bugs/show_bug.cgi?id=197 Bug 197]: PSAlgorithmInternalCRKeys.h is missing
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   791
	}
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   792
	else
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   793
	{
104
b3c9be6eba35 Added the links to the website for each package (may need some improvements).
Arnaud Lenoir <arnaudl@symbian.org>
parents: 103
diff changeset
   794
		print FCLCOMPARISONFILE "=== $val ([https://developer.symbian.org/$pckg_license_array{$val}/$pckg_branch_array{$val}/$pckg_path_name_array{$val}/graph  $pckg_path_name_array{$val}]) -- NEW ===\n\n";
81
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   795
	}
80
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   796
}
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   797
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   798
# Packages that were on FCL and that are now on FCL
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   799
foreach $val (@still_fcl_table)
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   800
{
81
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   801
	if($pckg_name_array{$val})
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   802
	{
104
b3c9be6eba35 Added the links to the website for each package (may need some improvements).
Arnaud Lenoir <arnaudl@symbian.org>
parents: 103
diff changeset
   803
		print FCLCOMPARISONFILE "=== $pckg_name_array{$val} ([https://developer.symbian.org/$pckg_license_array{$val}/$pckg_branch_array{$val}/$pckg_path_name_array{$val}/graph  $pckg_path_name_array{$val}]) ===\n\n";
81
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   804
	}
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   805
	else
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   806
	{
104
b3c9be6eba35 Added the links to the website for each package (may need some improvements).
Arnaud Lenoir <arnaudl@symbian.org>
parents: 103
diff changeset
   807
		print FCLCOMPARISONFILE "=== $val ([https://developer.symbian.org/$pckg_license_array{$val}/$pckg_branch_array{$val}/$pckg_path_name_array{$val}/graph  $pckg_path_name_array{$val}]) ===\n\n";
81
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   808
	}
80
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   809
}
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   810
82
dbc58074ae06 Synchronised the output filename to match the other parts of the system generating release note content.
Simon Howkins <simonh@symbian.org>
parents: 81
diff changeset
   811
print FCLCOMPARISONFILE "=== FCLs used in $pdk1_correct_name_to_use but not needed in $pdk2_correct_name_to_use ===\n\n";
80
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   812
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   813
foreach $val (@no_more_fcl_table)
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   814
{
81
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   815
	if($pckg_name_array{$val})
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   816
	{
104
b3c9be6eba35 Added the links to the website for each package (may need some improvements).
Arnaud Lenoir <arnaudl@symbian.org>
parents: 103
diff changeset
   817
		print FCLCOMPARISONFILE "''' $pckg_name_array{$val} ([https://developer.symbian.org/$pckg_license_array{$val}/$pckg_branch_array{$val}/$pckg_path_name_array{$val}/graph  $pckg_path_name_array{$val}]) '''\n\n";		
81
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   818
	}
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   819
	else
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   820
	{
104
b3c9be6eba35 Added the links to the website for each package (may need some improvements).
Arnaud Lenoir <arnaudl@symbian.org>
parents: 103
diff changeset
   821
		print FCLCOMPARISONFILE "''' $val ([https://developer.symbian.org/$pckg_license_array{$val}/$pckg_branch_array{$val}/$pckg_path_name_array{$val}/graph  $pckg_path_name_array{$val}]) '''\n\n";
81
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   822
	}
80
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   823
}
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   824
81
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   825
close(FCLCOMPARISONFILE);
80
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   826
81
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   827
print "\nYou will find the file with all the information you need for the releases note, here: $path_to_file_to_publish\n\n";
80
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   828
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   829
# Cleanup the mess!!!
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   830
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   831
$system_cmd = "rmdir /S /Q $working_dir";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   832
print "Exec: $system_cmd\n";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   833
system($system_cmd);
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   834
90
e45faf323a50 Correct problem with the name entered as parameter because it was exiting if 2 PDKs starting with the same name
Arnaud Lenoir
parents: 87
diff changeset
   835
exit(0);
80
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   836
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   837
# If no parameters entered or help selected, display help
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   838
sub helpme
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   839
{
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   840
	print "\nfct: helpme\n";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   841
	
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   842
	print "Generate FCLs details between 2 PDKs to be included as part of the release notes\n";	
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   843
	print "Default location for PDKs is: $default_pdk_loc\n";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   844
	print "Usage: perl fcls4releasenotes.pl --input_data1=x --input_data2=y\n";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   845
	print "Where input_data1 and input_data2 could be pdknb1 or pdknb2 or pdkloc1 or pdkloc2 or pdkname1 or pdkname2\n";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   846
	print "Where pdknb is the PDK number, for example 2.0.e\n";
81
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   847
	print "Where pdkloc is the root location where your file $build_bom_zip_file_to_extract is. For ex: \\\\bishare\\releases\\PDK_2.0.e\\ or c:\\temp\\myPDK\\\n";
80
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   848
	print "Where pdkname is the full name of the PDK, like for ex PDK_candidate_2.0.d_flat\n";
81
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   849
	print "\nNotes:\n";
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   850
	print "\tParameter names with 1 at the end (pdknb1, pdkname1, pdkloc1) are set for the oldest PDK to use (PDK1)\n";
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   851
	print "\tParameter names with 2 at the end (pdknb2, pdkname2, pdkloc2) are set for the newest PDK to use (PDK2)\n";
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   852
	print "\tIf you try to use for example pdknb2 and pdkname2 or pdkloc1 and pdknb1 the result is not guaranted to be correct!!!! as one will be set as PDK1 and the other as PDK2, but which order????\n";
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   853
	print "\tThe difference is done as follow PDK2 - PDK1\n";
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   854
	print "\n";
80
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   855
	print "\nTypical command lines from script location:\n";
81
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   856
	print "\t<perl fcls4releasenotes.pl --pdknb1=2.0.e --pdkloc2=c:\\temp\\myPDK\\>\n";
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   857
	print "\t<perl fcls4releasenotes.pl --pdkname1=PDK_2.0.e --pdknb2=2.0.e>\n";
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   858
	print "\t<perl fcls4releasenotes.pl --pdknb2=2.0.d --pdknb1=2.0.e>\n";
80
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   859
	print "\t<perl fcls4releasenotes.pl help>\n";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   860
	
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   861
	list_pdks_at_default_location();
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   862
	
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   863
	exit(0);
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   864
}
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   865
# End section related to help
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   866
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   867
# Extract list of PDKs that are in the default location.
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   868
sub list_pdks_at_default_location
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   869
{
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   870
	print "\nfct: list_pdks_at_default_location\n";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   871
	
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   872
	# Do a dir of the default location
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   873
	print "List of directories in the default location $default_pdk_loc\n";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   874
	extract_dir_default_loc();
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   875
	
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   876
	# Extract all the PDKs that have the pattern PDK_
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   877
	print "All available PDKS in the default location $default_pdk_loc that have the pattern $pdk_start_pattern\n";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   878
	extract_pdk_in_default_loc();
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   879
	
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   880
	# Extract all the PDKs that have the file build_BOM.zip
81
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   881
	print "All available PDKS in the default location $default_pdk_loc that contains the zip file $build_bom_zip_file_to_extract\n";
80
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   882
	extract_pdk_with_valid_zip_in_default_loc();
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   883
	
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   884
}
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   885
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   886
# Generates list of directories in the default location used for the storage of the PDKs
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   887
sub extract_dir_default_loc
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   888
{
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   889
	print "\nfct: extract_dir_default_loc\n";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   890
	
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   891
	# Get the list of directories in the default location
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   892
	opendir(DEFAULT_DIR, $default_pdk_loc);
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   893
	@directories_list_default_location = readdir(DEFAULT_DIR);
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   894
	close(DEFAULT_DIR);
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   895
	
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   896
	$nb_dir_in_default_loc = scalar(@directories_list_default_location);
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   897
	
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   898
	print "nb_dir_in_default_loc=$nb_dir_in_default_loc\n";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   899
}
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   900
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   901
# Establish the list of directories that are an actual PDK
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   902
sub extract_pdk_in_default_loc
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   903
{
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   904
	print "\nfct: extract_pdk_in_default_loc\n";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   905
	
99
5adea361d896 Bug 881: "Automatic creation of release note content broken by config change"
Simon Howkins <simonh@symbian.org>
parents: 98
diff changeset
   906
	my $nb_pdks_in_default_loc=0;
80
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   907
	print "pdk_start_pattern = $pdk_start_pattern\n";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   908
	
99
5adea361d896 Bug 881: "Automatic creation of release note content broken by config change"
Simon Howkins <simonh@symbian.org>
parents: 98
diff changeset
   909
	foreach my $var (@directories_list_default_location)
80
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   910
	{
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   911
		if($var =~ /^$pdk_start_pattern+/)
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   912
		{
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   913
			$pdk_dir_list_in_default_location[$nb_pdks_in_default_loc++] = $var;
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   914
		}
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   915
	}
99
5adea361d896 Bug 881: "Automatic creation of release note content broken by config change"
Simon Howkins <simonh@symbian.org>
parents: 98
diff changeset
   916
	print "There are $nb_pdks_in_default_loc PDKs in the default location $default_pdk_loc\n";	
80
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   917
}
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   918
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   919
# Establish the list of PDK directories with a valid zip file to do the test
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   920
sub extract_pdk_with_valid_zip_in_default_loc
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   921
{
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   922
	print "\nfct: extract_pdk_with_valid_zip_in_default_loc\n";
99
5adea361d896 Bug 881: "Automatic creation of release note content broken by config change"
Simon Howkins <simonh@symbian.org>
parents: 98
diff changeset
   923
80
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   924
	my $path_to_find_zip = "";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   925
	my @read_pdk_directory=();
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   926
	
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   927
	$nb_pdks_with_valid_zip_in_default_loc=0;
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   928
	
81
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   929
	print "build_bom_zip_file_to_extract=$build_bom_zip_file_to_extract\n";
80
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   930
	
99
5adea361d896 Bug 881: "Automatic creation of release note content broken by config change"
Simon Howkins <simonh@symbian.org>
parents: 98
diff changeset
   931
	foreach my $var1 (@pdk_dir_list_in_default_location)
80
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   932
	{
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   933
		$path_to_find_zip=$default_pdk_loc;
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   934
		
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   935
		$path_to_find_zip .= $var1;
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   936
				
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   937
		# Get the list of directories in the default location
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   938
		opendir(PDK_DIR, $path_to_find_zip);
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   939
		@read_pdk_directory = readdir(PDK_DIR);
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   940
		close(PDK_DIR);
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   941
	
99
5adea361d896 Bug 881: "Automatic creation of release note content broken by config change"
Simon Howkins <simonh@symbian.org>
parents: 98
diff changeset
   942
		foreach my $var2 (@read_pdk_directory)
80
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   943
		{
81
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   944
			if($var2 =~ /$build_bom_zip_file_to_extract$/)
80
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   945
			{
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   946
				$pdks_with_valid_zip_in_default_loc[$nb_pdks_with_valid_zip_in_default_loc++] = $var1;
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   947
			}
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   948
		}
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   949
	}
99
5adea361d896 Bug 881: "Automatic creation of release note content broken by config change"
Simon Howkins <simonh@symbian.org>
parents: 98
diff changeset
   950
	print "There are $nb_pdks_with_valid_zip_in_default_loc PDKs with a valid $build_bom_zip_file_to_extract zip in the default location $default_pdk_loc\n";	
80
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   951
	
81
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   952
	print "This is the list of PDKs that have a zip file called $build_bom_zip_file_to_extract in the default location $default_pdk_loc\n";
80
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   953
	display_array_one_line_at_the_time(@pdks_with_valid_zip_in_default_loc);
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   954
}
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   955
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   956
# This function is used to extract the name of the package and the type
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   957
sub extract_packages_and_branch_type_from_file
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   958
{
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   959
	# 1 Parameters passed, the path to the file to be viewed
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   960
	my ($file_to_work_on) = @_;
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   961
	
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   962
	print "\nfct: extract_packages_and_branch_type_from_file\n";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   963
	
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   964
	print "$file_to_work_on\n";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   965
	
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   966
	my %local_hash_array;
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   967
	my $local_key;
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   968
	
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   969
	my $package="";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   970
	my $type_of_branch="";
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   971
	
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   972
	# Open file
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   973
	open(FILETOWORKON , $file_to_work_on);
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   974
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   975
	# Extract data from file
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   976
	my @local_array = <FILETOWORKON>;
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   977
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   978
	# Close file
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   979
	close(FILETOWORKON);
81
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   980
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
   981
80
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   982
	my $extracted_line;
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   983
	
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   984
	# Go line by line
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   985
	foreach  $extracted_line (@local_array)
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   986
	{
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   987
		if ($extracted_line =~ /$starting_pattern_for_xml_extraction/)
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   988
		{
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   989
			$extraction_from_xml_is_allowed=1;
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   990
		}
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   991
		else
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   992
		{
98
9edb472725a0 Removed commented code, code which had no effect on the output, some unnecessary \s, and a couple of other basic simplifications.
Simon Howkins <simonh@symbian.org>
parents: 91
diff changeset
   993
			if ($extracted_line =~ /$ending_pattern_for_xml_extraction/)
80
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   994
			{
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   995
				$extraction_from_xml_is_allowed=0;
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   996
			}
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   997
		}
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   998
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
   999
		if($extraction_from_xml_is_allowed)
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
  1000
		{
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
  1001
			# Decode the line			
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
  1002
			
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
  1003
			# Decode the branch type			
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
  1004
			if($extracted_line =~ /$branch_type_extraction_pattern/)
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
  1005
			{
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
  1006
				$type_of_branch=$1;
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
  1007
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
  1008
				# Decode the package because there is a branch type in the line extracted!
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
  1009
				if ($extracted_line =~ m,$package_extraction_pattern,)
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
  1010
				{
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
  1011
					$package=$1;					
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
  1012
				}
81
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
  1013
				$local_hash_array{$package}=$type_of_branch;
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
  1014
				
80
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
  1015
			}
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
  1016
		}
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
  1017
	}
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
  1018
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
  1019
	# Return hash array containing all the packages and branch type associated
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
  1020
	return (%local_hash_array);
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
  1021
}
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
  1022
81
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
  1023
# Function used to extract all the data from the csv file about the different packages (name, path and real name)
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
  1024
sub extract_package_detail
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
  1025
{
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
  1026
	# 1 Parameters passed, the path to the file to be viewed
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
  1027
	my ($file_to_work_on) = @_;
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
  1028
	
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
  1029
	print "\nfct: extract_package_detail\n";
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
  1030
	
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
  1031
	print "$file_to_work_on\n";
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
  1032
	
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
  1033
	# Open file
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
  1034
	open(FILETOWORKON , $file_to_work_on);
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
  1035
	my @local_array = <FILETOWORKON>;
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
  1036
	close(FILETOWORKON);
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
  1037
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
  1038
	# Create a table with the path for each package using a hash array
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
  1039
	my $pckg_name_extraction_pattern = "^sf\/[\\w]*\/([\\w]*)";
99
5adea361d896 Bug 881: "Automatic creation of release note content broken by config change"
Simon Howkins <simonh@symbian.org>
parents: 98
diff changeset
  1040
	my $pckg_path_extraction_pattern = "^([^,]+),";
81
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
  1041
	my $pckg_real_name_extraction_pattern = ",[\\s]+([\\w\\s]*),[\\s]+[\\w\\s]*\$";
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
  1042
	
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
  1043
	#Typical lines to decode
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
  1044
	#sf/app/helps,SFL,sf/app/helps/symhelp/helpmodel/group/bld.inf,OK, Help Apps, Help
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
  1045
	#sf/app/java,SFL,sf/app/java/java_plat/group/bld.inf,OK, , 
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
  1046
	#sf/app/helps,SFL,sf/app/helps/symhelp/helpmodel/group/bld.inf,OK, Help Apps, Help
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
  1047
	#sf/app/helps,
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
  1048
	#SFL,
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
  1049
	#sf/app/helps/symhelp/helpmodel/group/bld.inf,
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
  1050
	#OK,
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
  1051
	# Help Apps,
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
  1052
	# Help
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
  1053
	
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
  1054
	#sf/app/java,SFL,sf/app/java/java_plat/group/bld.inf,OK, , 
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
  1055
	#sf/app/java,
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
  1056
	#SFL,
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
  1057
	#sf/app/java/java_plat/group/bld.inf,
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
  1058
	#OK,
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
  1059
	# ,
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
  1060
	#
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
  1061
	
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
  1062
	# Go line by line
99
5adea361d896 Bug 881: "Automatic creation of release note content broken by config change"
Simon Howkins <simonh@symbian.org>
parents: 98
diff changeset
  1063
	foreach my $extracted_line (sort @local_array)
81
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
  1064
	{
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
  1065
		if($extracted_line =~ m;$pckg_name_extraction_pattern;)
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
  1066
		{
99
5adea361d896 Bug 881: "Automatic creation of release note content broken by config change"
Simon Howkins <simonh@symbian.org>
parents: 98
diff changeset
  1067
			my $pckg_name = $1;
81
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
  1068
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
  1069
			if(!$pckg_path_name_array{$pckg_name})	# Check if package is not already in the table to avoid duplicates
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
  1070
			{
99
5adea361d896 Bug 881: "Automatic creation of release note content broken by config change"
Simon Howkins <simonh@symbian.org>
parents: 98
diff changeset
  1071
				my $pckg_path="''nonstandard path''";
5adea361d896 Bug 881: "Automatic creation of release note content broken by config change"
Simon Howkins <simonh@symbian.org>
parents: 98
diff changeset
  1072
				my $pckg_real_name="";
104
b3c9be6eba35 Added the links to the website for each package (may need some improvements).
Arnaud Lenoir <arnaudl@symbian.org>
parents: 103
diff changeset
  1073
				my $pckg_license_type="";
99
5adea361d896 Bug 881: "Automatic creation of release note content broken by config change"
Simon Howkins <simonh@symbian.org>
parents: 98
diff changeset
  1074
81
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
  1075
				if($extracted_line =~ m;$pckg_path_extraction_pattern;)
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
  1076
				{
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
  1077
					$pckg_path = $1;
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
  1078
				}
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
  1079
				if($extracted_line =~ m;$pckg_real_name_extraction_pattern;)
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
  1080
				{
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
  1081
					$pckg_real_name = $1;
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
  1082
				}
104
b3c9be6eba35 Added the links to the website for each package (may need some improvements).
Arnaud Lenoir <arnaudl@symbian.org>
parents: 103
diff changeset
  1083
				if($extracted_line =~ m;$license_type_extraction_pattern;)	# Extract data about the type of license OSS or SFL
b3c9be6eba35 Added the links to the website for each package (may need some improvements).
Arnaud Lenoir <arnaudl@symbian.org>
parents: 103
diff changeset
  1084
				{
b3c9be6eba35 Added the links to the website for each package (may need some improvements).
Arnaud Lenoir <arnaudl@symbian.org>
parents: 103
diff changeset
  1085
					$pckg_license_type = $1;
b3c9be6eba35 Added the links to the website for each package (may need some improvements).
Arnaud Lenoir <arnaudl@symbian.org>
parents: 103
diff changeset
  1086
				}
81
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
  1087
				# fill the tables
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
  1088
				$pckg_path_name_array{$pckg_name} = $pckg_path;
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
  1089
				$pckg_name_array{$pckg_name} = $pckg_real_name;
104
b3c9be6eba35 Added the links to the website for each package (may need some improvements).
Arnaud Lenoir <arnaudl@symbian.org>
parents: 103
diff changeset
  1090
				$pckg_license_type =~ tr/A-Z/a-z/; # Convert from uppercase to lowercase otherwise don't work to access the website.
b3c9be6eba35 Added the links to the website for each package (may need some improvements).
Arnaud Lenoir <arnaudl@symbian.org>
parents: 103
diff changeset
  1091
				$pckg_license_array{$pckg_name} = $pckg_license_type;
81
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
  1092
			}
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
  1093
		}
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
  1094
	}
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
  1095
	
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
  1096
	my @local_array_sorted;
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
  1097
	
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
  1098
	@local_array=keys (%pckg_path_name_array);
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
  1099
	@local_array_sorted = sort { lc($a) cmp lc($b) } @local_array;
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
  1100
}
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
  1101
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
  1102
# Function used to display one line at the time for an array				
80
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
  1103
sub display_array_one_line_at_the_time
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
  1104
{
98
9edb472725a0 Removed commented code, code which had no effect on the output, some unnecessary \s, and a couple of other basic simplifications.
Simon Howkins <simonh@symbian.org>
parents: 91
diff changeset
  1105
	foreach (@_)
80
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
  1106
	{
98
9edb472725a0 Removed commented code, code which had no effect on the output, some unnecessary \s, and a couple of other basic simplifications.
Simon Howkins <simonh@symbian.org>
parents: 91
diff changeset
  1107
		print "$_\n";
80
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
  1108
	}
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
  1109
}
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
  1110
81
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
  1111
# Function used to display one line at the time for an hash array
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
  1112
sub display_hash_array_one_line_at_the_time
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
  1113
{
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
  1114
	my (%hash_array_to_display_one_line_at_the_time) = @_;
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
  1115
	
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
  1116
	my @local_keys_array;
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
  1117
	my @local_keys_array_sorted;
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
  1118
	
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
  1119
	my $line_to_display;
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
  1120
	
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
  1121
	@local_keys_array = keys (%hash_array_to_display_one_line_at_the_time);
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
  1122
	@local_keys_array_sorted = sort { lc($a) cmp lc($b) } @local_keys_array;
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
  1123
	
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
  1124
	foreach $line_to_display (@local_keys_array_sorted)
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
  1125
	{
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
  1126
		print "$line_to_display = $hash_array_to_display_one_line_at_the_time{$line_to_display}\n";
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
  1127
	}
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
  1128
}
63e14a36aefd Arnaudl. Final version of the script before testing live by doing a test build.
Arnaud Lenoir
parents: 80
diff changeset
  1129
80
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
  1130
# PDKs with build_bom.zip file in the default PDKs location 14-09-2009
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
  1131
#Z:\Releases\PDK_2.0.e
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
  1132
#Z:\Releases\PDK_candidate_2.0.d_flat
9f8bdafe5d68 Perl script for the releases notes automation with fcl!
Arnaud Lenoir
parents:
diff changeset
  1133
#Z:\Releases\PDK_candidate_2.0e_FCL_27.78