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) | |||
44 | { | 44 | { |
45 | } | 45 | } |
46 | 46 | ||
47 | QString BootloaderInstallHex::ofHint() | ||
48 | { | ||
49 | return tr("Bootloader installation requires you to provide " | ||
50 | "a firmware file of the original firmware (hex file). " | ||
51 | "You need to download this file yourself due to legal " | ||
52 | "reasons. Please refer to the " | ||
53 | "<a href='http://www.rockbox.org/manual.shtml'>manual</a> and the " | ||
54 | "<a href='http://www.rockbox.org/wiki/IriverBoot" | ||
55 | "#Download_and_extract_a_recent_ve'>IriverBoot</a> wiki page on " | ||
56 | "how to obtain this file.<br/>" | ||
57 | "Press Ok to continue and browse your computer for the firmware " | ||
58 | "file."); | ||
59 | } | ||
47 | 60 | ||
48 | bool BootloaderInstallHex::install(void) | 61 | bool BootloaderInstallHex::install(void) |
49 | { | 62 | { |
50 | if(m_hex.isEmpty()) | 63 | if(m_offile.isEmpty()) |
51 | return false; | 64 | return false; |
52 | m_hashindex = -1; | 65 | m_hashindex = -1; |
53 | 66 | ||
@@ -55,7 +68,7 @@ bool BootloaderInstallHex::install(void) | |||
55 | emit logItem(tr("checking MD5 hash of input file ..."), LOGINFO); | 68 | emit logItem(tr("checking MD5 hash of input file ..."), LOGINFO); |
56 | QByteArray filedata; | 69 | QByteArray filedata; |
57 | // read hex file into QByteArray | 70 | // read hex file into QByteArray |
58 | QFile file(m_hex); | 71 | QFile file(m_offile); |
59 | file.open(QIODevice::ReadOnly); | 72 | file.open(QIODevice::ReadOnly); |
60 | filedata = file.readAll(); | 73 | filedata = file.readAll(); |
61 | file.close(); | 74 | file.close(); |
@@ -97,7 +110,7 @@ bool BootloaderInstallHex::install(void) | |||
97 | emit logItem(tr("Descrambling file"), LOGINFO); | 110 | emit logItem(tr("Descrambling file"), LOGINFO); |
98 | m_descrambled.open(); | 111 | m_descrambled.open(); |
99 | int result; | 112 | int result; |
100 | result = iriver_decode(m_hex.toAscii().data(), | 113 | result = iriver_decode(m_offile.toAscii().data(), |
101 | m_descrambled.fileName().toAscii().data(), FALSE, STRIP_NONE); | 114 | m_descrambled.fileName().toAscii().data(), FALSE, STRIP_NONE); |
102 | qDebug() << "iriver_decode" << result; | 115 | qDebug() << "iriver_decode" << result; |
103 | 116 | ||
@@ -223,7 +236,7 @@ BootloaderInstallBase::BootloaderType BootloaderInstallHex::installed(void) | |||
223 | 236 | ||
224 | BootloaderInstallBase::Capabilities BootloaderInstallHex::capabilities(void) | 237 | BootloaderInstallBase::Capabilities BootloaderInstallHex::capabilities(void) |
225 | { | 238 | { |
226 | return (Install | NeedsFlashing); | 239 | return (Install | NeedsOf); |
227 | } | 240 | } |
228 | 241 | ||
229 | QString BootloaderInstallHex::scrambleError(int err) | 242 | QString BootloaderInstallHex::scrambleError(int err) |