Mercurial > trustbridge > trustbridge
changeset 809:4b702f6cf9b6
Download sofware with .sh extension on linux and make it exeutable
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Tue, 15 Jul 2014 16:30:55 +0200 |
parents | 13cf42dbe9bd |
children | ee75e236843c |
files | ui/downloader.cpp |
diffstat | 1 files changed, 8 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/ui/downloader.cpp Tue Jul 15 16:30:24 2014 +0200 +++ b/ui/downloader.cpp Tue Jul 15 16:30:55 2014 +0200 @@ -231,14 +231,22 @@ QString fileName = dataDirectory.append("/SW-") .append(remoteModSW.toString("yyyyMMddHHmmss")) +#ifdef WIN32 .append(".exe"); +#else + .append(".sh"); +#endif qDebug() << "fileName: " << fileName; if (mDownloadSW) { if (!downloadFile(mResourceSW, fileName, MAX_SW_SIZE)) { + qDebug() << "Failed to download software update."; return; } + QFile::setPermissions(fileName, QFileDevice::ReadOwner | + QFileDevice::WriteOwner | + QFileDevice::ExeOwner); } emit newSoftwareAvailable(fileName, remoteModSW);