Fixed: Use full path to launch Ryzom client and pass profile argument
This commit is contained in:
parent
b571de42b7
commit
1562a5dddf
1 changed files with 19 additions and 6 deletions
|
@ -149,15 +149,28 @@ void CClientConfigDialog::onClickPlay()
|
||||||
{
|
{
|
||||||
bool started = false;
|
bool started = false;
|
||||||
|
|
||||||
|
QStringList arguments;
|
||||||
|
|
||||||
|
if (Args.haveArg("p"))
|
||||||
|
{
|
||||||
|
arguments << "-p" << QString::fromUtf8(Args.getArg("p").front().c_str());
|
||||||
|
}
|
||||||
|
|
||||||
|
QString clientFullPath = QString::fromUtf8(Args.getProgramPath().c_str());
|
||||||
|
|
||||||
#ifdef Q_OS_WIN32
|
#ifdef Q_OS_WIN32
|
||||||
started = QProcess::startDetached( "ryzom_client_r.exe" );
|
#ifdef _DEBUG
|
||||||
if( !started )
|
clientFullPath += "ryzom_client_d.exe";
|
||||||
QProcess::startDetached( "ryzom_client_d.exe" );
|
|
||||||
#elif defined(Q_OS_MAC)
|
|
||||||
started = QProcess::startDetached( "./Ryzom.app" );
|
|
||||||
#else
|
#else
|
||||||
started = QProcess::startDetached( "./ryzom_client" );
|
clientFullPath += "ryzom_client_r.exe";
|
||||||
#endif
|
#endif
|
||||||
|
#elif defined(Q_OS_MAC)
|
||||||
|
clientFullPath += "Ryzom";
|
||||||
|
#else
|
||||||
|
clientFullPath += "ryzom_client";
|
||||||
|
#endif
|
||||||
|
|
||||||
|
started = QProcess::startDetached(clientFullPath, arguments);
|
||||||
|
|
||||||
onClickOK();
|
onClickOK();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue