From 1a26c0c347b063a1bb9b0db0e4c1c045a126cce5 Mon Sep 17 00:00:00 2001 From: probonopd Date: Thu, 8 Sep 2016 22:06:46 +0200 Subject: [PATCH] Allow binaries in the usr/bin subdirectory to be found --- linuxdeployqt/main.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/linuxdeployqt/main.cpp b/linuxdeployqt/main.cpp index 2641e37..48b9cee 100644 --- a/linuxdeployqt/main.cpp +++ b/linuxdeployqt/main.cpp @@ -70,9 +70,10 @@ int main(int argc, char **argv) // Allow binaries in the usr/bin subdirectory to be found; this is useful for bundling // this application itself together with helper binaries such as patchelf QProcessEnvironment env = QProcessEnvironment::systemEnvironment(); - QString pathToUsrBin = QCoreApplication::applicationDirPath()+ "/usr/bin"; QString oldPath = env.value("PATH"); - env.insert("PATH", pathToUsrBin + ":" + oldPath); + QString newPath = QCoreApplication::applicationDirPath()+ "/usr/bin" + ":" + oldPath; + qDebug() << newPath; + setenv("PATH",newPath.toUtf8().constData(),1); QString appName = QDir::cleanPath(QFileInfo(appBinaryPath).completeBaseName());