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
This commit is contained in:
probonopd
2016-09-08 21:31:22 +02:00
committed by GitHub
parent 5a50d55131
commit 35a37c5d4c
+5 -1
View File
@@ -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;
}