summaryrefslogtreecommitdiff
path: root/rbutil
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2012-08-19 10:49:53 +0200
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2012-08-19 11:04:54 +0200
commitca1bbc08b34a03a217471b802fdd600e8594f5bb (patch)
treefad81117400145c258f7187c78adc711475b00e4 /rbutil
parent4908b8eb1c60283fbca0c4884e9f0258d1b949ec (diff)
Check environment before starting installation.
The environment needs to be correct for other installations than main Rockbox as well. Change-Id: Icf626de63b58ba40f600fd095a254b6e7e9e46ee
Diffstat (limited to 'rbutil')
-rw-r--r--rbutil/rbutilqt/base/utils.cpp1
-rw-r--r--rbutil/rbutilqt/gui/selectiveinstallwidget.cpp29
2 files changed, 15 insertions, 15 deletions
diff --git a/rbutil/rbutilqt/base/utils.cpp b/rbutil/rbutilqt/base/utils.cpp
index 60bacd709e..3821b67201 100644
--- a/rbutil/rbutilqt/base/utils.cpp
+++ b/rbutil/rbutilqt/base/utils.cpp
@@ -299,6 +299,7 @@ QString Utils::findExecutable(QString name)
*/
QString Utils::checkEnvironment(bool permission)
{
+ qDebug() << "[Utils] checking environment";
QString text = "";
// check permission
diff --git a/rbutil/rbutilqt/gui/selectiveinstallwidget.cpp b/rbutil/rbutilqt/gui/selectiveinstallwidget.cpp
index ec8ce1cc64..ec55a81176 100644
--- a/rbutil/rbutilqt/gui/selectiveinstallwidget.cpp
+++ b/rbutil/rbutilqt/gui/selectiveinstallwidget.cpp
@@ -157,9 +157,23 @@ void SelectiveInstallWidget::startInstall(void)
{
qDebug() << "[SelectiveInstallWidget] starting installation";
saveSettings();
+
m_installStage = 0;
if(m_logger != NULL) delete m_logger;
m_logger = new ProgressLoggerGui(this);
+ QString warning = Utils::checkEnvironment(false);
+ if(!warning.isEmpty())
+ {
+ warning += "<br/>" + tr("Continue with installation?");
+ if(QMessageBox::warning(this, tr("Really continue?"), warning,
+ QMessageBox::Ok | QMessageBox::Abort, QMessageBox::Abort)
+ == QMessageBox::Abort)
+ {
+ emit installSkipped(true);
+ return;
+ }
+ }
+
m_logger->show();
if(!QFileInfo(m_mountpoint).isDir()) {
m_logger->addItem(tr("Mountpoint is wrong"), LOGERROR);
@@ -360,21 +374,6 @@ void SelectiveInstallWidget::installRockbox(void)
RbSettings::setValue(RbSettings::Build, selected);
RbSettings::sync();
- QString warning = Utils::checkEnvironment(false);
- if(!warning.isEmpty())
- {
- warning += "<br/>" + tr("Continue with installation?");
- if(QMessageBox::warning(this, tr("Really continue?"), warning,
- QMessageBox::Ok | QMessageBox::Abort, QMessageBox::Abort)
- == QMessageBox::Abort)
- {
- m_logger->addItem(tr("Aborted!"),LOGERROR);
- m_logger->setFinished();
- emit installSkipped(true);
- return;
- }
- }
-
if(selected == "release") url = ServerInfo::platformValue(m_target,
ServerInfo::CurReleaseUrl).toString();
else if(selected == "development") url = ServerInfo::platformValue(m_target,