forked from len0rd/rockbox
Install widget: fallback to development build.
If neither an old selected build nor a release is available fallback to selecting the development build. Remove some old code that was not supposed to be be kept. Change-Id: I883535bd8e7981e68bc3fac3bcd5f375e1237242
This commit is contained in:
parent
a455f5901a
commit
d8f5a00fc1
1 changed files with 5 additions and 47 deletions
|
|
@ -111,10 +111,14 @@ void SelectiveInstallWidget::updateVersion(void)
|
|||
if(index != -1) {
|
||||
ui.selectedVersion->setCurrentIndex(index);
|
||||
}
|
||||
else {
|
||||
else if(!m_versions["release"].isEmpty()) {
|
||||
index = ui.selectedVersion->findData("release");
|
||||
ui.selectedVersion->setCurrentIndex(index);
|
||||
}
|
||||
else {
|
||||
index = ui.selectedVersion->findData("current");
|
||||
ui.selectedVersion->setCurrentIndex(index);
|
||||
}
|
||||
// check if Rockbox is installed. If it is untick the bootloader option, as
|
||||
// well as if the selected player doesn't need a bootloader.
|
||||
if(m_blmethod == "none") {
|
||||
|
|
@ -378,52 +382,6 @@ void SelectiveInstallWidget::installRockbox(void)
|
|||
else if(selected == "rc") url = ServerInfo::platformValue(m_target,
|
||||
ServerInfo::RelCandidateUrl).toString();
|
||||
|
||||
#if 0
|
||||
RockboxInfo info(m_mountpoint);
|
||||
if(info.success()) {
|
||||
// existing installation found. Ask for backup.
|
||||
QMessageBox::information(this, tr("Backup existing installation?"),
|
||||
tr("Existing installation detected. Create a backup before installing?"),
|
||||
QMessageBox::Yes | QMessageBox::No, QMessageBox::No);
|
||||
|
||||
}
|
||||
#endif
|
||||
#if 0
|
||||
//! check if we should backup
|
||||
if(ui.backup->isChecked())
|
||||
{
|
||||
m_logger->addItem(tr("Beginning Backup..."),LOGINFO);
|
||||
QCoreApplication::processEvents();
|
||||
|
||||
//! create dir, if it doesnt exist
|
||||
QFileInfo backupFile(m_backupName);
|
||||
if(!QDir(backupFile.path()).exists())
|
||||
{
|
||||
QDir a;
|
||||
a.mkpath(backupFile.path());
|
||||
}
|
||||
|
||||
//! create backup
|
||||
bool result = true;
|
||||
ZipUtil zip(this);
|
||||
connect(&zip, SIGNAL(logProgress(int, int)), m_logger, SLOT(setProgress(int, int)));
|
||||
connect(&zip, SIGNAL(logItem(QString, int)), m_logger, SLOT(addItem(QString, int)));
|
||||
zip.open(m_backupName, QuaZip::mdCreate);
|
||||
QString mp = RbSettings::value(RbSettings::Mountpoint).toString();
|
||||
QString folder = mp + "/.rockbox";
|
||||
result = zip.appendDirToArchive(folder, mp);
|
||||
zip.close();
|
||||
if(result) {
|
||||
m_logger->addItem(tr("Backup finished."), LOGINFO);
|
||||
}
|
||||
else {
|
||||
m_logger->addItem(tr("Backup failed!"), LOGERROR);
|
||||
m_logger->setFinished();
|
||||
return;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
//! install build
|
||||
if(m_zipinstaller != NULL) delete m_zipinstaller;
|
||||
m_zipinstaller = new ZipInstaller(this);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue