Add EPOCROOT to the envinfo report
authorDario Sestito <darios@symbian.org>
Wed, 16 Jun 2010 12:25:30 +0100
changeset 288 77dc8956ed66
parent 287 598059d917c3
child 289 759aa5329d25
Add EPOCROOT to the envinfo report
envinfo/envinfo.pl
--- a/envinfo/envinfo.pl	Wed Jun 16 11:44:46 2010 +0100
+++ b/envinfo/envinfo.pl	Wed Jun 16 12:25:30 2010 +0100
@@ -19,9 +19,11 @@
 use Getopt::Long;
 
 my $report;
-my $output = "\\output\\logs\\envinfo.txt";
+my $output = "$ENV{'EPOCROOT'}\\output\\logs\\envinfo.txt";
+$output =~ s/^\\+/\\/;
 my $compare;
-my $baseline = "\\build_info\\logs\\envinfo.txt";
+my $baseline = "$ENV{'EPOCROOT'}\\build_info\\logs\\envinfo.txt";
+$baseline =~ s/^\\+/\\/;
 my $help = 0;
 GetOptions((
 	'report:s' => \$report,
@@ -43,10 +45,10 @@
 
 Options:
   -h, --help            Show this help message and exit
-  -r,--report [FILE]    Write report to FILE (default \\output\\logs\\envinfo.txt)
+  -r,--report [FILE]    Write report to FILE (default %EPOCROOT%\\output\\logs\\envinfo.txt)
   -c,--compare [LOCATION]
                         Compare environment with info at LOCATION
-                        (default \\build_info\\logs\\envinfo.txt)
+                        (default %EPOCROOT%\\build_info\\logs\\envinfo.txt)
 _EOH
 	exit(0);
 }
@@ -163,6 +165,13 @@
 $zip_ver = $1 if ($zip_out =~ /^7-Zip\s+(\S+)\s+Copyright/m);
 push @environment_info, {name=>'7-Zip', version=>$zip_ver};
 
+# EPOCROOT
+my $epocroot_ver = 'N.A.';
+my $epocroot_out = `echo %EPOCROOT%`;
+chomp $epocroot_out;
+$epocroot_ver = $epocroot_out if ($epocroot_out ne '%EPOCROOT%');
+push @environment_info, {name=>'EPOCROOT', version=>$epocroot_ver};
+
 # Raptor
 my $sbs_ver = 'N.A.';
 my $sbs_out = `sbs -v`;
@@ -255,7 +264,7 @@
 	$tool_info->{version} =~ s/\t/ /g;
 }
 
-print "\nTools breakdown\n";
+print "\nEnvironment Information:\n";
 
 my $cmp_notpresent = 0;
 my $cmp_diffver = 0;