From 35a37c5d4cd591f8571f88080b4c2f3c16db0a8a Mon Sep 17 00:00:00 2001 From: probonopd Date: Thu, 8 Sep 2016 21:31:22 +0200 Subject: [PATCH] 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 --- linuxdeployqt/main.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/linuxdeployqt/main.cpp b/linuxdeployqt/main.cpp index 6cdc03e..d8da78d 100644 --- a/linuxdeployqt/main.cpp +++ b/linuxdeployqt/main.cpp @@ -67,6 +67,11 @@ int main(int argc, char **argv) return 1; } + // 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 + QString pathToUsrBin = QCoreApplication::applicationDirPath()+ "/usr/bin"; + setenv("PATH",pathToUsrBin.toUtf8().constData(),1); + QString appName = QDir::cleanPath(QFileInfo(appBinaryPath).completeBaseName()); if (QDir().exists(appBinaryPath)) { @@ -194,4 +199,3 @@ int main(int argc, char **argv) return 0; } -