# so that binaries can find each other using just relative paths.
#
add_definitions(
- -DAPITRACE_BINARY_DIR="${CMAKE_BINARY_DIR}"
-DAPITRACE_INSTALL_PREFIX="${CMAKE_INSTALL_PREFIX}"
-DAPITRACE_PROGRAMS_INSTALL_DIR="${CMAKE_INSTALL_PREFIX}/bin"
-DAPITRACE_SCRIPTS_INSTALL_DIR="${CMAKE_INSTALL_PREFIX}/${SCRIPTS_INSTALL_DIR}"
#include "apitrace.h"
#include "apitracecall.h"
+#include "os_string.hpp"
+#include "os_process.hpp"
+
#include <QApplication>
#include <QMetaType>
#include <QVariant>
qRegisterMetaType<QList<QImage> >();
#ifndef Q_OS_WIN
+ os::String currentProcess = os::getProcessName();
+ currentProcess.trimFilename();
QString path = qgetenv("PATH");
- path = QLatin1String(APITRACE_BINARY_DIR) + QLatin1String(":") + path;
+ path = QLatin1String(currentProcess.str()) + QLatin1String(":") + path;
qputenv("PATH", path.toLatin1());
#endif