mirror of
https://github.com/LMMS/lmms.git
synced 2026-03-19 06:28:24 -04:00
Improve STK rawwave path detection (#5804)
This commit is contained in:
@@ -528,17 +528,16 @@ void ConfigManager::loadConfigFile(const QString & configFile)
|
||||
{
|
||||
#if defined(LMMS_BUILD_WIN32)
|
||||
m_stkDir = m_dataDir + "stk/rawwaves/";
|
||||
#elif defined(LMMS_BUILD_APPLE)
|
||||
m_stkDir = qApp->applicationDirPath() + "/../share/stk/rawwaves/";
|
||||
#else
|
||||
if ( qApp->applicationDirPath().startsWith("/tmp/") )
|
||||
// Look for bundled raw waves first
|
||||
m_stkDir = qApp->applicationDirPath() + "/../share/stk/rawwaves/";
|
||||
// Try system installations if not exists
|
||||
if (!QDir(m_stkDir).exists())
|
||||
{
|
||||
// Assume AppImage bundle
|
||||
m_stkDir = qApp->applicationDirPath() + "/../share/stk/rawwaves/";
|
||||
m_stkDir = "/usr/local/share/stk/rawwaves/";
|
||||
}
|
||||
else
|
||||
if (!QDir(m_stkDir).exists())
|
||||
{
|
||||
// Fallback to system provided location
|
||||
m_stkDir = "/usr/share/stk/rawwaves/";
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user