Ref T103, not all executables on MacOSX are bundles

This commit is contained in:
Klaus Basan
2017-07-12 17:12:39 +02:00
committed by Mathew Sutcliffe
parent c0b78bee6f
commit f53a64396a

View File

@@ -51,9 +51,14 @@ namespace BlackMisc
Q_ASSERT_X(CBuildConfig::isKnownExecutableName(executable), Q_FUNC_INFO, "Unknown exectuable");
QString s = CFileUtils::appendFilePaths(CDirectoryUtils::binDirectory(), executable);
if (CDirectoryUtils::isMacOSXAppBundle())
if (CBuildConfig::isRunningOnMacOSXPlatform())
{
s += QLatin1String(".app/Contents/MacOS/") + executable;
// Mac OSX bundle may or may not be a bundle
const QDir dir(s + QLatin1String(".app/Contents/MacOS"));
if (dir.exists())
{
s += QLatin1String(".app/Contents/MacOS/") + executable;
}
}
else if (CBuildConfig::isRunningOnWindowsNtPlatform())
{