mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
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:
parent
de6f96229b
commit
7c78963bbb
1 changed files with 16 additions and 0 deletions
|
@ -28,6 +28,21 @@ sub cmd1line {
|
||||||
return $out[0];
|
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 {
|
sub mapscan {
|
||||||
my ($f)=@_;
|
my ($f)=@_;
|
||||||
my $start, $end;
|
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 ("Version: %s", `$ENV{TOOLSDIR}/version.sh $ENV{ROOTDIR}`);
|
||||||
printf O ("Binary: %s\n", $ENV{'BINARY'});
|
printf O ("Binary: %s\n", $ENV{'BINARY'});
|
||||||
printf O ("Binary size: %s\n", filesize($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$/) {
|
if ($ENV{'APPSDIR'} =~ /\/apps$/) {
|
||||||
printf O ("Actual size: %s\n", filesize("rockbox.bin"));
|
printf O ("Actual size: %s\n", filesize("rockbox.bin"));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue