SCRATCH fix BaseLauncher

This commit is contained in:
Petr Mrázek 2015-06-15 22:08:13 +02:00
parent 34ddfc7ecc
commit f86a39c21c

View File

@ -21,6 +21,8 @@
#include <QDir> #include <QDir>
#include <QEventLoop> #include <QEventLoop>
#define IBUS "@im=ibus"
BaseLauncher::BaseLauncher(InstancePtr instance): m_instance(instance) BaseLauncher::BaseLauncher(InstancePtr instance): m_instance(instance)
{ {
} }
@ -56,7 +58,7 @@ void BaseLauncher::initializeEnvironment()
qDebug() << "Env: ignoring" << key << value; qDebug() << "Env: ignoring" << key << value;
continue; continue;
} }
#ifdef LINUX #ifdef Q_OS_LINUX
// Do not pass LD_* variables to java. They were intended for MultiMC // Do not pass LD_* variables to java. They were intended for MultiMC
if(key.startsWith("LD_")) if(key.startsWith("LD_"))
{ {
@ -71,13 +73,26 @@ void BaseLauncher::initializeEnvironment()
value.replace(IBUS, ""); value.replace(IBUS, "");
qDebug() << "Env: stripped" << IBUS << "from" << save << ":" << value; qDebug() << "Env: stripped" << IBUS << "from" << save << ":" << value;
} }
if(key == "GAME_PRELOAD")
{
m_env.insert("LD_PRELOAD", value);
continue;
}
if(key == "GAME_LIBRARY_PATH")
{
m_env.insert("LD_LIBRARY_PATH", value);
continue;
}
#endif #endif
qDebug() << "Env: " << key << value; qDebug() << "Env: " << key << value;
m_env.insert(key, value); m_env.insert(key, value);
} }
#ifdef LINUX #ifdef Q_OS_LINUX
// HACK: Workaround for QTBUG-42500 // HACK: Workaround for QTBUG42500
m_env.insert("LD_LIBRARY_PATH", ""); if(!m_env.contains("LD_LIBRARY_PATH"))
{
m_env.insert("LD_LIBRARY_PATH", "");
}
#endif #endif
// export some infos // export some infos