common/build.postbuild.xml
changeset 1035 62b7cda1c2bb
parent 1031 6660c0312c89
child 1036 1f465f774089
equal deleted inserted replaced
1034:24bd01e430fd 1035:62b7cda1c2bb
   218         <zip destfile="${build.output.dir}/zips/release/build_md5.zip">
   218         <zip destfile="${build.output.dir}/zips/release/build_md5.zip">
   219             <zipfileset dir="${build.drive}/output/md5/" prefix="epoc32/relinfo"/>
   219             <zipfileset dir="${build.drive}/output/md5/" prefix="epoc32/relinfo"/>
   220         </zip>
   220         </zip>
   221     </target>    
   221     </target>    
   222     
   222     
   223     <target name="sf-package-binary" depends="sf-package-postbuild-rnd">
   223     <target name="sf-package-binary" depends="sf-package-postbuild-rnd,sf-merge-manifest">
   224         <!-- Warning: Reverting to using the He zipper will also revert to a single zip for the binaries:
   224         <!-- Warning: Reverting to using the He zipper will also revert to a single zip for the binaries:
   225              would need to update the template and possibly the script that populates it -->
   225              would need to update the template and possibly the script that populates it -->
   226         <!--antcall target="sf-zip-content">
   226         <!--antcall target="sf-zip-content">
   227             <param name="zip.config.file" value="${temp.build.dir}/zip.cfg.xml.ftl"/>
   227             <param name="zip.config.file" value="${temp.build.dir}/zip.cfg.xml.ftl"/>
   228             <param name="zip.target.name" value="bin" />
   228             <param name="zip.target.name" value="bin" />
   237                 </if>
   237                 </if>
   238                 <property name="sf.epoc32.exclusions.file" value="nul:"/>
   238                 <property name="sf.epoc32.exclusions.file" value="nul:"/>
   239                 <exec executable="7za" dir="${build.drive}" output="${build.log.dir}/zip_${build.id}_binaries_epoc32.log">
   239                 <exec executable="7za" dir="${build.drive}" output="${build.log.dir}/zip_${build.id}_binaries_epoc32.log">
   240                     <arg value="a"/>
   240                     <arg value="a"/>
   241                     <arg value="-t${sf.spec.package.zip.format}"/>
   241                     <arg value="-t${sf.spec.package.zip.format}"/>
   242                     <arg value="-x@${build.log.dir}/rnd_excludefile.txt"/>
   242                     <arg value="-x@${build.log.dir}/rnd_excludefile.txt"/> <!-- rnd content taken from internal hg repos -->
   243                     <arg value="-x@${sf.spec.prebuilt.excludelist}"/>
   243                     <arg value="-x@${sf.spec.prebuilt.excludelist}"/>
       
   244                     <arg value="-x@$output/temp_build_files/manifest_excludelist.txt"/> <!-- merged list of prebuilt content such as binaries_prebuilt -->
   244                     <arg value="-x@${sf.epoc32.exclusions.file}"/>
   245                     <arg value="-x@${sf.epoc32.exclusions.file}"/>
   245                     <arg value="-x!epoc32\gcc"/>
   246                     <arg value="-x!epoc32\gcc"/>
   246                     <arg value="-x!epoc32\gcc_mingw"/>
   247                     <arg value="-x!epoc32\gcc_mingw"/>
   247                     <arg value="-x!epoc32\tools"/>
   248                     <arg value="-x!epoc32\tools"/>
   248                     <arg value="-x!epoc32\data\buildinfo.txt"/>
   249                     <arg value="-x!epoc32\data\buildinfo.txt"/>
   263                     <exec executable="7za" dir="${build.drive}" output="${build.log.dir}/zip_${build.id}_binaries_sdk.log">
   264                     <exec executable="7za" dir="${build.drive}" output="${build.log.dir}/zip_${build.id}_binaries_sdk.log">
   264                         <arg value="a"/>
   265                         <arg value="a"/>
   265                         <arg value="-t${sf.spec.package.zip.format}"/>
   266                         <arg value="-t${sf.spec.package.zip.format}"/>
   266                         <arg value="-i@${sf.sdk.header.list.file}"/>
   267                         <arg value="-i@${sf.sdk.header.list.file}"/>
   267                         <arg value="-x@${build.log.dir}/rnd_excludefile.txt"/>
   268                         <arg value="-x@${build.log.dir}/rnd_excludefile.txt"/>
       
   269                         <arg value="-x@$output/temp_build_files/manifest_excludelist.txt"/>
   268                         <arg value="-x@${sf.spec.prebuilt.excludelist}"/>
   270                         <arg value="-x@${sf.spec.prebuilt.excludelist}"/>
   269                         <arg value="${build.drive}/output/zips/release/binaries_epoc_sdk.zip"/>
   271                         <arg value="${build.drive}/output/zips/release/binaries_epoc_sdk.zip"/>
   270                     </exec>
   272                     </exec>
   271                     <!-- Check that all the files we want in the SDK are zipped -->
   273                     <!-- Check that all the files we want in the SDK are zipped -->
   272                     <antcall target="sf-log-to-brag">
   274                     <antcall target="sf-log-to-brag">
   286             <!-- WinsCW binaries, by udeb/urel/lib -->
   288             <!-- WinsCW binaries, by udeb/urel/lib -->
   287             <exec executable="7za" dir="${build.drive}" output="${build.log.dir}/zip_${build.id}_binaries_winscw_udeb.log">
   289             <exec executable="7za" dir="${build.drive}" output="${build.log.dir}/zip_${build.id}_binaries_winscw_udeb.log">
   288                 <arg value="a"/>
   290                 <arg value="a"/>
   289                 <arg value="-t${sf.spec.package.zip.format}"/>
   291                 <arg value="-t${sf.spec.package.zip.format}"/>
   290                 <arg value="-x@${build.log.dir}/rnd_excludefile.txt"/>
   292                 <arg value="-x@${build.log.dir}/rnd_excludefile.txt"/>
       
   293                 <arg value="-x@$output/temp_build_files/manifest_excludelist.txt"/>
   291                 <arg value="-x@${sf.spec.prebuilt.excludelist}"/>
   294                 <arg value="-x@${sf.spec.prebuilt.excludelist}"/>
   292                 <arg value="-xr!*.sym"/>
   295                 <arg value="-xr!*.sym"/>
   293                 <arg value="-xr!*.lib"/>
   296                 <arg value="-xr!*.lib"/>
   294                 <arg value="${build.drive}/output/zips/release/binaries_winscw_udeb.zip"/>
   297                 <arg value="${build.drive}/output/zips/release/binaries_winscw_udeb.zip"/>
   295                 <arg value="epoc32\release\winscw\udeb"/>
   298                 <arg value="epoc32\release\winscw\udeb"/>
   296             </exec>
   299             </exec>
   297             <exec executable="7za" dir="${build.drive}" output="${build.log.dir}/zip_${build.id}_binaries_winscw_urel.log">
   300             <exec executable="7za" dir="${build.drive}" output="${build.log.dir}/zip_${build.id}_binaries_winscw_urel.log">
   298                 <arg value="a"/>
   301                 <arg value="a"/>
   299                 <arg value="-t${sf.spec.package.zip.format}"/>
   302                 <arg value="-t${sf.spec.package.zip.format}"/>
   300                 <arg value="-x@${build.log.dir}/rnd_excludefile.txt"/>
   303                 <arg value="-x@${build.log.dir}/rnd_excludefile.txt"/>
       
   304                 <arg value="-x@$output/temp_build_files/manifest_excludelist.txt"/>
   301                 <arg value="-x@${sf.spec.prebuilt.excludelist}"/>
   305                 <arg value="-x@${sf.spec.prebuilt.excludelist}"/>
   302                 <arg value="-xr!*.sym"/>
   306                 <arg value="-xr!*.sym"/>
   303                 <arg value="-xr!*.lib"/>
   307                 <arg value="-xr!*.lib"/>
   304                 <arg value="${build.drive}/output/zips/release/binaries_winscw_urel.zip"/>
   308                 <arg value="${build.drive}/output/zips/release/binaries_winscw_urel.zip"/>
   305                 <arg value="epoc32\release\winscw\urel"/>
   309                 <arg value="epoc32\release\winscw\urel"/>
   307             <exec executable="7za" dir="${build.drive}" output="${build.log.dir}/zip_${build.id}_binaries_winscw_lib.log">
   311             <exec executable="7za" dir="${build.drive}" output="${build.log.dir}/zip_${build.id}_binaries_winscw_lib.log">
   308                 <arg value="a"/>
   312                 <arg value="a"/>
   309                 <arg value="-t${sf.spec.package.zip.format}"/>
   313                 <arg value="-t${sf.spec.package.zip.format}"/>
   310                 <arg value="-ir!epoc32/release/winscw/*.lib"/>
   314                 <arg value="-ir!epoc32/release/winscw/*.lib"/>
   311                 <arg value="-x@${build.log.dir}/rnd_excludefile.txt"/>
   315                 <arg value="-x@${build.log.dir}/rnd_excludefile.txt"/>
       
   316                 <arg value="-x@$output/temp_build_files/manifest_excludelist.txt"/>
   312                 <arg value="-x@${sf.spec.prebuilt.excludelist}"/>
   317                 <arg value="-x@${sf.spec.prebuilt.excludelist}"/>
   313                 <arg value="${build.drive}/output/zips/release/binaries_winscw_lib.zip"/>
   318                 <arg value="${build.drive}/output/zips/release/binaries_winscw_lib.zip"/>
   314             </exec>
   319             </exec>
   315             
   320             
   316             <!-- ARMv5 binaries, by udeb/urel/lib -->
   321             <!-- ARMv5 binaries, by udeb/urel/lib -->
   317             <exec executable="7za" dir="${build.drive}" output="${build.log.dir}/zip_${build.id}_binaries_armv5_udeb.log">
   322             <exec executable="7za" dir="${build.drive}" output="${build.log.dir}/zip_${build.id}_binaries_armv5_udeb.log">
   318                 <arg value="a"/>
   323                 <arg value="a"/>
   319                 <arg value="-t${sf.spec.package.zip.format}"/>
   324                 <arg value="-t${sf.spec.package.zip.format}"/>
   320                 <arg value="-x@${build.log.dir}/rnd_excludefile.txt"/>
   325                 <arg value="-x@${build.log.dir}/rnd_excludefile.txt"/>
       
   326                 <arg value="-x@$output/temp_build_files/manifest_excludelist.txt"/>
   321                 <arg value="-x@${sf.spec.prebuilt.excludelist}"/>
   327                 <arg value="-x@${sf.spec.prebuilt.excludelist}"/>
   322                 <arg value="-xr!*.sym"/>
   328                 <arg value="-xr!*.sym"/>
   323                 <arg value="${build.drive}/output/zips/release/binaries_armv5_udeb.zip"/>
   329                 <arg value="${build.drive}/output/zips/release/binaries_armv5_udeb.zip"/>
   324                 <arg value="epoc32\release\armv5\udeb"/>
   330                 <arg value="epoc32\release\armv5\udeb"/>
   325             </exec>
   331             </exec>
   326             <exec executable="7za" dir="${build.drive}" output="${build.log.dir}/zip_${build.id}_binaries_armv5_urel.log">
   332             <exec executable="7za" dir="${build.drive}" output="${build.log.dir}/zip_${build.id}_binaries_armv5_urel.log">
   327                 <arg value="a"/>
   333                 <arg value="a"/>
   328                 <arg value="-t${sf.spec.package.zip.format}"/>
   334                 <arg value="-t${sf.spec.package.zip.format}"/>
   329                 <arg value="-x@${build.log.dir}/rnd_excludefile.txt"/>
   335                 <arg value="-x@${build.log.dir}/rnd_excludefile.txt"/>
       
   336                 <arg value="-x@$output/temp_build_files/manifest_excludelist.txt"/>
   330                 <arg value="-x@${sf.spec.prebuilt.excludelist}"/>
   337                 <arg value="-x@${sf.spec.prebuilt.excludelist}"/>
   331                 <arg value="-xr!*.sym"/>
   338                 <arg value="-xr!*.sym"/>
   332                 <arg value="${build.drive}/output/zips/release/binaries_armv5_urel.zip"/>
   339                 <arg value="${build.drive}/output/zips/release/binaries_armv5_urel.zip"/>
   333                 <arg value="epoc32\release\armv5\urel"/>
   340                 <arg value="epoc32\release\armv5\urel"/>
   334             </exec>
   341             </exec>
   335             <exec executable="7za" dir="${build.drive}" output="${build.log.dir}/zip_${build.id}_binaries_armv5_lib.log">
   342             <exec executable="7za" dir="${build.drive}" output="${build.log.dir}/zip_${build.id}_binaries_armv5_lib.log">
   336                 <arg value="a"/>
   343                 <arg value="a"/>
   337                 <arg value="-t${sf.spec.package.zip.format}"/>
   344                 <arg value="-t${sf.spec.package.zip.format}"/>
   338                 <arg value="-x@${build.log.dir}/rnd_excludefile.txt"/>
   345                 <arg value="-x@${build.log.dir}/rnd_excludefile.txt"/>
       
   346                 <arg value="-x@$output/temp_build_files/manifest_excludelist.txt"/>
   339                 <arg value="-x@${sf.spec.prebuilt.excludelist}"/>
   347                 <arg value="-x@${sf.spec.prebuilt.excludelist}"/>
   340                 <arg value="-xr!*.sym"/>
   348                 <arg value="-xr!*.sym"/>
   341                 <arg value="-ir!epoc32/release/armv5/_*.bin"/> <!-- include bootloaders in common lib zipfile -->
   349                 <arg value="-ir!epoc32/release/armv5/_*.bin"/> <!-- include bootloaders in common lib zipfile -->
   342                 <arg value="${build.drive}/output/zips/release/binaries_armv5_lib.zip"/>
   350                 <arg value="${build.drive}/output/zips/release/binaries_armv5_lib.zip"/>
   343                 <arg value="epoc32\release\armv5\lib"/>
   351                 <arg value="epoc32\release\armv5\lib"/>
   344             </exec>
   352             </exec>
   345         </parallel>
   353         </parallel>
   346         
   354         
   347         <runtarget target="sf-package-tools"/>
   355         <runtarget target="sf-package-tools"/>
       
   356         <runtarget target="sf-package-prebuilt"/>
   348         
   357         
   349         <!-- Generate release_metadata entries for the above zips -->
   358         <!-- Generate release_metadata entries for the above zips -->
   350         <antcall target="sf-zip-content">
   359         <antcall target="sf-zip-content">
   351             <param name="zip.config.file" value="${temp.build.dir}/zip.cfg.xml.ftl"/>
   360             <param name="zip.config.file" value="${temp.build.dir}/zip.cfg.xml.ftl"/>
   352             <param name="zip.target.name" value="bin-just-metadata" />
   361             <param name="zip.target.name" value="bin-just-metadata" />
   363     <target name="sf-package-tools" >
   372     <target name="sf-package-tools" >
   364         <exec executable="7za" dir="${build.drive}" output="${build.log.dir}/zip_${build.id}_tools_epoc32.log">
   373         <exec executable="7za" dir="${build.drive}" output="${build.log.dir}/zip_${build.id}_tools_epoc32.log">
   365             <arg value="a"/>
   374             <arg value="a"/>
   366             <arg value="-t${sf.spec.package.zip.format}"/>
   375             <arg value="-t${sf.spec.package.zip.format}"/>
   367             <arg value="-x@${build.log.dir}/rnd_excludefile.txt"/>
   376             <arg value="-x@${build.log.dir}/rnd_excludefile.txt"/>
       
   377             <arg value="-x@$output/temp_build_files/manifest_excludelist.txt"/>
   368             <arg value="-x@${sf.spec.prebuilt.excludelist}"/>
   378             <arg value="-x@${sf.spec.prebuilt.excludelist}"/>
   369             <arg value="${build.drive}/output/zips/release/tools_epoc.zip"/>
   379             <arg value="${build.drive}/output/zips/release/tools_epoc.zip"/>
   370             <arg value="epoc32/tools"/>
   380             <arg value="epoc32/tools"/>
   371             <arg value="epoc32/gcc"/>
   381             <arg value="epoc32/gcc"/>
   372             <arg value="epoc32/gcc_mingw"/>
   382             <arg value="epoc32/gcc_mingw"/>
   388             <arg value="t"/>
   398             <arg value="t"/>
   389             <arg value="*.zip"/>
   399             <arg value="*.zip"/>
   390         </exec>  
   400         </exec>  
   391     </target>
   401     </target>
   392 
   402 
       
   403     <!-- merge manifests for prebuilt stuff delivered at the start of build process -->
       
   404     <target name="sf-merge-manifest">
       
   405       <echo message="INFO Build drive is ${build.drive} "/>
       
   406       <concat destfile="${build.drive}\output\temp_build_files\manifest_excludelist.txt">
       
   407         <fileset dir="${build.drive}" includes="*manifest*"/>
       
   408       </concat>
       
   409        
       
   410        <!-- touch file to update/create it in the event that there are no manifest* files available 
       
   411             as 7z will not be happy being given a non-existent file -->  
       
   412       <touch file="${build.drive}\output\temp_build_files\manifest_excludelist.txt"/>
       
   413     </target>
       
   414 
       
   415     <target name="sf-package-prebuilt" depends="sf-merge-manifest">
       
   416     <!-- for each prebuilt manifest* file, repackage -->  
       
   417 
       
   418       <for param="manifest">
       
   419         <path>
       
   420           <fileset dir="${build.drive}\">
       
   421             <include name="manifest*.txt"/>
       
   422             <exclude name="manifest*restricted*.txt"/> <!-- dont repack restricted content such as testconfigfileparser -->
       
   423           </fileset>
       
   424         </path>
       
   425         <!-- strip manifest_ and .txt extension for matched file -->
       
   426         <sequential>
       
   427         <propertyregex property="manifest.shortname" override="true" input="@{manifest}" regexp="manifest_(\S+)(.txt)" select="\1" global="true"  casesensitive="false"/>
       
   428         <propertyregex property="manifest.fullname"  override="true" input="@{manifest}" regexp="(.*)" select="\1" global="true"  casesensitive="false"/>
       
   429         <propertyregex property="manifest.pkgname"   override="true" input="@{manifest}" regexp="manifest_binaries_(\S+)(.txt)" select="\1" global="true"  casesensitive="false"/>
       
   430 
       
   431         <echo message="INFO Packaging ${manifest.fullname} into ${manifest.shortname}.zip"/>
       
   432 
       
   433         <exec executable="7za" dir="${build.drive}/" output="${build.drive}/zip_${manifest.shortname}.log">
       
   434             <arg value="a"/>
       
   435             <arg value="-t${sf.spec.package.zip.format}"/>
       
   436             <arg value="-i@${manifest.fullname}"/>
       
   437             <arg value="${build.drive}/output/zips/release/${manifest.shortname}.zip"/> 
       
   438         </exec>
       
   439 
       
   440         <!-- merge release metadata -->
       
   441         <antcall target="sf-zip-content">
       
   442             <param name="zip.config.file"  value="${temp.build.dir}/zip.cfg.xml.ftl"/>
       
   443             <param name="zip.target.name"  value="bin-${manifest.pkgname}-metadata" />
       
   444             <param name="sf.spec.job.name" value="${manifest.pkgname}" />
       
   445         </antcall>
       
   446         </sequential>  
       
   447       </for>
       
   448 
       
   449     </target>
   393     <!-- runs analysis of missing bins and source -->
   450     <!-- runs analysis of missing bins and source -->
   394     <target name="sf-run-analysis">
   451     <target name="sf-run-analysis">
   395         <stopwatch name="sf-run-analysis"/>
   452         <stopwatch name="sf-run-analysis"/>
   396         <mkdir dir="${build.log.dir}/analysis"/>
   453         <mkdir dir="${build.log.dir}/analysis"/>
   397         <parallel>
   454         <parallel>