forked from len0rd/rockbox
'make zip' no longer includes the fonts. 'make fontzip' makes a font package
only. 'make fullzip' makes a full zip including fonts. http://www.rockbox.org/mail/archive/rockbox-dev-archive-2006-05/0049.shtml git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9902 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
2931bb2f19
commit
a420dc381e
2 changed files with 67 additions and 40 deletions
|
@ -10,14 +10,13 @@
|
||||||
|
|
||||||
$ROOT="..";
|
$ROOT="..";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
my $ziptool="zip";
|
my $ziptool="zip";
|
||||||
my $output="rockbox.zip";
|
my $output="rockbox.zip";
|
||||||
my $verbose;
|
my $verbose;
|
||||||
my $exe;
|
my $exe;
|
||||||
my $target;
|
my $target;
|
||||||
my $archos;
|
my $archos;
|
||||||
|
my $incfonts;
|
||||||
|
|
||||||
while(1) {
|
while(1) {
|
||||||
if($ARGV[0] eq "-r") {
|
if($ARGV[0] eq "-r") {
|
||||||
|
@ -43,6 +42,11 @@ while(1) {
|
||||||
shift @ARGV;
|
shift @ARGV;
|
||||||
shift @ARGV;
|
shift @ARGV;
|
||||||
}
|
}
|
||||||
|
elsif($ARGV[0] eq "-f") {
|
||||||
|
$incfonts=$ARGV[1]; # 0 - no fonts, 1 - fonts only 2 - fonts and package
|
||||||
|
shift @ARGV;
|
||||||
|
shift @ARGV;
|
||||||
|
}
|
||||||
|
|
||||||
elsif($ARGV[0] eq "-v") {
|
elsif($ARGV[0] eq "-v") {
|
||||||
$verbose =1;
|
$verbose =1;
|
||||||
|
@ -85,12 +89,37 @@ sub buildlangs {
|
||||||
}
|
}
|
||||||
|
|
||||||
sub buildzip {
|
sub buildzip {
|
||||||
my ($zip, $image, $notplayer)=@_;
|
my ($zip, $image, $notplayer, $fonts)=@_;
|
||||||
|
|
||||||
# remove old traces
|
# remove old traces
|
||||||
`rm -rf .rockbox`;
|
`rm -rf .rockbox`;
|
||||||
|
|
||||||
mkdir ".rockbox", 0777;
|
mkdir ".rockbox", 0777;
|
||||||
|
|
||||||
|
if($fonts) {
|
||||||
|
mkdir ".rockbox/fonts", 0777;
|
||||||
|
|
||||||
|
opendir(DIR, "$ROOT/fonts") || die "can't open dir fonts";
|
||||||
|
my @fonts = grep { /\.bdf$/ && -f "$ROOT/fonts/$_" } readdir(DIR);
|
||||||
|
closedir DIR;
|
||||||
|
|
||||||
|
for(@fonts) {
|
||||||
|
my $f = $_;
|
||||||
|
|
||||||
|
print "FONT: $f\n" if($verbose);
|
||||||
|
my $o = $f;
|
||||||
|
$o =~ s/\.bdf/\.fnt/;
|
||||||
|
my $cmd ="$ROOT/tools/convbdf -f -o \".rockbox/fonts/$o\" \"$ROOT/fonts/$f\" >/dev/null 2>&1";
|
||||||
|
print "CMD: $cmd\n" if($verbose);
|
||||||
|
`$cmd`;
|
||||||
|
|
||||||
|
}
|
||||||
|
if($fonts < 2) {
|
||||||
|
# fonts-only package, return
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
mkdir ".rockbox/langs", 0777;
|
mkdir ".rockbox/langs", 0777;
|
||||||
mkdir ".rockbox/rocks", 0777;
|
mkdir ".rockbox/rocks", 0777;
|
||||||
if($notplayer) {
|
if($notplayer) {
|
||||||
|
@ -175,25 +204,6 @@ sub buildzip {
|
||||||
if($notplayer) {
|
if($notplayer) {
|
||||||
`cp $ROOT/apps/plugins/sokoban.levels .rockbox/rocks/`; # sokoban levels
|
`cp $ROOT/apps/plugins/sokoban.levels .rockbox/rocks/`; # sokoban levels
|
||||||
`cp $ROOT/apps/plugins/snake2.levels .rockbox/rocks/`; # snake2 levels
|
`cp $ROOT/apps/plugins/snake2.levels .rockbox/rocks/`; # snake2 levels
|
||||||
|
|
||||||
mkdir ".rockbox/fonts", 0777;
|
|
||||||
|
|
||||||
opendir(DIR, "$ROOT/fonts") || die "can't open dir fonts";
|
|
||||||
my @fonts = grep { /\.bdf$/ && -f "$ROOT/fonts/$_" } readdir(DIR);
|
|
||||||
closedir DIR;
|
|
||||||
|
|
||||||
for(@fonts) {
|
|
||||||
my $f = $_;
|
|
||||||
|
|
||||||
print "FONT: $f\n" if($verbose);
|
|
||||||
my $o = $f;
|
|
||||||
$o =~ s/\.bdf/\.fnt/;
|
|
||||||
my $cmd ="$ROOT/tools/convbdf -f -o \".rockbox/fonts/$o\" \"$ROOT/fonts/$f\" >/dev/null 2>&1";
|
|
||||||
print "CMD: $cmd\n" if($verbose);
|
|
||||||
`$cmd`;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if($image) {
|
if($image) {
|
||||||
|
@ -231,15 +241,6 @@ sub buildzip {
|
||||||
|
|
||||||
buildlangs(".rockbox/langs");
|
buildlangs(".rockbox/langs");
|
||||||
|
|
||||||
`rm -f $zip`;
|
|
||||||
`find .rockbox | xargs $ziptool $zip >/dev/null`;
|
|
||||||
|
|
||||||
if($image) {
|
|
||||||
`$ziptool $zip $image`;
|
|
||||||
}
|
|
||||||
|
|
||||||
# remove the .rockbox afterwards
|
|
||||||
`rm -rf .rockbox`;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) =
|
my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) =
|
||||||
|
@ -253,11 +254,29 @@ $shortdate=sprintf("%02d%02d%02d", $year%100,$mon, $mday);
|
||||||
|
|
||||||
# made once for all targets
|
# made once for all targets
|
||||||
sub runone {
|
sub runone {
|
||||||
my ($type, $target)=@_;
|
my ($type, $target, $fonts)=@_;
|
||||||
|
|
||||||
# build a full install zip file
|
# build a full install .rockbox directory
|
||||||
buildzip($output, $target,
|
buildzip($output, $target,
|
||||||
($type eq "player")?0:1);
|
($type eq "player")?0:1, $fonts);
|
||||||
|
|
||||||
|
# create a zip file from the .rockbox dfir
|
||||||
|
|
||||||
|
`rm -f $output`;
|
||||||
|
if($verbose) {
|
||||||
|
print "find .rockbox | xargs $ziptool $output >/dev/null\n";
|
||||||
|
}
|
||||||
|
`find .rockbox | xargs $ziptool $output >/dev/null`;
|
||||||
|
|
||||||
|
if($target && ($fonts > 1)) {
|
||||||
|
if($verbose) {
|
||||||
|
print "$ziptool $output $target\n";
|
||||||
|
}
|
||||||
|
`$ziptool $output $target`;
|
||||||
|
}
|
||||||
|
|
||||||
|
# remove the .rockbox afterwards
|
||||||
|
`rm -rf .rockbox`;
|
||||||
};
|
};
|
||||||
|
|
||||||
if(!$exe) {
|
if(!$exe) {
|
||||||
|
@ -281,9 +300,9 @@ elsif($exe =~ /rockboxui/) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if($target =~ /player/i) {
|
if($target =~ /player/i) {
|
||||||
runone("player", $exe);
|
runone("player", $exe, 0);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
runone("recorder", $exe);
|
runone("recorder", $exe, $incfonts);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
16
tools/configure
vendored
16
tools/configure
vendored
|
@ -1277,9 +1277,15 @@ tags:
|
||||||
\$(SILENT)\$(MAKE) -C \$(APPSDIR)/plugins tags
|
\$(SILENT)\$(MAKE) -C \$(APPSDIR)/plugins tags
|
||||||
\$(SILENT)\$(MAKE) -C \$(APPSDIR)/plugins/lib tags
|
\$(SILENT)\$(MAKE) -C \$(APPSDIR)/plugins/lib tags
|
||||||
|
|
||||||
|
fontzip:
|
||||||
|
\$(SILENT)\$(TOOLSDIR)/buildzip.pl \$(VERBOSEOPT) -t \"\$(ARCHOS)\" -r "\$(ROOTDIR)" -f 1 -o rockbox-fonts.zip \$(TARGET) \$(BINARY)
|
||||||
|
|
||||||
zip:
|
zip:
|
||||||
\$(SILENT)\$(TOOLSDIR)/buildzip.pl \$(VERBOSEOPT) -t \"\$(ARCHOS)\" -r "\$(ROOTDIR)" \$(TARGET) \$(BINARY)
|
\$(SILENT)\$(TOOLSDIR)/buildzip.pl \$(VERBOSEOPT) -t \"\$(ARCHOS)\" -r "\$(ROOTDIR)" \$(TARGET) \$(BINARY)
|
||||||
|
|
||||||
|
fullzip:
|
||||||
|
\$(SILENT)\$(TOOLSDIR)/buildzip.pl \$(VERBOSEOPT) -t \"\$(ARCHOS)\" -r "\$(ROOTDIR)" -f 2 -o rockbox-full.zip \$(TARGET) \$(BINARY)
|
||||||
|
|
||||||
7zip:
|
7zip:
|
||||||
\$(SILENT)\$(TOOLSDIR)/buildzip.pl \$(VERBOSEOPT) -t \"\$(ARCHOS)\" -o "rockbox.7z" -z "7za a" -r "\$(ROOTDIR)" \$(TARGET) \$(BINARY)
|
\$(SILENT)\$(TOOLSDIR)/buildzip.pl \$(VERBOSEOPT) -t \"\$(ARCHOS)\" -o "rockbox.7z" -z "7za a" -r "\$(ROOTDIR)" \$(TARGET) \$(BINARY)
|
||||||
|
|
||||||
|
@ -1303,10 +1309,12 @@ help:
|
||||||
@echo "clean - cleans a build directory (not tools)"
|
@echo "clean - cleans a build directory (not tools)"
|
||||||
@echo "veryclean - cleans the build and tools directories"
|
@echo "veryclean - cleans the build and tools directories"
|
||||||
@echo "manual - builds a manual"
|
@echo "manual - builds a manual"
|
||||||
@echo "zip - creates a rockbox.zip of your build"
|
@echo "fullzip - creates a rockbox.zip of your build with fonts"
|
||||||
@echo "gzip - creates a rockbox.tar.gz of your build"
|
@echo "zip - creates a rockbox.zip of your build (no fonts)"
|
||||||
@echo "bzip2 - creates a rockbox.tar.bz2 of your build"
|
@echo "gzip - creates a rockbox.tar.gz of your build (no fonts)"
|
||||||
@echo "7zip - creates a rockbox.7z of your build"
|
@echo "bzip2 - creates a rockbox.tar.bz2 of your build (no fonts)"
|
||||||
|
@echo "7zip - creates a rockbox.7z of your build (no fonts)"
|
||||||
|
@echo "fontzip - creates rockbox-fonts.zip"
|
||||||
@echo "tools - builds the tools only"
|
@echo "tools - builds the tools only"
|
||||||
@echo "install - installs your build (for simulator builds only)"
|
@echo "install - installs your build (for simulator builds only)"
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue