From 7f6560986d72eef8a6e83f1d92020e283632471c Mon Sep 17 00:00:00 2001 From: kervala Date: Wed, 19 Oct 2016 09:56:06 +0200 Subject: [PATCH 1/5] Added tag ryzom-patch-3.0.0 for changeset 3e17907af67e --HG-- branch : develop --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index f13a14cd9..ab12aee39 100644 --- a/.hgtags +++ b/.hgtags @@ -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 From c05a8d3c2e21ee737a09a4294e6f8ec962db6589 Mon Sep 17 00:00:00 2001 From: kervala Date: Wed, 19 Oct 2016 10:46:56 +0200 Subject: [PATCH 2/5] Fixed: Try to put executable permissions before to launch an executable under UNIX --HG-- branch : develop --- .../client/client_config_qt/src/client_config_dialog.cpp | 5 +++++ code/ryzom/tools/client/ryzom_installer/src/main.cpp | 5 +++++ .../ryzom/tools/client/ryzom_installer/src/mainwindow.cpp | 8 ++++++++ code/ryzom/tools/client/ryzom_installer/src/utils.cpp | 8 ++++++++ 4 files changed, 26 insertions(+) diff --git a/code/ryzom/tools/client/client_config_qt/src/client_config_dialog.cpp b/code/ryzom/tools/client/client_config_qt/src/client_config_dialog.cpp index 5ec5b2a60..ecac3ccdb 100644 --- a/code/ryzom/tools/client/client_config_qt/src/client_config_dialog.cpp +++ b/code/ryzom/tools/client/client_config_qt/src/client_config_dialog.cpp @@ -172,6 +172,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(); diff --git a/code/ryzom/tools/client/ryzom_installer/src/main.cpp b/code/ryzom/tools/client/ryzom_installer/src/main.cpp index 6b664ace0..3420ef42e 100644 --- a/code/ryzom/tools/client/ryzom_installer/src/main.cpp +++ b/code/ryzom/tools/client/ryzom_installer/src/main.cpp @@ -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 } diff --git a/code/ryzom/tools/client/ryzom_installer/src/mainwindow.cpp b/code/ryzom/tools/client/ryzom_installer/src/mainwindow.cpp index 822570fec..d6f356f8e 100644 --- a/code/ryzom/tools/client/ryzom_installer/src/mainwindow.cpp +++ b/code/ryzom/tools/client/ryzom_installer/src/mainwindow.cpp @@ -137,6 +137,10 @@ 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()); @@ -164,6 +168,10 @@ 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); diff --git a/code/ryzom/tools/client/ryzom_installer/src/utils.cpp b/code/ryzom/tools/client/ryzom_installer/src/utils.cpp index 9a08b4ac8..0a31629f9 100644 --- a/code/ryzom/tools/client/ryzom_installer/src/utils.cpp +++ b/code/ryzom/tools/client/ryzom_installer/src/utils.cpp @@ -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); From 4f996024d906e26ccff774ec2e91ebc7b714be31 Mon Sep 17 00:00:00 2001 From: kervala Date: Wed, 19 Oct 2016 10:48:32 +0200 Subject: [PATCH 3/5] Fixed: Catch ESocket exceptions when disconnecting and log it --HG-- branch : develop --- code/ryzom/client/src/network_connection.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/code/ryzom/client/src/network_connection.cpp b/code/ryzom/client/src/network_connection.cpp index 5a7e42179..d78fd6199 100644 --- a/code/ryzom/client/src/network_connection.cpp +++ b/code/ryzom/client/src/network_connection.cpp @@ -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); From 142155d8c8bd9af265d56433fdf8813d5ba116e4 Mon Sep 17 00:00:00 2001 From: kervala Date: Wed, 19 Oct 2016 10:49:20 +0200 Subject: [PATCH 4/5] Fixed: Use & to not wait until client exits in bash script --HG-- branch : develop --- code/ryzom/client/src/login_patch.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/ryzom/client/src/login_patch.cpp b/code/ryzom/client/src/login_patch.cpp index 0afbdf5f4..0f867ff70 100644 --- a/code/ryzom/client/src/login_patch.cpp +++ b/code/ryzom/client/src/login_patch.cpp @@ -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 From b62562c896bc170abf17163a97b1b84995d901ab Mon Sep 17 00:00:00 2001 From: kervala Date: Wed, 19 Oct 2016 10:49:51 +0200 Subject: [PATCH 5/5] Changed: Save default profile when clicking on Play or Configure --HG-- branch : develop --- .../tools/client/ryzom_installer/src/mainwindow.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/code/ryzom/tools/client/ryzom_installer/src/mainwindow.cpp b/code/ryzom/tools/client/ryzom_installer/src/mainwindow.cpp index d6f356f8e..5d61f0924 100644 --- a/code/ryzom/tools/client/ryzom_installer/src/mainwindow.cpp +++ b/code/ryzom/tools/client/ryzom_installer/src/mainwindow.cpp @@ -145,7 +145,11 @@ void CMainWindow::onPlayClicked() 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() @@ -174,7 +178,11 @@ void CMainWindow::onConfigureClicked() bool started = QProcess::startDetached(executable, arguments); - CConfigFile::getInstance()->setDefaultProfileIndex(profileIndex); + if (started) + { + CConfigFile::getInstance()->setDefaultProfileIndex(profileIndex); + CConfigFile::getInstance()->save(); + } } void CMainWindow::onProfiles()