diff options
Diffstat (limited to 'rbutil/rbutilqt/base/bootloaderinstallbase.cpp')
-rw-r--r-- | rbutil/rbutilqt/base/bootloaderinstallbase.cpp | 113 |
1 files changed, 3 insertions, 110 deletions
diff --git a/rbutil/rbutilqt/base/bootloaderinstallbase.cpp b/rbutil/rbutilqt/base/bootloaderinstallbase.cpp index 87e414413d..72c7526241 100644 --- a/rbutil/rbutilqt/base/bootloaderinstallbase.cpp +++ b/rbutil/rbutilqt/base/bootloaderinstallbase.cpp | |||
@@ -20,16 +20,6 @@ | |||
20 | #include <QtCore> | 20 | #include <QtCore> |
21 | 21 | ||
22 | #include "bootloaderinstallbase.h" | 22 | #include "bootloaderinstallbase.h" |
23 | #include "bootloaderinstallmi4.h" | ||
24 | #include "bootloaderinstallhex.h" | ||
25 | #include "bootloaderinstallipod.h" | ||
26 | #include "bootloaderinstallsansa.h" | ||
27 | #include "bootloaderinstallfile.h" | ||
28 | #include "bootloaderinstallchinachip.h" | ||
29 | #include "bootloaderinstallams.h" | ||
30 | #include "bootloaderinstalltcc.h" | ||
31 | #include "bootloaderinstallmpio.h" | ||
32 | #include "bootloaderinstallimx.h" | ||
33 | #include "utils.h" | 23 | #include "utils.h" |
34 | #include "ziputil.h" | 24 | #include "ziputil.h" |
35 | 25 | ||
@@ -40,44 +30,6 @@ | |||
40 | #endif | 30 | #endif |
41 | 31 | ||
42 | 32 | ||
43 | BootloaderInstallBase* BootloaderInstallBase::createBootloaderInstaller(QObject* parent,QString type) | ||
44 | { | ||
45 | if(type == "mi4") { | ||
46 | return new BootloaderInstallMi4(parent); | ||
47 | } | ||
48 | else if(type == "hex") { | ||
49 | return new BootloaderInstallHex(parent); | ||
50 | } | ||
51 | else if(type == "sansa") { | ||
52 | return new BootloaderInstallSansa(parent); | ||
53 | } | ||
54 | else if(type == "ipod") { | ||
55 | return new BootloaderInstallIpod(parent); | ||
56 | } | ||
57 | else if(type == "file") { | ||
58 | return new BootloaderInstallFile(parent); | ||
59 | } | ||
60 | else if(type == "chinachip") { | ||
61 | return new BootloaderInstallChinaChip(parent); | ||
62 | } | ||
63 | else if(type == "ams") { | ||
64 | return new BootloaderInstallAms(parent); | ||
65 | } | ||
66 | else if(type == "tcc") { | ||
67 | return new BootloaderInstallTcc(parent); | ||
68 | } | ||
69 | else if(type == "mpio") { | ||
70 | return new BootloaderInstallMpio(parent); | ||
71 | } | ||
72 | else if(type == "imx") { | ||
73 | return new BootloaderInstallImx(parent); | ||
74 | } | ||
75 | else { | ||
76 | return NULL; | ||
77 | } | ||
78 | |||
79 | } | ||
80 | |||
81 | BootloaderInstallBase::BootloaderType BootloaderInstallBase::installed(void) | 33 | BootloaderInstallBase::BootloaderType BootloaderInstallBase::installed(void) |
82 | { | 34 | { |
83 | return BootloaderUnknown; | 35 | return BootloaderUnknown; |
@@ -142,6 +94,7 @@ void BootloaderInstallBase::downloadBlFinish(bool error) | |||
142 | emit downloadDone(); | 94 | emit downloadDone(); |
143 | } | 95 | } |
144 | 96 | ||
97 | |||
145 | void BootloaderInstallBase::installBlfile(void) | 98 | void BootloaderInstallBase::installBlfile(void) |
146 | { | 99 | { |
147 | qDebug() << "[BootloaderInstallBase] installBlFile(void)"; | 100 | qDebug() << "[BootloaderInstallBase] installBlFile(void)"; |
@@ -151,7 +104,6 @@ void BootloaderInstallBase::installBlfile(void) | |||
151 | //! @brief backup OF file. | 104 | //! @brief backup OF file. |
152 | //! @param to folder to write backup file to. Folder will get created. | 105 | //! @param to folder to write backup file to. Folder will get created. |
153 | //! @return true on success, false on error. | 106 | //! @return true on success, false on error. |
154 | |||
155 | bool BootloaderInstallBase::backup(QString to) | 107 | bool BootloaderInstallBase::backup(QString to) |
156 | { | 108 | { |
157 | qDebug() << "[BootloaderInstallBase] Backing up bootloader file"; | 109 | qDebug() << "[BootloaderInstallBase] Backing up bootloader file"; |
@@ -198,67 +150,6 @@ int BootloaderInstallBase::logInstall(LogMode mode) | |||
198 | } | 150 | } |
199 | 151 | ||
200 | 152 | ||
201 | //! @brief Return post install hints string. | ||
202 | //! @param model model string | ||
203 | //! @return hints. | ||
204 | QString BootloaderInstallBase::postinstallHints(QString model) | ||
205 | { | ||
206 | bool hint = false; | ||
207 | QString msg = tr("Bootloader installation is almost complete. " | ||
208 | "Installation <b>requires</b> you to perform the " | ||
209 | "following steps manually:"); | ||
210 | |||
211 | msg += "<ol>"; | ||
212 | if(model != "sansafuzeplus") { | ||
213 | msg += tr("<li>Safely remove your player.</li>"); | ||
214 | } | ||
215 | if(model == "iriverh100" || model == "iriverh120" || model == "iriverh300" || | ||
216 | model == "ondavx747") { | ||
217 | hint = true; | ||
218 | msg += tr("<li>Reboot your player into the original firmware.</li>" | ||
219 | "<li>Perform a firmware upgrade using the update functionality " | ||
220 | "of the original firmware. Please refer to your player's manual " | ||
221 | "on details.<br/><b>Important:</b> updating the firmware is a " | ||
222 | "critical process that must not be interrupted. <b>Make sure the " | ||
223 | "player is charged before starting the firmware update " | ||
224 | "process.</b></li>" | ||
225 | "<li>After the firmware has been updated reboot your player.</li>"); | ||
226 | } | ||
227 | if(model == "sansafuzeplus") { | ||
228 | hint = true; | ||
229 | msg += tr("<li>Remove any previously inserted microSD card</li>"); | ||
230 | msg += tr("<li>Disconnect your player. The player will reboot and " | ||
231 | "perform an update of the original firmware. " | ||
232 | "Please refer to your players manual on details.<br/>" | ||
233 | "<b>Important:</b> updating the firmware is a " | ||
234 | "critical process that must not be interrupted. <b>Make sure the " | ||
235 | "player is charged before disconnecting the player.</b></li>" | ||
236 | "<li>After the firmware has been updated reboot your player.</li>"); | ||
237 | } | ||
238 | if(model == "iaudiox5" || model == "iaudiom5" | ||
239 | || model == "iaudiox5v" || model == "iaudiom3" || model == "mpioh200") { | ||
240 | hint = true; | ||
241 | msg += tr("<li>Turn the player off</li>" | ||
242 | "<li>Insert the charger</li>"); | ||
243 | } | ||
244 | if(model == "gigabeatf") { | ||
245 | hint = true; | ||
246 | msg += tr("<li>Unplug USB and power adaptors</li>" | ||
247 | "<li>Hold <i>Power</i> to turn the player off</li>" | ||
248 | "<li>Toggle the battery switch on the player</li>" | ||
249 | "<li>Hold <i>Power</i> to boot into Rockbox</li>"); | ||
250 | } | ||
251 | msg += "</ol>"; | ||
252 | msg += tr("<p><b>Note:</b> You can safely install other parts first, but " | ||
253 | "the above steps are <b>required</b> to finish the installation!</p>"); | ||
254 | |||
255 | if(hint) | ||
256 | return msg; | ||
257 | else | ||
258 | return QString(""); | ||
259 | } | ||
260 | |||
261 | |||
262 | #if defined(Q_OS_MACX) | 153 | #if defined(Q_OS_MACX) |
263 | void BootloaderInstallBase::waitRemount() | 154 | void BootloaderInstallBase::waitRemount() |
264 | { | 155 | { |
@@ -320,6 +211,7 @@ void BootloaderInstallBase::setBlFile(QStringList sl) | |||
320 | } | 211 | } |
321 | } | 212 | } |
322 | 213 | ||
214 | |||
323 | bool BootloaderInstallBase::setOfFile(QString of, QStringList blfile) | 215 | bool BootloaderInstallBase::setOfFile(QString of, QStringList blfile) |
324 | { | 216 | { |
325 | bool found = false; | 217 | bool found = false; |
@@ -360,3 +252,4 @@ bool BootloaderInstallBase::setOfFile(QString of, QStringList blfile) | |||
360 | } | 252 | } |
361 | return found; | 253 | return found; |
362 | } | 254 | } |
255 | |||