X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=gui%2Fmain.cpp;h=471dec7939c7eccd88c4d1c882a121ea2a587b08;hb=15046fbda519d2cf35fd341cdead170e14844a63;hp=0ed50ed8f2b33506f931f570d9662430d59712ec;hpb=1f94577d8c4b1c1a2a1a8f3dceb0daac02dd72b7;p=apitrace diff --git a/gui/main.cpp b/gui/main.cpp index 0ed50ed..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 @@ -32,6 +35,15 @@ int main(int argc, char **argv) qRegisterMetaType(); qRegisterMetaType(); qRegisterMetaType >(); + +#ifndef Q_OS_WIN + os::String currentProcess = os::getProcessName(); + currentProcess.trimFilename(); + QString path = qgetenv("PATH"); + path = QLatin1String(currentProcess.str()) + QLatin1String(":") + path; + qputenv("PATH", path.toLatin1()); +#endif + QStringList args = app.arguments(); int i = 1;