Merge with develop

--HG--
branch : compatibility-develop
This commit is contained in:
kervala 2016-10-19 10:50:26 +02:00
commit 9bd254d25a
7 changed files with 48 additions and 4 deletions

View file

@ -8,3 +8,4 @@ e3fe4855f22c3e75722e015dc33c091c340b3ad7 ryzomcore/v0.11.1
9e583b717fd63be0be9fd60b99087abf1691ea49 ryzomcore/v0.11.2
bfe5628e14a024ba7ea32e4b326ae433a07856b9 ryzomcore/v0.11.3
9a6120735daa97c96ac5d85ca35c7f21f607bd87 ryzomcore/v0.12.0
3e17907af67e8d66d80e6b714707bbf912607f2a ryzom-patch-3.0.0

View file

@ -952,7 +952,7 @@ void CPatchManager::createBatchFile(CProductDescriptionForClient &descFile, bool
// use exec command under OS X
contentSuffix += toString("exec \"$RYZOM_CLIENT\" %s $LOGIN $PASSWORD $SHARDID\n", additionalParams.c_str());
#else
contentSuffix += toString("\"$RYZOM_CLIENT\" %s $LOGIN $PASSWORD $SHARDID\n", additionalParams.c_str());
contentSuffix += toString("\"$RYZOM_CLIENT\" %s $LOGIN $PASSWORD $SHARDID &\n", additionalParams.c_str());
#endif
}
#endif

View file

@ -2756,7 +2756,16 @@ void CNetworkConnection::sendSystemDisconnection()
uint32 length = message.length();
if (_Connection.connected())
_Connection.send (message.buffer(), length);
{
try
{
_Connection.send(message.buffer(), length);
}
catch (const ESocket &e)
{
nlwarning("Socket exception: %s", e.what());
}
}
//sendUDP (&(_Connection), message.buffer(), length);
statsSend(length);

View file

@ -177,6 +177,11 @@ void CClientConfigDialog::onClickPlay()
clientFullPath += "ryzom_client";
#endif
#ifndef Q_OS_WIN32
// fix executable permissions under UNIX
QFile::setPermissions(clientFullPath, QFile::permissions(clientFullPath) | QFile::ExeGroup | QFile::ExeUser | QFile::ExeOther);
#endif
started = QProcess::startDetached(clientFullPath, arguments);
onClickOK();

View file

@ -271,6 +271,11 @@ int main(int argc, char *argv[])
if (restartInstaller)
{
#ifndef _DEBUG
#ifndef Q_OS_WIN32
// fix executable permissions under UNIX
QFile::setPermissions(config.getInstallerInstalledFilePath(), QFile::permissions(config.getInstallerInstalledFilePath()) | QFile::ExeGroup | QFile::ExeUser | QFile::ExeOther);
#endif
if (QProcess::startDetached(config.getInstallerInstalledFilePath())) return 0;
#endif
}

View file

@ -137,11 +137,19 @@ void CMainWindow::onPlayClicked()
arguments << profile.id;
arguments << profile.arguments.split(' ');
#ifndef Q_OS_WIN32
QFile::setPermissions(executable, QFile::permissions(executable) | QFile::ExeGroup | QFile::ExeUser | QFile::ExeOther);
#endif
// launch the game with all arguments and from server root directory (to use right data)
bool started = QProcess::startDetached(executable, arguments, server.getDirectory());
// define this profile as default one
CConfigFile::getInstance()->setDefaultProfileIndex(profileIndex);
if (started)
{
CConfigFile::getInstance()->setDefaultProfileIndex(profileIndex);
CConfigFile::getInstance()->save();
}
}
void CMainWindow::onConfigureClicked()
@ -164,9 +172,17 @@ void CMainWindow::onConfigureClicked()
arguments << "-p";
arguments << profile.id;
#ifndef Q_OS_WIN32
QFile::setPermissions(executable, QFile::permissions(executable) | QFile::ExeGroup | QFile::ExeUser | QFile::ExeOther);
#endif
bool started = QProcess::startDetached(executable, arguments);
CConfigFile::getInstance()->setDefaultProfileIndex(profileIndex);
if (started)
{
CConfigFile::getInstance()->setDefaultProfileIndex(profileIndex);
CConfigFile::getInstance()->save();
}
}
void CMainWindow::onProfiles()

View file

@ -408,6 +408,14 @@ QString appendShortcutExtension(const QString &shortcut)
QString getVersionFromExecutable(const QString &path)
{
// check if file exists
if (!QFile::exists(path)) return "";
#ifndef Q_OS_WIN32
// fix executable permissions under UNIX
QFile::setPermissions(path, QFile::permissions(path) | QFile::ExeGroup | QFile::ExeUser | QFile::ExeOther);
#endif
// launch executable with --version argument
QProcess process;
process.setProcessChannelMode(QProcess::MergedChannels);