From fda7d720c05b4a756f045e0c0f4afe9630edb5c5 Mon Sep 17 00:00:00 2001 From: Jonathan Gordon Date: Mon, 6 Aug 2007 13:42:52 +0000 Subject: Accept FS#5464 - organise the rocks directory. If any plugins or "open with" optoins dont work please let me know... git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14214 a1c6a512-1295-4272-9138-f99709370657 --- tools/buildzip.pl | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) (limited to 'tools') diff --git a/tools/buildzip.pl b/tools/buildzip.pl index c3f6ccc3d4..ea7aabee0b 100755 --- a/tools/buildzip.pl +++ b/tools/buildzip.pl @@ -213,6 +213,11 @@ sub buildzip { mkdir ".rockbox/langs", 0777; mkdir ".rockbox/rocks", 0777; + mkdir ".rockbox/rocks/games", 0777; + mkdir ".rockbox/rocks/apps", 0777; + mkdir ".rockbox/rocks/demos", 0777; + mkdir ".rockbox/rocks/viewers", 0777; + if ($recording) { mkdir ".rockbox/recpresets", 0777; } @@ -280,7 +285,7 @@ STOP open VIEWERS, ">.rockbox/viewers.config" or die "can't create .rockbox/viewers.config"; - mkdir ".rockbox/viewers", 0777; + foreach my $line (@viewers) { if ($line =~ /([^,]*),([^,]*),/) { my ($ext, $plugin)=($1, $2); @@ -305,7 +310,7 @@ STOP if($dir ne "rocks") { # target is not 'rocks' but the plugins are always in that # dir at first! - `mv .rockbox/rocks/$name .rockbox/$r`; + `mv .rockbox/rocks/$name .rockbox/rocks/$r`; } print VIEWERS $line; } @@ -318,11 +323,22 @@ STOP if(-e ".rockbox/rocks/$oname") { # if there's an "overlay" file for the .rock, move that as # well - `mv .rockbox/rocks/$oname .rockbox/$dir`; + `mv .rockbox/rocks/$oname .rockbox/rocks/$dir`; } } } close VIEWERS; + + open CATEGORIES, "$ROOT/apps/plugins/CATEGORIES" or + die "can't open CATEGORIES"; + @rock_targetdirs = ; + close CATEGORIES; + foreach my $line (@rock_targetdirs) { + if ($line =~ /([^,]*),(.*)/) { + my ($plugin, $dir)=($1, $2); + `mv .rockbox/rocks/${plugin}.rock .rockbox/rocks/$dir 2> /dev/null`; + } + } if ($bitmap) { mkdir ".rockbox/icons", 0777; @@ -335,8 +351,8 @@ STOP `cp $ROOT/apps/tagnavi.config .rockbox/`; if($bitmap) { - `cp $ROOT/apps/plugins/sokoban.levels .rockbox/rocks/`; # sokoban levels - `cp $ROOT/apps/plugins/snake2.levels .rockbox/rocks/`; # snake2 levels + `cp $ROOT/apps/plugins/sokoban.levels .rockbox/rocks/games/`; # sokoban levels + `cp $ROOT/apps/plugins/snake2.levels .rockbox/rocks/games/`; # snake2 levels } if($image) { -- cgit v1.2.3