summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2012-06-01 22:51:48 +0200
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2012-06-05 23:23:44 +0200
commit7c78963bbb09603e8ceb986b478ae4762a6f427b (patch)
tree5866819261269b46a8dd31466f42d10a6838fe36
parentde6f96229b96fd08a6fe331638e3a98425778b45 (diff)
downloadrockbox-7c78963bbb09603e8ceb986b478ae4762a6f427b.tar.gz
rockbox-7c78963bbb09603e8ceb986b478ae4762a6f427b.tar.bz2
rockbox-7c78963bbb09603e8ceb986b478ae4762a6f427b.zip
Add voicefile version to rockbox-info.txt.
When the voicefile binary format changes there is no easy way to figure which format is compatible with a given Rockbox installation. Add the version number to rockbox-info.txt so tools like Rockbox Utility can easily retrieve it and therefore support different versions. Change-Id: Ia5b8f00f89065f0dd0adf061612d844dcaff39c6 Reviewed-on: http://gerrit.rockbox.org/269 Tested-by: Dominik Riebeling <Dominik.Riebeling@gmail.com> Reviewed-by: Dominik Riebeling <Dominik.Riebeling@gmail.com>
-rwxr-xr-xtools/mkinfo.pl16
1 files changed, 16 insertions, 0 deletions
diff --git a/tools/mkinfo.pl b/tools/mkinfo.pl
index 483ddd10bc..12d32bc7dc 100755
--- a/tools/mkinfo.pl
+++ b/tools/mkinfo.pl
@@ -28,6 +28,21 @@ sub cmd1line {
return $out[0];
}
+sub definescan {
+ my ($f, $d)=($_[0], $_[1]);
+ my $v;
+ open(M, "<$f");
+ while(<M>) {
+ if($_ =~ /\#define\s+$d\s+([^\s]+)\s?/) {
+ $v = $1;
+ last;
+ }
+ }
+ close(M);
+
+ return $v;
+}
+
sub mapscan {
my ($f)=@_;
my $start, $end;
@@ -82,6 +97,7 @@ printf O ("Manufacturer: %s\n", $ENV{'MANUFACTURER'});
printf O ("Version: %s", `$ENV{TOOLSDIR}/version.sh $ENV{ROOTDIR}`);
printf O ("Binary: %s\n", $ENV{'BINARY'});
printf O ("Binary size: %s\n", filesize($ENV{'BINARY'}));
+printf O ("Voice format: %s\n", definescan("$ENV{APPSDIR}/talk.h", "VOICE_VERSION"));
if ($ENV{'APPSDIR'} =~ /\/apps$/) {
printf O ("Actual size: %s\n", filesize("rockbox.bin"));