From a1c7bd673a9286299a6bc3c73b8f215b5d97e909 Mon Sep 17 00:00:00 2001 From: kervala Date: Sun, 12 Jun 2016 14:19:39 +0200 Subject: [PATCH] Fixed: Make upgrade script executable under UNIX --HG-- branch : develop --- .../ryzom_installer/src/operationdialog.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/code/ryzom/tools/client/ryzom_installer/src/operationdialog.cpp b/code/ryzom/tools/client/ryzom_installer/src/operationdialog.cpp index 14db9a6f1..ab6007b9e 100644 --- a/code/ryzom/tools/client/ryzom_installer/src/operationdialog.cpp +++ b/code/ryzom/tools/client/ryzom_installer/src/operationdialog.cpp @@ -468,6 +468,21 @@ void COperationDialog::extractBnpClient() env.insert("STARTUPPATH", ""); process.setProcessEnvironment(env); + // permissions to execute script + QFileDevice::Permissions permissions; + permissions |= QFileDevice::ExeOther; + permissions |= QFileDevice::ExeOwner; + permissions |= QFileDevice::ExeUser; + permissions |= QFileDevice::ReadOther; + permissions |= QFileDevice::ReadOwner; + permissions |= QFileDevice::ReadUser; + permissions |= QFileDevice::WriteOwner; + + if (!QFile::setPermissions(upgradeScript, permissions)) + { + qDebug() << "Unable to set executable flag to" << upgradeScript; + } + process.start(upgradeScript); while (process.waitForFinished())