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>
This commit is contained in:
Dominik Riebeling 2012-06-01 22:51:48 +02:00
parent de6f96229b
commit 7c78963bbb

View file

@ -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"));