2008-10-14 20:44:49 +00:00
|
|
|
#!/usr/bin/perl
|
|
|
|
|
2012-04-07 18:29:59 +00:00
|
|
|
$version="3.11.1";
|
2008-10-14 20:44:49 +00:00
|
|
|
|
2010-06-03 20:50:07 +00:00
|
|
|
require "tools/builds.pm";
|
|
|
|
|
2008-10-14 20:44:49 +00:00
|
|
|
my $verbose;
|
|
|
|
if($ARGV[0] eq "-v") {
|
|
|
|
$verbose =1;
|
|
|
|
shift @ARGV;
|
|
|
|
}
|
|
|
|
|
|
|
|
my $doonly;
|
|
|
|
if($ARGV[0]) {
|
|
|
|
$doonly = $ARGV[0];
|
|
|
|
print "only build $doonly\n" if($verbose);
|
|
|
|
}
|
|
|
|
|
|
|
|
# made once for all targets
|
|
|
|
sub runone {
|
2009-12-07 12:19:08 +00:00
|
|
|
my ($dir)=@_;
|
2008-10-14 20:44:49 +00:00
|
|
|
my $a;
|
|
|
|
|
|
|
|
if($doonly && ($doonly ne $dir)) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2009-06-18 22:08:12 +00:00
|
|
|
mkdir "buildv-$dir";
|
|
|
|
chdir "buildv-$dir";
|
|
|
|
print "Build in buildv-$dir\n" if($verbose);
|
2008-10-14 20:44:49 +00:00
|
|
|
|
|
|
|
# build the manual(s)
|
2009-12-07 12:19:08 +00:00
|
|
|
$a = buildit($dir);
|
2008-10-14 20:44:49 +00:00
|
|
|
|
|
|
|
chdir "..";
|
|
|
|
|
2009-06-18 22:08:12 +00:00
|
|
|
my $o="buildv-$dir/english.voice";
|
2008-10-14 20:44:49 +00:00
|
|
|
if (-f $o) {
|
|
|
|
my $newo="output/$dir-$version-english.zip";
|
|
|
|
system("cp $o output/$dir-$version-english.voice");
|
|
|
|
system("mkdir -p .rockbox/langs");
|
|
|
|
system("cp $o .rockbox/langs");
|
|
|
|
system("zip -r $newo .rockbox");
|
|
|
|
system("rm -rf .rockbox");
|
|
|
|
print "moved $o to $newo\n" if($verbose);
|
|
|
|
}
|
|
|
|
|
2009-06-18 22:08:12 +00:00
|
|
|
print "remove all contents in buildv-$dir\n" if($verbose);
|
|
|
|
system("rm -rf buildv-$dir");
|
2008-10-14 20:44:49 +00:00
|
|
|
|
|
|
|
return $a;
|
|
|
|
};
|
|
|
|
|
|
|
|
sub buildit {
|
2009-12-07 12:19:08 +00:00
|
|
|
my ($model)=@_;
|
2008-10-14 20:44:49 +00:00
|
|
|
|
|
|
|
`rm -rf * >/dev/null 2>&1`;
|
|
|
|
|
2010-06-03 21:04:02 +00:00
|
|
|
my $c = "../tools/configure --type=av --target=$model --language=0 --tts=f --ram=0 --voice=0";
|
2008-10-14 20:44:49 +00:00
|
|
|
|
|
|
|
print "C: $c\n" if($verbose);
|
|
|
|
`$c`;
|
|
|
|
|
|
|
|
print "Run 'make voice'\n" if($verbose);
|
2011-12-07 17:59:11 +00:00
|
|
|
print `make voice VERSION=$version 2>/dev/null`;
|
2008-10-14 20:44:49 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
# run make in tools first to make sure they're up-to-date
|
|
|
|
`(cd tools && make ) >/dev/null 2>&1`;
|
|
|
|
|
2009-06-18 22:08:12 +00:00
|
|
|
my $home=$ENV{'HOME'};
|
|
|
|
|
|
|
|
my $pool="$home/tmp/rockbox-voices-$version/voice-pool";
|
|
|
|
`mkdir -p $pool`;
|
|
|
|
`rm -f $pool/*`;
|
|
|
|
$ENV{'POOL'}="$pool";
|
2008-10-14 20:44:49 +00:00
|
|
|
|
2009-12-07 12:19:08 +00:00
|
|
|
for my $b (&stablebuilds) {
|
2010-06-03 20:56:24 +00:00
|
|
|
next if (length($builds{$b}{configname}) > 0); # no variants
|
2008-10-14 20:44:49 +00:00
|
|
|
|
2009-12-07 12:19:08 +00:00
|
|
|
runone($b);
|
|
|
|
}
|