author | William Roberts <williamr@symbian.org> |
Wed, 13 Oct 2010 22:27:53 +0100 | |
changeset 34 | 33a3c5f8b4c8 |
child 81 | 5796f75bcd93 |
permissions | -rw-r--r-- |
34
33a3c5f8b4c8
Add "application" to all of the rom_content.csv lines for applications (i.e. executables with a matching _reg.rsc file)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
1 |
# Copyright (c) 2010 Symbian Foundation Ltd. |
33a3c5f8b4c8
Add "application" to all of the rom_content.csv lines for applications (i.e. executables with a matching _reg.rsc file)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
2 |
# All rights reserved. |
33a3c5f8b4c8
Add "application" to all of the rom_content.csv lines for applications (i.e. executables with a matching _reg.rsc file)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
3 |
# This component and the accompanying materials are made available |
33a3c5f8b4c8
Add "application" to all of the rom_content.csv lines for applications (i.e. executables with a matching _reg.rsc file)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
4 |
# under the terms of the License "Eclipse Public License v1.0" |
33a3c5f8b4c8
Add "application" to all of the rom_content.csv lines for applications (i.e. executables with a matching _reg.rsc file)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
5 |
# which accompanies this distribution, and is available |
33a3c5f8b4c8
Add "application" to all of the rom_content.csv lines for applications (i.e. executables with a matching _reg.rsc file)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
6 |
# at the URL "http://www.eclipse.org/legal/epl-v10.html". |
33a3c5f8b4c8
Add "application" to all of the rom_content.csv lines for applications (i.e. executables with a matching _reg.rsc file)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
7 |
# |
33a3c5f8b4c8
Add "application" to all of the rom_content.csv lines for applications (i.e. executables with a matching _reg.rsc file)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
8 |
# Initial Contributors: |
33a3c5f8b4c8
Add "application" to all of the rom_content.csv lines for applications (i.e. executables with a matching _reg.rsc file)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
9 |
# Symbian Foundation - initial contribution. |
33a3c5f8b4c8
Add "application" to all of the rom_content.csv lines for applications (i.e. executables with a matching _reg.rsc file)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
10 |
# |
33a3c5f8b4c8
Add "application" to all of the rom_content.csv lines for applications (i.e. executables with a matching _reg.rsc file)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
11 |
# Contributors: |
33a3c5f8b4c8
Add "application" to all of the rom_content.csv lines for applications (i.e. executables with a matching _reg.rsc file)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
12 |
# |
33a3c5f8b4c8
Add "application" to all of the rom_content.csv lines for applications (i.e. executables with a matching _reg.rsc file)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
13 |
# Description: |
33a3c5f8b4c8
Add "application" to all of the rom_content.csv lines for applications (i.e. executables with a matching _reg.rsc file)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
14 |
# Read a list of "static dependency" lines and tag them in rom_content.csv |
33a3c5f8b4c8
Add "application" to all of the rom_content.csv lines for applications (i.e. executables with a matching _reg.rsc file)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
15 |
|
33a3c5f8b4c8
Add "application" to all of the rom_content.csv lines for applications (i.e. executables with a matching _reg.rsc file)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
16 |
use strict; |
33a3c5f8b4c8
Add "application" to all of the rom_content.csv lines for applications (i.e. executables with a matching _reg.rsc file)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
17 |
use Getopt::Long; |
33a3c5f8b4c8
Add "application" to all of the rom_content.csv lines for applications (i.e. executables with a matching _reg.rsc file)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
18 |
|
33a3c5f8b4c8
Add "application" to all of the rom_content.csv lines for applications (i.e. executables with a matching _reg.rsc file)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
19 |
my $marking; |
33a3c5f8b4c8
Add "application" to all of the rom_content.csv lines for applications (i.e. executables with a matching _reg.rsc file)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
20 |
my $who; |
33a3c5f8b4c8
Add "application" to all of the rom_content.csv lines for applications (i.e. executables with a matching _reg.rsc file)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
21 |
GetOptions( |
33a3c5f8b4c8
Add "application" to all of the rom_content.csv lines for applications (i.e. executables with a matching _reg.rsc file)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
22 |
"m|message=s" => \$marking, # comment to add to the CSV lines |
33a3c5f8b4c8
Add "application" to all of the rom_content.csv lines for applications (i.e. executables with a matching _reg.rsc file)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
23 |
"u|user=s" => \$who, # value for the Who column |
33a3c5f8b4c8
Add "application" to all of the rom_content.csv lines for applications (i.e. executables with a matching _reg.rsc file)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
24 |
); |
33a3c5f8b4c8
Add "application" to all of the rom_content.csv lines for applications (i.e. executables with a matching _reg.rsc file)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
25 |
|
33a3c5f8b4c8
Add "application" to all of the rom_content.csv lines for applications (i.e. executables with a matching _reg.rsc file)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
26 |
die("must specify a value for the Why column with the -m option") if (!defined $marking); |
33a3c5f8b4c8
Add "application" to all of the rom_content.csv lines for applications (i.e. executables with a matching _reg.rsc file)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
27 |
die("must specify a value for the Who column with the -u option") if (!defined $who); |
33a3c5f8b4c8
Add "application" to all of the rom_content.csv lines for applications (i.e. executables with a matching _reg.rsc file)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
28 |
|
33a3c5f8b4c8
Add "application" to all of the rom_content.csv lines for applications (i.e. executables with a matching _reg.rsc file)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
29 |
my %romfiles; |
33a3c5f8b4c8
Add "application" to all of the rom_content.csv lines for applications (i.e. executables with a matching _reg.rsc file)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
30 |
my $line; |
33a3c5f8b4c8
Add "application" to all of the rom_content.csv lines for applications (i.e. executables with a matching _reg.rsc file)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
31 |
while ($line=<>) |
33a3c5f8b4c8
Add "application" to all of the rom_content.csv lines for applications (i.e. executables with a matching _reg.rsc file)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
32 |
{ |
33a3c5f8b4c8
Add "application" to all of the rom_content.csv lines for applications (i.e. executables with a matching _reg.rsc file)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
33 |
# PRIVATE\10003A3F\IMPORT\APPS\musui_reg.rsc /epoc32/data/z/private/10003a3f/apps/musui_reg.rsc sys\bin\musui.exe |
33a3c5f8b4c8
Add "application" to all of the rom_content.csv lines for applications (i.e. executables with a matching _reg.rsc file)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
34 |
if ($line =~ /^\S+\t\S+\t(\S+)/) |
33a3c5f8b4c8
Add "application" to all of the rom_content.csv lines for applications (i.e. executables with a matching _reg.rsc file)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
35 |
{ |
33a3c5f8b4c8
Add "application" to all of the rom_content.csv lines for applications (i.e. executables with a matching _reg.rsc file)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
36 |
my $romfile = $1; |
33a3c5f8b4c8
Add "application" to all of the rom_content.csv lines for applications (i.e. executables with a matching _reg.rsc file)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
37 |
$romfiles{$romfile} = 1; |
33a3c5f8b4c8
Add "application" to all of the rom_content.csv lines for applications (i.e. executables with a matching _reg.rsc file)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
38 |
next; |
33a3c5f8b4c8
Add "application" to all of the rom_content.csv lines for applications (i.e. executables with a matching _reg.rsc file)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
39 |
} |
33a3c5f8b4c8
Add "application" to all of the rom_content.csv lines for applications (i.e. executables with a matching _reg.rsc file)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
40 |
|
33a3c5f8b4c8
Add "application" to all of the rom_content.csv lines for applications (i.e. executables with a matching _reg.rsc file)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
41 |
my ($romfile,$hostfile,$ibyfile,$package,$cmd,@rest) = split /,/, $line; |
33a3c5f8b4c8
Add "application" to all of the rom_content.csv lines for applications (i.e. executables with a matching _reg.rsc file)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
42 |
next if (!defined $cmd); |
33a3c5f8b4c8
Add "application" to all of the rom_content.csv lines for applications (i.e. executables with a matching _reg.rsc file)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
43 |
|
33a3c5f8b4c8
Add "application" to all of the rom_content.csv lines for applications (i.e. executables with a matching _reg.rsc file)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
44 |
if (defined $romfiles{$romfile}) |
33a3c5f8b4c8
Add "application" to all of the rom_content.csv lines for applications (i.e. executables with a matching _reg.rsc file)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
45 |
{ |
33a3c5f8b4c8
Add "application" to all of the rom_content.csv lines for applications (i.e. executables with a matching _reg.rsc file)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
46 |
if ($cmd eq "") |
33a3c5f8b4c8
Add "application" to all of the rom_content.csv lines for applications (i.e. executables with a matching _reg.rsc file)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
47 |
{ |
33a3c5f8b4c8
Add "application" to all of the rom_content.csv lines for applications (i.e. executables with a matching _reg.rsc file)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
48 |
# mark this one |
33a3c5f8b4c8
Add "application" to all of the rom_content.csv lines for applications (i.e. executables with a matching _reg.rsc file)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
49 |
print join(",", $romfile,$hostfile,$ibyfile,$package,"",$who,$marking), "\n"; |
33a3c5f8b4c8
Add "application" to all of the rom_content.csv lines for applications (i.e. executables with a matching _reg.rsc file)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
50 |
next; |
33a3c5f8b4c8
Add "application" to all of the rom_content.csv lines for applications (i.e. executables with a matching _reg.rsc file)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
51 |
} |
33a3c5f8b4c8
Add "application" to all of the rom_content.csv lines for applications (i.e. executables with a matching _reg.rsc file)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
52 |
else |
33a3c5f8b4c8
Add "application" to all of the rom_content.csv lines for applications (i.e. executables with a matching _reg.rsc file)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
53 |
{ |
33a3c5f8b4c8
Add "application" to all of the rom_content.csv lines for applications (i.e. executables with a matching _reg.rsc file)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
54 |
print STDERR "Skipping $romfile line - already marked as $cmd,",join(",", @rest); |
33a3c5f8b4c8
Add "application" to all of the rom_content.csv lines for applications (i.e. executables with a matching _reg.rsc file)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
55 |
} |
33a3c5f8b4c8
Add "application" to all of the rom_content.csv lines for applications (i.e. executables with a matching _reg.rsc file)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
56 |
} |
33a3c5f8b4c8
Add "application" to all of the rom_content.csv lines for applications (i.e. executables with a matching _reg.rsc file)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
57 |
print $line; |
33a3c5f8b4c8
Add "application" to all of the rom_content.csv lines for applications (i.e. executables with a matching _reg.rsc file)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
58 |
} |