Move android notification display format logic to java code (no functional change...
[kugel-rb.git] / tools / release / voices.pl
blobd4a91b18060215dbf52c18d850b512f645800889
1 #!/usr/bin/perl
3 $version="3.0";
5 require "tools/builds.pm";
7 my $verbose;
8 if($ARGV[0] eq "-v") {
9 $verbose =1;
10 shift @ARGV;
13 my $doonly;
14 if($ARGV[0]) {
15 $doonly = $ARGV[0];
16 print "only build $doonly\n" if($verbose);
19 # made once for all targets
20 sub runone {
21 my ($dir)=@_;
22 my $a;
24 if($doonly && ($doonly ne $dir)) {
25 return;
28 mkdir "buildv-$dir";
29 chdir "buildv-$dir";
30 print "Build in buildv-$dir\n" if($verbose);
32 # build the manual(s)
33 $a = buildit($dir);
35 chdir "..";
37 my $o="buildv-$dir/english.voice";
38 if (-f $o) {
39 my $newo="output/$dir-$version-english.zip";
40 system("cp $o output/$dir-$version-english.voice");
41 system("mkdir -p .rockbox/langs");
42 system("cp $o .rockbox/langs");
43 system("zip -r $newo .rockbox");
44 system("rm -rf .rockbox");
45 print "moved $o to $newo\n" if($verbose);
48 print "remove all contents in buildv-$dir\n" if($verbose);
49 system("rm -rf buildv-$dir");
51 return $a;
54 sub buildit {
55 my ($model)=@_;
57 `rm -rf * >/dev/null 2>&1`;
59 my $c = "../tools/configure --type=av --target=$model --language=0 --tts=f --ram=0 --voice=0";
61 print "C: $c\n" if($verbose);
62 `$c`;
64 print "Run 'make voice'\n" if($verbose);
65 print `make voice 2>/dev/null`;
68 # run make in tools first to make sure they're up-to-date
69 `(cd tools && make ) >/dev/null 2>&1`;
71 my $home=$ENV{'HOME'};
73 my $pool="$home/tmp/rockbox-voices-$version/voice-pool";
74 `mkdir -p $pool`;
75 `rm -f $pool/*`;
76 $ENV{'POOL'}="$pool";
78 for my $b (&stablebuilds) {
79 next if (length($builds{$b}{configname}) > 0); # no variants
81 runone($b);