# HG changeset patch # User Brendan Donegan # Date 1278322894 -3600 # Node ID 90101aa1a17782d427cc3dab026f39eeed90cb42 # Parent c2940da46e9aa78f160530b0720e3f794964c340# Parent 4af748f40e05164fe00b339748677f0bf8a1ccba Merge diff -r 4af748f40e05 -r 90101aa1a177 common/build.xml --- a/common/build.xml Wed Jun 30 10:54:16 2010 +0100 +++ b/common/build.xml Mon Jul 05 10:41:34 2010 +0100 @@ -124,6 +124,12 @@ + + + + + + diff -r 4af748f40e05 -r 90101aa1a177 common/templates/run-qmake.ant.xml.ftl diff -r 4af748f40e05 -r 90101aa1a177 common/tools/ats/hlm_fix_pkg_files.pl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/hlm_fix_pkg_files.pl Mon Jul 05 10:41:34 2010 +0100 @@ -0,0 +1,63 @@ +#!/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. +# Maciej Seroka, maciej@symbian.org +# +# Description: +# This is a script for fixing pkg files. + +use strict; +use File::Copy; +use Tie::File; +use File::Find; + +my @files; +my @lines; +my $file; +my $n; +my $file_fixed; +sub Wanted; + +my $package_path; +if ($ARGV[0]) { + $package_path = $ARGV[0]; + } +else { die "Missing parameter \"package path\". For example: D:\\sf\\app\\musicplayer"; } + +find(\&Wanted, $package_path); + +#Copy a pkg file and replace \armv5\urel with $(platform)\$(target) +foreach $file (@files) { #Replace "//v800020/Publish" with "http://cdn.symbian,org" + copy($file,$file . ".orig") or die ("Cannot copy file \"$file\". $!\n"); + tie (@lines, 'Tie::File', $file, recsep => "\n") or die ("Cannot tie file \"$file\". $!\n"); + $n = 0; + $file_fixed = 0; + foreach (@lines) { + if (lc(@lines[$n]) =~ m/epoc32\\release\\armv5\\urel\\/) { + @lines[$n] = lc(@lines[$n]); + @lines[$n] =~ s/\\armv5\\urel\\/\\\$(platform)\\\$(target)\\/; + $file_fixed = 1; + } + if (lc(@lines[$n]) =~ m/epoc32\\release\\armv5\\udeb\\/) { + @lines[$n] = lc(@lines[$n]); + @lines[$n] =~ s/\\armv5\\udeb\\/\\\$(platform)\\\$(target)\\/; + $file_fixed = 1; + } + $n++; + } + if ($file_fixed) { print $file . " fixed.\n"; } + untie @lines; +} + +sub Wanted { + # only operate on .pkg files + /.pkg$/ or return; + push (@files, $File::Find::name); +} \ No newline at end of file