--- a/common/tools/7z_list_to_manifest.pl Mon May 17 13:41:23 2010 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,57 +0,0 @@
-#!/usr/bin/perl
-
-# Copyright (c) 2009 Symbian Foundation Ltd
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Symbian Foundation Ltd - initial contribution.
-#
-# Contributors:
-#
-# Description:
-# Turn a 7z listing into a manifest file that can be re-used by 7z
-# - Assumes that header/footer is fixed, and that file listing starts at column 53
-# Also allows use on a zipfile directly by passing -z as an option
-
-use strict;
-
-my $line;
-my $between_header_footer = 0;
-my $header_footer_pattern = "------------------- ----- ------------ ------------ ------------------------";
-
-my $file = shift or die "Usage: $0 <7z list output file> [-z to run directly on a zipfile]\n"; # provided 7z list to process
-my $mode = shift;
-
-# if -z has been specified, then generate intermediate 7z list file for processing
-if ($mode eq lc("-z")) {
- system("7z l $file > $file.tmp.lst");
- $file = $file.".tmp.lst";
-}
-
-open my $sevenZfile, "<", $file or die;
-
-while ($line =<$sevenZfile>)
-{
- if ($line =~ /$header_footer_pattern/)
- {
- $between_header_footer= !$between_header_footer;
-
- }
- if (($line =~ /^(.{53})(.*)/) && ($line !=/$header_footer_pattern/))
- {
- print $2 ."\n" if $between_header_footer;
- next;
- }
-}
-
-close $sevenZfile;
-
-# remove temp 7z file if one has been generated
-if ($mode eq lc("-z")) {
- system("del $file");
-}
-
-exit 0;
\ No newline at end of file
--- a/sf-tools/build.xml Mon May 17 13:41:23 2010 +0100
+++ b/sf-tools/build.xml Mon May 17 15:13:30 2010 +0100
@@ -89,31 +89,38 @@
</target>
- <target name="sf-package-binary">
+ <target name="sf-create-manifest">
+
+ <!-- turn comma separated list into sbs friendly -c list, and _ separated list for friendly log names -->
+ <propertyregex property="i.sf.spec.sbs.config.expanded" override="true" input="${sf.spec.sbs.config}" regexp="(,)" replace=" -c " defaultValue="${sf.spec.sbs.config}" global="true" casesensitive="false"/>
+ <propertyregex property="i.sf.spec.sbs.config.expanded.logname" override="true" input="${sf.spec.sbs.config}" regexp="(,)" replace="_" defaultValue="${sf.spec.sbs.config}" global="true" casesensitive="false"/>
+
+ <echo message="INFO Creating WHAT output for target : ${i.sf.spec.sbs.config.expanded}"/>
+ <echo message="INFO Logname: ${i.sf.spec.sbs.config.expanded.logname} + Config: ${sf.spec.sysdef.configurations.list}"/>
+
+ <!-- define sbs args, log name etc -->
+ <exec executable="cmd" dir="${build.drive}" failonerror="false" output="${build.drive}/manifest_binaries_${sf.spec.job.name}.txt">
+ <arg line="/c sbs.bat"/>
+ <arg line="-c ${i.sf.spec.sbs.config.expanded}"/>
+ <arg line="-s ${build.drive}\output\build\canonical_system_definition.xml"/>
+ <arg line="${sf.spec.sbs.options}"/>
+ <arg line="--what"/>
+ <!-- output only what is found on disk -->
+ <arg line=" | perl -pe "while ($line=<STDIN>) { my $orig =$line; chomp $line; print $orig if (-e "$line"); };""/>
+ <arg line=" | perl -pe "s/^${build.drive}\\//; s/\\/\//g; ""/> <!-- remove drive and backslash to fwdslash-->
+ <arg line=" | findstr /B /V tools"/> <!-- ignore raptor exports into root of drive-->
+ </exec>
+
+ </target>
+
+ <target name="sf-package-binary" depends="sf-create-manifest">
<exec executable="7z" dir="${build.drive}" output="${build.log.dir}/zip_${build.id}_binaries_${sf.spec.job.name}.log">
<arg value="a"/>
<arg value="-t${sf.spec.package.zip.format}"/>
- <arg value="-x@${build.log.dir}/listdir_${build.id}_bootstrap.log"/>
- <arg value="-x!epoc32\build"/>
- <arg value="-x!sf"/>
+ <arg value="-i@${build.drive}/manifest_binaries_${sf.spec.job.name}.txt"/>
<arg value="${build.drive}/output/zips/release/binaries_${sf.spec.job.name}.zip"/>
- <arg value="epoc32\"/>
- </exec>
-
- <!-- create a manifest in the root of the build drive -->
- <exec executable="perl" dir="${build.drive}" output="${build.log.dir}/manifest_binaries_${sf.spec.job.name}.txt">
- <arg value="${sf.common.config.dir}/tools/7z_list_to_manifest.pl"/>
- <arg value="${build.drive}\output\zips\release\binaries_${sf.spec.job.name}.zip"/>
- <arg value="-z"/>
- </exec>
-
- <!-- add manifest to zip and update release meta data -->
- <exec executable="7z" dir="${build.drive}">
- <arg value="a"/>
- <arg value="-t${sf.spec.package.zip.format}"/>
- <arg value="${build.drive}/output/zips/release/binaries_${sf.spec.job.name}.zip"/>
- <arg value="${build.log.dir}/manifest_binaries_${sf.spec.job.name}.txt"/>
+ <arg value="manifest_binaries_${sf.spec.job.name}.txt"/>
</exec>
<antcall target="sf-zip-content">