summaryrefslogtreecommitdiff
path: root/wps/wpsbuild.pl
diff options
context:
space:
mode:
Diffstat (limited to 'wps/wpsbuild.pl')
-rwxr-xr-xwps/wpsbuild.pl30
1 files changed, 15 insertions, 15 deletions
diff --git a/wps/wpsbuild.pl b/wps/wpsbuild.pl
index b33e70bf4a..46aa46eeb8 100755
--- a/wps/wpsbuild.pl
+++ b/wps/wpsbuild.pl
@@ -56,11 +56,9 @@ STOP
56 else { 56 else {
57 print GCC <<STOP 57 print GCC <<STOP
58\#include "config.h" 58\#include "config.h"
59#ifdef HAVE_LCD_BITMAP
60Height: LCD_HEIGHT 59Height: LCD_HEIGHT
61Width: LCD_WIDTH 60Width: LCD_WIDTH
62Depth: LCD_DEPTH 61Depth: LCD_DEPTH
63#endif
64STOP 62STOP
65; 63;
66} 64}
@@ -93,7 +91,7 @@ STOP
93 return ($height, $width, $depth); 91 return ($height, $width, $depth);
94} 92}
95 93
96sub mkdirs { 94sub mkdirs {
97 my $wpsdir = $wps; 95 my $wpsdir = $wps;
98 $wpsdir =~ s/\.(r|)wps//; 96 $wpsdir =~ s/\.(r|)wps//;
99 mkdir ".rockbox/wps", 0777; 97 mkdir ".rockbox/wps", 0777;
@@ -132,20 +130,22 @@ sub copywps {
132 } 130 }
133 close(WPSFILE); 131 close(WPSFILE);
134 132
135 if (-e "$dir/$wps_prefix/$req_g") { 133 if ($#filelist >= 0) {
136 foreach $file (@filelist) { 134 if (-e "$dir/$wps_prefix/$req_g") {
137 system("cp $dir/$wps_prefix/$req_g/$file .rockbox/wps/$wps_prefix/"); 135 foreach $file (@filelist) {
136 system("cp $dir/$wps_prefix/$req_g/$file .rockbox/wps/$wps_prefix/");
137 }
138 }
139 elsif (-e "$dir/$wps_prefix") {
140 foreach $file (@filelist) {
141 system("cp $dir/$wps_prefix/$file .rockbox/wps/$wps_prefix/");
142 }
138 } 143 }
139 } 144 else {
140 elsif (-e "$dir/$wps_prefix") { 145 print STDERR "beep, no dir to copy WPS from!\n";
141 foreach $file (@filelist) {
142 system("cp $dir/$wps_prefix/$file .rockbox/wps/$wps_prefix/");
143 } 146 }
144 }
145 else {
146 print STDERR "beep, no dir to copy WPS from!\n";
147 } 147 }
148 148
149 } else { 149 } else {
150 print STDERR "Skipping $wps - no matching resolution.\n"; 150 print STDERR "Skipping $wps - no matching resolution.\n";
151 } 151 }
@@ -255,7 +255,7 @@ while(<WPS>) {
255 $req_g = $rwidth . "x" . $rheight . "x" . $d; 255 $req_g = $rwidth . "x" . $rheight . "x" . $d;
256 256
257 $req_g_wps = $wps_prefix . "." . $req_g . ".wps"; 257 $req_g_wps = $wps_prefix . "." . $req_g . ".wps";
258 last if (-e "$wpsdir/$req_g_wps"); 258 last if (-e "$wpsdir/$req_g_wps");
259 259
260 if ($isrwps) { 260 if ($isrwps) {
261 $req_g = $req_g . "." . $main_width . "x" . $main_height . "x" . "$main_depth"; 261 $req_g = $req_g . "." . $main_width . "x" . $main_height . "x" . "$main_depth";