# HG changeset patch # User Dario Sestito # Date 1248083019 -3600 # Node ID 257557b397545b9d0b56bff7ccd2f6d8aed36dcf # Parent 13596dc42a476c49647cf6b4f3df6ae6402d3e02 Added transformation of model file from version 3.0.0 to a version usable by Raptor diff -r 13596dc42a47 -r 257557b39754 common/common_props.ant.xml --- a/common/common_props.ant.xml Thu Jul 16 16:33:38 2009 +0100 +++ b/common/common_props.ant.xml Mon Jul 20 10:43:39 2009 +0100 @@ -54,6 +54,7 @@ + diff -r 13596dc42a47 -r 257557b39754 common/diamonds/config.xml.ftl --- a/common/diamonds/config.xml.ftl Thu Jul 16 16:33:38 2009 +0100 +++ b/common/diamonds/config.xml.ftl Mon Jul 20 10:43:39 2009 +0100 @@ -27,7 +27,7 @@ - + diff -r 13596dc42a47 -r 257557b39754 common/sysdefdowngrade/sysdefdowngrade.pl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/sysdefdowngrade/sysdefdowngrade.pl Mon Jul 20 10:43:39 2009 +0100 @@ -0,0 +1,93 @@ +# 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: +# Extracts output text in context which doesn't belong to 's + +use strict; +use Getopt::Long; + +my $XALAN_PATH = "xalan-j_2_7_1"; +my $XSLT_FILE = "sysdefdowngrade.xsl"; + +my $modelfile = ''; +my $csvsourcesfile = ''; +my $help = 0; +GetOptions(( + 'model=s' => \$modelfile, + 'sources=s' => \$csvsourcesfile, + 'help!' => \$help +)); + +$help = 1 if (!$modelfile or !$csvsourcesfile); + +if ($help) +{ + print "Checks that a model file is not in version 3.0.0. If it is transforms it to a version usable by Raptor\n"; + print "Usage: perl sysdefdowngrade.pl --model=MODELFILE --sources=SOURCESFILE\n\n"; + exit(0); +} + +my $isversion3 = 0; +open(MODELFILE, "$modelfile") or die("Can't open model file $modelfile"); +while() +{ + if ($_ =~ /) +{ + if ($_ =~ m{[^,]*,([\\/]sf[\\/][^,]*),[^,]*,[^,]*,[^,]*}) + { + $param_path = $1; + #print "param_path= $param_path\n"; + last; + } +} +close(SOURCESFILE); + +if (!$param_path) +{ + print "Error: could not determine path parameter from sources file. Quitting.\n"; + exit(0); +} + +$param_path =~ s,\\,/,g; + +my $transformcmd = "java -jar $XALAN_PATH\\xalan.jar -xsl $XSLT_FILE -in $modelfile -out $modelfile.transformed"; +$transformcmd .= " -param Path $param_path"; + +print "Executing: $transformcmd\n"; +system("$transformcmd"); + +# ren doesn't work with forward slashes +$modelfile =~ s,/,\\,g; + +$modelfile =~ m,.*[\\/](.*),; +my $modelfile_name = $1; +print "Executing: ren $modelfile $modelfile_name.orig\n"; +system("ren $modelfile $modelfile_name.orig"); + +print "Executing: ren $modelfile.transformed $modelfile_name\n"; +system("ren $modelfile.transformed $modelfile_name"); diff -r 13596dc42a47 -r 257557b39754 common/sysdefdowngrade/sysdefdowngrade.xsl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/sysdefdowngrade/sysdefdowngrade.xsl Mon Jul 20 10:43:39 2009 +0100 @@ -0,0 +1,355 @@ + + + + + os/deviceplatformrelease/foundation_system/system_model + + + + Cannot process this document + + + + + + + + + + + + + + + + + + + + Package definition cannot link another package + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Error: IDs do not match: vs + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Excessive nesting of packages: Ignoring + + + + + + + + + + + + + + + + + + + + + Y + + + plugin + + placeholder + PC + + + + + + + + + + + + + + + + + + + + + + + Y + N + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + / + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +]> +]]> + + \ No newline at end of file diff -r 13596dc42a47 -r 257557b39754 common/sysdefdowngrade/xalan-j_2_7_1/serializer.jar Binary file common/sysdefdowngrade/xalan-j_2_7_1/serializer.jar has changed diff -r 13596dc42a47 -r 257557b39754 common/sysdefdowngrade/xalan-j_2_7_1/xalan.jar Binary file common/sysdefdowngrade/xalan-j_2_7_1/xalan.jar has changed diff -r 13596dc42a47 -r 257557b39754 common/sysdefdowngrade/xalan-j_2_7_1/xercesImpl.jar Binary file common/sysdefdowngrade/xalan-j_2_7_1/xercesImpl.jar has changed diff -r 13596dc42a47 -r 257557b39754 common/sysdefdowngrade/xalan-j_2_7_1/xml-apis.jar Binary file common/sysdefdowngrade/xalan-j_2_7_1/xml-apis.jar has changed diff -r 13596dc42a47 -r 257557b39754 sf-package/build.xml --- a/sf-package/build.xml Thu Jul 16 16:33:38 2009 +0100 +++ b/sf-package/build.xml Mon Jul 20 10:43:39 2009 +0100 @@ -13,6 +13,16 @@ + + + + + + + + + +