Mercurial > trustbridge
comparison ui/mainwindow.cpp @ 894:2e7fff9d195a
Update in the real prefix
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Fri, 08 Aug 2014 14:37:31 +0200 |
parents | b61d5a289d8f |
children | c4ba93dbf680 |
comparison
equal
deleted
inserted
replaced
893:b61d5a289d8f | 894:2e7fff9d195a |
---|---|
311 qDebug() << "Failed to start process: " << qerrmsg; | 311 qDebug() << "Failed to start process: " << qerrmsg; |
312 setState(NewSoftwareAvailable); | 312 setState(NewSoftwareAvailable); |
313 return; | 313 return; |
314 } | 314 } |
315 #else /* WIN32 */ | 315 #else /* WIN32 */ |
316 /* On linux installDir is <prefix>/bin */ | |
316 QStringList parameters; | 317 QStringList parameters; |
318 installDir.cdUp(); | |
317 parameters << "--prefix" << installDir.path(); | 319 parameters << "--prefix" << installDir.path(); |
318 bool sudo_started = false; | 320 bool sudo_started = false; |
319 bool use_sudo = is_admin() && is_system_install(); | 321 bool use_sudo = is_admin() && is_system_install(); |
320 if (use_sudo) { | 322 if (use_sudo) { |
321 QStringList sudoPrograms; | 323 QStringList sudoPrograms; |
331 sudo_started = true; | 333 sudo_started = true; |
332 break; | 334 break; |
333 } | 335 } |
334 } | 336 } |
335 } | 337 } |
338 qDebug() << "Starting process " << filePath <<" params: " << parameters; | |
336 if (!sudo_started && !QProcess::startDetached(filePath, parameters)) { | 339 if (!sudo_started && !QProcess::startDetached(filePath, parameters)) { |
337 qDebug() << "Failed to start process."; | 340 qDebug() << "Failed to start process."; |
338 return; | 341 return; |
339 } | 342 } |
340 | 343 |