summaryrefslogtreecommitdiffstats
path: root/wps
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2009-10-16 20:30:09 +0000
committerThomas Martitz <kugel@rockbox.org>2009-10-16 20:30:09 +0000
commit8d032ae136035563f262dabf9b839b90db25de29 (patch)
treea044aeabdd553bc7fb58e0a2a1434767204c6d32 /wps
parent27ece8c366b89fab05a47c342edc3edc18a6c5e3 (diff)
downloadrockbox-8d032ae136035563f262dabf9b839b90db25de29.tar.gz
rockbox-8d032ae136035563f262dabf9b839b90db25de29.tar.bz2
rockbox-8d032ae136035563f262dabf9b839b90db25de29.zip
initial custom statusbar commit
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23212 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'wps')
-rw-r--r--wps/WPSLIST3
-rw-r--r--wps/cabbiev2.176x220x16.sb20
-rwxr-xr-xwps/wpsbuild.pl70
3 files changed, 79 insertions, 14 deletions
diff --git a/wps/WPSLIST b/wps/WPSLIST
index 662fb82cb0..63b111e0dc 100644
--- a/wps/WPSLIST
+++ b/wps/WPSLIST
@@ -268,6 +268,8 @@ Author: Jens Arnold
<wps>
Name: cabbiev2.wps
RWPS: cabbiev2.rwps
+SB: cabbiev2.sb
+RSB: cabbiev2.rsb
# Real name of the creator of the WPS
Author: Johannes Voggenthaler, Apoo Maha, Marc Guay, Alex Vanderpol, Jerry Lange, Keith Perri, Mark Fawcus, and Marianne Arnold with support from Rockbox developers and forums. Based on Cabbie by Yohann Misquitta.
@@ -352,6 +354,7 @@ Statusbar: top
# list & remote ui viewports
ui viewport: -
+ui viewport.176x220x16: 0,0,-,180,-,-,-
remote ui viewport: -
</wps>
diff --git a/wps/cabbiev2.176x220x16.sb b/wps/cabbiev2.176x220x16.sb
new file mode 100644
index 0000000000..505b57f1c8
--- /dev/null
+++ b/wps/cabbiev2.176x220x16.sb
@@ -0,0 +1,20 @@
+# cabbie 2.0 default for the Sansa e200 Series by Marc Guay
+# derived from cabbie 2.0 default (C) 2007, Johannes Voggenthaler (Zinc Alloy)
+%wd
+%xl|A|lock-176x220x16.bmp|51|24|2|
+%xl|B|battery-176x220x16.bmp|73|26|10|
+%xl|C|volume-176x220x16.bmp|97|26|10|
+%xl|D|shuffle-176x220x16.bmp|119|27|
+%xl|E|repeat-176x220x16.bmp|144|24|4|
+%xl|F|playmode-176x220x16.bmp|159|24|5|
+#NowPlaying
+%V|0|180|-|-|-|-|-|
+%pb|pb-176x220x16.bmp|5|2|166|8|
+%al %pc%ac%pp of %pe%ar%pr
+%?mh<%xdAa|%xdAb>
+%?bp<%?bc<%xdBa|%xdBb>|%?bl<|%xdBc|%xdBd|%xdBe|%xdBf|%xdBg|%xdBh|%xdBi|%xdBj>>
+%?pv<%xdCa|%xdCb|%xdCc|%xdCd|%xdCe|%xdCf|%xdCg|%xdCh|%xdCi|%xdCj>
+%?ps<%xdD>
+%?mm<|%xdEa|%xdEb|%xdEc|%xdEd>
+%?mp<%xdFa|%xdFb|%xdFc|%xdFd|%xdFe>
+#%?C<%C>
diff --git a/wps/wpsbuild.pl b/wps/wpsbuild.pl
index e9e5c29a30..04e2846025 100755
--- a/wps/wpsbuild.pl
+++ b/wps/wpsbuild.pl
@@ -32,9 +32,18 @@ my $cppdef = $target;
my @depthlist = ( 16, 8, 4, 2, 1 );
# These parameters are filled in as we parse wpslist
+my $req_size;
+my $req_g_wps;
+my $req_t;
+my $req_t_wps;
my $wps;
my $wps_prefix;
+my $sb_prefix;
my $rwps;
+my $sb;
+my $sb_w_size;
+my $rsb;
+my $rsb_w_size;
my $width;
my $height;
my $font;
@@ -42,9 +51,6 @@ my $fgcolor;
my $bgcolor;
my $statusbar;
my $author;
-my $req_g;
-my $req_g_wps;
-my $req_t_wps;
my $backdrop;
my $lineselectstart;
my $lineselectend;
@@ -191,12 +197,26 @@ sub copywps
my $dir;
my @filelist;
my $file;
+ my $__sb;
if($wpslist =~ /(.*)WPSLIST/) {
$dir = $1;
-# system("cp $dir/$wps .rockbox/wps/");
- #print "$req_t_wps $req_g_wps\n";
+ $__sb = $sb_prefix . "." . $req_size . ".sb";
+ print "$req_t_wps $req_g_wps $sb_prefix\n";
+ print "$dir/$__sb\n";
+# system("cp $dir/$wps .rockbox/wps/");
+ # check for <name>.WIDTHxHEIGHTxDEPTH.sb
+ if (-e "$dir/$__sb") {
+ system("cp $dir/$__sb $rbdir/wps/$sb");
+ }
+ # check for <name>.WIDTHxHEIGHTxDEPTH.<model>.sb and overwrite the
+ # previous sb if needed
+ $__sb = $sb_prefix . "." . $req_size . "." . $modelname . ".sb";
+ if (-e "$dir/$__sb") {
+ system("cp $dir/$__sb $rbdir/wps/$sb");
+ }
+
if (-e "$dir/$req_t_wps" ) {
system("cp $dir/$req_t_wps $rbdir/wps/$wps");
@@ -210,9 +230,9 @@ sub copywps
close(WPSFILE);
if ($#filelist >= 0) {
- if (-e "$dir/$wps_prefix/$req_g") {
+ if (-e "$dir/$wps_prefix/$req_size") {
foreach $file (@filelist) {
- system("cp $dir/$wps_prefix/$req_g/$file $rbdir/wps/$wps_prefix/");
+ system("cp $dir/$wps_prefix/$req_size/$file $rbdir/wps/$wps_prefix/");
}
}
elsif (-e "$dir/$wps_prefix") {
@@ -235,7 +255,7 @@ sub copywps
sub buildcfg {
my $cfg = $wps;
- my @out;
+ my @out;
$cfg =~ s/\.(r|)wps/.cfg/;
@@ -338,6 +358,8 @@ while(<WPS>) {
undef $wps;
undef $wps_prefix;
undef $rwps;
+ undef $sb;
+ undef $rsb;
undef $width;
undef $height;
undef $font;
@@ -386,23 +408,24 @@ while(<WPS>) {
foreach my $d (@depthlist) {
next if ($d > $rdepth);
- $req_g = $rwidth . "x" . $rheight . "x" . $d;
+ $req_size = $rwidth . "x" . $rheight . "x" . $d;
# check for model specific wps
- $req_g_wps = $wps_prefix . "." . $req_g . "." . $modelname . ".wps";
+ $req_g_wps = $wps_prefix . "." . $req_size . "." . $modelname . ".wps";
last if (-e "$wpsdir/$req_g_wps");
- $req_g_wps = $wps_prefix . "." . $req_g . ".wps";
+ # check for normal wps (with WIDTHxHEIGHTxDEPTH)
+ $req_g_wps = $wps_prefix . "." . $req_size . ".wps";
last if (-e "$wpsdir/$req_g_wps");
if ($isrwps) {
- $req_g = $req_g . "." . $main_width . "x" . $main_height . "x" . "$main_depth";
+ $req_size = $req_size . "." . $main_width . "x" . $main_height . "x" . "$main_depth";
- $req_g_wps = $wps_prefix . "." . $req_g . ".wps";
+ $req_g_wps = $wps_prefix . "." . $req_size . ".wps";
last if (-e "$wpsdir/$req_g_wps");
}
}
- $req_t_wps = $wps_prefix . ".txt" . ".wps";
+ $req_t_wps = $wps_prefix . $req_t . ".wps";
#print "LCD: $wps wants $width x $height\n";
#print "LCD: is $rwidth x $rheight\n";
@@ -454,6 +477,19 @@ while(<WPS>) {
elsif($l =~ /^RWPS\.${main_width}x${main_height}x$main_depth: *(.*)/i) {
$rwps = $1;
}
+ elsif($l =~ /^SB: *(.*)/i) {
+ $sb = $sb_prefix = $1;
+ $sb_prefix =~ s/\.(r|)sb//;
+ }
+ elsif($l =~ /^SB\.${main_width}x${main_height}x$main_depth: *(.*)/i) {
+ $sb = $1;
+ }
+ elsif($l =~ /^RSB: *(.*)/i) {
+ $rsb = $1;
+ }
+ elsif($l =~ /^RSB\.${main_width}x${main_height}x$main_depth: *(.*)/i) {
+ $rsb = $1;
+ }
elsif($l =~ /^Author: *(.*)/i) {
$author = $1;
}
@@ -526,9 +562,15 @@ while(<WPS>) {
elsif($l =~ /^ui viewport: *(.*)/i) {
$listviewport = $1;
}
+ elsif($l =~ /^ui viewport\.${main_width}x${main_height}x$main_depth: *(.*)/i) {
+ $listviewport = $1;
+ }
elsif($l =~ /^remote ui viewport: *(.*)/i) {
$remotelistviewport = $1;
}
+ elsif($l =~ /^remote ui viewport\.${main_width}x${main_height}x$main_depth: *(.*)/i) {
+ $remotelistviewport = $1;
+ }
else{
#print "Unknown line: $l!\n";
}