Rockbox open source high quality audio player as a Music Player Daemon
mpris rockbox mpd libadwaita audio rust zig deno
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

rbutil: path suffix support for devices with non-standard paths

Only for themes, fonts and voice files, includes rgnano implementation to test (can be in its own commit if needed, with the required manual updates and changes to install rockbox itself with rbutil).

Change-Id: I2481e6a3224912a298cf4c86011226e466490e08

authored by

Hairo R. Carela and committed by
Solomon Peachy
64e0ced6 7418e651

+61 -6
+1
utils/rbutilqt/base/playerbuildinfo.cpp
··· 68 68 { PlayerBuildInfo::Brand, ":target:/brand" }, 69 69 { PlayerBuildInfo::PlayerPicture, ":target:/playerpic" }, 70 70 { PlayerBuildInfo::ThemeName, ":target:/themename" }, 71 + { PlayerBuildInfo::PathSuffix, ":target:/pathsuffix" }, 71 72 { PlayerBuildInfo::TargetNamesAll, "_targets/all" }, 72 73 { PlayerBuildInfo::TargetNamesEnabled, "_targets/enabled" }, 73 74 { PlayerBuildInfo::LanguageInfo, "languages/:target:" },
+1
utils/rbutilqt/base/playerbuildinfo.h
··· 70 70 Brand, 71 71 PlayerPicture, 72 72 ThemeName, 73 + PathSuffix, 73 74 74 75 TargetNamesAll, 75 76 TargetNamesEnabled,
+1
utils/rbutilqt/base/rbsettings.cpp
··· 35 35 { RbSettings::ShowChangelog, "show_changelog", "false" }, 36 36 { RbSettings::CurrentPlatform, "platform", "" }, 37 37 { RbSettings::Mountpoint, "mountpoint", "" }, 38 + { RbSettings::Suffix, "suffix", "" }, 38 39 { RbSettings::CachePath, "cachepath", "" }, 39 40 { RbSettings::Build, "build", "" }, 40 41 { RbSettings::ProxyType, "proxytype", "" },
+1
utils/rbutilqt/base/rbsettings.h
··· 34 34 ShowChangelog, 35 35 CurrentPlatform, 36 36 Mountpoint, 37 + Suffix, 37 38 CachePath, 38 39 Build, 39 40 ProxyType,
+7 -2
utils/rbutilqt/configure.cpp
··· 188 188 } 189 189 190 190 // platform 191 - QString nplat; 191 + QString nplat = ui.treeDevices->selectedItems().at(0)->data(0, Qt::UserRole).toString(); 192 192 if(ui.treeDevices->selectedItems().size() != 0) { 193 - nplat = ui.treeDevices->selectedItems().at(0)->data(0, Qt::UserRole).toString(); 194 193 RbSettings::setValue(RbSettings::Platform, nplat); 195 194 } 196 195 else { 197 196 errormsg += "<li>" + tr("No player selected") + "</li>"; 198 197 error = true; 198 + } 199 + 200 + // path suffix 201 + QString suffix = PlayerBuildInfo::instance()->value(PlayerBuildInfo::DeviceInfo::PathSuffix, nplat).toString(); 202 + if (!suffix.isEmpty()) { 203 + RbSettings::setValue(RbSettings::Suffix, suffix); 199 204 } 200 205 201 206 // cache settings
+25 -3
utils/rbutilqt/gui/selectiveinstallwidget.cpp
··· 51 51 52 52 m_logger = nullptr; 53 53 m_zipinstaller = nullptr; 54 + m_suffix = RbSettings::value(RbSettings::Suffix).toString(); 54 55 m_themesinstaller = new ThemesInstallWindow(this); 55 56 connect(m_themesinstaller, &ThemesInstallWindow::selected, 56 57 [this](int count) {ui.themesCheckbox->setChecked(count > 0);}); ··· 494 495 m_zipinstaller->setUrl(fontsurl); 495 496 m_zipinstaller->setLogSection("Fonts"); 496 497 m_zipinstaller->setLogVersion(logversion); 497 - m_zipinstaller->setMountPoint(m_mountpoint); 498 + 499 + if (!m_suffix.isEmpty()) { 500 + QString fullpath = m_mountpoint + m_suffix; 501 + m_zipinstaller->setMountPoint(fullpath); 502 + } else { 503 + m_zipinstaller->setMountPoint(m_mountpoint); 504 + } 505 + 498 506 if(!RbSettings::value(RbSettings::CacheDisabled).toBool()) 499 507 m_zipinstaller->setCache(true); 500 508 ··· 533 541 m_zipinstaller->setUrl(voiceurl); 534 542 m_zipinstaller->setLogSection("Prerendered Voice (" + lang + ")"); 535 543 m_zipinstaller->setLogVersion(logversion); 536 - m_zipinstaller->setMountPoint(m_mountpoint); 544 + 545 + if (!m_suffix.isEmpty()) { 546 + QString fullpath = m_mountpoint + m_suffix; 547 + m_zipinstaller->setMountPoint(fullpath); 548 + } else { 549 + m_zipinstaller->setMountPoint(m_mountpoint); 550 + } 551 + 537 552 if(!RbSettings::value(RbSettings::CacheDisabled).toBool()) 538 553 m_zipinstaller->setCache(true); 539 554 ··· 664 679 m_zipinstaller->setUrl(dataUrls); 665 680 m_zipinstaller->setLogSection(dataName); 666 681 m_zipinstaller->setLogVersion(); 667 - m_zipinstaller->setMountPoint(m_mountpoint); 682 + 683 + if (!m_suffix.isEmpty()) { 684 + QString fullpath = m_mountpoint + m_suffix; 685 + m_zipinstaller->setMountPoint(fullpath); 686 + } else { 687 + m_zipinstaller->setMountPoint(m_mountpoint); 688 + } 689 + 668 690 if(!RbSettings::value(RbSettings::CacheDisabled).toBool()) 669 691 m_zipinstaller->setCache(true); 670 692 connect(m_zipinstaller, &ZipInstaller::done, this, &SelectiveInstallWidget::continueInstall);
+1
utils/rbutilqt/gui/selectiveinstallwidget.h
··· 63 63 QString m_target; 64 64 QString m_blmethod; 65 65 QString m_mountpoint; 66 + QString m_suffix; 66 67 ProgressLoggerGui *m_logger; 67 68 int m_installStage; 68 69 ZipInstaller *m_zipinstaller;
+14
utils/rbutilqt/rbutil.ini
··· 90 90 platform146=erosqnative.hw1hw2.hifiwalkerh2 91 91 platform147=erosqnative.hw1hw2.hifiwalkerh2.v13 92 92 platform148=erosqnative.hw1hw2.surfansf20 93 + platform149=rgnano 93 94 94 95 ; devices sections 95 96 ; ··· 115 116 ; and the user has to manually choose. 116 117 ; usberror: VID / PID value for detecting the player in an incompatible mode 117 118 ; (MTP vs MSC). Can be a list. 119 + ; pathsuffix: For devices that don't use the root of the filesystem for the 120 + ; rockbox folder. 118 121 ; status: allows hiding the target from the list of devices. 119 122 ; 120 123 [archosplayer] ··· 1006 1009 usberror= 1007 1010 playerpic=aigoerosk 1008 1011 encoder=rbspeex 1012 + 1013 + [rgnano] 1014 + name="RG Nano" 1015 + bootloadermethod=none 1016 + bootloadername= 1017 + manualname= 1018 + brand=Anbernic 1019 + usbid=0x1d6b0104 1020 + playerpic=rgnano 1021 + encoder=lame 1022 + pathsuffix=/FunKey 1009 1023 1010 1024 ; incompatible devices sections 1011 1025 ; each section uses a USB VID / PID string as section name.
+1
utils/rbutilqt/test/test-playerbuildinfo.cpp
··· 165 165 { "archosfmrecorder", PlayerBuildInfo::BootloaderFile, "" }, 166 166 { "archosfmrecorder", PlayerBuildInfo::BootloaderFilter, "" }, 167 167 { "archosfmrecorder", PlayerBuildInfo::Encoder, "lame" }, 168 + { "archosfmrecorder", PlayerBuildInfo::PathSuffix, "" }, 168 169 { "archosfmrecorder", PlayerBuildInfo::Brand, "Archos" }, 169 170 { "archosfmrecorder", PlayerBuildInfo::PlayerPicture, "archosfmrecorder"}, 170 171 { "iriverh100", PlayerBuildInfo::BuildStatus, "2" },
+9 -1
utils/rbutilqt/themesinstallwindow.cpp
··· 353 353 logger = new ProgressLoggerGui(this); 354 354 logger->show(); 355 355 QString mountPoint = RbSettings::value(RbSettings::Mountpoint).toString(); 356 + QString m_suffix = RbSettings::value(RbSettings::Suffix).toString(); 356 357 LOG_INFO() << "mountpoint:" << mountPoint; 357 358 // show dialog with error if mount point is wrong 358 359 if(!QFileInfo(mountPoint).isDir()) { ··· 365 366 installer->setUrl(themes); 366 367 installer->setLogSection(names); 367 368 installer->setLogVersion(version); 368 - installer->setMountPoint(mountPoint); 369 + 370 + if (!m_suffix.isEmpty()) { 371 + QString fullpath = mountPoint + m_suffix; 372 + installer->setMountPoint(fullpath); 373 + } else { 374 + installer->setMountPoint(mountPoint); 375 + } 376 + 369 377 if(!RbSettings::value(RbSettings::CacheDisabled).toBool()) 370 378 installer->setCache(true); 371 379