12 if($ARGV[0] eq "-v") {
20 my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,
21 $atime,$mtime,$ctime,$blksize,$blocks)
28 my $dir = "$ROOT/apps/lang";
30 my @files = grep { /\.lang$/ } readdir(DIR
);
35 $output =~ s/(.*)\.lang/$1.lng/;
36 print "lang $_\n" if($verbose);
37 system ("$ROOT/tools/binlang $dir/english.lang $dir/$_ $outputlang/$output >/dev/null 2>&1");
42 my ($zip, $image, $notplayer)=@_;
47 mkdir ".rockbox", 0777;
48 mkdir ".rockbox/langs", 0777;
49 mkdir ".rockbox/rocks", 0777;
50 `find . -name "*.rock" ! -empty | xargs --replace=foo cp foo .rockbox/rocks/`;
52 open VIEWERS
, "$ROOT/apps/plugins/viewers.config" or
53 die "can't open viewers.config";
57 open VIEWERS
, ">.rockbox/viewers.config" or
58 die "can't create .rockbox/viewers.config";
59 mkdir ".rockbox/viewers";
62 if(-e
".rockbox/rocks/$1") {
63 `mv .rockbox/rocks/$1 .rockbox/viewers`;
71 `cp $ROOT/apps/plugins/sokoban.levels .rockbox/`; # sokoban levels
72 `cp $ROOT/apps/plugins/snake2.levels .rockbox/`; # snake2 levels
74 mkdir ".rockbox/fonts", 0777;
76 opendir(DIR
, "$ROOT/fonts") || die "can't open dir fonts";
77 my @fonts = grep { /\.bdf$/ && -f
"$ROOT/fonts/$_" } readdir(DIR
);
81 open(HEADER
, "<$ROOT/firmware/export/font.h");
83 if(/^\#define MAX_FONT_SIZE[ \t]*(\d+)/) {
88 die "no decent max font size" if ($maxfont < 2000);
93 print "FONT: $f\n" if($verbose);
96 my $cmd ="$ROOT/tools/convbdf -s 32 -l 255 -f -o \".rockbox/fonts/$o\" \"$ROOT/fonts/$f\" >/dev/null 2>&1";
97 print "CMD: $cmd\n" if($verbose);
100 # no need to add fonts we cannot load anyway
101 my $fontsize = filesize
(".rockbox/fonts/$o");
102 if($fontsize > $maxfont) {
103 unlink(".rockbox/fonts/$o");
108 # image is blank when this is a simulator
109 if( filesize
("rockbox.ucl") > 1000 ) {
110 `cp rockbox.ucl .rockbox/`; # UCL for flashing
112 if( filesize
("rombox.ucl") > 1000) {
113 `cp rombox.ucl .rockbox/`; # UCL for flashing
118 mkdir ".rockbox/docs", 0777;
125 `cp $ROOT/docs/$_ .rockbox/docs/$_.txt`;
128 # now copy the file made for reading on the unit:
130 # `cp $webroot/docs/Help-JBR.txt .rockbox/docs/`;
133 # `cp $webroot/docs/Help-Stu.txt .rockbox/docs/`;
136 buildlangs
(".rockbox/langs");
138 `find .rockbox | zip $zip -@ >/dev/null`;
144 # remove the .rockbox afterwards
148 my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) =
154 $date=sprintf("%04d%02d%02d", $year,$mon, $mday);
155 $shortdate=sprintf("%02d%02d%02d", $year%100,$mon, $mday);
157 # made once for all targets
159 my ($type, $target)=@_;
161 # build a full install zip file
162 buildzip
("rockbox.zip", $target,
163 ($type eq "player")?
0:1);
166 my $target = $ARGV[0];
170 if($target !~ /sim/i) {
172 if($target =~ /(recorder|ondio)/i) {
180 if($target =~ /player/i) {
181 runone
("player", $exe);
184 runone
("recorder", $exe);