From 9425cf65489776cfaf2d4c5472d4693dcd158aa6 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sun, 17 Feb 2008 23:24:28 +0000 Subject: eeek, revert the FS#8482 commit again as it broke the bootloaders and the generated size wasn't actually used yet! git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16339 a1c6a512-1295-4272-9138-f99709370657 --- tools/buildzip.pl | 35 +++++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) (limited to 'tools/buildzip.pl') diff --git a/tools/buildzip.pl b/tools/buildzip.pl index 4faa38ac54..4c21ae819f 100755 --- a/tools/buildzip.pl +++ b/tools/buildzip.pl @@ -154,6 +154,30 @@ sub filesize { return $size; } +sub buildlangs { + my ($outputlang)=@_; + my $dir = "$ROOT/apps/lang"; + opendir(DIR, $dir); + my @files = grep { /\.lang$/ } readdir(DIR); + closedir(DIR); + + # Exclude some bad languages (uncomment and adjust in case of release + # and/or End Times) + # @files = grep(!/(afrikaans|hindi|slovenscina|turkce)\.lang/, @files); + + # Exclude more languages on the player which won't work on charcell display + if ($archos =~ /^"?player:/ ) { + @files = grep(!/(chinese-simp|chinese-trad|hindi|japanese|korean|thai)\.lang/, @files); + } + + for(@files) { + my $output = $_; + $output =~ s/(.*)\.lang/$1.lng/; + print "$ROOT/tools/genlang -e=$dir/english.lang -t=$archos -i=$target_id -b=$outputlang/$output $dir/$_\n" if($verbose); + system ("$ROOT/tools/genlang -e=$dir/english.lang -t=$archos -i=$target_id -b=$outputlang/$output $dir/$_ >/dev/null 2>&1"); + } +} + sub buildzip { my ($zip, $image, $fonts)=@_; @@ -389,8 +413,15 @@ STOP # and the info file system("cp rockbox-info.txt .rockbox/"); - # copy the already built lng files - `cp apps/lang/*lng .rockbox/langs/` + # now copy the file made for reading on the unit: + #if($notplayer) { + # `cp $webroot/docs/Help-JBR.txt .rockbox/docs/`; + #} + #else { + # `cp $webroot/docs/Help-Stu.txt .rockbox/docs/`; + #} + + buildlangs(".rockbox/langs"); } -- cgit v1.2.3