94 $REBUILD = 0; |
94 $REBUILD = 0; |
95 $BUILD_TYPE = $BUILD_TYPE_ALL; |
95 $BUILD_TYPE = $BUILD_TYPE_ALL; |
96 $CHECK_BUILD = 0; |
96 $CHECK_BUILD = 0; |
97 $DO_UNPATCH = 0; |
97 $DO_UNPATCH = 0; |
98 $FINALIZE_S60EX = 0; |
98 $FINALIZE_S60EX = 0; |
|
99 $DO_EMU_PATCH=0; ## Added to run optimize emulator patch only when complete build is given |
|
100 $DO_DB_UPDATE=0; ## Added to update commsdb only when complete build is given |
99 |
101 |
100 # Non-edtable configuration |
102 # Non-edtable configuration |
101 $FS = '/'; # File separator |
103 $FS = '/'; # File separator |
102 $PS = ';'; # Path separator |
104 $PS = ';'; # Path separator |
103 @PLATFORMS = ("winscw"); |
105 @PLATFORMS = ("winscw"); |
104 @VARIANTS = ("udeb", "urel"); |
106 @VARIANTS = ("udeb", "urel"); |
105 @SDK_MODULES = ( |
107 @SDK_MODULES = ( |
106 "NMIT", |
108 "NMIT", |
107 # "sdkcommonutils", |
109 #"sdkcommonutils", |
108 "msgsimulation", |
110 "msgsimulation", |
109 "xrpcrt", |
111 "xrpcrt", |
110 "wsock", |
112 "wsock", |
111 "scard", |
113 "new_wsock_3pc", |
112 # "MIDP", later needs to be enabled |
|
113 "emumenubar", |
114 "emumenubar", |
114 "bluetoothdriver", |
115 "bluetoothdriver", |
115 #"Tools", |
116 #"Tools", |
116 # "AsyStub" |
117 "scard", |
|
118 "MIDP", |
|
119 "AsyStub" |
117 ); |
120 ); |
118 |
121 |
119 $PATCH_LIST_FNAME = "sdk_build.conf"; |
122 $PATCH_LIST_FNAME = "sdk_build.conf"; |
120 $PLATFORM = get_plat_name (); |
123 $PLATFORM = get_plat_name (); |
121 $SDK_PROJ_NAME = "PublicSDK/sdkcreationmw"; |
124 $SDK_PROJ_NAME = "PublicSDK/sdkcreationmw"; |
176 exit 1; |
179 exit 1; |
177 } |
180 } |
178 |
181 |
179 msg ("Build script started at " . localtime()); |
182 msg ("Build script started at " . localtime()); |
180 msg ("Cmd line: $0 @ARGV"); |
183 msg ("Cmd line: $0 @ARGV"); |
|
184 |
|
185 |
|
186 if ($DO_EMU_PATCH) |
|
187 { |
|
188 #Apply OptimiseEmulator patch to improve the SDK performance |
|
189 #Do not remove eval error handling, it will cause issues with build scripts |
|
190 msg ("Starting Optimise Emulator Patch, " . localtime()); |
|
191 eval |
|
192 { |
|
193 ## do_apply_patch_OptimiseEmulator(); |
|
194 }; |
|
195 if ($@) |
|
196 { |
|
197 print "\n ERROR: $@"; |
|
198 } |
|
199 msg ("End of Optimise Emulator Patch, " . localtime()); |
|
200 } |
|
201 |
181 |
202 |
182 open PATCH_LIST, $patch_list_path or die "$DIED_MSG Could not find $patch_list_path!"; |
203 open PATCH_LIST, $patch_list_path or die "$DIED_MSG Could not find $patch_list_path!"; |
183 |
204 |
184 if ($DO_PATCH) { |
205 if ($DO_PATCH) { |
185 |
206 |
385 check_series60_tools_component ($m); |
406 check_series60_tools_component ($m); |
386 } |
407 } |
387 dbg ("Build info: @bld_info"); |
408 dbg ("Build info: @bld_info"); |
388 check_platform_build (@bld_info); |
409 check_platform_build (@bld_info); |
389 } |
410 } |
390 |
411 ## Remove the example application build: As example application build should happen only after SDK installation. So |
391 if($FINALIZE_S60EX && $BUILD_TYPE != $BUILD_TYPE_MIDP){ |
412 ## this has to be moved from build phase to sanity test phase |
392 dbg ("Finalizing S60 C++ examples:"); |
413 # if($FINALIZE_S60EX && $BUILD_TYPE != $BUILD_TYPE_MIDP){ |
393 do_s60ex_finalizing(); |
414 # dbg ("Finalizing S60 C++ examples:"); |
|
415 # do_s60ex_finalizing(); |
394 #TODO: Cleaning may not be required for 9.l check and add components in the below function |
416 #TODO: Cleaning may not be required for 9.l check and add components in the below function |
395 #do_s60_rndtools_cleaning(); |
417 #do_s60_rndtools_cleaning(); |
396 } |
418 # } |
397 |
419 |
398 |
420 |
399 msg ("Build script finished at " . localtime()); |
421 msg ("Build script finished at " . localtime()); |
|
422 if ($DO_DB_UPDATE) |
|
423 { |
|
424 do_Db_Update(); |
|
425 } |
|
426 |
400 close ($LOG_FH) if $LOG; |
427 close ($LOG_FH) if $LOG; |
401 } |
428 } |
402 |
429 |
403 # ======================================================================= |
430 # ======================================================================= |
404 sub usage |
431 sub usage |
829 foreach $b (@bld_info) { |
859 foreach $b (@bld_info) { |
830 my @modules = split /,/, $b; |
860 my @modules = split /,/, $b; |
831 my $group_dir = shift @modules; |
861 my $group_dir = shift @modules; |
832 chdir_or_die ("$BUILD_ROOT$group_dir"); |
862 chdir_or_die ("$BUILD_ROOT$group_dir"); |
833 dbg ("Building in $BUILD_ROOT$group_dir"); |
863 dbg ("Building in $BUILD_ROOT$group_dir"); |
834 run ("cmd /c bldmake.bat bldfiles"); |
|
835 |
864 |
836 #modules are optional |
865 #modules are optional |
837 if(@modules>0) |
866 if(@modules>0) |
838 { |
867 { |
839 foreach $m (@modules) |
868 foreach $m (@modules) |
851 # ======================================================================= |
880 # ======================================================================= |
852 sub do_java_platform_build |
881 sub do_java_platform_build |
853 # ======================================================================= |
882 # ======================================================================= |
854 { |
883 { |
855 # Build java system ams |
884 # Build java system ams |
856 my $java_group_dir = "sf/app/java/group"; |
885 my $java_group_dir = "sf/app/jrt/group"; |
857 chdir_or_die ("$BUILD_ROOT$java_group_dir"); |
886 chdir_or_die ("$BUILD_ROOT$java_group_dir"); |
858 dbg ("Building in $BUILD_ROOT$java_group_dir"); |
887 dbg ("Building in $BUILD_ROOT$java_group_dir"); |
859 run ("cmd /c bldmake.bat bldfiles"); |
888 run ("cmd /c sbs export"); |
860 run ("cmd /c abld.bat export"); |
|
861 run ("cmd /c pbuild build winscw udeb midp2ams"); |
889 run ("cmd /c pbuild build winscw udeb midp2ams"); |
862 run ("cmd /c pbuild build winscw udeb wma"); |
890 run ("cmd /c pbuild build winscw udeb wma"); |
863 run ("cmd /c pbuild build winscw udeb multimedia11"); |
891 run ("cmd /c pbuild build winscw udeb multimedia11"); |
864 |
892 |
865 my $s60ex_dir = $BUILD_ROOT . "$SDK_PROJ_NAME/sdkexamples/javaexamples"; |
893 my $s60ex_dir = $BUILD_ROOT . "$SDK_PROJ_NAME/sdkexamples/java"; |
866 chdir_or_die ($s60ex_dir); |
894 chdir_or_die ($s60ex_dir); |
867 |
895 |
868 run_build_cmd("ant IAPInfoMIDlet eSWTMIDlet SystemProperties"); |
896 run_build_cmd("ant IAPInfoMIDlet eSWTMIDlet SystemProperties"); |
869 run_build_cmd("ant copy_documentation"); |
897 run_build_cmd("ant copy_documentation"); |
870 $cmd = "unzip -o \\\\filerblr\\SP\\AM\\DT_SDK\\SDK_BIS\\Repository\\Java_API\\IAPInfoMIDlet_doc.zip -d Z\:\\PublicSDK\\sdkcreationmw\\sdkexamples\\javaexamples\\dist\\examples\\IAPInfoMIDlet"; |
898 $cmd = "unzip -o \\\\filerblr\\SP\\AM\\DT_SDK\\SDK_BIS\\Repository\\Java_API\\IAPInfoMIDlet_doc.zip -d Z\:\\PublicSDK\\sdkcreationmw\\sdkexamples\\java\\dist\\examples\\IAPInfoMIDlet"; |
871 print ($cmd."\n"); system ($cmd); |
899 print ($cmd."\n"); system ($cmd); |
872 $cmd = "unzip -o \\\\filerblr\\SP\\AM\\DT_SDK\\SDK_BIS\\Repository\\Java_API\\eSWTMIDlet_doc.zip -d Z\:\\PublicSDK\\sdkcreationmw\\sdkexamples\\javaexamples\\dist\\examples\\eSWTMIDlet"; |
900 $cmd = "unzip -o \\\\filerblr\\SP\\AM\\DT_SDK\\SDK_BIS\\Repository\\Java_API\\eSWTMIDlet_doc.zip -d Z\:\\PublicSDK\\sdkcreationmw\\sdkexamples\\java\\dist\\examples\\eSWTMIDlet"; |
873 print ($cmd."\n"); system ($cmd); |
901 print ($cmd."\n"); system ($cmd); |
874 $cmd = "unzip -o \\\\filerblr\\SP\\AM\\DT_SDK\\SDK_BIS\\Repository\\Java_API\\SystemPropertiesMidlet_doc.zip -d Z\:\\PublicSDK\\sdkcreationmw\\sdkexamples\\javaexamples\\dist\\examples\\SystemProperties"; |
902 $cmd = "unzip -o \\\\filerblr\\SP\\AM\\DT_SDK\\SDK_BIS\\Repository\\Java_API\\SystemPropertiesMidlet_doc.zip -d Z\:\\PublicSDK\\sdkcreationmw\\sdkexamples\\java\\dist\\examples\\SystemProperties"; |
875 print ($cmd."\n"); system ($cmd); |
903 print ($cmd."\n"); system ($cmd); |
876 system("copy /V Z\:\\PublicSDK\\sdkcreationmw\\sdkexamples\\javaexamples\\examples\\examples.html Z\:\\PublicSDK\\sdkcreationmw\\sdkexamples\\javaexamples\\dist\\examples"); |
904 system("copy /V Z\:\\PublicSDK\\sdkcreationmw\\sdkexamples\\java\\examples\\examples.html Z\:\\PublicSDK\\sdkcreationmw\\sdkexamples\\java\\dist\\examples"); |
877 system("copy /V \\\\filerblr\\SP\\AM\\DT_SDK\\SDK_BIS\\Repository\\Java_API\\build.xml Z\:\\PublicSDK\\sdkcreationmw\\sdkexamples\\javaexamples\\dist\\examples\\IAPInfoMIDlet\\targets"); |
905 system("copy /V \\\\filerblr\\SP\\AM\\DT_SDK\\SDK_BIS\\Repository\\Java_API\\build.xml Z\:\\PublicSDK\\sdkcreationmw\\sdkexamples\\java\\dist\\examples\\IAPInfoMIDlet\\targets"); |
878 } |
906 } |
879 |
907 |
880 # ======================================================================= |
908 # ======================================================================= |
881 sub check_platform_build |
909 sub check_platform_build |
882 # ======================================================================= |
910 # ======================================================================= |
928 my $name = shift; |
954 my $name = shift; |
929 my $dir = "$S60_TOOLS_DIR/$name/group"; |
955 my $dir = "$S60_TOOLS_DIR/$name/group"; |
930 chdir_or_die ($dir); |
956 chdir_or_die ($dir); |
931 chdir_to_build_specific_dir (); |
957 chdir_to_build_specific_dir (); |
932 dbg ("Building in " . getcwd); |
958 dbg ("Building in " . getcwd); |
933 run ("cmd /c bldmake.bat bldfiles"); |
959 |
934 run ("cmd /c abld.bat export"); |
|
935 run ("cmd /c abld.bat makefile"); |
|
936 foreach $bt (@VARIANTS) { |
960 foreach $bt (@VARIANTS) { |
937 if($REBUILD || $CLEAN) { |
961 if($REBUILD || $CLEAN) { |
938 run_build_cmd ( "cmd /c abld.bat clean $bt"); |
962 run_build_cmd ( "cmd /c sbs clean"); |
939 } |
963 } |
940 if (!$CLEAN) { |
964 if (!$CLEAN) { |
941 run_build_cmd ( "cmd /c abld.bat -k build $bt"); |
965 # Build only for winscw , No need to build for ARM targets |
|
966 run_build_cmd ( "cmd /c sbs -c winscw"); |
942 } |
967 } |
943 } |
968 } |
944 } |
969 } |
945 |
970 |
946 |
971 |
1479 |
1498 |
1480 # ======================================================================== |
1499 # ======================================================================== |
1481 sub do_s60ex_finalizing |
1500 sub do_s60ex_finalizing |
1482 # ======================================================================== |
1501 # ======================================================================== |
1483 { |
1502 { |
1484 my $s60ex_dir = $BUILD_ROOT . "$SDK_PROJ_NAME/ExamplesCpp/build"; |
1503 my $s60ex_dir = $BUILD_ROOT . "$SDK_PROJ_NAME/tools_config/build"; |
1485 chdir_or_die ($s60ex_dir); |
1504 chdir_or_die ($s60ex_dir); |
1486 run ("cmd /c finalize.bat"); |
1505 run ("cmd /c finalize.bat"); |
1487 } |
1506 } |
1488 |
1507 |
1489 # ======================================================================== |
1508 # ======================================================================== |
1498 foreach my $rndtools_cleandirs ( @rndtools_cleandirs ) |
1517 foreach my $rndtools_cleandirs ( @rndtools_cleandirs ) |
1499 { |
1518 { |
1500 print "\n\n=== Clean up of rnd tools: $rndtools_cleandirs\n\n ==="; |
1519 print "\n\n=== Clean up of rnd tools: $rndtools_cleandirs\n\n ==="; |
1501 chdir $rndtools_cleandirs or print " WARNING: Can chdir to $rndtools_cleandirs: $!"; |
1520 chdir $rndtools_cleandirs or print " WARNING: Can chdir to $rndtools_cleandirs: $!"; |
1502 |
1521 |
1503 $cmd = "call bldmake bldfiles"; |
1522 |
|
1523 |
|
1524 $cmd = "call sbs -m winscw"; |
1504 system ($cmd); #==0 or print ($cmd."\n\n"); |
1525 system ($cmd); #==0 or print ($cmd."\n\n"); |
1505 |
1526 |
1506 $cmd = "call abld makefile"; |
1527 $cmd = "call sbs reallyclean"; |
1507 system ($cmd); #==0 or print ($cmd."\n\n"); |
1528 system ($cmd); #==0 or print ($cmd."\n\n"); |
1508 |
1529 } |
1509 $cmd = "call abld reallyclean"; |
1530 } |
1510 system ($cmd); #==0 or print ($cmd."\n\n"); |
1531 # ======================================================================== |
1511 } |
1532 sub do_Db_Update() |
1512 } |
1533 # ======================================================================== |
|
1534 { |
|
1535 |
|
1536 msg("Updating the commsDb\n"); |
|
1537 my $CommsDb_update = "${BUILD_ROOT}epoc32/release/winscw/udeb"; |
|
1538 chdir_or_die ($CommsDb_update); |
|
1539 run ("cmd /c ced -dtextshell -- -i c:\\cedout.cfg"); |
|
1540 run ("cmd /c dbcreator -dtextshell --"); |
|
1541 msg("Finished Updating the commsDb\n"); |
|
1542 |
|
1543 } |
|
1544 |
|
1545 # ======================================================================== |
|
1546 sub do_apply_patch_OptimiseEmulator |
|
1547 # ======================================================================== |
|
1548 { |
|
1549 #return 0 if (! -d optEmuPatch); |
|
1550 msg("Start Apply Emulator performance boost patching..."); |
|
1551 my $optEmuPatch = $BUILD_ROOT . "OptimiseEmulator"; |
|
1552 #Add patch path to System path |
|
1553 $ENV{'PATH'}=$optEmuPatch.";".$ENV{'PATH'}; |
|
1554 chdir_or_die ($optEmuPatch); |
|
1555 run ("cmd /c OptimiseEmulator.bat"); |
|
1556 msg("Finished Applying Emulator performance boost Patch..."); |
|
1557 } |