From 5d2692375d32f7cd2c87d94c1f2b0ee62840765b Mon Sep 17 00:00:00 2001 From: Dana Conrad Date: Sat, 14 Sep 2024 14:34:21 -0500 Subject: rbutil: Add erosqnative - Give each brand its own entry, and make ranges of OF versions correspond to hardware changes. - Temporarily disabled target aigoerosq. - Post-install hint enabled. - Added pre-install hint function - Added optional parameter themename, in case the target name does not match the themesite name. - Made Port Status (statusAsString()) only care about platform string prior to first '.' - Manual: Remove note that rbutil does not support this model Issues: - Cannot uninstall the bootloader - manual instructions are available Change-Id: I574aad7943ea3d1e543e9449f68240446fec0709 --- manual/getting_started/installation.tex | 2 +- utils/rbutilqt/base/bootloaderinstallhelper.cpp | 31 ++++++- utils/rbutilqt/base/bootloaderinstallhelper.h | 1 + utils/rbutilqt/base/playerbuildinfo.cpp | 3 +- utils/rbutilqt/base/playerbuildinfo.h | 1 + utils/rbutilqt/changelog.txt | 3 + utils/rbutilqt/gui/selectiveinstallwidget.cpp | 11 +++ utils/rbutilqt/gui/selectiveinstallwidget.h | 1 + utils/rbutilqt/rbutil.ini | 117 ++++++++++++++++++++++-- utils/rbutilqt/rbutilqt.cpp | 1 + utils/rbutilqt/themesinstallwindow.cpp | 9 +- utils/rbutilqt/version.h | 2 +- 12 files changed, 170 insertions(+), 12 deletions(-) diff --git a/manual/getting_started/installation.tex b/manual/getting_started/installation.tex index 169943e0a3..c5a5cf37de 100644 --- a/manual/getting_started/installation.tex +++ b/manual/getting_started/installation.tex @@ -327,7 +327,7 @@ people. Rockbox Utility is a graphical application that does almost everything for you. However, should you encounter a problem, then the manual way is still available to you.\\ -\opt{gigabeats,fiiom3k,shanlingq1,erosqnative}{ +\opt{gigabeats,fiiom3k,shanlingq1}{ \note{The automated install is not yet available for the \playerlongtype{}. For now you can use the manual method to install Rockbox. Please still read the section on the automatic install as it explains diff --git a/utils/rbutilqt/base/bootloaderinstallhelper.cpp b/utils/rbutilqt/base/bootloaderinstallhelper.cpp index 4a1b24883b..34fcefc5bc 100644 --- a/utils/rbutilqt/base/bootloaderinstallhelper.cpp +++ b/utils/rbutilqt/base/bootloaderinstallhelper.cpp @@ -97,6 +97,34 @@ BootloaderInstallBase::Capabilities return caps; } +//! @brief Return pre install hints string. +//! @param model model string +//! @return hints. +QString BootloaderInstallHelper::preinstallHints(QString model) +{ + bool hint = false; + QString msg = QObject::tr("Before Bootloader installation begins, " + "Please check the following:"); + + msg += "
    "; + if(model.contains("erosqnative")) { + hint = true; + msg += QObject::tr("
  1. Ensure your SD card is formatted as FAT. " + "exFAT is not supported. You can reformat using the " + "Original Firmware on your player if need be. It is located " + "under (System Settings --> Reset --> Format TF Card).
  2. " + "
  3. Please use a quality SD card from a reputable source. " + "The SD cards that come bundled with players are often of " + "substandard quality and may cause issues.
  4. "); + } + msg += "
"; + + if(hint) + return msg; + else + return QString(); +} + //! @brief Return post install hints string. //! @param model model string @@ -114,7 +142,8 @@ QString BootloaderInstallHelper::postinstallHints(QString model) } if(model == "iriverh100" || model == "iriverh120" || model == "iriverh300" || model == "ondavx747" || model == "agptekrocker" - || model == "xduoox3" || model == "xduoox3ii" || model == "xduoox20") { + || model == "xduoox3" || model == "xduoox3ii" || model == "xduoox20" + || model.contains("erosqnative")) { hint = true; msg += QObject::tr("
  • Reboot your player into the original firmware.
  • " "
  • Perform a firmware upgrade using the update functionality " diff --git a/utils/rbutilqt/base/bootloaderinstallhelper.h b/utils/rbutilqt/base/bootloaderinstallhelper.h index 9b6fed0866..4b912cd5d5 100644 --- a/utils/rbutilqt/base/bootloaderinstallhelper.h +++ b/utils/rbutilqt/base/bootloaderinstallhelper.h @@ -30,6 +30,7 @@ class BootloaderInstallHelper : public QObject public: static BootloaderInstallBase* createBootloaderInstaller(QObject* parent, QString type); static BootloaderInstallBase::Capabilities bootloaderInstallerCapabilities(QObject *parent, QString type); + static QString preinstallHints(QString model); static QString postinstallHints(QString model); }; diff --git a/utils/rbutilqt/base/playerbuildinfo.cpp b/utils/rbutilqt/base/playerbuildinfo.cpp index 7edb7f750c..1673f73d6b 100644 --- a/utils/rbutilqt/base/playerbuildinfo.cpp +++ b/utils/rbutilqt/base/playerbuildinfo.cpp @@ -67,6 +67,7 @@ const static struct { { PlayerBuildInfo::Encoder, ":target:/encoder" }, { PlayerBuildInfo::Brand, ":target:/brand" }, { PlayerBuildInfo::PlayerPicture, ":target:/playerpic" }, + { PlayerBuildInfo::ThemeName, ":target:/themename" }, { PlayerBuildInfo::TargetNamesAll, "_targets/all" }, { PlayerBuildInfo::TargetNamesEnabled, "_targets/enabled" }, { PlayerBuildInfo::LanguageInfo, "languages/:target:" }, @@ -332,7 +333,7 @@ QVariant PlayerBuildInfo::value(SystemUrl item) QString PlayerBuildInfo::statusAsString(QString platform) { QString result; - switch(value(BuildStatus, platform).toInt()) + switch(value(BuildStatus, platform.split('.').at(0)).toInt()) { case STATUS_RETIRED: result = tr("Stable (Retired)"); diff --git a/utils/rbutilqt/base/playerbuildinfo.h b/utils/rbutilqt/base/playerbuildinfo.h index 38f6662e09..8b7e5934d1 100644 --- a/utils/rbutilqt/base/playerbuildinfo.h +++ b/utils/rbutilqt/base/playerbuildinfo.h @@ -67,6 +67,7 @@ public: Encoder, Brand, PlayerPicture, + ThemeName, TargetNamesAll, TargetNamesEnabled, diff --git a/utils/rbutilqt/changelog.txt b/utils/rbutilqt/changelog.txt index 705395b5f0..e08cc48c7f 100644 --- a/utils/rbutilqt/changelog.txt +++ b/utils/rbutilqt/changelog.txt @@ -48,3 +48,6 @@ Version 1.5.1 * Improve responsiveness on install / uninstall. * Enable Themes installation if themes are selected. +Version 1.5.2 +* Add support for Native Port to AIGO Eros Q and various clones +* Make Hosted Port to AIGO Eros Q and various clones "disabled" (can be reenabled by checking the "show disabled targets" checkbox) diff --git a/utils/rbutilqt/gui/selectiveinstallwidget.cpp b/utils/rbutilqt/gui/selectiveinstallwidget.cpp index 639e03308a..91e4fcf1cf 100644 --- a/utils/rbutilqt/gui/selectiveinstallwidget.cpp +++ b/utils/rbutilqt/gui/selectiveinstallwidget.cpp @@ -409,6 +409,17 @@ void SelectiveInstallWidget::installBootloader(void) } } +void SelectiveInstallWidget::installBootloaderHints() +{ + if(ui.bootloaderCheckbox->isChecked()) { + QString msg = BootloaderInstallHelper::preinstallHints( + RbSettings::value(RbSettings::Platform).toString()); + if(!msg.isEmpty()) { + QMessageBox::information(this, tr("Manual steps required"), msg); + } + } +} + void SelectiveInstallWidget::installBootloaderPost() { // don't do anything if no bootloader install has been done. diff --git a/utils/rbutilqt/gui/selectiveinstallwidget.h b/utils/rbutilqt/gui/selectiveinstallwidget.h index d430cecb10..64083497a0 100644 --- a/utils/rbutilqt/gui/selectiveinstallwidget.h +++ b/utils/rbutilqt/gui/selectiveinstallwidget.h @@ -31,6 +31,7 @@ class SelectiveInstallWidget : public QWidget Q_OBJECT public: SelectiveInstallWidget(QWidget* parent = nullptr); + void installBootloaderHints(void); public slots: void updateVersion(void); diff --git a/utils/rbutilqt/rbutil.ini b/utils/rbutilqt/rbutil.ini index 41f6cd9758..339878a4b5 100644 --- a/utils/rbutilqt/rbutil.ini +++ b/utils/rbutilqt/rbutil.ini @@ -79,6 +79,14 @@ platform135=aigoerosq.agptekh3 platform136=aigoerosq.hifiwalkerh2 platform137=aigoerosq.hifiwalkerh2.v13 platform138=aigoerosq.surfansf20 +; default erosqnative should be most recent hardware revision +platform139=erosqnative.hw3 +platform140=erosqnative.hw3.hifiwalkerh2 +platform141=erosqnative.hw3.surfansf20 +platform142=erosqnative.hw1hw2 +platform143=erosqnative.hw1hw2.hifiwalkerh2 +platform144=erosqnative.hw1hw2.hifiwalkerh2.v13 +platform145=erosqnative.hw1hw2.surfansf20 ; devices sections ; @@ -784,7 +792,7 @@ playerpic=agptekrocker encoder=rbspeex [aigoerosq] -name="AIGO Eros Q" +name="AIGO Eros Q (Hosted)" bootloadermethod=bspatch bootloadername=/aigo/EROSQ-v18.bsdiff bootloaderfile=/update.upt @@ -795,9 +803,10 @@ usbid=0xc5020023 ; shared across EROS Q/K series usberror= playerpic=aigoerosq encoder=rbspeex +status=disabled [aigoerosq.k] -name="AIGO Eros K" +name="AIGO Eros K (Hosted)" bootloadermethod=bspatch bootloadername=/aigo/EROSK-v13.bsdiff bootloaderfile=/update.upt @@ -808,9 +817,10 @@ usbid=0xc5020023 ; shared across EROS Q/K series usberror= playerpic=aigoerosk encoder=rbspeex +status=disabled [aigoerosq.agptekh3] -name="AGPTek H3" +name="AGPTek H3 (Hosted)" bootloadermethod=bspatch bootloadername=/agptek/H3-20180905.bsdiff bootloaderfile=/update.upt @@ -821,9 +831,10 @@ usbid=0xc5020023 ; shared across EROS Q / K series usberror= playerpic=aigoerosk encoder=rbspeex +status=disabled [aigoerosq.surfansf20] -name="Surfans F20" +name="Surfans F20 (Hosted)" bootloadermethod=bspatch bootloadername=/surfans/F20-v22.bsdiff bootloaderfile=/update.upt @@ -834,9 +845,10 @@ usbid=0xc5020023 ; shared across EROS Q / K series usberror= playerpic=aigoerosk encoder=rbspeex +status=disabled [aigoerosq.hifiwalkerh2] -name="HIFI WALKER H2" +name="HIFI WALKER H2 (Hosted)" bootloadermethod=bspatch bootloadername=/hifiwalker/H2-v12.bsdiff bootloaderfile=/update.upt @@ -847,9 +859,10 @@ usbid=0xc5020023 ; shared across EROS Q / K series usberror= playerpic=aigoerosq encoder=rbspeex +status=disabled [aigoerosq.hifiwalkerh2.v13] -name="HIFI WALKER H2 (v1.3+)" +name="HIFI WALKER H2 (v1.3+) (Hosted)" bootloadermethod=file bootloadername=/hifiwalker/H2-v13-patched.upt bootloaderfile=/update.upt @@ -859,6 +872,98 @@ usbid=0xc5020023 ; shared across EROS Q / K series usberror= playerpic=aigoerosq encoder=rbspeex +status=disabled + +[erosqnative.hw3] +name="AIGO Eros Q V2.1" +bootloadermethod=file +bootloadername=/aigo/native/erosqnative-hw3-erosq.upt +bootloaderfile=/update.upt +manualname=erosqnative +themename=aigoerosq +brand=AIGO/EROS +usbid=0xc5020023 ; shared across EROS Q / K series +usberror= +playerpic=aigoerosq +encoder=rbspeex + +[erosqnative.hw3.hifiwalkerh2] +name="HIFI WALKER H2 V1.7 - V1.8" +bootloadermethod=file +bootloadername=/aigo/native/erosqnative-hw3-erosq.upt +bootloaderfile=/update.upt +manualname=erosqnative +themename=aigoerosq +brand=HIFI WALKER +usbid=0xc5020023 ; shared across EROS Q / K series +usberror= +playerpic=aigoerosq +encoder=rbspeex + +[erosqnative.hw3.surfansf20] +name="Surfans F20 V3.0 - V3.3" +bootloadermethod=file +bootloadername=/aigo/native/erosqnative-hw3-erosq.upt +bootloaderfile=/update.upt +manualname=erosqnative +themename=aigoerosq +brand=Surfans +usbid=0xc5020023 ; shared across EROS Q / K series +usberror= +playerpic=aigoerosk +encoder=rbspeex + +[erosqnative.hw1hw2] +name="AIGO Eros Q V1.8 - V2.0" +bootloadermethod=file +bootloadername=/aigo/native/erosqnative-hw1hw2-erosq.upt +bootloaderfile=/update.upt +manualname=erosqnative +themename=aigoerosq +brand=AIGO/EROS +usbid=0xc5020023 ; shared across EROS Q / K series +usberror= +playerpic=aigoerosq +encoder=rbspeex + +[erosqnative.hw1hw2.hifiwalkerh2] +name="HIFI WALKER H2 V1.1 - V1.2, V1.4 - V1.6" +bootloadermethod=file +bootloadername=/aigo/native/erosqnative-hw1hw2-erosq.upt +bootloaderfile=/update.upt +manualname=erosqnative +themename=aigoerosq +brand=HIFI WALKER +usbid=0xc5020023 ; shared across EROS Q / K series +usberror= +playerpic=aigoerosq +encoder=rbspeex + +[erosqnative.hw1hw2.hifiwalkerh2.v13] +name="HIFI WALKER H2 V1.3" +bootloadermethod=file +bootloadername=/aigo/native/erosqnative-hw1hw2-eros_h2.upt +bootloaderfile=/update.upt +manualname=erosqnative +themename=aigoerosq +brand=HIFI WALKER +usbid=0xc5020023 ; shared across EROS Q / K series +usberror= +playerpic=aigoerosq +encoder=rbspeex + +[erosqnative.hw1hw2.surfansf20] +name="Surfans F20 V2.2 - V2.7" +bootloadermethod=file +bootloadername=/aigo/native/erosqnative-hw1hw2-erosq.upt +bootloaderfile=/update.upt +manualname=erosqnative +themename=aigoerosq +brand=Surfans +usbid=0xc5020023 ; shared across EROS Q / K series +usberror= +playerpic=aigoerosk +encoder=rbspeex ; incompatible devices sections ; each section uses a USB VID / PID string as section name. diff --git a/utils/rbutilqt/rbutilqt.cpp b/utils/rbutilqt/rbutilqt.cpp index f5872f268e..b6446dda26 100644 --- a/utils/rbutilqt/rbutilqt.cpp +++ b/utils/rbutilqt/rbutilqt.cpp @@ -366,6 +366,7 @@ void RbUtilQt::configDialog() { Config *cw = new Config(this); connect(cw, &Config::settingsUpdated, this, &RbUtilQt::updateSettings); + connect(cw, &Config::settingsUpdated, selectiveinstallwidget, &SelectiveInstallWidget::installBootloaderHints); cw->show(); } diff --git a/utils/rbutilqt/themesinstallwindow.cpp b/utils/rbutilqt/themesinstallwindow.cpp index 3dd564c5e5..1c4281d25b 100644 --- a/utils/rbutilqt/themesinstallwindow.cpp +++ b/utils/rbutilqt/themesinstallwindow.cpp @@ -85,8 +85,13 @@ void ThemesInstallWindow::downloadInfo() themesInfo.close(); QString infoUrl = PlayerBuildInfo::instance()->value(PlayerBuildInfo::ThemesInfoUrl).toString(); - infoUrl.replace("%TARGET%", - RbSettings::value(RbSettings::CurrentPlatform).toString().split(".").at(0)); + if (PlayerBuildInfo::instance()->value(PlayerBuildInfo::ThemeName).toString() != "") { + infoUrl.replace("%TARGET%", + PlayerBuildInfo::instance()->value(PlayerBuildInfo::ThemeName).toString()); + } else { + infoUrl.replace("%TARGET%", + RbSettings::value(RbSettings::CurrentPlatform).toString().split(".").at(0)); + } infoUrl.replace("%REVISION%", installInfo.revision()); infoUrl.replace("%RELEASE%", installInfo.release()); infoUrl.replace("%RBUTILVER%", VERSION); diff --git a/utils/rbutilqt/version.h b/utils/rbutilqt/version.h index c55a4d845c..15812132fa 100644 --- a/utils/rbutilqt/version.h +++ b/utils/rbutilqt/version.h @@ -34,7 +34,7 @@ // combined differently. #define VERSION_MAJOR 1 #define VERSION_MINOR 5 -#define VERSION_MICRO 1 +#define VERSION_MICRO 2 #define VERSION_PATCH 0 #define STR(x) #x #define VERSIONSTRING(a, b, c) STR(a) "." STR(b) "." STR(c) -- cgit v1.2.3