mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-09 13:15:18 -05:00
rbutil: Detect if Rockbox is already installed, and allow Backup bevor installing a new build.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17440 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
251db06294
commit
acccee479a
7 changed files with 49 additions and 11 deletions
|
|
@ -33,6 +33,7 @@
|
|||
#include "uninstallwindow.h"
|
||||
#include "browseof.h"
|
||||
#include "utils.h"
|
||||
#include "rbzip.h"
|
||||
|
||||
#if defined(Q_OS_LINUX)
|
||||
#include <stdio.h>
|
||||
|
|
@ -462,7 +463,22 @@ bool RbUtilQt::installAuto()
|
|||
}
|
||||
|
||||
QString myversion = "r" + versmap.value("bleed_rev");
|
||||
|
||||
|
||||
//! check if rockbox is already installed
|
||||
if(QDir(settings->mountpoint() + "/.rockbox").exists())
|
||||
{
|
||||
if(QMessageBox::question(this, tr("Installed Rockbox detected"),
|
||||
tr("Rockbox installation detected. Do you want to backup first?"),
|
||||
QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes)
|
||||
{
|
||||
QString backupName = QFileDialog::getSaveFileName(this,"Select Backup Filename",settings->mountpoint());
|
||||
logger->show();
|
||||
RbZip backup;
|
||||
backup.createZip(backupName,settings->mountpoint() + "/.rockbox",logger);
|
||||
}
|
||||
}
|
||||
|
||||
//! install current build
|
||||
ZipInstaller* installer = new ZipInstaller(this);
|
||||
installer->setUrl(file);
|
||||
installer->setLogSection("Rockbox (Base)");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue