author | William Roberts <williamr@symbian.org> |
Sat, 09 Oct 2010 15:55:48 +0100 | |
changeset 8 | 36cb9eb36988 |
child 9 | b5c893269cd5 |
permissions | -rw-r--r-- |
8
36cb9eb36988
Add tools\repair_obyfile.pl to process imaker generated .oby file back into suitable input for buildrom.pl
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
1 |
# Copyright (c) 2010 Symbian Foundation Ltd. |
36cb9eb36988
Add tools\repair_obyfile.pl to process imaker generated .oby file back into suitable input for buildrom.pl
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
2 |
# All rights reserved. |
36cb9eb36988
Add tools\repair_obyfile.pl to process imaker generated .oby file back into suitable input for buildrom.pl
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
3 |
# This component and the accompanying materials are made available |
36cb9eb36988
Add tools\repair_obyfile.pl to process imaker generated .oby file back into suitable input for buildrom.pl
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
4 |
# under the terms of the License "Eclipse Public License v1.0" |
36cb9eb36988
Add tools\repair_obyfile.pl to process imaker generated .oby file back into suitable input for buildrom.pl
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
5 |
# which accompanies this distribution, and is available |
36cb9eb36988
Add tools\repair_obyfile.pl to process imaker generated .oby file back into suitable input for buildrom.pl
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
6 |
# at the URL "http://www.eclipse.org/legal/epl-v10.html". |
36cb9eb36988
Add tools\repair_obyfile.pl to process imaker generated .oby file back into suitable input for buildrom.pl
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
7 |
# |
36cb9eb36988
Add tools\repair_obyfile.pl to process imaker generated .oby file back into suitable input for buildrom.pl
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
8 |
# Initial Contributors: |
36cb9eb36988
Add tools\repair_obyfile.pl to process imaker generated .oby file back into suitable input for buildrom.pl
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
9 |
# Symbian Foundation - initial contribution. |
36cb9eb36988
Add tools\repair_obyfile.pl to process imaker generated .oby file back into suitable input for buildrom.pl
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
10 |
# |
36cb9eb36988
Add tools\repair_obyfile.pl to process imaker generated .oby file back into suitable input for buildrom.pl
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
11 |
# Contributors: |
36cb9eb36988
Add tools\repair_obyfile.pl to process imaker generated .oby file back into suitable input for buildrom.pl
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
12 |
# |
36cb9eb36988
Add tools\repair_obyfile.pl to process imaker generated .oby file back into suitable input for buildrom.pl
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
13 |
# Description: |
36cb9eb36988
Add tools\repair_obyfile.pl to process imaker generated .oby file back into suitable input for buildrom.pl
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
14 |
# Process file ROM log to make it suitable for re-use by buildrom.pl |
36cb9eb36988
Add tools\repair_obyfile.pl to process imaker generated .oby file back into suitable input for buildrom.pl
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
15 |
|
36cb9eb36988
Add tools\repair_obyfile.pl to process imaker generated .oby file back into suitable input for buildrom.pl
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
16 |
use strict; |
36cb9eb36988
Add tools\repair_obyfile.pl to process imaker generated .oby file back into suitable input for buildrom.pl
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
17 |
my $line; |
36cb9eb36988
Add tools\repair_obyfile.pl to process imaker generated .oby file back into suitable input for buildrom.pl
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
18 |
|
36cb9eb36988
Add tools\repair_obyfile.pl to process imaker generated .oby file back into suitable input for buildrom.pl
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
19 |
while ($line = <>) |
36cb9eb36988
Add tools\repair_obyfile.pl to process imaker generated .oby file back into suitable input for buildrom.pl
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
20 |
{ |
36cb9eb36988
Add tools\repair_obyfile.pl to process imaker generated .oby file back into suitable input for buildrom.pl
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
21 |
# Put back original auto-btmap statements for any "mbm_rom" derived files |
36cb9eb36988
Add tools\repair_obyfile.pl to process imaker generated .oby file back into suitable input for buildrom.pl
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
22 |
$line =~ s/data="(.*mbm)_rom"(\s+)"(.*)"/auto-bitmap=$1$2$3/; |
36cb9eb36988
Add tools\repair_obyfile.pl to process imaker generated .oby file back into suitable input for buildrom.pl
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
23 |
|
36cb9eb36988
Add tools\repair_obyfile.pl to process imaker generated .oby file back into suitable input for buildrom.pl
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
24 |
# Put back original __ECOM_PLUGIN lines |
36cb9eb36988
Add tools\repair_obyfile.pl to process imaker generated .oby file back into suitable input for buildrom.pl
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
25 |
# REM expanded __ECOM_PLUGIN(\epoc32\release\ARMV5\urel,Sys\Bin,\epoc32\data\Z,Resource\Plugins, a3fFourCCConvertorPlugin.dll , a3fFourCCConvertorPlugin.dll ) |
36cb9eb36988
Add tools\repair_obyfile.pl to process imaker generated .oby file back into suitable input for buildrom.pl
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
26 |
if ($line =~ /^REM expanded\s+__ECOM_PLUGIN/) |
36cb9eb36988
Add tools\repair_obyfile.pl to process imaker generated .oby file back into suitable input for buildrom.pl
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
27 |
{ |
36cb9eb36988
Add tools\repair_obyfile.pl to process imaker generated .oby file back into suitable input for buildrom.pl
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
28 |
$line =~ s/REM expanded\s+//; |
36cb9eb36988
Add tools\repair_obyfile.pl to process imaker generated .oby file back into suitable input for buildrom.pl
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
29 |
my $discarded = <>; # discard the derived file= line for the plugin |
36cb9eb36988
Add tools\repair_obyfile.pl to process imaker generated .oby file back into suitable input for buildrom.pl
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
30 |
} |
36cb9eb36988
Add tools\repair_obyfile.pl to process imaker generated .oby file back into suitable input for buildrom.pl
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
31 |
|
36cb9eb36988
Add tools\repair_obyfile.pl to process imaker generated .oby file back into suitable input for buildrom.pl
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
32 |
if ($line =~ /REM processed spidata/) |
36cb9eb36988
Add tools\repair_obyfile.pl to process imaker generated .oby file back into suitable input for buildrom.pl
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
33 |
{ |
36cb9eb36988
Add tools\repair_obyfile.pl to process imaker generated .oby file back into suitable input for buildrom.pl
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
34 |
next; # discard this line - it will be regenerated by the __ECOM_PLUGIN |
36cb9eb36988
Add tools\repair_obyfile.pl to process imaker generated .oby file back into suitable input for buildrom.pl
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
35 |
} |
36cb9eb36988
Add tools\repair_obyfile.pl to process imaker generated .oby file back into suitable input for buildrom.pl
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
36 |
|
36cb9eb36988
Add tools\repair_obyfile.pl to process imaker generated .oby file back into suitable input for buildrom.pl
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
37 |
$line =~ s/REM processed //; # re-enable other directives |
36cb9eb36988
Add tools\repair_obyfile.pl to process imaker generated .oby file back into suitable input for buildrom.pl
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
38 |
|
36cb9eb36988
Add tools\repair_obyfile.pl to process imaker generated .oby file back into suitable input for buildrom.pl
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
39 |
if ($line =~ /^time=/) |
36cb9eb36988
Add tools\repair_obyfile.pl to process imaker generated .oby file back into suitable input for buildrom.pl
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
40 |
{ |
36cb9eb36988
Add tools\repair_obyfile.pl to process imaker generated .oby file back into suitable input for buildrom.pl
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
41 |
$line = "time=##TODAY## 12:00:00\n"; |
36cb9eb36988
Add tools\repair_obyfile.pl to process imaker generated .oby file back into suitable input for buildrom.pl
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
42 |
} |
36cb9eb36988
Add tools\repair_obyfile.pl to process imaker generated .oby file back into suitable input for buildrom.pl
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
43 |
|
36cb9eb36988
Add tools\repair_obyfile.pl to process imaker generated .oby file back into suitable input for buildrom.pl
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
44 |
print $line; |
36cb9eb36988
Add tools\repair_obyfile.pl to process imaker generated .oby file back into suitable input for buildrom.pl
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
45 |
} |