599
|
1 |
# Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
2 |
# All rights reserved.
|
|
3 |
# This component and the accompanying materials are made available
|
|
4 |
# under the terms of "Eclipse Public License v1.0"
|
|
5 |
# which accompanies this distribution, and is available
|
|
6 |
# at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
7 |
#
|
|
8 |
# Initial Contributors:
|
|
9 |
# Nokia Corporation - initial contribution.
|
|
10 |
#
|
|
11 |
# Contributors:
|
|
12 |
#
|
|
13 |
# Description:
|
|
14 |
# E32ENV.PM
|
|
15 |
# Contains information for makmake and associated e32tools perl programs
|
|
16 |
# within the Epoc32 Environment
|
|
17 |
#
|
|
18 |
#
|
|
19 |
|
|
20 |
package E32env;
|
|
21 |
|
|
22 |
|
|
23 |
use vars qw(%Data);
|
|
24 |
|
|
25 |
BEGIN {
|
|
26 |
my $epocroot = $ENV{EPOCROOT};
|
|
27 |
die "ERROR: Must set the EPOCROOT environment variable\n" if (!defined($epocroot));
|
|
28 |
$epocroot =~ s-/-\\-go; # for those working with UNIX shells
|
|
29 |
$epocroot =~ s/^ +//;
|
|
30 |
$epocroot =~ s/ +$//;
|
|
31 |
$ENV{EPOCROOT} = $epocroot;
|
|
32 |
die "ERROR: EPOCROOT must not include a drive letter\n" if ($epocroot =~ /^.:/);
|
|
33 |
die "ERROR: EPOCROOT must be an absolute path without a drive letter\n" if ($epocroot !~ /^\\/);
|
|
34 |
die "ERROR: EPOCROOT must not be a UNC path\n" if ($epocroot =~ /^\\\\/);
|
|
35 |
die "ERROR: EPOCROOT must end with a backslash\n" if ($epocroot !~ /\\$/);
|
|
36 |
open PIPE, "set EPOCROOT |";
|
|
37 |
my $found=0;
|
|
38 |
while (<PIPE>) {
|
|
39 |
if (/^EPOCROOT=.*/) {
|
|
40 |
$found=1;
|
|
41 |
last;
|
|
42 |
}
|
|
43 |
}
|
|
44 |
close PIPE;
|
|
45 |
die "EPOCROOT environment variable must be capitalised\n" if (!$found);
|
|
46 |
print "WARNING: EPOCROOT does not specify an existing directory\n" if (!-d $epocroot);
|
|
47 |
|
|
48 |
$epocroot=~ s-\\$--; # chop trailing \\
|
|
49 |
|
|
50 |
$Data{EPOCPath} = $epocroot."\\epoc32\\";
|
|
51 |
|
|
52 |
$Data{EPOCDataPath} = $epocroot."\\epoc32\\data\\";
|
|
53 |
$Data{EPOCIncPath} = $epocroot."\\epoc32\\include\\";
|
|
54 |
$Data{BldPath} = $epocroot."\\EPOC32\\BUILD\\";
|
|
55 |
$Data{LinkPath} = $epocroot."\\epoc32\\release\\";
|
|
56 |
$Data{RelPath} = $epocroot."\\epoc32\\release\\";
|
|
57 |
$Data{EPOCToolsPath} = $epocroot."\\epoc32\\tools\\";
|
|
58 |
$Data{RomPath} = $epocroot."\\epoc32\\rom\\";
|
|
59 |
|
|
60 |
$Data{DataPath} = "z\\system\\data\\";
|
|
61 |
|
|
62 |
$Data{SecurePlatform} = 1;
|
|
63 |
}
|
|
64 |
|
|
65 |
1;
|