summaryrefslogtreecommitdiffstats
path: root/bin/patch_capabilities.pl
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@digia.com>2010-12-03 09:06:29 (GMT)
committerMiikka Heikkinen <miikka.heikkinen@digia.com>2010-12-03 09:43:29 (GMT)
commita3967216f29b3ec8303c7aa71959dd30ae18ecc3 (patch)
treeaf6a364b578dfd2f12327840012f904892c11756 /bin/patch_capabilities.pl
parent46c4baa0915a9b9599b249833d1b2dd94eab3ca0 (diff)
downloadQt-a3967216f29b3ec8303c7aa71959dd30ae18ecc3.zip
Qt-a3967216f29b3ec8303c7aa71959dd30ae18ecc3.tar.gz
Qt-a3967216f29b3ec8303c7aa71959dd30ae18ecc3.tar.bz2
Unify epocroot usage in createpackage and patch_capabilities scripts
Some tools calls required epoc32/tools to be in path and some didn't. Now all tools calls will use tools from under %EPOCROOT%epoc32/tools if EPOCROOT env variable is defined. Reviewed-by: Janne Koskinen
Diffstat (limited to 'bin/patch_capabilities.pl')
-rwxr-xr-xbin/patch_capabilities.pl16
1 files changed, 12 insertions, 4 deletions
diff --git a/bin/patch_capabilities.pl b/bin/patch_capabilities.pl
index df71339..c3fb89f 100755
--- a/bin/patch_capabilities.pl
+++ b/bin/patch_capabilities.pl
@@ -78,6 +78,16 @@ sub trim($) {
return $string;
}
+my $epocroot = $ENV{EPOCROOT};
+my $epocToolsDir = "";
+if ($epocroot ne "") {
+ $epocroot =~ s,\\,/,g;
+ if ($epocroot =~ m,[^/]$,) {
+ $epocroot = $epocroot."/";
+ }
+ $epocToolsDir = "${epocroot}epoc32/tools/";
+}
+
my $nullDevice = "/dev/null";
$nullDevice = "NUL" if ($^O =~ /MSWin/);
@@ -237,7 +247,7 @@ if (@ARGV)
}
print ("\n");
- my $baseCommandToExecute = "elftran -vid 0x0 -capability \"%s\" ";
+ my $baseCommandToExecute = "${epocToolsDir}elftran -vid 0x0 -capability \"%s\" ";
# Actually set the capabilities of the listed binaries.
foreach my $binaryPath(@binaries)
@@ -256,7 +266,7 @@ if (@ARGV)
# Test which capabilities are present and then restrict them to the allowed set.
# This avoid raising the capabilities of apps that already have none.
my $dllCaps;
- open($dllCaps, "elftran -dump s $binaryPath |") or die ("ERROR: Could not execute elftran");
+ open($dllCaps, "${epocToolsDir}elftran -dump s $binaryPath |") or die ("ERROR: Could not execute elftran");
my $capsFound = 0;
my $originalVid;
my @capabilitiesToSet;
@@ -329,8 +339,6 @@ if (@ARGV)
system ("$commandToExecute > $nullDevice");
$somethingPatched = true;
}
- ## Create another command line to check that the set capabilities are correct.
- #$commandToExecute = "elftran -dump s ".$binaryPath;
}
if ($checkFailed) {