sbsv1/abld/e32util/_secure_E32Env.pm
author Mike Kinghan <mikek@symbian.org>
Thu, 25 Nov 2010 13:59:07 +0000
changeset 40 68f68128601f
permissions -rw-r--r--
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package. 2) Enhance romnibus.pl so that it generate the symbol file for the built rom when invoked by Raptor 3) Make the maksym.pl tool portable for Linux as well as Windows. 4) Remove the of armasm2as.pl from the e32tools component in favour of the copy now exported from sbsv1/e32util.

# Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
# All rights reserved.
# This component and the accompanying materials are made available
# under the terms of "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:
# Nokia Corporation - initial contribution.
#
# Contributors:
#
# Description:
# E32ENV.PM
# Contains information for makmake and associated e32tools perl programs
# within the Epoc32 Environment
# 
#

package E32env;


use vars qw(%Data);

BEGIN {
	my $epocroot = $ENV{EPOCROOT};
	die "ERROR: Must set the EPOCROOT environment variable\n" if (!defined($epocroot));
	$epocroot =~ s-/-\\-go;	# for those working with UNIX shells
	$epocroot =~ s/^ +//;
	$epocroot =~ s/ +$//;
	$ENV{EPOCROOT} = $epocroot;
	die "ERROR: EPOCROOT must not include a drive letter\n" if ($epocroot =~ /^.:/);
	die "ERROR: EPOCROOT must be an absolute path without a drive letter\n" if ($epocroot !~ /^\\/);
	die "ERROR: EPOCROOT must not be a UNC path\n" if ($epocroot =~ /^\\\\/);
	die "ERROR: EPOCROOT must end with a backslash\n" if ($epocroot !~ /\\$/);
 	open PIPE, "set EPOCROOT |";
 	my $found=0;
	while (<PIPE>) {
		if (/^EPOCROOT=.*/) {
			$found=1;
			last;
		}
	}
	close PIPE;
	die "EPOCROOT environment variable must be capitalised\n" if (!$found);
	print "WARNING: EPOCROOT does not specify an existing directory\n" if (!-d $epocroot);

	$epocroot=~ s-\\$--;		# chop trailing \\

	$Data{EPOCPath} = $epocroot."\\epoc32\\";

	$Data{EPOCDataPath} = $epocroot."\\epoc32\\data\\";
	$Data{EPOCIncPath} = $epocroot."\\epoc32\\include\\";
	$Data{BldPath} = $epocroot."\\EPOC32\\BUILD\\";
	$Data{LinkPath} = $epocroot."\\epoc32\\release\\";
	$Data{RelPath} = $epocroot."\\epoc32\\release\\";
	$Data{EPOCToolsPath} = $epocroot."\\epoc32\\tools\\";
	$Data{RomPath} = $epocroot."\\epoc32\\rom\\";

	$Data{DataPath} = "z\\system\\data\\";
	
	$Data{SecurePlatform} = 1;
}

1;