From 9ca29354e1de9859044bdcfce0309b0509bafb90 Mon Sep 17 00:00:00 2001 From: Dominik Wenger Date: Sat, 9 May 2009 18:17:05 +0000 Subject: 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 --- rbutil/rbutilqt/base/bootloaderinstallhex.cpp | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) (limited to 'rbutil/rbutilqt/base/bootloaderinstallhex.cpp') 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 " + "manual and the " + "IriverBoot wiki page on " + "how to obtain this file.
" + "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) -- cgit v1.2.3