This is the bug/patch tracker for Rockbox. Click here for more information.
Quick links: Bugs · Patches · Rockbox frontpage
FS#8338 - Adds MD5 Checksums generation
Attached to Project:
Rockbox
Opened by Rene Peinthor (rp) - Monday, 17 December 2007, 22:51 GMT+2
Last edited by Jonathan Gordon (jdgordon) - Wednesday, 11 June 2008, 11:31 GMT+2
Opened by Rene Peinthor (rp) - Monday, 17 December 2007, 22:51 GMT+2
Last edited by Jonathan Gordon (jdgordon) - Wednesday, 11 June 2008, 11:31 GMT+2
|
DetailsThis Patch adds the possibility of generating md5 checksums for whole directories, or shows the md5 sum in the properties plugin.
It seems I touched some spaces in code parts which are not relevant, I will see if i can fix this. |
This task depends upon
Closed by Jonathan Gordon (jdgordon)
Wednesday, 11 June 2008, 11:31 GMT+2
Reason for closing: Out of Date
Additional comments about closing: md5sum plugin commited a few days ago
Wednesday, 11 June 2008, 11:31 GMT+2
Reason for closing: Out of Date
Additional comments about closing: md5sum plugin commited a few days ago
Can you update whether this patch is working correctly?
1. This patch was written in december 2007 so it will be totally out of sync with current svn, but as i have plenty of time at this weekend i will sync it this weekend.
2. It has actually somewhat of 2 modes, if i remember correctly, it is possible to generate a file containing the md5 hash for every file in the directory. Or you can just check the md5 hash of a specific file which will be shown in the properties plugin and i think there is also an extra menu entry for this.
3. The patch always worked, what i meant with "It seems I touched some spaces in code parts which are not relevant" was that my editor removed some trailing spaces or inserted some at places i never edited.
As I said i will sync the patch with the current svn revision this weekend and than you can test it and give me more feedback.
I will try to get source r17565 to try as well, once I find it.
***************
*** 120,126 ****
#define PLUGIN_MAGIC 0x526F634B /* RocK */
/* increase this every time the api struct changes */
- #define PLUGIN_API_VERSION 115
/* update this to latest version if a change to the api struct breaks
backwards compatibility (and please take the opportunity to sort in any
--- 121,127 ----
#define PLUGIN_MAGIC 0x526F634B /* RocK */
/* increase this every time the api struct changes */
+ #define PLUGIN_API_VERSION 116
/* update this to latest version if a change to the api struct breaks
backwards compatibility (and please take the opportunity to sort in any
Any advice you might have in fixing this would be appreciated Rene, such as where I can download ver 17565 of the source.
Thanks
Tony
I don't know why this junk failed, actually it shouldn't, but its easy to solve, just open the plugin.h file it's in apps/.
Search for the line with PLUGIN_API_VERSION and increment the number by 1, it should than read 116 for now. This could change a lot, because the plugin api version gets increment everytime the the plugin api is changed, or a new function was added.
After you have done that, you can delete the .rej and .orig file, just to keep your source directory clean.
If you are using svn and not the zipped source, you can easily check out a specific revision of the source with the -r option for checkout or update.
Here is a short overview for working with svn http://www.rockbox.org/twiki/bin/view/Main/UsingSVN .
If you have a lot of patches and have some time to learn new stuff, i would recommend you to try git with the rockbox source, it's a bit more demanding but works very good if you know how :)
http://www.rockbox.org/twiki/bin/view/Main/GitVersionControl
I'll continue testing the patch on my X5, with some larger files, and let you know if I discover any issues.
Thanks for making the patch, and then all the help you've given me in getting it working. Hopefully this patch will be incorporated into the svn at some point, to save you the hassle of re-syncing with the latest source, whenever someone like me comes along :-)
but anyway as long as it works for you its alright.
I think in future versions of the patch I will let the PLUGIN_API_VERSION untouched, because this will only lead to conflicting merges. And as long as the patch applier doesn't forget to copy all .rock files to his player everything should work.
have fun with it.
The added Context menu in the Files menu, (for creating a text file with md5 checksums for each file in a directory), works beautifully. If you are creating large files, as I do, then it can take a few minutes for the processor in the player to do the calculations, but they are then stored in the text file, so its a 'run once' type operation.
However, when viewing the 'Properties' of any file, the md5 checksum is recalculated each time the command is invoked, and is displayed as the last line in the Properties dialog. Once again, this can take up to 1 minute on my X5, from the time I invoke the 'Properties' command, to the time the properties for the file are displayed, during which time, the screen only has the background showing.
Because of the large files I use, I found that I preferred to have just the md5sums text file option, so I edited the patch to remove the creation of the md5s from the Properties dialog, which thanks to Renes patch was fairly easy to work out. So I now have the md5 text file option, and a fast display of file properties.
Thanks again for everthing Rene, I've learnt a lot from you.
Tony
In a first version I had it done via an extra menu entry, to show checksums for a single file, but than i thought it would be nicer to have it in the properties plugin.
But when I'm reading your comment it might actually a better idea remove it from the properties plugin and redo the menu entry for a single file.
It would make it also easier for future patching because i wouldn't need to export the md5 functions to the plugins.
It adds a new menu entry for showing the md5 for a single file.