Rockbox

Tasklist

FS#6156 - themes installer (tar themes)

Attached to Project: Rockbox
Opened by Dominik Riebeling (bluebrother) - Monday, 09 October 2006, 21:45 GMT
Last edited by Dominik Riebeling (bluebrother) - Friday, 04 June 2010, 22:12 GMT
Task Type Patches
Category User Interface
Status Closed
Assigned To No-one
Operating System All players
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

The attached patch works as a viewer plugin for theme files. The theme file will get installed so it can get choosen from the "Browse Themes" menu afterwards.
Theme files (.rbt):
- the theme gets recognized by the .cfg file.
- the theme will get the same name as the basename of the cfg file inside of the tar file. This has the advantage that the theme name will be preserved, even if the rbt file got renamed (e.g. to distinguish them on the web server)
- paths inside of the file get ignored so you can drop all files into a single dir upon creation. When extracting the correct folders will get created and the files sorted.
- when extracting the backdrop (if any) will get recognized by its reference in the cfg file, all other bmp files will go to the wps image folder
- the data is tarred and renamed to "rbt"

Reasons:
- I want to have single-file themes. Using tar is IMO the best solution as it doesn't support compression, so no need to handle this (and no possible errors). Using uncompressed zip doesn't have any real advantages over tar, it is also not suited for seeking.
- The best way would be to support single-file themes in the rockbox core. I wrote a patch for this some time ago, but this has a noticeable speed penalty. Exploding the themes on the device should be a handy way for users.

I'm also attaching a single-file theme I used for testing for demonstration (h100, converted from rockbox-themes.org). This plugin is similar to  FS#5002  but it doesn't change the currently set theme but only installs the data.
This task depends upon

Closed by  Dominik Riebeling (bluebrother)
Friday, 04 June 2010, 22:12 GMT
Reason for closing:  Out of Date
Comment by Zakk Roberts (midkay) - Monday, 09 October 2006, 22:39 GMT
Nice! I haven't tried this but form your description, I have two suggestions.

1) Convert the theme installer plugin to be a TAR file viewer, that would be pretty cool - dunno about how you can tie that in with theme installation; maybe you can add tar reading into the plugin libraries and have a theme installer in addition to a tar viewer/extractor. *shrugs* since you already have the code for tar accessing, it'd be cool to see a plugin that would do it to more than just themes.

2) Don't create your own extension. Yeah, it's tempting, but I think your work is more likely to be accepted and it's easier to create files when you use a standard extension rather than this proprietary one (evspecially since you're using the standard tar format).
Comment by Dominik Riebeling (bluebrother) - Tuesday, 10 October 2006, 09:06 GMT
1. I'm not sure what purpose to have with a generic tar viewer -- as long as it's not part of the core it won't be possible accessing files transparently, and having a simple tar extractor is kind of superfluous IMO -- you can untar files using a PC.
2. Reasons for a new extension:
- make it easier to distinguish the files (like winamp skins: zip files renamed to .wsz)
- make sure it's a bit harder to open a tar file that is something completely else
- we have our own extensions for various text files -- wps, fmr, etc., so I don't see a reason why not to use out own extension for packed themes.
- tar doesn't provide its own extension when archiving, so it doesn't make a difference if your using "tar -cf foo.rbt" instead of "tar -cf foo.tar"

My goal is to get a packed themes file format which can easily recognized by users and IMO it's clearer to end-users to use a new file extension.
Comment by Jonas Häggqvist (rasher) - Tuesday, 10 October 2006, 09:12 GMT
I'm not sure it matters much, but windows programs (such as 7-zip) will name tar archives .tar by default, and they'll also not be associated with .rbt files (of course, it's still possible to open a .rbt file with 7-zip, but it'll be slightly more inconvenient).
Comment by Dominik Riebeling (bluebrother) - Tuesday, 10 October 2006, 09:42 GMT
I just tried using 7zip on windows. While it suggests the extension .tar when generating a tar file you can simply change this -- it's part of the filename. When providing single-file themes it shouldn't be necessary for users to open them on the PC. Artists creating such files need to know what they're doing, but they need to know that anyway.
Comment by Dominik Riebeling (bluebrother) - Friday, 09 February 2007, 21:19 GMT
update diff to reflect latest changes in plugin API.
Comment by Calvin Walden (clone4crw) - Friday, 21 August 2009, 00:54 GMT
A tar viewer and extractor would be really nice to have. Do consider it...

Loading...