Note: You can safely install other parts first, but " - "the above steps are required to finish the installation!
"); - - if(hint) - return msg; - else - return QString(""); -} - Index: rbutil/rbutilqt/base/bootloaderinstallfile.h =================================================================== --- rbutil/rbutilqt/base/bootloaderinstallfile.h (revision 20848) +++ rbutil/rbutilqt/base/bootloaderinstallfile.h (working copy) @@ -30,11 +30,12 @@ Q_OBJECT public: - BootloaderInstallFile(QObject *parent = 0); + BootloaderInstallFile(QObject *parent); bool install(void); bool uninstall(void); BootloaderInstallBase::BootloaderType installed(void); Capabilities capabilities(void); + QString postinstallHints(QString model); private slots: void installStage2(void); Index: rbutil/rbutilqt/base/bootloaderinstallhex.h =================================================================== --- rbutil/rbutilqt/base/bootloaderinstallhex.h (revision 20848) +++ rbutil/rbutilqt/base/bootloaderinstallhex.h (working copy) @@ -37,12 +37,10 @@ bool uninstall(void); BootloaderInstallBase::BootloaderType installed(void); Capabilities capabilities(void); + QString ofHint(); + QString postinstallHints(QString model); - void setHexfile(QString h) - { m_hex = h; } - private: - QString m_hex; int m_hashindex; int m_model; QTemporaryFile m_descrambled; Index: rbutil/rbutilqt/base/bootloaderinstallmi4.h =================================================================== --- rbutil/rbutilqt/base/bootloaderinstallmi4.h (revision 20848) +++ rbutil/rbutilqt/base/bootloaderinstallmi4.h (working copy) @@ -30,7 +30,7 @@ Q_OBJECT public: - BootloaderInstallMi4(QObject *parent = 0); + BootloaderInstallMi4(QObject *parent); bool install(void); bool uninstall(void); BootloaderInstallBase::BootloaderType installed(void); Index: rbutil/rbutilqt/base/bootloaderinstallipod.h =================================================================== --- rbutil/rbutilqt/base/bootloaderinstallipod.h (revision 20848) +++ rbutil/rbutilqt/base/bootloaderinstallipod.h (working copy) @@ -31,7 +31,7 @@ Q_OBJECT public: - BootloaderInstallIpod(QObject *parent = 0); + BootloaderInstallIpod(QObject *parent); ~BootloaderInstallIpod(); bool install(void); bool uninstall(void); Index: rbutil/rbutilqt/base/bootloaderinstallfile.cpp =================================================================== --- rbutil/rbutilqt/base/bootloaderinstallfile.cpp (revision 20848) +++ rbutil/rbutilqt/base/bootloaderinstallfile.cpp (working copy) @@ -144,3 +144,29 @@ return Install | IsFile | CanCheckInstalled | Backup; } +QString BootloaderInstallFile::postinstallHints(QString model) +{ + QString msg = tr("Bootloader installation is almost complete. " + "Installation requires you to perform the " + "following steps manually:"); + + msg += "Note: You can safely install other parts first, but " + "the above steps are required to finish the installation!
"); + return msg; +} + Index: rbutil/rbutilqt/base/bootloaderinstallbase.h =================================================================== --- rbutil/rbutilqt/base/bootloaderinstallbase.h (revision 20848) +++ rbutil/rbutilqt/base/bootloaderinstallbase.h (working copy) @@ -24,41 +24,49 @@ #include "progressloggerinterface.h" #include "httpget.h" - +//! baseclass for all Bootloader installs class BootloaderInstallBase : public QObject { Q_OBJECT - public: enum Capability { Install = 0x01, Uninstall = 0x02, Backup = 0x04, - IsFile = 0x08, IsRaw = 0x10, NeedsFlashing = 0x20, + IsFile = 0x08, IsRaw = 0x10, NeedsOf = 0x20, CanCheckInstalled = 0x40, CanCheckVersion = 0x80 }; Q_DECLARE_FLAGS(Capabilities, Capability) enum BootloaderType { BootloaderNone, BootloaderRockbox, BootloaderOther, BootloaderUnknown }; - BootloaderInstallBase(QObject *parent = 0) : QObject(parent) + BootloaderInstallBase(QObject *parent) : QObject(parent) { } - virtual bool install(void) - { return false; } - virtual bool uninstall(void) - { return false; } - virtual BootloaderType installed(void); - virtual Capabilities capabilities(void); + //! install the bootloader, must be implemented + virtual bool install(void) = 0; + //! uninstall the bootloader, must be implemented + virtual bool uninstall(void) = 0; + //! returns the installed bootloader + virtual BootloaderType installed(void)=0; + //! returns the capabilities of the bootloader class + virtual Capabilities capabilities(void)=0; + //! returns a port Install Hint or empty if there is none + virtual QString postinstallHints(QString model) {return QString();} + //! returns a OF Firmware hint or empty if there is none + virtual QString ofHint() {return QString();} + + //! backup a already installed bootloader bool backup(QString to); + //! set the differen filenames and paths void setBlFile(QString f) { m_blfile = f; } void setBlUrl(QUrl u) { m_blurl = u; } void setLogfile(QString f) { m_logfile = f; } - - static QString postinstallHints(QString model); - + void setOfFile(QString f) + {m_offile = f;} + protected slots: void downloadReqFinished(int id, bool error); void downloadBlFinish(bool error); @@ -76,7 +84,7 @@ QUrl m_blurl; //! bootloader download URL QTemporaryFile m_tempfile; //! temporary file for download QDateTime m_blversion; //! download timestamp used for version information - + QString m_offile; //! path to the offile signals: void downloadDone(void); //! internal signal sent when download finished. void done(bool); Index: rbutil/rbutilqt/base/bootloaderinstallhex.cpp =================================================================== --- rbutil/rbutilqt/base/bootloaderinstallhex.cpp (revision 20848) +++ rbutil/rbutilqt/base/bootloaderinstallhex.cpp (working copy) @@ -44,10 +44,23 @@ { } +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.Note: You can safely install other parts first, but " + "the above steps are required to finish the installation!
"); + return msg; +}