tcctool: add support for Cowon J3 - FS#11747
[maemo-rb.git] / tools / buildzip.pl
blob22a706224ff087f9c287e90e7806c889bb8fc0a9
1 #!/usr/bin/perl
2 # __________ __ ___.
3 # Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 # \/ \/ \/ \/ \/
8 # $Id$
11 use strict;
13 use File::Copy; # For move() and copy()
14 use File::Find; # For find()
15 use File::Path qw(mkpath rmtree); # For rmtree()
16 use Cwd 'abs_path';
17 use Getopt::Long qw(:config pass_through); # pass_through so not confused by -DTYPE_STUFF
19 my $ROOT="..";
21 my $ziptool="zip -r9";
22 my $output="rockbox.zip";
23 my $verbose;
24 my $install;
25 my $exe;
26 my $target;
27 my $modelname;
28 my $incfonts;
29 my $target_id; # passed in, not currently used
30 my $rbdir=".rockbox"; # can be changed for special builds
31 my $app;
33 sub glob_mkdir {
34 my ($dir) = @_;
35 mkpath ($dir, $verbose, 0777);
36 return 1;
39 sub glob_install {
40 my ($_src, $dest, $opts) = @_;
42 unless ($opts) {
43 $opts = "-m 0664";
46 foreach my $src (glob($_src)) {
47 unless ( -d $src || !(-e $src)) {
48 system("install $opts \"$src\" \"$dest\"");
49 print "install $opts \"$src\" -> \"$dest\"\n" if $verbose;
52 return 1;
55 sub glob_copy {
56 my ($pattern, $destination) = @_;
57 print "glob_copy: $pattern -> $destination\n" if $verbose;
58 foreach my $path (glob($pattern)) {
59 copy($path, $destination);
63 sub glob_move {
64 my ($pattern, $destination) = @_;
65 print "glob_move: $pattern -> $destination\n" if $verbose;
66 foreach my $path (glob($pattern)) {
67 move($path, $destination);
71 sub glob_unlink {
72 my ($pattern) = @_;
73 print "glob_unlink: $pattern\n" if $verbose;
74 foreach my $path (glob($pattern)) {
75 unlink($path);
79 sub find_copyfile {
80 my ($pattern, $destination) = @_;
81 print "find_copyfile: $pattern -> $destination\n" if $verbose;
82 return sub {
83 my $path = $_;
84 if ($path =~ $pattern && filesize($path) > 0 && !($path =~ /$rbdir/)) {
85 copy($path, $destination);
86 print "cp $path $destination\n" if $verbose;
87 chmod(0755, $destination.'/'.$path);
92 sub find_installfile {
93 my ($pattern, $destination) = @_;
94 print "find_installfile: $pattern -> $destination\n" if $verbose;
95 return sub {
96 my $path = $_;
97 if ($path =~ $pattern) {
98 print "FIND_INSTALLFILE: $path\n";
99 glob_install($path, $destination);
105 sub make_install {
106 my ($src, $dest) = @_;
108 my $bindir = $dest;
109 my $libdir = $dest;
110 my $userdir = $dest;
112 my @plugins = ( "games", "apps", "demos", "viewers" );
113 my @userstuff = ( "backdrops", "codepages", "docs", "fonts", "langs", "themes", "wps", "eqs", "icons" );
114 my @files = ();
116 if ($app) {
117 $bindir .= "/bin";
118 $libdir .= "/lib/rockbox";
119 $userdir .= "/share/rockbox";
120 } else {
121 # for non-app builds we expect the prefix to be the dir above .rockbox
122 $bindir .= "/$rbdir";
123 $libdir = $userdir = $bindir;
125 if ($dest =~ /\/dev\/null/) {
126 die "ERROR: No PREFIX given\n"
129 if ((!$app) && $src && (abs_path($bindir) eq abs_path($src))) {
130 return 1;
133 # binary
134 unless ($exe eq "") {
135 unless (glob_mkdir($bindir)) {
136 return 0;
138 glob_install($exe, $bindir, "-m 0775");
141 # codecs
142 unless (glob_mkdir("$libdir/codecs")) {
143 return 0;
145 glob_install("$src/codecs/*", "$libdir/codecs", "-m 0755");
147 # plugins
148 unless (glob_mkdir("$libdir/rocks")) {
149 return 0;
151 foreach my $t (@plugins) {
152 unless (glob_mkdir("$libdir/rocks/$t")) {
153 return 0;
155 glob_install("$src/rocks/$t/*", "$libdir/rocks/$t", "-m 0755");
158 # rocks/viewers/lua
159 unless (glob_mkdir("$libdir/rocks/viewers/lua")) {
160 return 0;
162 glob_install("$src/rocks/viewers/lua/*", "$libdir/rocks/viewers/lua");
164 # all the rest directories
165 foreach my $t (@userstuff) {
166 unless (glob_mkdir("$userdir/$t")) {
167 return 0;
169 glob_install("$src/$t/*", "$userdir/$t");
172 # wps/ subfolders and bitmaps
173 opendir(DIR, $src . "/wps");
174 @files = readdir(DIR);
175 closedir(DIR);
177 foreach my $_dir (@files) {
178 my $dir = "wps/" . $_dir;
179 if ( -d "$src/$dir" && $_dir !~ /\.\.?/) {
180 unless (glob_mkdir("$userdir/$dir")) {
181 return 0;
183 glob_install("$src/$dir/*", "$userdir/$dir");
187 # rest of the files, excluding the binary
188 opendir(DIR,$src);
189 @files = readdir(DIR);
190 closedir(DIR);
192 foreach my $file (grep (/[a-zA-Z]+\.(txt|config|ignnore)/,@files)) {
193 glob_install("$src/$file", "$userdir/");
195 return 1;
198 # Get options
199 GetOptions ( 'r|root=s' => \$ROOT,
200 'z|ziptool=s' => \$ziptool,
201 'm|modelname=s' => \$modelname, # The model name as used in ARCHOS in the root makefile
202 'i|id=s' => \$target_id, # The target id name as used in TARGET_ID in the root makefile
203 'o|output=s' => \$output,
204 'f|fonts=s' => \$incfonts, # 0 - no fonts, 1 - fonts only 2 - fonts and package
205 'v|verbose' => \$verbose,
206 'install=s' => \$install, # install destination
207 'rbdir=s' => \$rbdir, # If we want to put in a different directory
210 ($target, $exe) = @ARGV;
212 my $firmdir="$ROOT/firmware";
213 my $appsdir="$ROOT/apps";
214 my $viewer_bmpdir="$ROOT/apps/plugins/bitmaps/viewer_defaults";
216 my $cppdef = $target;
218 sub gettargetinfo {
219 open(GCC, ">gcctemp");
220 # Get the LCD screen depth and graphical status
221 print GCC <<STOP
222 \#include "config.h"
223 #ifdef HAVE_LCD_BITMAP
224 Bitmap: yes
225 Depth: LCD_DEPTH
226 LCD Width: LCD_WIDTH
227 LCD Height: LCD_HEIGHT
228 Icon Width: CONFIG_DEFAULT_ICON_WIDTH
229 Icon Height: CONFIG_DEFAULT_ICON_HEIGHT
230 #endif
231 Codec: CONFIG_CODEC
232 #ifdef HAVE_REMOTE_LCD
233 Remote Depth: LCD_REMOTE_DEPTH
234 Remote Icon Width: CONFIG_REMOTE_DEFAULT_ICON_WIDTH
235 Remote Icon Height: CONFIG_REMOTE_DEFAULT_ICON_HEIGHT
236 #else
237 Remote Depth: 0
238 #endif
239 #ifdef HAVE_RECORDING
240 Recording: yes
241 #endif
242 STOP
244 close(GCC);
246 my $c="cat gcctemp | gcc $cppdef -I. -I$firmdir/export -E -P -";
248 # print STDERR "CMD $c\n";
250 open(TARGET, "$c|");
252 my ($bitmap, $width, $height, $depth, $swcodec, $icon_h, $icon_w);
253 my ($remote_depth, $remote_icon_h, $remote_icon_w);
254 my ($recording);
255 my $icon_count = 1;
256 while(<TARGET>) {
257 # print STDERR "DATA: $_";
258 if($_ =~ /^Bitmap: (.*)/) {
259 $bitmap = $1;
261 elsif($_ =~ /^Depth: (\d*)/) {
262 $depth = $1;
264 elsif($_ =~ /^LCD Width: (\d*)/) {
265 $width = $1;
267 elsif($_ =~ /^LCD Height: (\d*)/) {
268 $height = $1;
270 elsif($_ =~ /^Icon Width: (\d*)/) {
271 $icon_w = $1;
273 elsif($_ =~ /^Icon Height: (\d*)/) {
274 $icon_h = $1;
276 elsif($_ =~ /^Codec: (\d*)/) {
277 # SWCODEC is 1, the others are HWCODEC
278 $swcodec = ($1 == 1);
280 elsif($_ =~ /^Remote Depth: (\d*)/) {
281 $remote_depth = $1;
283 elsif($_ =~ /^Remote Icon Width: (\d*)/) {
284 $remote_icon_w = $1;
286 elsif($_ =~ /^Remote Icon Height: (\d*)/) {
287 $remote_icon_h = $1;
289 if($_ =~ /^Recording: (.*)/) {
290 $recording = $1;
293 close(TARGET);
294 unlink("gcctemp");
296 return ($bitmap, $depth, $width, $height, $icon_w, $icon_h, $recording,
297 $swcodec, $remote_depth, $remote_icon_w, $remote_icon_h);
300 sub filesize {
301 my ($filename)=@_;
302 my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,
303 $atime,$mtime,$ctime,$blksize,$blocks)
304 = stat($filename);
305 return $size;
308 sub create_failsafefiles {
309 my ($dir, $remote_depth) = @_;
310 my $text = "# Dummy file to allow Rockbox to reset to the default skin config.
311 # Do not edit this file. It's never actually loaded by Rockbox.";
312 open (FOO, ">$dir/wps/rockbox_failsafe.wps");
313 print FOO $text;
314 close(FOO);
315 open (FOO, ">$dir/wps/rockbox_failsafe.sbs");
316 print FOO $text;
317 close(FOO);
318 open (FOO, ">$dir/wps/rockbox_failsafe.fms");
319 print FOO $text;
320 close(FOO);
321 if ($remote_depth) {
322 open (FOO, ">$dir/wps/rockbox_failsafe.rwps");
323 print FOO $text;
324 close(FOO);
325 open (FOO, ">$dir/wps/rockbox_failsafe.rsbs");
326 print FOO $text;
327 close(FOO);
328 open (FOO, ">$dir/wps/rockbox_failsafe.rfms");
329 print FOO $text;
330 close(FOO);
332 open (FOO, ">$dir/themes/rockbox_failsafe.cfg");
333 print FOO <<STOP
334 # This config has been autogenerated to reload the failsafe setup
335 wps: $dir/wps/rockbox_failsafe.wps
336 sbs: $dir/wps/rockbox_failsafe.sbs
337 fms: $dir/wps/rockbox_failsafe.fms
338 STOP
340 if ($remote_depth) {
341 print FOO <<STOP
342 rwps: $dir/wps/rockbox_failsafe.rwps
343 rsbs: $dir/wps/rockbox_failsafe.rsbs
344 rfms: $dir/wps/rockbox_failsafe.rfms
345 STOP
348 print FOO <<STOP
349 statusbar: top
350 font: 08-Schumacher-Clean.fnt
351 foreground color: 000000
352 background color: B6C6E5
353 selector type: bar (inverse)
354 STOP
356 close(FOO);
359 sub buildzip {
360 my ($image, $fonts)=@_;
361 my $libdir = $install;
362 my $temp_dir = ".rockbox";
364 print "buildzip: image=$image fonts=$fonts\n" if $verbose;
366 my ($bitmap, $depth, $width, $height, $icon_w, $icon_h, $recording,
367 $swcodec, $remote_depth, $remote_icon_w, $remote_icon_h) =
368 &gettargetinfo();
370 # print "Bitmap: $bitmap\nDepth: $depth\nSwcodec: $swcodec\n";
372 # remove old traces
373 rmtree($temp_dir);
375 glob_mkdir($temp_dir);
377 if(!$bitmap) {
378 # always disable fonts on non-bitmap targets
379 $fonts = 0;
381 if($fonts) {
382 glob_mkdir("$temp_dir/fonts");
383 chdir "$temp_dir/fonts";
384 my $cmd = "$ROOT/tools/convbdf -f $ROOT/fonts/*bdf >/dev/null 2>&1";
385 print($cmd."\n") if $verbose;
386 system($cmd);
387 chdir("../../");
389 if($fonts < 2) {
390 # fonts-only package, return
391 return;
395 # create the file so the database does not try indexing a folder
396 open(IGNORE, ">$temp_dir/database.ignore") || die "can't open database.ignore";
397 close(IGNORE);
399 glob_mkdir("$temp_dir/langs");
400 glob_mkdir("$temp_dir/rocks");
401 glob_mkdir("$temp_dir/rocks/games");
402 glob_mkdir("$temp_dir/rocks/apps");
403 glob_mkdir("$temp_dir/rocks/demos");
404 glob_mkdir("$temp_dir/rocks/viewers");
406 if ($recording) {
407 glob_mkdir("$temp_dir/recpresets");
410 if($swcodec) {
411 glob_mkdir("$temp_dir/eqs");
413 glob_copy("$ROOT/apps/eqs/*.cfg", "$temp_dir/eqs/"); # equalizer presets
416 glob_mkdir("$temp_dir/wps");
417 glob_mkdir("$temp_dir/themes");
418 if ($bitmap) {
419 open(THEME, ">$temp_dir/themes/rockbox_default_icons.cfg");
420 print THEME <<STOP
421 # this config file was auto-generated to make it
422 # easy to reset the icons back to default
423 iconset: -
424 # taken from apps/gui/icon.c
425 viewers iconset: /$rbdir/icons/viewers.bmp
426 remote iconset: -
427 # taken from apps/gui/icon.c
428 remote viewers iconset: /$rbdir/icons/remote_viewers.bmp
430 STOP
432 close(THEME);
435 glob_mkdir("$temp_dir/codepages");
437 if($bitmap) {
438 system("$ROOT/tools/codepages");
440 else {
441 system("$ROOT/tools/codepages -m");
444 glob_move('*.cp', "$temp_dir/codepages/");
446 if($bitmap && $depth > 1) {
447 glob_mkdir("$temp_dir/backdrops");
450 glob_mkdir("$temp_dir/codecs");
452 find(find_copyfile(qr/.*\.codec/, abs_path("$temp_dir/codecs/")), 'apps/codecs');
454 # remove directory again if no codec was copied
455 rmdir("$temp_dir/codecs");
457 find(find_copyfile(qr/\.(rock|ovl|lua)/, abs_path("$temp_dir/rocks/")), 'apps/plugins');
459 open VIEWERS, "$ROOT/apps/plugins/viewers.config" or
460 die "can't open viewers.config";
461 my @viewers = <VIEWERS>;
462 close VIEWERS;
464 open VIEWERS, ">$temp_dir/viewers.config" or
465 die "can't create $temp_dir/viewers.config";
467 foreach my $line (@viewers) {
468 if ($line =~ /([^,]*),([^,]*),/) {
469 my ($ext, $plugin)=($1, $2);
470 my $r = "${plugin}.rock";
471 my $oname;
473 my $dir = $r;
474 my $name;
476 # strip off the last slash and file name part
477 $dir =~ s/(.*)\/(.*)/$1/;
478 # store the file name part
479 $name = $2;
481 # get .ovl name (file part only)
482 $oname = $name;
483 $oname =~ s/\.rock$/.ovl/;
485 # print STDERR "$ext $plugin $dir $name $r\n";
487 if(-e "$temp_dir/rocks/$name") {
488 if($dir ne "rocks") {
489 # target is not 'rocks' but the plugins are always in that
490 # dir at first!
491 move("$temp_dir/rocks/$name", "$temp_dir/rocks/$r");
493 print VIEWERS $line;
495 elsif(-e "$temp_dir/rocks/$r") {
496 # in case the same plugin works for multiple extensions, it
497 # was already moved to the viewers dir
498 print VIEWERS $line;
501 if(-e "$temp_dir/rocks/$oname") {
502 # if there's an "overlay" file for the .rock, move that as
503 # well
504 move("$temp_dir/rocks/$oname", "$temp_dir/rocks/$dir");
508 close VIEWERS;
510 open CATEGORIES, "$ROOT/apps/plugins/CATEGORIES" or
511 die "can't open CATEGORIES";
512 my @rock_targetdirs = <CATEGORIES>;
513 close CATEGORIES;
514 foreach my $line (@rock_targetdirs) {
515 if ($line =~ /([^,]*),(.*)/) {
516 my ($plugin, $dir)=($1, $2);
517 move("$temp_dir/rocks/${plugin}.rock", "$temp_dir/rocks/$dir/${plugin}.rock");
518 if(-e "$temp_dir/rocks/${plugin}.ovl") {
519 # if there's an "overlay" file for the .rock, move that as
520 # well
521 move("$temp_dir/rocks/${plugin}.ovl", "$temp_dir/rocks/$dir");
523 if(-e "$temp_dir/rocks/${plugin}.lua") {
524 # if this is a lua script, move it to the appropriate dir
525 move("$temp_dir/rocks/${plugin}.lua", "$temp_dir/rocks/$dir/");
530 glob_unlink("$temp_dir/rocks/*.lua"); # Clean up unwanted *.lua files (e.g. actions.lua, buttons.lua)
532 if ($bitmap) {
533 glob_mkdir("$temp_dir/icons");
534 copy("$viewer_bmpdir/viewers.${icon_w}x${icon_h}x$depth.bmp", "$temp_dir/icons/viewers.bmp");
535 if ($remote_depth) {
536 copy("$viewer_bmpdir/remote_viewers.${remote_icon_w}x${remote_icon_h}x$remote_depth.bmp", "$temp_dir/icons/remote_viewers.bmp");
540 copy("$ROOT/apps/tagnavi.config", "$temp_dir/");
541 copy("$ROOT/apps/plugins/disktidy.config", "$temp_dir/rocks/apps/");
543 if($bitmap) {
544 copy("$ROOT/apps/plugins/sokoban.levels", "$temp_dir/rocks/games/sokoban.levels"); # sokoban levels
545 copy("$ROOT/apps/plugins/snake2.levels", "$temp_dir/rocks/games/snake2.levels"); # snake2 levels
546 copy("$ROOT/apps/plugins/rockbox-fonts.config", "$temp_dir/rocks/viewers/");
549 if(-e "$temp_dir/rocks/demos/pictureflow.rock") {
550 copy("$ROOT/apps/plugins/bitmaps/native/pictureflow_emptyslide.100x100x16.bmp",
551 "$temp_dir/rocks/demos/pictureflow_emptyslide.bmp");
552 my ($pf_logo);
553 if ($width < 200) {
554 $pf_logo = "pictureflow_logo.100x18x16.bmp";
555 } else {
556 $pf_logo = "pictureflow_logo.193x34x16.bmp";
558 copy("$ROOT/apps/plugins/bitmaps/native/$pf_logo",
559 "$temp_dir/rocks/demos/pictureflow_splash.bmp");
562 create_failsafefiles($temp_dir, $remote_depth);
564 if($image) {
565 # image is blank when this is a simulator
566 if( filesize("rockbox.ucl") > 1000 ) {
567 copy("rockbox.ucl", "$temp_dir/rockbox.ucl"); # UCL for flashing
569 if( filesize("rombox.ucl") > 1000) {
570 copy("rombox.ucl", "$temp_dir/rombox.ucl"); # UCL for flashing
573 # Check for rombox.target
574 if ($image=~/(.*)\.(\w+)$/)
576 my $romfile = "rombox.$2";
577 if (filesize($romfile) > 1000)
579 copy($romfile, "$temp_dir/$romfile");
584 glob_mkdir("$temp_dir/docs");
585 for(("COPYING",
586 "LICENSES",
587 "KNOWN_ISSUES"
588 )) {
589 copy("$ROOT/docs/$_", "$temp_dir/docs/$_.txt");
591 if ($fonts) {
592 copy("$ROOT/docs/profontdoc.txt", "$temp_dir/docs/profontdoc.txt");
594 for(("sample.colours",
595 "sample.icons"
596 )) {
597 copy("$ROOT/docs/$_", "$temp_dir/docs/$_");
600 # Now do the WPS dance
601 if(-d "$ROOT/wps") {
602 my $wps_build_cmd="perl $ROOT/wps/wpsbuild.pl ";
603 $wps_build_cmd=$wps_build_cmd."-v " if $verbose;
604 $wps_build_cmd=$wps_build_cmd." --tempdir=$temp_dir --rbdir=$rbdir -r $ROOT -m $modelname $ROOT/wps/WPSLIST $target";
605 print "wpsbuild: $wps_build_cmd\n" if $verbose;
606 system("$wps_build_cmd");
607 print "wps_build_cmd: done\n" if $verbose;
609 else {
610 print STDERR "No wps module present, can't do the WPS magic!\n";
613 # until buildwps.pl is fixed, manually copy the classic_statusbar theme across
614 mkdir "$temp_dir/wps/classic_statusbar", 0777;
615 glob_copy("$ROOT/wps/classic_statusbar/*.bmp", "$temp_dir/wps/classic_statusbar");
616 if ($swcodec) {
617 if ($depth == 16) {
618 copy("$ROOT/wps/classic_statusbar.sbs", "$temp_dir/wps");
619 } elsif ($depth > 1) {
620 copy("$ROOT/wps/classic_statusbar.grey.sbs", "$temp_dir/wps/classic_statusbar.sbs");
621 } else {
622 copy("$ROOT/wps/classic_statusbar.mono.sbs", "$temp_dir/wps/classic_statusbar.sbs");
624 } else {
625 copy("$ROOT/wps/classic_statusbar.112x64x1.sbs", "$temp_dir/wps/classic_statusbar.sbs");
627 if ($remote_depth != $depth) {
628 copy("$ROOT/wps/classic_statusbar.mono.sbs", "$temp_dir/wps/classic_statusbar.rsbs");
629 } else {
630 copy("$temp_dir/wps/classic_statusbar.sbs", "$temp_dir/wps/classic_statusbar.rsbs");
632 copy("$temp_dir/wps/rockbox_none.sbs", "$temp_dir/wps/rockbox_none.rsbs");
634 # and the info file
635 copy("rockbox-info.txt", "$temp_dir/rockbox-info.txt");
637 # copy the already built lng files
638 glob_copy('apps/lang/*lng', "$temp_dir/langs/");
640 # copy the .lua files
641 glob_mkdir("$temp_dir/rocks/viewers/lua/");
642 glob_copy('apps/plugins/lua/*.lua', "$temp_dir/rocks/viewers/lua/");
645 my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) =
646 localtime(time);
648 $mon+=1;
649 $year+=1900;
651 #$date=sprintf("%04d%02d%02d", $year,$mon, $mday);
652 #$shortdate=sprintf("%02d%02d%02d", $year%100,$mon, $mday);
654 # made once for all targets
655 sub runone {
656 my ($target, $fonts)=@_;
658 # in the app the the layout is different (no .rockbox, but bin/lib/share)
659 $app = ($modelname eq "application");
660 unless ($app) {
661 #rbdir starts with '/', strip it
662 $rbdir = substr($rbdir, 1);
665 # build a full install .rockbox ($rbdir) directory
666 buildzip($target, $fonts);
668 unlink($output);
670 if($fonts == 1) {
671 # Don't include image file in fonts-only package
672 undef $target;
674 if($target && ($target !~ /(mod|ajz|wma)\z/i)) {
675 # On some targets, the image goes into .rockbox.
676 copy("$target", ".rockbox/$target");
677 undef $target;
680 if($install) {
681 make_install(".rockbox", $install) or die "MKDIRFAILED\n";
682 rmtree(".rockbox");
683 print "rm .rockbox\n" if $verbose;
685 else {
686 unless (".rockbox" eq $rbdir) {
687 mkpath($rbdir);
688 rmtree($rbdir);
689 move(".rockbox", $rbdir);
690 print "mv .rockbox $rbdir\n" if $verbose;
692 system("$ziptool $output $rbdir $target >/dev/null");
693 print "$ziptool $output $rbdir $target >/dev/null\n" if $verbose;
694 rmtree("$rbdir");
695 print "rm $rbdir\n" if $verbose;
699 if(!$exe) {
700 # not specified, guess!
701 if($target =~ /(recorder|ondio)/i) {
702 $exe = "ajbrec.ajz";
704 elsif($target =~ /iriver/i) {
705 $exe = "rockbox.iriver";
707 else {
708 $exe = "archos.mod";
711 elsif(($exe =~ /rockboxui/)) {
712 # simulator, exclude the exe file
713 $exe = "";
715 elsif($exe eq "librockbox.so") {
716 # android, exclude the binary
717 $exe="";
720 runone($exe, $incfonts);