sdkcreationmw/sdkbuild/SDK_WINSCW/Create_SDK.pl
changeset 0 b26acd06ea60
equal deleted inserted replaced
-1:000000000000 0:b26acd06ea60
       
     1 #
       
     2 # Copyright (c) 2002-2006 Nokia Corporation and/or its subsidiary(-ies).
       
     3 # All rights reserved.
       
     4 # This component and the accompanying materials are made available
       
     5 # under the terms of "Eclipse Public License v1.0"
       
     6 # which accompanies this distribution, and is available
       
     7 # at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 #
       
     9 # Initial Contributors:
       
    10 # Nokia Corporation - initial contribution.
       
    11 #
       
    12 # Contributors:
       
    13 #
       
    14 # Description: 
       
    15 #
       
    16 
       
    17 use TinyMake ':all';
       
    18 use strict;
       
    19 use Cwd;
       
    20 use SDK_vars;
       
    21 use SDK;
       
    22 use SDK_utils;
       
    23 use Remote_utils;
       
    24 use SDK_lang;
       
    25 use ApiRef;
       
    26 use File::Path;
       
    27 
       
    28 my $phasedir = "phase";
       
    29 my $logsdir = "logs";
       
    30 my ($sec,$min,$hour,$mday,$mon,$year) =  localtime();
       
    31 my $start_time = sprintf ("%02d%02d%02d%02d%02d", ($year + 1900)%100, $mon + 1, $mday, $hour, $min);
       
    32 our $given_target = $ARGV[0] || "${phasedir}\\_all";
       
    33 $|=1; #Immediate flush
       
    34 mkpath (${phasedir});
       
    35 mkpath (${logsdir});
       
    36 
       
    37 file "${phasedir}\\initialize.log" => sub {
       
    38 	record_time("start",$target,$phasedir);
       
    39   start_target($target, ${logsdir});
       
    40   initialize($start_time, \%iniH);
       
    41    record_time("end",$target,$phasedir);
       
    42     sh "touch $target";
       
    43 };
       
    44 file "${phasedir}\\sdk_installer.log" => ["${phasedir}\\sdk_files.log"], sub {
       
    45 	record_time("start",$target,$phasedir);
       
    46   start_target($target, ${logsdir});
       
    47   run_installer();
       
    48    record_time("end",$target,$phasedir);
       
    49   sh "touch $target";
       
    50 };
       
    51 file "${phasedir}\\sdk_publish.log" => ["${phasedir}\\sdk_installer.log"], sub {
       
    52 	record_time("start",$target,$phasedir);
       
    53   start_target($target, ${logsdir});
       
    54   publish_sdk();
       
    55    record_time("end",$target,$phasedir);
       
    56   sh "touch $target";
       
    57 };
       
    58 file "${phasedir}\\sdk_files.log" => ["${phasedir}\\sce.log","${phasedir}\\sdk_api.log","${phasedir}\\api_ref.log","${phasedir}\\language_packages.log","${phasedir}\\sdk_common.log",
       
    59   "${phasedir}\\_copy_api_platform"], sub { 
       
    60 	  record_time("start",$target,$phasedir);
       
    61   start_target($target, ${logsdir});
       
    62   create_sdk_files();
       
    63    record_time("end",$target,$phasedir);
       
    64   sh "touch $target";
       
    65 };
       
    66 file "${phasedir}\\sdk_common.log" => ["${phasedir}\\sce.log","${phasedir}\\sdk_api.log"], sub {
       
    67        record_time("start",$target,$phasedir);	
       
    68   start_target($target);
       
    69   create_sdk_common(\%iniH); 
       
    70    record_time("end",$target,$phasedir);
       
    71   sh "touch $target";
       
    72 };
       
    73 file "${phasedir}\\language_packages.log" => ["${phasedir}\\copy_lang_zips.log","${phasedir}\\s60_platform.log","${phasedir}\\sdk_api.log","${phasedir}\\sdk_common.log"], sub { 
       
    74 	record_time("start",$target,$phasedir);
       
    75   start_target($target, ${logsdir});
       
    76   create_lang_package($iniH{S60_Root}, "$iniH{S60_Root}\\Languages", $common_graylist, $blacklist, "\\sdk_lang\\epoc32\\tools\\ecmt\\language");
       
    77    record_time("end",$target,$phasedir);
       
    78   sh "touch $target"; 
       
    79 };
       
    80 
       
    81 file "${phasedir}\\sdk_api.log" => ["${phasedir}\\fetch_IF_sheets.log","${phasedir}\\sce.log"], sub { 
       
    82 	record_time("start",$target,$phasedir);
       
    83   start_target($target, ${logsdir});
       
    84   create_sdk_api(\%iniH);
       
    85    record_time("end",$target,$phasedir);
       
    86   sh "touch $target";
       
    87 };
       
    88 
       
    89 
       
    90 file "${phasedir}\\S60_api_description.log" => ["${phasedir}\\s60_all.log"], sub { 
       
    91 	record_time("start",$target,$phasedir);
       
    92   start_target($target);
       
    93   create_apidescr_xml( \%iniH, "$iniH{S60_Root}\\sf", "$repository_area\\CPP_API\\apidescr.xml");
       
    94   record_time("end",$target,$phasedir);
       
    95   sh "touch $target";
       
    96 };
       
    97 
       
    98 file "${phasedir}\\sce.log" => ["${phasedir}\\s60_platform.log","${phasedir}\\synergy_work_area.log","${phasedir}\\sdk_binary_components.log","${phasedir}\\sdk_platform.log", 
       
    99   "${phasedir}\\examples_Java.log", "${phasedir}\\fetch_capas.log","${phasedir}\\beatnik.log"], sub { 
       
   100 	  record_time("start",$target,$phasedir);
       
   101   start_target($target, ${logsdir});
       
   102   sce_prepare(\%iniH);
       
   103    record_time("end",$target,$phasedir);
       
   104   sh "touch $target";
       
   105 };
       
   106 file "${phasedir}\\sdk_platform.log" => ["${phasedir}\\s60_platform.log","${phasedir}\\synergy_work_area.log"], sub {
       
   107        record_time("start",$target,$phasedir);	
       
   108   start_target($target, ${logsdir});
       
   109   integrate(\%iniH);
       
   110    record_time("end",$target,$phasedir);
       
   111   sh "touch $target"; 
       
   112 };
       
   113 
       
   114 file "${phasedir}\\examples_Java.log" => sub {
       
   115 	record_time("start",$target,$phasedir);
       
   116   start_target($target, ${logsdir});
       
   117   build_examples_java(\%iniH);
       
   118    record_time("end",$target,$phasedir);
       
   119   sh "touch $target"; 
       
   120 }; 
       
   121 
       
   122 file "${phasedir}\\synergy_work_area.log" => sub {
       
   123        record_time("start",$target,$phasedir);	
       
   124   start_target($target, ${logsdir});
       
   125   reconfigure(\%iniH);
       
   126   copy_sdk_source_components(\%iniH); 
       
   127   start_target("${phasedir}\\sdk_binary_components.log");
       
   128   sh "touch ${phasedir}\\sdk_binary_components.log";
       
   129    record_time("end",$target,$phasedir);
       
   130   sh "touch $target";
       
   131 };
       
   132 file "${phasedir}\\s60_platform.log" => ["${phasedir}\\s60_all.log","${phasedir}\\s60_recovery.log","${phasedir}\\copy_lang_zips.log"], sub { 
       
   133 	record_time("start",$target,$phasedir);
       
   134   start_target($target, ${logsdir});
       
   135   copy_platform_patch();
       
   136    record_time("end",$target,$phasedir);
       
   137   sh "touch $target";
       
   138 };
       
   139 file "${phasedir}\\s60_all.log" => ["${phasedir}\\initialize.log"], sub { 
       
   140 	record_time("start",$target,$phasedir);
       
   141   start_target($target, ${logsdir});
       
   142   copy_platform(\%iniH);
       
   143   start_target("${phasedir}\\s60_recovery.log");
       
   144   sh "touch ${phasedir}\\s60_recovery.log";
       
   145    record_time("end",$target,$phasedir);
       
   146   sh "touch $target";
       
   147 };
       
   148 file "${phasedir}\\s60_recovery.log" =>  sub { 
       
   149 	record_time("start",$target,$phasedir);
       
   150   start_target($target, ${logsdir});
       
   151   unzip_some_source_zips();
       
   152    record_time("end",$target,$phasedir);
       
   153   sh "touch $target";
       
   154 };
       
   155 file "${phasedir}\\copy_lang_zips.log" =>  sub { 
       
   156 	record_time("start",$target,$phasedir);
       
   157   start_target($target, ${logsdir});
       
   158   copy_language_zips(\%iniH);
       
   159    record_time("end",$target,$phasedir);
       
   160   sh "touch $target";
       
   161 };
       
   162 file "${phasedir}\\copy_api_platform.log" =>  sub { 
       
   163 	record_time("start",$target,$phasedir);
       
   164   start_target($target, ${logsdir});
       
   165   copy_api_platform(\%iniH);
       
   166    record_time("end",$target,$phasedir);
       
   167   sh "touch $target";
       
   168 };
       
   169 file "${phasedir}\\sdk_binary_components.log" => ["${phasedir}\\synergy_work_area.log"], sub { 
       
   170 	record_time("start",$target,$phasedir);
       
   171   start_target($target, ${logsdir});
       
   172   copy_sdk_binary_components(\%iniH);
       
   173    #Todo: Add Path validator code here
       
   174   my $dump =dump_sdk_ini(\%iniH);
       
   175   validate_sdk_ini_paths($dump,$target,\%iniH,"Languages_Patch");
       
   176    record_time("end",$target,$phasedir);
       
   177   sh "touch $target";
       
   178 };
       
   179 
       
   180 file "${phasedir}\\beatnik.log" => sub {
       
   181 	record_time("start",$target,$phasedir);
       
   182   start_target($target, ${logsdir});
       
   183   beatnik($iniH{Beatnik});
       
   184    record_time("end",$target,$phasedir);
       
   185   sh "touch $target";
       
   186 };
       
   187 file "${phasedir}\\fetch_capas.log" => sub {
       
   188 	record_time("start",$target,$phasedir);
       
   189   start_target($target);
       
   190   fetch_capas($iniH{Capas});
       
   191    record_time("end",$target,$phasedir);
       
   192   sh "touch $target";
       
   193 };
       
   194 file "${phasedir}\\fetch_IF_sheets.log" => ["${phasedir}\\initialize.log"], sub {
       
   195 	record_time("start",$target,$phasedir);
       
   196   start_target($target, ${logsdir});
       
   197   fetch_IF_sheets($iniH{CPP_API}, "$iniH{S60_Root}\\sce\\IFs", \%iniH);
       
   198    record_time("end",$target,$phasedir);
       
   199   sh "touch $target";
       
   200 };
       
   201 file "${phasedir}\\tidy_up" => sub { 
       
   202 	
       
   203   tidy_up(${phasedir}, ${logsdir});
       
   204 
       
   205 };
       
   206 file "${phasedir}\\sdk.ini" => sub { 
       
   207 	record_time("start",$target,$phasedir);
       
   208  
       
   209 
       
   210   my $dump = dump_sdk_ini(\%iniH);
       
   211   local $,="\n";
       
   212   print @$dump;
       
   213    record_time("end",$target,$phasedir);
       
   214 
       
   215 };
       
   216 
       
   217 
       
   218 # This is for testing purposes only....
       
   219 file "phase\\dummy" => sub { 
       
   220 	record_time("start",$target,$phasedir);
       
   221 	 start_target($target, ${logsdir});
       
   222   print "Dummy phase entered !\n";
       
   223   
       
   224   print  "changed value: $iniH{StartDir}\n";
       
   225     copy_and_interpolate("$init_dir\\$::iniH{PTBase}\\templates\\apiref32.properties", "$init_dir\\$::iniH{PTBase}\\conf");
       
   226     copy_and_interpolate("$init_dir\\$::iniH{PTBase}\\templates\\DoxySettings.cfg", "$init_dir\\$::iniH{PTBase}\\doxygen");
       
   227     
       
   228 	 record_time("end",$target,$phasedir);   
       
   229   sh "touch $target";
       
   230 };
       
   231 
       
   232 
       
   233 
       
   234 make @ARGV;
       
   235 
       
   236 
       
   237 
       
   238 __END__
       
   239 file "${phasedir}\\_cpp_installer" => ["${phasedir}\\_sdk_cpp"], sub {
       
   240   start_target($target);
       
   241   run_cpp_installer();
       
   242   sh "touch $target";
       
   243 };
       
   244 file "${phasedir}\\_cpp_publish" => ["${phasedir}\\_cpp_installer"], sub {
       
   245   start_target($target);
       
   246   publish_cpp();
       
   247   sh "touch $target";
       
   248 };
       
   249 file "${phasedir}\\_java_installer" => ["${phasedir}\\_sdk_java"], sub {
       
   250   start_target($target);
       
   251   run_java_installer();
       
   252    record_time("end",$target,$phasedir);
       
   253   sh "touch $target";
       
   254 };
       
   255 file "${phasedir}\\_java_publish" => ["${phasedir}\\_java_installer"], sub {
       
   256   start_target($target);
       
   257   publish_java();
       
   258    record_time("end",$target,$phasedir);
       
   259   sh "touch $target";
       
   260 };