diff options
author | Christi Scarborough <christi@coraline.org> | 2005-11-18 15:33:05 +0000 |
---|---|---|
committer | Christi Scarborough <christi@coraline.org> | 2005-11-18 15:33:05 +0000 |
commit | 32a43e2ee688bf8b3c930685400a52910c512a1e (patch) | |
tree | 8675fddb2d926f0dabb65adb798033036a22c18d /wps/wpsbuild.pl | |
parent | e16ebf1a50b9692e93f44633138903418ef93526 (diff) |
When fixing things is it better to do it in a way that causes them to actually work. Some more bugs in wpsbuild.pl squashed. Also, themes moved to the main menu. Resetting to default themes now works properly.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7965 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'wps/wpsbuild.pl')
-rwxr-xr-x | wps/wpsbuild.pl | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/wps/wpsbuild.pl b/wps/wpsbuild.pl index fc7be294a3..d6cff68d3a 100755 --- a/wps/wpsbuild.pl +++ b/wps/wpsbuild.pl @@ -90,7 +90,7 @@ sub mkdirs { my $wpsdir = $wps; $wpsdir =~ s/\.(r|)wps//; mkdir ".rockbox/wps", 0777; - mkdir ".rockbox/theme", 0777; + mkdir ".rockbox/themes", 0777; if( -d ".rockbox/wps/$wpsdir") { #print STDERR "wpsbuild warning: directory wps/$wpsdir already exists!\n"; @@ -140,7 +140,7 @@ MOO if($statusbar) { push @out, "statusbar: $statusbar\n"; } - if($rwps && !$isrwps) { + if($rwps && $has_remote ) { push @out, "rwps: /.rockbox/wps/$rwps\n"; } @@ -148,7 +148,7 @@ MOO print STDERR "wpsbuild warning: wps/$cfg already exists!\n"; } else { - open(CFG, ">.rockbox/theme/$cfg"); + open(CFG, ">.rockbox/themes/$cfg"); print CFG @out; close(CFG); } @@ -158,6 +158,8 @@ MOO my ($main_height, $main_width) = getlcdsizes(); my ($remote_height, $remote_width) = getlcdsizes(1); +$has_remote = true if ($remote_height && $remote_width); + open(WPS, "<$wpslist"); while(<WPS>) { my $l = $_; @@ -168,6 +170,14 @@ while(<WPS>) { if($l =~ /^ *<(r|)wps>/i) { $isrwps = $1; $within = 1; + # undef is a unary operator (!) + undef $wps; + undef $rwps; + undef $width; + undef $height; + undef $font; + undef $statusbar; + undef $author; next; } if($within) { @@ -184,6 +194,7 @@ while(<WPS>) { if(!$rheight || !$rwidth) { printf STDERR "wpsbuild notice: No %sLCD size, skipping $wps\n", $isrwps?"remote ":""; + $within = 0; next; } @@ -196,7 +207,6 @@ while(<WPS>) { # WPS # #print "Size requirement is fine!\n"; - mkdirs(); if(!$isrwps) { # We only make .cfg files for <wps> sections: @@ -208,8 +218,6 @@ while(<WPS>) { #print "Skip $wps due to size restraints\n"; } $within = 0; - - undef $wps, $rwps, $width, $height, $font, $statusbar, $author; } elsif($l =~ /^Name: (.*)/i) { # Note that in the case this is within <rwps>, $wps will contain the |