Rockbox.org home
releases
current build
extras
themes FAQ
manual
wiki
docs index mailing lists
IRC
forums bugs
patches



Search | Go
TWiki > Main > RockboxUtility > RockboxUtilityDevelopment

Development of Rockbox Utility


Tasks

Open Tasks in the tracker

Milestone 1: be on par with the old wx version

What? Status?
Device detection DONE sansapatcher detection untested
Rockbox installation DONE done
Bootloader installation DONE done, needs testing
Font installation DONE done
Doom files installation DONE done
Theme installation DONE done
Talk file generation DONE done (only basic functionality)
Voice file installation DONE done
Uninstallation DONE done
Manual view DONE done: downloading to the device (no destination selection)
Complete Installation DONE done, code could be improved
Small Installation DONE done, code could be improved
Portable installation DONE done (only working if built as static binary)
Proxy setup DONE system proxy only working on linux (http_proxy environment variable)
Download cache DONE needs testing
I18N DONE support added, translations missing

Milestone 2: further enhancements

What? Status?
uninstallation / install info DONE done
1st installation detection DONE if no / no valid user configuration is found, display a warning and open the configuration dialog
Device detection DONE use USB PIDs for detection DONE linux (using libusb), DONE windows (setupapi based)
Proxy DONE support "system proxy" setting on windows (registry values used)
L10N support DONE we have I18N already, extend it to do real L10N
Mountpoint resolving on mac DONE done
backup of installation prior to installing DONE rbutil now asks if you want to backup before installing a new Build
improving screenreader support DONE maybe add a drop downmenü with all install/uninstall options from the main tabs. / DONE findout why jaws and other screenreaders have problems reading titles of QTabwidget: Qt bug, fixed with Qt 4.4.0.
builtin rbspeex and sapi.vbs DONE The rbspeex encoder should be built in, and the Sapi.vbs should be in the resource file (windows)
Talk file generation support DONE festival and the DONE sapi scripts from svn; DONE autodetect binaries; DONE find a way to not make the progress window flicker; DONE add option to generate talk files for directories only; incorporate sapi vbs scripts DONE; ALERT! add option to only voice certain file types; ALERT! add options to correct voicestrings
voice file creation DONE needs the servers to provide the features file for every player
General Code clean up - being worked on.
Better Progress Window console version needs implementation, Logging to a file
Console commandos for rbutil needs implementation - in Work (FS#8571)
clean orphan files could be done by automatically performing an uninstallation before updating
install info cleanup possibility to wipe all files that are marked as outdated in the info window / all files that don't match a specific (read: the current) version)
1st time installation Operate in wizard mode instead of the "invalid configuration" splash. First thing should be UI language selection, without needing to restart.
Device detection Auto detection should probably display directly what was found; at least the highlighting should be more prominent (currently very faint on laptop LCD)
Unsupported iPod Display exactly which unsupported iPod was found so as to help avoid user confusion when they are e.g. sure they have a Video not Classic and think it is RBUtil that is wrong

Milestone 3: additions / ideas

Some of the following could be implemented with plugins. -- Qt supports plugins, but it hasn't figured out how to make use of that. Its also unclear which functionality should go into plugins.

What? How? Status?
Scrobbler submission basically a frontend for libscrobbler  
tagnavi_custom.config generator    
default configuration provide some reasonable defaults for config.cfg  
video conversion do it like WinFF  
local repository do we really want such a function? Offline mode does something similar  
Configfile editor A Editor for Rockbox config files  
Optional components Rbutil could install the midi patchset, if the license allows it (otherwise the patchset needs to be removed from the wiki as well)  
Install/ uninstall Support for multiple devices would be nice (perhaps use some sort of (quasi-)unique device ID?)  
Translation Support for editing .lang files in a user friendly way  
UI Rework see below  

UI Rework

As rbutil gets more and more functions, the UI needs a rework. Lets collect ideas for a Rework here:

  • Mainscreen:
Combine the first three Tabs (Quickstart, Installation, Extras) into one. Make a more global selection of release or current Build. Screenshots of mockups by bluebrother:

mainscreen

mainscreen during installation


How To Compile

If you want to work on RockboxUtility get the module "rockbox" from svn (you need parts of the Rockbox source tree, so it's easiest to grab the whole tree. If you don't want to do this: you'll need rbutil, tools and apps). Source code is in the rbutil/rbutilqt folder (plus other parts of the Rockbox source tree) in the Rockbox SVN (browse). You can download it with the command: svn co svn://svn.rockbox.org/rockbox/trunk rockbox


You have to have Qt Version 4.3.0 or higher installed. Then you run the command qmake and then make in the rbutil/rbutilqt folder. Depending on your installation the qmake binary of Qt4 might be called qmake-qt4. On linux and mac you'll also need libusb (including the development headers).

Notes:

  • the build defaults to a release build which has debugging output (even the console) disabled. To create a debug build run qmake with the config option "dbg", i.e. the following way: qmake -config dbg
  • you can make the build output much more silent by adding the configuration "silent". The easiers way is to add -config silent to the qmake call (you can add multiple -config switches, in case you also want to enable debugging output), or add the line CONFIG += silent to the project file.
    • Important note on Windows
      • Note that there is a bug in Qt/Windows which prevents -config silent from working. You can simply fix this by adjusting the path delimiter in mkspecs/features/resources.prf below the Qt installation directory -- the delimiter in the line naming rcc.exe needs to be a slash, not a backslash.
      • make sure to call the mingw32 make, not the msys one. You usually can ensure this by explicitly calling mingw32-make instead of make.
      • you can also define QMAKE_RCC in the project file to the correct binary using slashes.
      • if you don't have Qt in your PATH (i.e. calling qmake.exe using a full path) make sure to use /'s in the path. Otherwise make will fail.
      • Qt 4.3.3s qmake has a bug (at least on windows) which generates wrong makefiles. Comment out the UI_DIR entrys in the .pro file, as a hotfix.
  • There is now a Makefile target "install" on non-windows platforms. It seems as it gets confused with the file install.cpp, but you can use the internal target "install_target" instead. This will only install the binary (to /usr/local/bin), language files are not handled yet. Unless you want to use translations you don't need to install anything else from the build. Translation files are now bundeled in the binary for non-debug builds.
  • The non-debug builds now include the translations (*.qm files) in a resource file. These files are not present when building for the first time, therefore qmake will produce a warning. You can either safely ignore this warning (the translations are generated during the build process) or run lrelease-qt4 rbutilqt.pro before calling qmake-qt4.

Compiling on Windows

  • You need the following packages installed (additionally to Qt itself)
    • MinGW. You need a recent version (current is 5.1.4), the package offered for installation by Qt is not sufficient. You should append the bin folder of the MinGW installation in your PATH variable.
    • msys. librbspeex.a requires sed which is not part of MinGW. As for MinGW itself, append the bin folder to your PATH. Make sure the MinGW path comes first or use mingw32-make instead of make (msys' make won't accepts backslashes in paths, but this is unfortunately needed by Qt)
    • You don't need to put Qt's bin folder in the PATH variable. If you chose to not add it you need to copy the Qt libs to the same folder as the binary (of course this does not apply if you're building a static binary).
    • current w32api (at least 3.12 and 3.13) conflicts with Qt -- this is a Qt issue. As a workaround use w32api-3.11. Simply extract the archive into the MinGW install folder.
    • Building using Visual Studio isn't supported -- rbutil uses some C99 features VS doesn't implement.
  • for building the static release binary make sure to use -no-exceptions when building Qt. Otherwise you'll get a dependency on mingwm10.dll. Also, having support for exceptions enabled increases the binary size noticably.
    The current binaries are built using the following configuration of Qt:
    configure -no-exceptions -static -release -no-webkit -no-dbus -no-phonon -no-phonon-backend -no-qt3support -no-opengl -no-direct3d -no-style-motif -no-style-cde

Compiling on Mac OS X

  • Download the Qt source and uncompress it. I used qt-mac-opensource-src-4.3.0
  • Run ./configure -universal -sdk /Developer/SDKs/MacOSX10.4u.sdk
  • Run make followed by (as root) make install

You can then build rbutilqt by typing (in the rbutilqt source directory) /usr/local/Trolltech/Qt-4.3.0/bin/qmake followed by make

If you want to statically link rbutil with Qt (i.e. to build versions for distribution), add -static to the configure options.

An alternative to static linking is to use the instructions on http://doc.trolltech.com/4.3/deployment-mac.htm to include the frameworks in the application bundle. This method has the benefit of allowing plugins to be included too and also means that a static build of Qt is not required.

For deployment on mac, there is a "osx_deploy.sh script. It expects Qt as framework. So dont built Qt statically. You have to make sure that you have a universal libusb.a. Also make sure that rbutil links to the static version of libusb. (easiest way is to rename the libusb.dynlib in your search path) You can get a universal binary of libusb at: http://www.ellert.se/twain-sane/

Notes: I had an error regarding when compiling Qt related to missing pq_* functions. I fixed this by disabling PostgreSQL support - adding "-no-sql-psql" to the ./configure line.

More advice for compiling on the Mac is available here - http://doc.trolltech.com/qtjambi/com/trolltech/qt/platform-notes-mac.html

Statically Compiling on Linux

For building the static binary the following configuration was used:
./configure -prefix /usr/local/qt4.4.3-static/ -release -static -no-exceptions -no-qt3support -no-phonon -no-phonon-backend -no-xinerama -no-openssl -no-xcursor -no-cups
You can have two differently configured versions of Qt alongside without any problems, just remember to call the correct qmake. There is no need to make the Qt bin-folder part of the PATH variable. If you want to omit demos and examples during Qt compilation, omit the -fast option in the configure line and run make sub-src sub-tools instead of make.


How to Translate

Qt supports I18N and Rockbox Utility uses this. To translate Rockbox Utility do the following:

  • add a new file to the TRANSLATIONS line in rbutilqt/rbutilqt.pro.
  • run "lupdate rbutilqt.pro"
  • edit the resulting *.ts file using "linguist"
  • run "lrelease" to convert the *.ts file to the *.qm format that is used for I18N.
  • put the resulting *.qm file in the same folder as the executable. Rockbox Utility will then detect the new translation and allow you to use it.
  • or add the resulting *.qm file in rbutil-lang.qrc and the language file will be built into the binary.
  • and don't forget to post the *.ts file to the tracker so we can include it ;-)

Translation status (updated 2009-06-10, r21239)

Language Language Code Translations Finished Unfinished Untranslated
German de 538 520 18 0
Finnish fi 350 338 12 188
French fr 374 344 30 164
Greek gr 489 484 5 49
Hebrew he 363 0 363 175
Japanese ja 523 523 0 15
Dutch nl 538 538 0 0
Portuguese pt 489 484 5 49
Turkish tr 268 246 22 270
Chinese zh_CN 241 221 20 297
Chinese (trad) zh_TW 240 221 19 298


Autodetection

All supported devices can be detected automatically. Rockbox Utility will display a warning when autodetection wasn't successful; you can always select your device manually. If you installed Rockbox once it can get detected via the file /.rockbox/rockbox-info.txt. This will work on all devices. See DeviceDetection for further details.


Resolving mountpoints

This relies on detecting the player first (see paragraph above). The following table list when / how we can resolve the mountpoint afterwards. This table only holds supported players; all supported player can now (as of 2008-04-03) be detected reliably. ALERT! denotes a possible way of resolving that hasn't been implemented yet. Once Rockbox is installed mountpoint resolving using rockbox-info.txt will always work.
Brand Player Windows Linux OS X
Apple all Ipods DONE resolving from drive UNC path figured by ipodpatcher (fallback: check for iPod_Control folder) DONE device node known by ipodpatcher, resolving using mtab DONE same as linux
Archos all DONE detect some specific files (firmware image on disk, magic in firmware file) DONE same DONE same
Cowon X5, M5 choice-no unknown (no specific file to check for) choice-no same choice-no same
Iriver H100, H300 choice-no only detection based on USB possible, currently there is no way known to resolve USB PID -> mountpoint choice-no same choice-no same
Iriver H10 ALERT! possible recognizing the bootloader file location ALERT! same ALERT! same
Sandisk e200, c200 DONE resolving from drive UNC path figured by sansapatcher DONE device node known by sansapatcher, resolving using mtab DONE same as linux
Olympus m:robe 100 ALERT! possible looking for bootloader file ALERT! same ALERT! same
Toshiba Gigabeat ALERT! possible searching for bootloader file ALERT! same ALERT! same

Releasing

The script deploy-release.py is intended to automate releasing by building the current checkout state and packaging it to a tar.bz2 / zip file. Use the command line option -q / --qmake to pass the path to the qmake binary of the Qt installation you want to use (if there are multiple), otherwise the system is searched for a Qt4 installation and the first found gets used.

Brief release checklist

  1. update the version info in version.h and Info.plist and commit them.
  2. tag svn. As rbutil now needs parts of the main Rockbox sources we need to tag trunk, not only the rbutil folder. Use a version number as in the following example:
    svn copy svn://svn.rockbox.org/rockbox/trunk svn://svn.rockbox.org/rockbox/tags/rbutil_m1.0.5
  3. lrelease the language files (they are now in the resource, so this need to be done before building!)
  4. configure with qmake -config release -config static
  5. build against static libraries ;-)
  6. linux: strip the binaries (seems to be mostly an issue on linux)
  7. windows: upx the binary to cut down its size
  8. osx: run osx_deploy.sh. Make sure libusb is static and universal.
  9. compress the result (tarball / zip) and put it to some public location and ping someone with access to the download server


History

This is the Qt version of Rockbox Utility. It supersedes the older wxwidgets based version which isn't maintained anymore and has therefore been removed from svn.


r51 - 29 Jun 2009 - 19:02:26 - DominikWenger
Edit | View raw | Attach | Ref-By | History: r51 < r50 < r49 < r48 < r47 | More | Refresh cache

Parents: RockboxUtility

Copyright © 1999-2009 by the contributing authors.