summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorWilliam Wilgus <wilgus.william@gmail.com>2024-05-04 08:41:16 -0400
committerWilliam Wilgus <wilgus.william@gmail.com>2024-05-05 14:01:43 -0400
commitd7c541742f5e6ec07dbcc8e1346efde9d807437e (patch)
tree2c3325b652999bd9b2443eb96d8d32035d3c4c18 /tools
parentefcea6628024c5f6796c3850c3779801db4b6874 (diff)
downloadrockbox-d7c541742f5e6ec07dbcc8e1346efde9d807437e.tar.gz
rockbox-d7c541742f5e6ec07dbcc8e1346efde9d807437e.zip
Allow first level folders in plugin menu
add sorting directories as files move picross files to a hidden folder use directory for lua_scripts, sgt_puzzles make plugin browser able to handle 1st level directories Change-Id: I30852d71dc992c378d5790756e94f06f5a2e9bef
Diffstat (limited to 'tools')
-rwxr-xr-xtools/buildzip.pl28
1 files changed, 24 insertions, 4 deletions
diff --git a/tools/buildzip.pl b/tools/buildzip.pl
index 2956b49492..59c32d3e3d 100755
--- a/tools/buildzip.pl
+++ b/tools/buildzip.pl
@@ -167,6 +167,13 @@ sub make_install {
167 glob_install("$src/rocks/$t/*", "$libdir/rocks/$t", "-m 0755"); 167 glob_install("$src/rocks/$t/*", "$libdir/rocks/$t", "-m 0755");
168 } 168 }
169 169
170 if(-e "$src/rocks/games/sgt_puzzles") {
171 unless (glob_mkdir("$libdir/rocks/games/sgt_puzzles")) {
172 return 0;
173 }
174 glob_install("$src/rocks/games/sgt_puzzles/*", "$libdir/rocks/games/sgt_puzzles", "-m 0755");
175 }
176
170 # rocks/viewers/lua 177 # rocks/viewers/lua
171 unless (glob_mkdir("$libdir/rocks/viewers/lua")) { 178 unless (glob_mkdir("$libdir/rocks/viewers/lua")) {
172 return 0; 179 return 0;
@@ -182,12 +189,13 @@ sub make_install {
182 #glob_mkdir("$temp_dir/rocks/demos/lua_scripts"); 189 #glob_mkdir("$temp_dir/rocks/demos/lua_scripts");
183 #glob_copy("$ROOT/apps/plugins/lua_scripts/*.lua", "$temp_dir/rocks/demos/lua_scripts/"); 190 #glob_copy("$ROOT/apps/plugins/lua_scripts/*.lua", "$temp_dir/rocks/demos/lua_scripts/");
184 } 191 }
185 #lua picross puzzles 192
193 #lua picross puzzles
186 if(-e "$ROOT/apps/plugins/picross") { 194 if(-e "$ROOT/apps/plugins/picross") {
187 unless (glob_mkdir("$libdir/rocks/games/picross")) { 195 unless (glob_mkdir("$libdir/rocks/games/.picross")) {
188 return 0; 196 return 0;
189 } 197 }
190 glob_install("$ROOT/apps/plugins/picross/*.picross", "$libdir/rocks/games/picross"); 198 glob_install("$ROOT/apps/plugins/picross/*.picross", "$libdir/rocks/games/.picross");
191 } 199 }
192 200
193 # all the rest directories 201 # all the rest directories
@@ -451,6 +459,12 @@ sub buildzip {
451 glob_copy("$ROOT/apps/plugins/lua_scripts/*.lua", "$temp_dir/rocks/demos/lua_scripts/"); 459 glob_copy("$ROOT/apps/plugins/lua_scripts/*.lua", "$temp_dir/rocks/demos/lua_scripts/");
452 } 460 }
453 461
462 #lua picross puzzles
463 if(-e "$ROOT/apps/plugins/picross") {
464 glob_mkdir("$temp_dir/rocks/games/.picross");
465 glob_copy("$ROOT/apps/plugins/picross/*.picross", "$temp_dir/rocks/games/.picross/");
466 }
467
454 # exclude entries for the image file types not supported by the imageviewer for the target. 468 # exclude entries for the image file types not supported by the imageviewer for the target.
455 my $viewers = "$ROOT/apps/plugins/viewers.config"; 469 my $viewers = "$ROOT/apps/plugins/viewers.config";
456 my $c="cat $viewers | gcc $cppdef -I. -I$firmdir/export -E -P -include config.h -"; 470 my $c="cat $viewers | gcc $cppdef -I. -I$firmdir/export -E -P -include config.h -";
@@ -512,7 +526,13 @@ sub buildzip {
512 foreach my $line (@rock_targetdirs) { 526 foreach my $line (@rock_targetdirs) {
513 if ($line =~ /([^,]*),(.*)/) { 527 if ($line =~ /([^,]*),(.*)/) {
514 my ($plugin, $dir)=($1, $2); 528 my ($plugin, $dir)=($1, $2);
515 move("$temp_dir/rocks/${plugin}.rock", "$temp_dir/rocks/$dir/${plugin}.rock"); 529 if($dir eq 'games' and substr(${plugin}, 0, 4) eq "sgt-") {
530 glob_mkdir("$temp_dir/rocks/$dir/sgt_puzzles");
531 move("$temp_dir/rocks/${plugin}.rock", "$temp_dir/rocks/$dir/sgt_puzzles/${plugin}.rock");
532 }
533 else {
534 move("$temp_dir/rocks/${plugin}.rock", "$temp_dir/rocks/$dir/${plugin}.rock");
535 }
516 if(-e "$temp_dir/rocks/${plugin}.ovl") { 536 if(-e "$temp_dir/rocks/${plugin}.ovl") {
517 # if there's an "overlay" file for the .rock, move that as 537 # if there's an "overlay" file for the .rock, move that as
518 # well 538 # well