summaryrefslogtreecommitdiff
path: root/cli/cli_dump_images.cpp
diff options
context:
space:
mode:
authorCarl Worth <cworth@cworth.org>2012-08-12 16:36:48 -0700
committerJosé Fonseca <jose.r.fonseca@gmail.com>2012-11-18 14:33:57 +0000
commita684451ce345c9d3667921520a4a75e387811ad6 (patch)
tree932d7ae6875101a4b8a33196cba0f7c3efed8320 /cli/cli_dump_images.cpp
parentca7283268b6ecc29d371624b908fd85c30024056 (diff)
dump-images: Execute glretrace from source dir when running uninstalled
Previously, we've had code to carefully find wrappers and scripts relative to an apitrace binary being run from an uninstalled directory. This is extremely useful while testing an experimental feature before installing said experimental code. Similarly, provide a findProgram function to do the same thing for an executable program and use it within "apitrace dump-images" when invoking glretrace.
Diffstat (limited to 'cli/cli_dump_images.cpp')
-rw-r--r--cli/cli_dump_images.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/cli/cli_dump_images.cpp b/cli/cli_dump_images.cpp
index d42b3f78..2a856c78 100644
--- a/cli/cli_dump_images.cpp
+++ b/cli/cli_dump_images.cpp
@@ -36,6 +36,8 @@
#include "os_string.hpp"
#include "os_process.hpp"
+#include "trace_resource.hpp"
+
static const char *synopsis = "Dump frame images obtained from a trace.";
static void
@@ -123,7 +125,9 @@ command(int argc, char *argv[])
* already been pulled in for the "apitrace retrace" (or "apitrace
* replay") command. */
std::vector<const char *> command;
- command.push_back("glretrace");
+
+ os::String glretracePath = trace::findProgram("glretrace");
+ command.push_back(glretracePath);
command.push_back("-s");
command.push_back(output);
command.push_back("-S");