mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-09 05:05:20 -05:00
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
This commit is contained in:
parent
66c3086ae5
commit
b45cc0a13a
5 changed files with 84 additions and 16 deletions
|
|
@ -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)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue