summaryrefslogtreecommitdiffstats
path: root/bin/patch_capabilities.pl
diff options
context:
space:
mode:
authorDavid Boddie <david.boddie@nokia.com>2010-12-14 13:01:13 (GMT)
committerDavid Boddie <david.boddie@nokia.com>2010-12-14 13:01:13 (GMT)
commit086a010a63895c6e6d178c1de9434483f11b2d34 (patch)
treebb2542f04438b42ae5c61b1c3a6330f011700474 /bin/patch_capabilities.pl
parent0fe36ac832abf8f8d438b21fce0177b65b3bbf3a (diff)
parent5cb2226ddf96555417f08c9bfe35addfc93f6acd (diff)
downloadQt-086a010a63895c6e6d178c1de9434483f11b2d34.zip
Qt-086a010a63895c6e6d178c1de9434483f11b2d34.tar.gz
Qt-086a010a63895c6e6d178c1de9434483f11b2d34.tar.bz2
Merge branch 'qdoc-simplified' into mimir-simplified
Conflicts: tools/qdoc3/atom.h tools/qdoc3/qdoc3.pro
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) {