diff options
author | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2012-07-01 12:21:20 +0200 |
---|---|---|
committer | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2012-07-01 12:34:59 +0200 |
commit | d8f5a00fc1cd8beff431bd236377b3fccece29fd (patch) | |
tree | ce1a51f82f26fec50ea4fa69223597956e8ab0d1 /rbutil | |
parent | a455f5901aab95eda4f22bb36796baa2eedfa8da (diff) | |
download | rockbox-d8f5a00fc1cd8beff431bd236377b3fccece29fd.tar.gz rockbox-d8f5a00fc1cd8beff431bd236377b3fccece29fd.zip |
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
Diffstat (limited to 'rbutil')
-rw-r--r-- | rbutil/rbutilqt/gui/selectiveinstallwidget.cpp | 52 |
1 files changed, 5 insertions, 47 deletions
diff --git a/rbutil/rbutilqt/gui/selectiveinstallwidget.cpp b/rbutil/rbutilqt/gui/selectiveinstallwidget.cpp index ebea57ada5..555c99c546 100644 --- a/rbutil/rbutilqt/gui/selectiveinstallwidget.cpp +++ b/rbutil/rbutilqt/gui/selectiveinstallwidget.cpp | |||
@@ -111,10 +111,14 @@ void SelectiveInstallWidget::updateVersion(void) | |||
111 | if(index != -1) { | 111 | if(index != -1) { |
112 | ui.selectedVersion->setCurrentIndex(index); | 112 | ui.selectedVersion->setCurrentIndex(index); |
113 | } | 113 | } |
114 | else { | 114 | else if(!m_versions["release"].isEmpty()) { |
115 | index = ui.selectedVersion->findData("release"); | 115 | index = ui.selectedVersion->findData("release"); |
116 | ui.selectedVersion->setCurrentIndex(index); | 116 | ui.selectedVersion->setCurrentIndex(index); |
117 | } | 117 | } |
118 | else { | ||
119 | index = ui.selectedVersion->findData("current"); | ||
120 | ui.selectedVersion->setCurrentIndex(index); | ||
121 | } | ||
118 | // check if Rockbox is installed. If it is untick the bootloader option, as | 122 | // check if Rockbox is installed. If it is untick the bootloader option, as |
119 | // well as if the selected player doesn't need a bootloader. | 123 | // well as if the selected player doesn't need a bootloader. |
120 | if(m_blmethod == "none") { | 124 | if(m_blmethod == "none") { |
@@ -378,52 +382,6 @@ void SelectiveInstallWidget::installRockbox(void) | |||
378 | else if(selected == "rc") url = ServerInfo::platformValue(m_target, | 382 | else if(selected == "rc") url = ServerInfo::platformValue(m_target, |
379 | ServerInfo::RelCandidateUrl).toString(); | 383 | ServerInfo::RelCandidateUrl).toString(); |
380 | 384 | ||
381 | #if 0 | ||
382 | RockboxInfo info(m_mountpoint); | ||
383 | if(info.success()) { | ||
384 | // existing installation found. Ask for backup. | ||
385 | QMessageBox::information(this, tr("Backup existing installation?"), | ||
386 | tr("Existing installation detected. Create a backup before installing?"), | ||
387 | QMessageBox::Yes | QMessageBox::No, QMessageBox::No); | ||
388 | |||
389 | } | ||
390 | #endif | ||
391 | #if 0 | ||
392 | //! check if we should backup | ||
393 | if(ui.backup->isChecked()) | ||
394 | { | ||
395 | m_logger->addItem(tr("Beginning Backup..."),LOGINFO); | ||
396 | QCoreApplication::processEvents(); | ||
397 | |||
398 | //! create dir, if it doesnt exist | ||
399 | QFileInfo backupFile(m_backupName); | ||
400 | if(!QDir(backupFile.path()).exists()) | ||
401 | { | ||
402 | QDir a; | ||
403 | a.mkpath(backupFile.path()); | ||
404 | } | ||
405 | |||
406 | //! create backup | ||
407 | bool result = true; | ||
408 | ZipUtil zip(this); | ||
409 | connect(&zip, SIGNAL(logProgress(int, int)), m_logger, SLOT(setProgress(int, int))); | ||
410 | connect(&zip, SIGNAL(logItem(QString, int)), m_logger, SLOT(addItem(QString, int))); | ||
411 | zip.open(m_backupName, QuaZip::mdCreate); | ||
412 | QString mp = RbSettings::value(RbSettings::Mountpoint).toString(); | ||
413 | QString folder = mp + "/.rockbox"; | ||
414 | result = zip.appendDirToArchive(folder, mp); | ||
415 | zip.close(); | ||
416 | if(result) { | ||
417 | m_logger->addItem(tr("Backup finished."), LOGINFO); | ||
418 | } | ||
419 | else { | ||
420 | m_logger->addItem(tr("Backup failed!"), LOGERROR); | ||
421 | m_logger->setFinished(); | ||
422 | return; | ||
423 | } | ||
424 | } | ||
425 | #endif | ||
426 | |||
427 | //! install build | 385 | //! install build |
428 | if(m_zipinstaller != NULL) delete m_zipinstaller; | 386 | if(m_zipinstaller != NULL) delete m_zipinstaller; |
429 | m_zipinstaller = new ZipInstaller(this); | 387 | m_zipinstaller = new ZipInstaller(this); |