sdkcreationmw/sdkbuild/SDK_WINSCW/SDK_vars.pm
author rajpuroh
Mon, 08 Mar 2010 12:09:11 +0530
changeset 0 b26acd06ea60
permissions -rw-r--r--
First Contribution of SDK components
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
     1
#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
     2
# Copyright (c) 2002-2006 Nokia Corporation and/or its subsidiary(-ies).
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
     3
# All rights reserved.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
     4
# This component and the accompanying materials are made available
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
     5
# under the terms of "Eclipse Public License v1.0"
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
     6
# which accompanies this distribution, and is available
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
     7
# at the URL "http://www.eclipse.org/legal/epl-v10.html".
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
     8
#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
     9
# Initial Contributors:
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    10
# Nokia Corporation - initial contribution.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    11
#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    12
# Contributors:
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    13
#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    14
# Description: 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    15
#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    16
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    17
package SDK_vars;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    18
use strict;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    19
no strict "subs";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    20
use Exporter;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    21
use Cwd;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    22
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    23
our ($VERSION, @ISA, @EXPORT, %iniH, %common_comp, %common_comp2, %common_comp3, %lib_dirs_to_collect_from_platform, 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    24
     $sdk_root, $repository_area, @remove_lists, $blacklist, $common_graylist, $cpp_graylist, $java_graylist, 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    25
     $symbianlist, %sdk_lang_codes, %extra_lang_codes, $IFs, @ecmt_dirs,@emu_src_dirs, @tools_src_dirs, @java_dirs, @dirs_to_dbgstrip, $body, 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    26
     %final_dest_dirsH, %Java_final_dest_dirsH, %final_dest_dirsH2,  
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    27
     %root_levelH3, $sms_receivers, @sub_roots, $init_dir, @RnD_dirs,%lang_names );
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    28
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    29
$VERSION = 1.00;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    30
@ISA = qw(Exporter);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    31
@EXPORT = qw(parse_ini_file  
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    32
             %iniH %common_comp %common_comp2 %common_comp3 %lib_dirs_to_collect_from_platform $sdk_root 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    33
             $repository_area @remove_lists $blacklist $common_graylist $cpp_graylist $java_graylist %sdk_lang_codes %extra_lang_codes
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    34
             $IFs $symbianlist @ecmt_dirs @emu_src_dirs @tools_src_dirs @java_dirs @dirs_to_dbgstrip $body 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    35
             %final_dest_dirsH %Java_final_dest_dirsH %final_dest_dirsH2 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    36
             %root_levelH3 $sms_receivers @sub_roots $init_dir @RnD_dirs %lang_names %lib_collect_dirs );
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    37
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    38
#These will be executed every time
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    39
($init_dir = Cwd::cwd())=~ tr [/][\\];
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    40
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    41
initialize_start_dir($init_dir);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    42
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    43
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    44
parse_ini_file("sdk.ini", \%iniH);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    45
if (-f "cmd.ini"){
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    46
	parse_ini_file("cmd.ini", \%iniH);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    47
}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    48
set_sdk_name();
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    49
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    50
my $tmp_path=$init_dir."\\tools;".$ENV{PATH};
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    51
$ENV{PATH}=$tmp_path;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    52
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    53
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    54
if ($iniH{Output_Base_substed}){
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    55
  `subst $iniH{Output_Base_substed} /d` ;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    56
  system ("subst $iniH{Output_Base_substed} $iniH{Output_Base}");
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    57
}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    58
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    59
my $substs = `subst`;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    60
print $substs;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    61
print "\nSubstitutions vs Start_time or Sdk_root mismatch!!!\n$substs\n$iniH{S60_Root} $iniH{Start_time} \n\n" unless ($substs =~ /$iniH{S60_Root}\\: =>.+$iniH{Start_time}/);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    62
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    63
#Global variables
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    64
$repository_area = "$iniH{S60_Root}\\sce\\Repository_area";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    65
$blacklist       = "$repository_area\\Common_Blacklist\\black_list.txt";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    66
$common_graylist = "$repository_area\\Common_Graylist\\common_graylist.txt";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    67
$cpp_graylist    = "$repository_area\\CPP_Graylist\\graylistcpp.txt";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    68
$java_graylist   = "$repository_area\\Java_Graylist\\Java_graylist.txt";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    69
$IFs             = "\\IFs";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    70
@remove_lists = ($blacklist, $common_graylist, $cpp_graylist, $java_graylist);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    71
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    72
#The set of sub root directories including include itself (=empty)!
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    73
@sub_roots = qw ( \\ \\middleware\\ \\osextensions\\ \\applications\\);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    74
# Following line commented by ngv to ensure more apis are included
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    75
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    76
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    77
#Copy components from repositories to repository_area
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    78
#If it contains . then only that pattern is copied. Otherwise all subdirectories are copied as well.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    79
#NB. Complemantary localisation files are copied only if they are in *_localisation.zip. 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    80
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    81
#  Platform_Patch          => [qw(\\*S60_3_1_200614_SP1.zip)],
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    82
#  Languages_Patch         => [qw(\\*.zip)],
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    83
#	 Common_Tools            => [""],
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    84
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    85
%common_comp = (
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    86
  Beatnik                  => [""],
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    87
  Capas                    => [""],
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    88
  Common_Blacklist         => [qw(\\black_list.txt)],
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    89
  Common_Graylist          => [qw(\\common_graylist.txt)],
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    90
	Common_Patch             => [""],
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    91
	Common_S60Tools          => [""],
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    92
  SDK_Installer            => [""],
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    93
  Doc_Browser              => [""],
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    94
  Doc_General              => [""],
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    95
  Doc_Carbide_Plugin       => [""],
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    96
  Doc_External             => [""],
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    97
  Doc_Licensee             => [""],
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    98
  Doc_Eclipse_Plugin       => [""],
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    99
  Doc_NetBeans_Plugin      => [qw(\\*.nbm)],
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   100
  CPP_Doc_APIRef           => [""],
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   101
  CPP_Carbide_Manifest     => [""],
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   102
  CPP_CarbideVS_Descriptor => [""],
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   103
  CPP_API                  => [""],   
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   104
  CPP_Examples             => [""],
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   105
  CPP_Graylist             => [qw(\\graylistcpp.txt)],
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   106
  CPP_Patch                => [""],
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   107
  CPP_Commonfilestools     => [""],
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   108
  CPP_Symbian_Ex           => [""],
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   109
  #CPP_S60Tools             => [""],
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   110
  CPP_Tools                => [""],
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   111
  CPP_Tools_build          => [""],
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   112
  Java_Examples            => [qw(\\examples)],
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   113
  Java_Graylist            => [qw(\\Java_graylist.txt)],
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   114
  Java_Patch               => [""],
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   115
  Java_SDK                 => [qw(\\emulator.exe \\prefs.exe \\preverify2.exe \\preverify.exe)],
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   116
  #Java_S60Tools            => [""],
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   117
  Java_Toolchain           => [qw(\\nei.jar)],
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   118
  Java_Tools_build         => [""],
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   119
  Java_NUMC                => [""],
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   120
  Widget_Examples          => [""],
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   121
  Vista_GCCEPatch_Plugin   => [""],
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   122
  CPP_OpenC_Plugin         => [qw(\\glib.zip)],
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   123
  Sdk_Lang_Extra_Readme    => [""],
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   124
  OOMMonitorAPI            => [""],
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   125
);                  
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   126
          
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   127
%lib_dirs_to_collect_from_platform = (
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   128
  '2.8'   => {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   129
    armi   => [qw(urel)],
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   130
    thumb  => [qw(urel)],
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   131
    winscw => [qw(udeb)]
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   132
  },
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   133
  '3.0'   => {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   134
    armi   => [qw(urel)],
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   135
    armv5  => [qw(lib urel udeb)],
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   136
    thumb  => [qw(urel)],
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   137
    winscw => [qw(udeb)]
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   138
  },
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   139
  '9.9'   => {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   140
    armv5  => [qw(lib urel udeb)],
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   141
    winscw => [qw(udeb)]
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   142
  },
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   143
);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   144
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   145
%sdk_lang_codes = (
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   146
  zh_CN => [qw( 31 159)],
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   147
  en_US => [qw( 01 10)],
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   148
#  ja_JP => [qw( 32 160)], /Commented to remove the japanese lang from N97 SDK
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   149
);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   150
%extra_lang_codes = (
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   151
##  tr_TR => [qw( 14 )],
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   152
##  th_TH => [qw( 33 161)],
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   153
##  ar_SA => [qw( 37 )],
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   154
##  fa_IR => [qw( 50 )],
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   155
##  el_GR => [qw( 54 )],
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   156
##  he_IL => [qw( 57 )],
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   157
##  hi_IN => [qw( 58 )],
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   158
##  uk_UA => [qw( 93 )],
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   159
##  ur_PK => [qw( 94 )],
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   160
);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   161
#Update this hash to create FN specific extra lang zips
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   162
%lang_names=(
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   163
ar_SA=>"Arabic",
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   164
ur_PK=>"Urdu"
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   165
);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   166
$body = "";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   167
$sms_receivers = "";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   168
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   169
#Blacklist and dbgstrip applied to these
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   170
%common_comp2 = (
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   171
	Beatnik                 => "\\sdk_wa\\",
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   172
);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   173
#Patches et al. These are copied at phase 2 ie. after blacklist but before dbgstrip
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   174
%common_comp3 = (
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   175
  Common_Patch          => "\\sdk_wa\\",
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   176
);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   177
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   178
%final_dest_dirsH = (
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   179
  CPP_CarbideVS_Descriptor 	=> "\\SDK_files\\CarbideVS_Descriptor\\",
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   180
  CPP_Carbide_Manifest  		=> "\\SDK_files\\carbide_manifest\\epoc32\\kit\\",
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   181
  CPP_Doc_APIRef            => "\\SDK_files\\docs\\",
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   182
  Doc_Carbide_Plugin		    => "\\SDK_files\\carbide_docplugin\\epoc32\\kit\\",
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   183
  Doc_General               => "\\SDK_files\\docs\\",
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   184
  Doc_Browser               => "\\SDK_files\\docs\\",
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   185
  Doc_Licensee              => "\\SDK_files\\docs\\Terms\\",
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   186
  Doc_Eclipse_Plugin        => "\\SDK_files\\Eclipse_Plugin\\",
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   187
  SDK_Installer         		=> "\\installer\\",
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   188
  CPP_Symbian_Ex            => "\\SDK_files\\Examples\\Symbian\\",
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   189
  CPP_Examples              => "\\SDK_files\\Examples\\CPP\\",
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   190
  CPP_Commonfilestools  		=> "\\SDK_files\\Commonfilestools\\",
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   191
  Java_API                  => "\\SDK_files\\lib\\",
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   192
  #Java_Doc_Examples			    => "\\SDK_files\\S60examples\\",
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   193
  Java_Examples             => "\\SDK_files\\Examples\\MIDP\\",
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   194
  Java_Patch                => "\\SDK_files\\",
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   195
  SDK_Installer             => "\\SDK_installer\\",
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   196
  Java_NUMC                 => "\\SDK_files\\Java_NUMC\\",
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   197
  Java_SDK                  => "\\SDK_files\\bin\\",
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   198
  Java_Toolchain            => "\\SDK_files\\epoc32_toolchain_common\\epoc32\\tools\\ecmt\\",
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   199
  Widget_Examples           => "\\SDK_files\\Examples\\Widget\\",
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   200
  Vista_GCCEPatch_Plugin    => "\\SDK_files\\Vista_GCCEPatch_Plugin\\",
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   201
);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   202
                      
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   203
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   204
%final_dest_dirsH2 = (
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   205
  Capas                 => "\\SDK_files\\epoc32_emu\\",
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   206
  CPP_Patch             => "\\SDK_files\\",                      #These may go to epoc32_emu eventually     
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   207
  #CPP_S60Tools          => "\\SDK_files\\S60Tools\\",
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   208
  CPP_Tools             => "\\SDK_files\\",
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   209
  CPP_Tools_build       => "\\SDK_files\\S60Tools\\Ecmt\\",
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   210
	Common_S60Tools       => "\\SDK_files\\S60Tools\\",
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   211
  Java_Patch            => "\\SDK_files\\",
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   212
  #Java_S60Tools         => "\\SDK_Java\\SDK_files\\S60tools\\",
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   213
  Java_Tools_build      => "\\SDK_files\\S60tools\\Ecmt",
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   214
  CPP_OpenC_Plugin      => "\\SDK_files\\OpenC_Plugin\\",
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   215
);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   216
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   217
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   218
%root_levelH3 = (
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   219
  Doc_External     			 => ".\\",
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   220
  #Doc_NetBeans_Plugin    => ".\\",
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   221
);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   222
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   223
#These are copied from SDK platform -> sdk_wa 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   224
@emu_src_dirs = qw (data  release\\winscw\\udeb winscw);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   225
@ecmt_dirs = qw (tools\\ecmt);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   226
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   227
#These are copied from SDK platform -> sdk_wa                 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   228
@tools_src_dirs = qw (release\\winc\\urel\\*.dll
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   229
                      release\\winc\\urel\\*.exe 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   230
                      release\\winc\\urel\\*.fsy 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   231
                      tools  gcc  cshlpcmp_template);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   232
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   233
#These dirs are copied from sdk_wa\epoc32 -> Java sdk
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   234
@java_dirs = qw (data  release\\winscw  tools\\ecmt tools\\java tools\\SipServer winscw);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   235
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   236
@RnD_dirs = qw ( data
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   237
                 cshlpcmp_template
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   238
                 gcc
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   239
                 include
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   240
                 release\\winscw\\udeb
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   241
                 release\\winc\\urel\\*.dll
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   242
                 release\\winc\\urel\\*.exe 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   243
                 release\\winc\\urel\\*.fsy 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   244
                 tools
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   245
                 winscw
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   246
               );
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   247
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   248
#These directories are stripped on work_area
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   249
@dirs_to_dbgstrip = qw (epoc32\release\winscw\udeb
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   250
                        epoc32\release\winscw\urel
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   251
                        epoc32\tools);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   252
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   253
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   254
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   255
sub parse_ini_file {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   256
  my $regex_var = qr{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   257
  	 \$		          # dollar sign
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   258
  	 (\{)?		      # $1: optional opening curly
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   259
  	 ([a-zA-Z_]\w*)	# $2: capturing variable name
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   260
  	 (?(1)\})		    # $3: if there's the opening curly... match closing curly
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   261
  }x;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   262
  my $regex_sub = qr{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   263
  	 sub	          # 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   264
  	 \s*            # potential blanko(s)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   265
  	 (\{)?		      # $1: optional opening curly
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   266
  	  \s*
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   267
  	 (.+)	          # $2: capturing variable name
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   268
  	 (?(1)\})		    # $3: if there's the opening curly... match closing curly
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   269
  }x;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   270
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   271
  my ($ini_file, $href) = @_;  
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   272
  open(INI, "<$ini_file") or die "Cannot read $ini_file: $!\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   273
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   274
  while( <INI> ) {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   275
  	chomp;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   276
  	s/\s#.*//;            # Remove comments
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   277
  	s/\s+$//;             # and traling spaces
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   278
  	s/^\[.*\]// ;         # and sections
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   279
    next unless length;   # anything left?
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   280
  	my ($key, $value ) = split /\s*=\s?/;                   #Don't comsume more than 1 blanko after =
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   281
  	while ($value =~/$regex_var/ && defined ($$href{$2})){  #interpolate only if the variable is defined earlier in the inifile
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   282
  	  $value =~ s/$regex_var/$$href{$2}/;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   283
    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   284
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   285
   	if ($value =~ s/$regex_sub/$2/){                #Evaluate if the value starts with 'sub{'
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   286
   	  $value =~ s/\$/esc_dollar_/g;                 #\$ -> esc_dollar
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   287
  	  $value = eval $value;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   288
   	  $value =~ s/esc_dollar_/\$/g;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   289
  	}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   290
  	$$href{ $key } = $value;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   291
  }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   292
  close INI;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   293
}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   294
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   295
sub set_sdk_name {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   296
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   297
	my %Phases = ('a' => 'Alpha',
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   298
				  'b' => 'Beta',
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   299
				  'f' => '1.0',
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   300
				  'h' => 'Herald',);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   301
	
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   302
  # Following section was added by ngv on 08/08/2008 due to changes in SDK naming
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   303
	$iniH{ Kit_ID } = "$iniH{Kit_ID}_$iniH{Start_Menu2}";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   304
	$iniH{ SDK_Short_name } = "$iniH{SDK_Short_name} $iniH{Start_Menu2}";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   305
	$iniH{ SDK_Product_name } = "$iniH{ SDK_Product_name } $iniH{Start_Menu2}";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   306
	$iniH{ Build_ID } = "-";		
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   307
	$iniH{ Start_Menu2 } = "$iniH{Start_Menu2}";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   308
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   309
	if ( $iniH{Support_pack} ) {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   310
		$iniH{SDK_Product_name} = "$iniH{SDK_Product_name}, $iniH{Support_pack}";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   311
		$iniH{sdkApiRefFullName} = "$iniH{SDK_Product_name}";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   312
	}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   313
}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   314
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   315
sub initialize_start_dir {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   316
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   317
  
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   318
  my $curr_dir = Cwd::cwd();
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   319
  $curr_dir =~  s/\//\\\//g;     # forward slashes in dir name
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   320
 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   321
  
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   322
  print "curr_dir = $curr_dir\n";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   323
  #Put the curr_dir to sdk.ini
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   324
  my $TargetFile = "sdk.ini";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   325
  system ("perl -pi.old -e\"s/(StartDir\\s+=).*/StartDir                  = $curr_dir/;\"  $TargetFile");
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   326
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   327
  $TargetFile .= ".old";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   328
  system ("del /F $TargetFile");
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   329
}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   330
1;