X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=gui%2Fmain.cpp;h=471dec7939c7eccd88c4d1c882a121ea2a587b08;hb=db3491e272f3754676673d52c89238e9cc43b7ad;hp=3ae56db1768ecc6528446006e2f4c77146fb74c8;hpb=ebe01ce9942e570f23b40793e97cf02b6f3616ee;p=apitrace diff --git a/gui/main.cpp b/gui/main.cpp index 3ae56db..471dec7 100644 --- a/gui/main.cpp +++ b/gui/main.cpp @@ -3,6 +3,9 @@ #include "apitrace.h" #include "apitracecall.h" +#include "os_string.hpp" +#include "os_process.hpp" + #include #include #include @@ -34,8 +37,10 @@ int main(int argc, char **argv) qRegisterMetaType >(); #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