equal
deleted
inserted
replaced
|
1 #!/usr/bin/perl |
1 # |
2 # |
2 # Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). |
3 # Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). |
3 # All rights reserved. |
4 # All rights reserved. |
4 # This component and the accompanying materials are made available |
5 # This component and the accompanying materials are made available |
5 # under the terms of the License "Eclipse Public License v1.0" |
6 # under the terms of the License "Eclipse Public License v1.0" |
13 # |
14 # |
14 # Description: |
15 # Description: |
15 # |
16 # |
16 |
17 |
17 # features tool version |
18 # features tool version |
18 use constant TOOL_VERSION=>"0.2"; |
19 use constant TOOL_VERSION=>"0.3"; |
19 |
20 |
20 # global variables |
21 # global variables |
21 my $PerlLibPath; # fully qualified pathname of the directory containing our Perl modules |
22 my $PerlLibPath; # fully qualified pathname of the directory containing our Perl modules |
|
23 my $PerlEPOCPath; # fully qualified pathname of the directory containing epoc tools |
22 my $ibyPath; # destination path for the iby files |
24 my $ibyPath; # destination path for the iby files |
23 my $hdrPath; # destination path for the header files |
25 my $hdrPath; # destination path for the header files |
24 my $datPath; # destination path for the features.DAT file |
26 my $datPath; # destination path for the features.DAT file |
25 my $convPath; # destination path for the feature registry database convertion |
27 my $convPath; # destination path for the feature registry database convertion |
26 my $epocroot = $ENV{EPOCROOT}; # epcoroot directory |
28 my $epocroot = &get_epocroot; # epcoroot directory |
27 |
29 |
28 # |
30 # |
29 # xml database file name(s) |
31 # xml database file name(s) |
30 # |
32 # |
31 my @xmlDBFile; |
33 my @xmlDBFile; |
46 use FindBin; # for FindBin::Bin |
48 use FindBin; # for FindBin::Bin |
47 BEGIN { |
49 BEGIN { |
48 # check user has a version of perl that will cope |
50 # check user has a version of perl that will cope |
49 require 5.005_03; |
51 require 5.005_03; |
50 # establish the path to the Perl libraries |
52 # establish the path to the Perl libraries |
51 $PerlLibPath = $FindBin::Bin; # X:/epoc32/tools |
53 $PerlLibPath = $FindBin::Bin; |
52 $PerlLibPath .= "/"; |
54 $PerlLibPath =~ s/\\/\//g; |
53 } |
55 $PerlLibPath .= "\/" unless $PerlLibPath =~ /\/$/; |
54 use lib $PerlLibPath; |
56 |
|
57 $PerlEPOCPath = $ENV{EPOCROOT}; |
|
58 $PerlEPOCPath =~ s/\\/\//g; |
|
59 $PerlEPOCPath .= "\/" unless $PerlEPOCPath =~ /\/$/; |
|
60 $PerlEPOCPath .= "epoc32\/tools\/"; |
|
61 } |
|
62 |
55 # Includes the validation perl modules for XML validation against the given DTD. |
63 # Includes the validation perl modules for XML validation against the given DTD. |
56 use lib "$PerlLibPath/build/lib"; |
64 use lib "${PerlEPOCPath}build/lib"; |
|
65 use lib $PerlEPOCPath; |
|
66 use lib $PerlLibPath; |
|
67 |
57 # Include routines to create the feature header and iby files. |
68 # Include routines to create the feature header and iby files. |
58 use features; |
69 use features; |
59 |
70 |
|
71 use romutl; |
60 # |
72 # |
61 # main - Tool entry function |
73 # main - Tool entry function |
62 # |
74 # |
63 { |
75 { |
64 # Default path settings |
76 # Default path settings |
291 --version - displays the tools version |
303 --version - displays the tools version |
292 |
304 |
293 Ex: option combination \"-ri\" generates header and IBY files |
305 Ex: option combination \"-ri\" generates header and IBY files |
294 |
306 |
295 Default destination paths: |
307 Default destination paths: |
296 <header file> - $EPOCROOT\\epoc32\\include\\ |
308 <header file> - ${epocroot}epoc32\/include\/ |
297 <iby file> - $EPOCROOT\\epoc32\\rom\\include\\ |
309 <iby file> - ${epocroot}epoc32\/rom\/include\/ |
298 <features.dat file> - generates in current directory |
310 <features.dat file> - generates in current directory |
299 |
311 |
300 Note: The conversion(--convert) of feature registry database requires the |
312 Note: The conversion(--convert) of feature registry database requires the |
301 feature registry dtd file(featureuids.dtd) in $EPOCROOT\\epoc32\\tools\\ |
313 feature registry dtd file(featureuids.dtd) in ${epocroot}epoc32\/tools\/ |
302 USAGE_EOF |
314 USAGE_EOF |
303 } |
315 } |