diff options
author | Dominik Wenger <domonoky@googlemail.com> | 2009-05-09 18:17:05 +0000 |
---|---|---|
committer | Dominik Wenger <domonoky@googlemail.com> | 2009-05-09 18:17:05 +0000 |
commit | 9ca29354e1de9859044bdcfce0309b0509bafb90 (patch) | |
tree | 2f2a56fbea6834eee6484d2e6d5eddcf5bfc2e73 /rbutil/rbutilqt/base/bootloaderinstallhex.cpp | |
parent | 09085a30f665a2382496bc6cddf92b8833653776 (diff) | |
download | rockbox-9ca29354e1de9859044bdcfce0309b0509bafb90.tar.gz rockbox-9ca29354e1de9859044bdcfce0309b0509bafb90.zip |
rbutil: enforce parents for bootloader install classes. and rework OF handling a bit.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20892 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'rbutil/rbutilqt/base/bootloaderinstallhex.cpp')
-rw-r--r-- | rbutil/rbutilqt/base/bootloaderinstallhex.cpp | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/rbutil/rbutilqt/base/bootloaderinstallhex.cpp b/rbutil/rbutilqt/base/bootloaderinstallhex.cpp index a52f8d0584..31659981f7 100644 --- a/rbutil/rbutilqt/base/bootloaderinstallhex.cpp +++ b/rbutil/rbutilqt/base/bootloaderinstallhex.cpp @@ -44,10 +44,23 @@ BootloaderInstallHex::BootloaderInstallHex(QObject *parent) { } +QString BootloaderInstallHex::ofHint() +{ + return tr("Bootloader installation requires you to provide " + "a firmware file of the original firmware (hex file). " + "You need to download this file yourself due to legal " + "reasons. Please refer to the " + "<a href='http://www.rockbox.org/manual.shtml'>manual</a> and the " + "<a href='http://www.rockbox.org/wiki/IriverBoot" + "#Download_and_extract_a_recent_ve'>IriverBoot</a> wiki page on " + "how to obtain this file.<br/>" + "Press Ok to continue and browse your computer for the firmware " + "file."); +} bool BootloaderInstallHex::install(void) { - if(m_hex.isEmpty()) + if(m_offile.isEmpty()) return false; m_hashindex = -1; @@ -55,7 +68,7 @@ bool BootloaderInstallHex::install(void) emit logItem(tr("checking MD5 hash of input file ..."), LOGINFO); QByteArray filedata; // read hex file into QByteArray - QFile file(m_hex); + QFile file(m_offile); file.open(QIODevice::ReadOnly); filedata = file.readAll(); file.close(); @@ -97,7 +110,7 @@ bool BootloaderInstallHex::install(void) emit logItem(tr("Descrambling file"), LOGINFO); m_descrambled.open(); int result; - result = iriver_decode(m_hex.toAscii().data(), + result = iriver_decode(m_offile.toAscii().data(), m_descrambled.fileName().toAscii().data(), FALSE, STRIP_NONE); qDebug() << "iriver_decode" << result; @@ -223,7 +236,7 @@ BootloaderInstallBase::BootloaderType BootloaderInstallHex::installed(void) BootloaderInstallBase::Capabilities BootloaderInstallHex::capabilities(void) { - return (Install | NeedsFlashing); + return (Install | NeedsOf); } QString BootloaderInstallHex::scrambleError(int err) |