summaryrefslogtreecommitdiffstats
path: root/rbutil/rbutilqt/rbutilqt.cpp
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2012-01-15 23:20:17 +0100
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2012-01-15 23:32:15 +0100
commitb45cc0a13a20e88546cd7a536f09979edf8353a1 (patch)
tree1189e5a6381c7f4a8ac770bafbb9a21f49d5e930 /rbutil/rbutilqt/rbutilqt.cpp
parent66c3086ae54c71413117f3de3dcfb5f0fe8b541d (diff)
downloadrockbox-b45cc0a13a20e88546cd7a536f09979edf8353a1.tar.gz
rockbox-b45cc0a13a20e88546cd7a536f09979edf8353a1.tar.bz2
rockbox-b45cc0a13a20e88546cd7a536f09979edf8353a1.zip
Support reading OF files from zip.
Several devices require the original firmware to be able installing the bootloader. Most vendors distribute the firmware file in zip format. Extend reading the original firmware file to support reading the file from the zip directly instead of requiring the user to separately extract it. Change-Id: Ic4e89053456d8f7d6adc294f6657aceddbc354ba
Diffstat (limited to 'rbutil/rbutilqt/rbutilqt.cpp')
-rw-r--r--rbutil/rbutilqt/rbutilqt.cpp23
1 files changed, 14 insertions, 9 deletions
diff --git a/rbutil/rbutilqt/rbutilqt.cpp b/rbutil/rbutilqt/rbutilqt.cpp
index 403d13a760..958550e880 100644
--- a/rbutil/rbutilqt/rbutilqt.cpp
+++ b/rbutil/rbutilqt/rbutilqt.cpp
@@ -708,7 +708,14 @@ void RbUtilQt::installBootloader()
logger->setFinished();
return;
}
-
+
+ // the bootloader install class does NOT use any GUI stuff.
+ // All messages are passed via signals.
+ connect(bl, SIGNAL(done(bool)), logger, SLOT(setFinished()));
+ connect(bl, SIGNAL(done(bool)), this, SLOT(installBootloaderPost(bool)));
+ connect(bl, SIGNAL(logItem(QString, int)), logger, SLOT(addItem(QString, int)));
+ connect(bl, SIGNAL(logProgress(int, int)), logger, SLOT(setProgress(int, int)));
+
// set bootloader filename. Do this now as installed() needs it.
QStringList blfile = SystemInfo::value(SystemInfo::CurBootloaderFile).toStringList();
QStringList blfilepath;
@@ -788,16 +795,14 @@ void RbUtilQt::installBootloader()
m_error = true;
return;
}
- bl->setOfFile(offile);
+ if(!bl->setOfFile(offile, blfile)) {
+ logger->addItem(tr("Error reading firmware file"), LOGERROR);
+ logger->setFinished();
+ m_error = true;
+ return;
+ }
}
- // the bootloader install class does NOT use any GUI stuff.
- // All messages are passed via signals.
- connect(bl, SIGNAL(done(bool)), logger, SLOT(setFinished()));
- connect(bl, SIGNAL(done(bool)), this, SLOT(installBootloaderPost(bool)));
- connect(bl, SIGNAL(logItem(QString, int)), logger, SLOT(addItem(QString, int)));
- connect(bl, SIGNAL(logProgress(int, int)), logger, SLOT(setProgress(int, int)));
-
// start install.
if(!backupDestination.isEmpty()) {
if(!bl->backup(backupDestination)) {