summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2012-06-10 20:28:36 +0200
committerThomas Martitz <kugel@rockbox.org>2012-06-10 21:20:36 +0200
commit66b6fdbb73f90cbb58fe814cdecc58858b584e1e (patch)
tree6fa8dd17555b1daf05bd4c2fa51a1de921f57162 /tools
parent300ff4c952d41fa49768b0e66e13f1354a83fa64 (diff)
wpsbuild: Rewrite to fix various issues and support .fms
wpsbuild.pl is enhanced to produce fallback themes that were previously hardcoded in buildzip.pl. It also recognizes resolution strings as regular expressions now so you can specify resolution dependant settings as <setting>.<regex>: <value> (needed to support single themes on multiple resolutions). The WPSBUILD syntax completely changed as well and it includes the fallback themes as well. Ultimately wpsbuild is also able to install .fms files. Change-Id: Idf5994f17b9750983d7bc3ef583540a8cdae1dde
Diffstat (limited to 'tools')
-rwxr-xr-xtools/buildzip.pl78
1 files changed, 1 insertions, 77 deletions
diff --git a/tools/buildzip.pl b/tools/buildzip.pl
index 70445570f8..56bbe6de1a 100755
--- a/tools/buildzip.pl
+++ b/tools/buildzip.pl
@@ -333,57 +333,6 @@ sub filesize {
return $size;
}
-sub create_failsafefiles {
- my ($dir, $remote_depth) = @_;
- my $text = "# Dummy file to allow Rockbox to reset to the default skin config.
-# Do not edit this file. It's never actually loaded by Rockbox.";
- open (FOO, ">$dir/wps/rockbox_failsafe.wps");
- print FOO $text;
- close(FOO);
- open (FOO, ">$dir/wps/rockbox_failsafe.sbs");
- print FOO $text;
- close(FOO);
- open (FOO, ">$dir/wps/rockbox_failsafe.fms");
- print FOO $text;
- close(FOO);
- if ($remote_depth) {
- open (FOO, ">$dir/wps/rockbox_failsafe.rwps");
- print FOO $text;
- close(FOO);
- open (FOO, ">$dir/wps/rockbox_failsafe.rsbs");
- print FOO $text;
- close(FOO);
- open (FOO, ">$dir/wps/rockbox_failsafe.rfms");
- print FOO $text;
- close(FOO);
- }
- open (FOO, ">$dir/themes/rockbox_failsafe.cfg");
- print FOO <<STOP
-# This config has been autogenerated to reload the failsafe setup
-wps: $dir/wps/rockbox_failsafe.wps
-sbs: $dir/wps/rockbox_failsafe.sbs
-fms: $dir/wps/rockbox_failsafe.fms
-STOP
-;
- if ($remote_depth) {
- print FOO <<STOP
-rwps: $dir/wps/rockbox_failsafe.rwps
-rsbs: $dir/wps/rockbox_failsafe.rsbs
-rfms: $dir/wps/rockbox_failsafe.rfms
-STOP
-;
- }
- print FOO <<STOP
-statusbar: top
-font: 08-Schumacher-Clean.fnt
-foreground color: 000000
-background color: B6C6E5
-selector type: bar (inverse)
-backdrop: -
-STOP
-;
- close(FOO);
-}
sub buildzip {
my ($image, $fonts)=@_;
@@ -454,24 +403,8 @@ sub buildzip {
}
glob_mkdir("$temp_dir/wps");
+ glob_mkdir("$temp_dir/icons");
glob_mkdir("$temp_dir/themes");
- if ($bitmap) {
- open(THEME, ">$temp_dir/themes/rockbox_default_icons.cfg");
- print THEME <<STOP
-# this config file was auto-generated to make it
-# easy to reset the icons back to default
-iconset: -
-# taken from apps/gui/icon.c
-viewers iconset: /$rbdir/icons/viewers.bmp
-remote iconset: -
-# taken from apps/gui/icon.c
-remote viewers iconset: /$rbdir/icons/remote_viewers.bmp
-
-STOP
-;
- close(THEME);
- }
-
glob_mkdir("$temp_dir/codepages");
if($bitmap) {
@@ -576,14 +509,6 @@ STOP
glob_unlink("$temp_dir/rocks/*.lua"); # Clean up unwanted *.lua files (e.g. actions.lua, buttons.lua)
- if ($bitmap) {
- glob_mkdir("$temp_dir/icons");
- copy("$viewer_bmpdir/viewers.${icon_w}x${icon_h}x$depth.bmp", "$temp_dir/icons/viewers.bmp");
- if ($remote_depth) {
- copy("$viewer_bmpdir/remote_viewers.${remote_icon_w}x${remote_icon_h}x$remote_depth.bmp", "$temp_dir/icons/remote_viewers.bmp");
- }
- }
-
copy("$ROOT/apps/tagnavi.config", "$temp_dir/");
copy("$ROOT/apps/plugins/disktidy.config", "$temp_dir/rocks/apps/");
@@ -606,7 +531,6 @@ STOP
"$temp_dir/rocks/demos/pictureflow_splash.bmp");
}
- create_failsafefiles($temp_dir, $remote_depth);
if($image) {
# image is blank when this is a simulator