summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2005-08-03 21:31:51 +0000
committerDaniel Stenberg <daniel@haxx.se>2005-08-03 21:31:51 +0000
commit0f820d6ed7439ccf9144fd045d1840dfe5562d9d (patch)
treeae0c21ee019a655ec4a902ccf4315f2eea24a7cb
parente6ad9458d16f1cab9bc6ab6b32deab290c142468 (diff)
downloadrockbox-0f820d6ed7439ccf9144fd045d1840dfe5562d9d.tar.gz
rockbox-0f820d6ed7439ccf9144fd045d1840dfe5562d9d.tar.bz2
rockbox-0f820d6ed7439ccf9144fd045d1840dfe5562d9d.zip
Increased maximum file size for models with LCD height larger than 64 to
10000 bytes. Also adjusted the buildzip script to dynamically figure out the maximum buffer size for the particular build that the zip is made for. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7280 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/export/font.h8
-rwxr-xr-xtools/buildzip.pl29
2 files changed, 27 insertions, 10 deletions
diff --git a/firmware/export/font.h b/firmware/export/font.h
index 01751add5c..beb63470bf 100644
--- a/firmware/export/font.h
+++ b/firmware/export/font.h
@@ -26,9 +26,13 @@
#if defined(HAVE_LCD_BITMAP) || defined(SIMULATOR)
-/* max static loadable fonts buffer*/
+/* max static loadable font buffer size */
#ifndef MAX_FONT_SIZE
-#define MAX_FONT_SIZE 4000 /* max total fontsize allocation*/
+#if LCD_HEIGHT > 64
+#define MAX_FONT_SIZE 10000
+#else
+#define MAX_FONT_SIZE 4000
+#endif
#endif
/*
diff --git a/tools/buildzip.pl b/tools/buildzip.pl
index a75f424f97..bdad0fc7e2 100755
--- a/tools/buildzip.pl
+++ b/tools/buildzip.pl
@@ -14,6 +14,10 @@ if($ARGV[0] eq "-v") {
shift @ARGV;
}
+my $target = $ARGV[0];
+my $cppdef = $target;
+
+my $exe = $ARGV[1];
sub filesize {
my ($filename)=@_;
@@ -95,13 +99,26 @@ sub buildzip {
closedir DIR;
my $maxfont;
- open(HEADER, "<$ROOT/firmware/export/font.h");
- while(<HEADER>) {
- if(/^\#define MAX_FONT_SIZE[ \t]*(\d+)/) {
+
+ open(SIZE, ">ziptemp");
+ print SIZE <<STOP
+\#include "font.h"
+Font Size We Want: MAX_FONT_SIZE
+STOP
+;
+ close(SIZE);
+ my $c="cat ziptemp | gcc $cppdef -I. -I../firmware/export -E -P -";
+ # print STDERR "C: $c\n";
+ open(GETSIZE, "$c|");
+
+ while(<GETSIZE>) {
+ if($_ =~ /^Font Size We Want: (\d*)/) {
$maxfont = $1;
+ last;
}
}
- close(HEADER);
+ close(GETSIZE);
+ unlink("ziptemp");
die "no decent max font size" if ($maxfont < 2000);
for(@fonts) {
@@ -182,10 +199,6 @@ sub runone {
($type eq "player")?0:1);
};
-my $target = $ARGV[0];
-
-my $exe = $ARGV[1];
-
if(!$exe) {
# not specified, guess!
if($target =~ /(recorder|ondio)/i) {