rbutil: warn when you install a build for a different target then already installed.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17769 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Dominik Wenger 2008-06-23 20:31:44 +00:00
parent d0e95cf077
commit 6b0a1ec2a1
6 changed files with 83 additions and 1 deletions

View file

@ -474,8 +474,25 @@ bool RbUtilQt::installAuto()
QString myversion = "r" + versmap.value("bleed_rev");
//! check if rockbox is already installed
// check installed Version and Target
QString rbVersion = installedVersion(settings->mountpoint());
int rbTarget = installedTargetId(settings->mountpoint());
if(rbTarget != -1 && rbTarget != settings->curTargetId())
{
if(QMessageBox::question(this, tr("Target mismatch detected"),
tr("Target mismatch detected. \n\n"
"Installed target: %1.\n"
"New Target: %2.\n\n"
"Do you want to continue?").arg(settings->nameOfTargetId(rbTarget),settings->curName()),
QMessageBox::Yes | QMessageBox::No) == QMessageBox::No)
{
logger->addItem(tr("Aborted!"),LOGERROR);
logger->abort();
return false;
}
}
// check version
if(rbVersion != "")
{
if(QMessageBox::question(this, tr("Installed Rockbox detected"),