Index: tools/configure =================================================================== --- tools/configure (revision 19163) +++ tools/configure (working copy) @@ -15,6 +15,8 @@ scriptver=`echo '$Revision$' | sed -e 's:\\$::g' -e 's/Revision: //'` +rbdir=".rockbox" + # # Begin Function Definitions # @@ -607,6 +609,13 @@ --type=TYPE Sets the build type. The shortcut is also valid. Run without this option to see available types. + + --rbdir=dir Set the device install dir (default:${rbdir}). + This is useful for having multiple alternate builds on your + device that you can run with ROLO. However as the bootcode + is hardcoded to look for .rockbox you wouldn't be able to + use such a build as your "master" rockbox. + --ccache Enable ccache use (done by default these days) --no-ccache Disable ccache use --help Shows this message (must not be used with other options) @@ -2272,11 +2281,17 @@ defendian="ROCKBOX_LITTLE_ENDIAN" fi +if [ "1" != `parse_args --rbdir` ]; then + rbdir=`parse_args --rbdir`; + echo "Using alternate rockbox dir:${rbdir}" +fi + sed > autoconf.h \ -e "s,@ENDIAN@,${defendian},g" \ -e "s,^#undef ROCKBOX_HAS_LOGF,$use_logf,g" \ -e "s,@config_rtc@,$config_rtc,g" \ -e "s,@have_rtc_alarm@,$have_rtc_alarm,g" \ + -e "s,@RBDIR@,${rbdir},g" \ < $destination\n" if $verbose; foreach my $path (glob($pattern)) { copy($path, $destination); } @@ -26,6 +41,7 @@ sub glob_move { my ($pattern, $destination) = @_; + print "glob_move: $pattern -> $destination\n" if $verbose; foreach my $path (glob($pattern)) { move($path, $destination); } @@ -33,6 +49,7 @@ sub glob_unlink { my ($pattern) = @_; + print "glob_unlink: $pattern\n" if $verbose; foreach my $path (glob($pattern)) { unlink($path); } @@ -40,27 +57,16 @@ sub find_copyfile { my ($pattern, $destination) = @_; + print "find_copyfile: $pattern -> $destination\n" if $verbose; return sub { my $path = $_; - if ($path =~ $pattern && filesize($path) > 0 && !($path =~ /\.rockbox/)) { + if ($path =~ $pattern && filesize($path) > 0 && !($path =~ /$rockbox_root/)) { copy($path, $destination); chmod(0755, $destination.'/'.$path); } } } -my $ROOT=".."; - -my $ziptool="zip -r9"; -my $output="rockbox.zip"; -my $verbose; -my $sim; -my $exe; -my $target; -my $archos; -my $incfonts; -my $target_id; # passed in, not currently used - # Get options GetOptions ( 'r|root=s' => \$ROOT, 'z|ziptool=s' => \$ziptool, @@ -69,7 +75,9 @@ 'o|output=s' => \$output, 'f|fonts=s' => \$incfonts, # 0 - no fonts, 1 - fonts only 2 - fonts and package 'v|verbose' => \$verbose, - 's|sim' => \$sim ); + 's|sim' => \$sim, + 'rockroot=s' => \$rockbox_root, # If we want to put in a different directory + ); ($target, $exe) = @ARGV; @@ -167,23 +175,25 @@ sub buildzip { my ($image, $fonts)=@_; + print "buildzip: image=$image fonts=$fonts\n" if $verbose; + my ($bitmap, $depth, $icon_w, $icon_h, $recording, $swcodec, $remote_depth, $remote_icon_w, $remote_icon_h) = &gettargetinfo(); # print "Bitmap: $bitmap\nDepth: $depth\nSwcodec: $swcodec\n"; # remove old traces - rmtree('.rockbox'); + rmtree('$rockbox_root'); - mkdir ".rockbox", 0777; + mkdir "$rockbox_root", 0777; if(!$bitmap) { # always disable fonts on non-bitmap targets $fonts = 0; } if($fonts) { - mkdir ".rockbox/fonts", 0777; - chdir(".rockbox/fonts"); + mkdir "$rockbox_root/fonts", 0777; + chdir("$rockbox_root/fonts"); my $cmd = "$ROOT/tools/convbdf -f $ROOT/fonts/*bdf >/dev/null 2>&1"; print($cmd."\n") if $verbose; system($cmd); @@ -196,46 +206,46 @@ } # create the file so the database does not try indexing a folder - open(IGNORE, ">.rockbox/database.ignore") || die "can't open database.ignore"; + open(IGNORE, ">$rockbox_root/database.ignore") || die "can't open database.ignore"; close(IGNORE); - 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; + mkdir "$rockbox_root/langs", 0777; + mkdir "$rockbox_root/rocks", 0777; + mkdir "$rockbox_root/rocks/games", 0777; + mkdir "$rockbox_root/rocks/apps", 0777; + mkdir "$rockbox_root/rocks/demos", 0777; + mkdir "$rockbox_root/rocks/viewers", 0777; if ($recording) { - mkdir ".rockbox/recpresets", 0777; + mkdir "$rockbox_root/recpresets", 0777; } if($swcodec) { - mkdir ".rockbox/eqs", 0777; + mkdir "$rockbox_root/eqs", 0777; - glob_copy("$ROOT/apps/eqs/*.cfg", '.rockbox/eqs/'); # equalizer presets + glob_copy("$ROOT/apps/eqs/*.cfg", "$rockbox_root/eqs/"); # equalizer presets } - mkdir ".rockbox/wps", 0777; - mkdir ".rockbox/themes", 0777; + mkdir "$rockbox_root/wps", 0777; + mkdir "$rockbox_root/themes", 0777; if ($bitmap) { - open(THEME, ">.rockbox/themes/rockbox_default_icons.cfg"); + open(THEME, ">$rockbox_root/themes/rockbox_default_icons.cfg"); print THEME < 1) { - mkdir ".rockbox/backdrops", 0777; + mkdir "$rockbox_root/backdrops", 0777; } - find(find_copyfile(qr/.*\.codec/, abs_path('.rockbox/codecs/')), 'apps/codecs'); + find(find_copyfile(qr/.*\.codec/, abs_path("$rockbox_root/codecs/")), 'apps/codecs'); # remove directory again if no codec was copied - rmdir(".rockbox/codecs"); + rmdir("$rockbox_root/codecs"); } - find(find_copyfile(qr/\.(rock|ovl)/, abs_path('.rockbox/rocks/')), 'apps/plugins'); + find(find_copyfile(qr/\.(rock|ovl)/, abs_path("$rockbox_root/rocks/")), 'apps/plugins'); open VIEWERS, "$ROOT/apps/plugins/viewers.config" or die "can't open viewers.config"; my @viewers = ; close VIEWERS; - open VIEWERS, ">.rockbox/viewers.config" or - die "can't create .rockbox/viewers.config"; + open VIEWERS, ">$rockbox_root/viewers.config" or + die "can't create $rockbox_root/viewers.config"; foreach my $line (@viewers) { if ($line =~ /([^,]*),([^,]*),/) { @@ -288,24 +298,24 @@ # print STDERR "$ext $plugin $dir $name $r\n"; - if(-e ".rockbox/rocks/$name") { + if(-e "$rockbox_root/rocks/$name") { if($dir ne "rocks") { # target is not 'rocks' but the plugins are always in that # dir at first! - move(".rockbox/rocks/$name", ".rockbox/rocks/$r"); + move("$rockbox_root/rocks/$name", "$rockbox_root/rocks/$r"); } print VIEWERS $line; } - elsif(-e ".rockbox/rocks/$r") { + elsif(-e "$rockbox_root/rocks/$r") { # in case the same plugin works for multiple extensions, it # was already moved to the viewers dir print VIEWERS $line; } - if(-e ".rockbox/rocks/$oname") { + if(-e "$rockbox_root/rocks/$oname") { # if there's an "overlay" file for the .rock, move that as # well - move(".rockbox/rocks/$oname", ".rockbox/rocks/$dir"); + move("$rockbox_root/rocks/$oname", "$rockbox_root/rocks/$dir"); } } } @@ -318,33 +328,33 @@ foreach my $line (@rock_targetdirs) { if ($line =~ /([^,]*),(.*)/) { my ($plugin, $dir)=($1, $2); - move(".rockbox/rocks/${plugin}.rock", ".rockbox/rocks/$dir/${plugin}.rock"); + move("$rockbox_root/rocks/${plugin}.rock", "$rockbox_root/rocks/$dir/${plugin}.rock"); } } if ($bitmap) { - mkdir ".rockbox/icons", 0777; - copy("$viewer_bmpdir/viewers.${icon_w}x${icon_h}x$depth.bmp", ".rockbox/icons/viewers.bmp"); + mkdir "$rockbox_root/icons", 0777; + copy("$viewer_bmpdir/viewers.${icon_w}x${icon_h}x$depth.bmp", "$rockbox_root/icons/viewers.bmp"); if ($remote_depth) { - copy("$viewer_bmpdir/remote_viewers.${remote_icon_w}x${remote_icon_h}x$remote_depth.bmp", ".rockbox/icons/remote_viewers.bmp"); + copy("$viewer_bmpdir/remote_viewers.${remote_icon_w}x${remote_icon_h}x$remote_depth.bmp", "$rockbox_root/icons/remote_viewers.bmp"); } } - copy("$ROOT/apps/tagnavi.config", ".rockbox/"); - copy("$ROOT/apps/plugins/disktidy.config", ".rockbox/rocks/apps/"); + copy("$ROOT/apps/tagnavi.config", "$rockbox_root/"); + copy("$ROOT/apps/plugins/disktidy.config", "$rockbox_root/rocks/apps/"); if($bitmap) { - copy("$ROOT/apps/plugins/sokoban.levels", ".rockbox/rocks/games/sokoban.levels"); # sokoban levels - copy("$ROOT/apps/plugins/snake2.levels", ".rockbox/rocks/games/snake2.levels"); # snake2 levels + copy("$ROOT/apps/plugins/sokoban.levels", "$rockbox_root/rocks/games/sokoban.levels"); # sokoban levels + copy("$ROOT/apps/plugins/snake2.levels", "$rockbox_root/rocks/games/snake2.levels"); # snake2 levels } if($image) { # image is blank when this is a simulator if( filesize("rockbox.ucl") > 1000 ) { - copy("rockbox.ucl", ".rockbox/rockbox.ucl"); # UCL for flashing + copy("rockbox.ucl", "$rockbox_root/rockbox.ucl"); # UCL for flashing } if( filesize("rombox.ucl") > 1000) { - copy("rombox.ucl", ".rockbox/rombox.ucl"); # UCL for flashing + copy("rombox.ucl", "$rockbox_root/rombox.ucl"); # UCL for flashing } # Check for rombox.target @@ -353,40 +363,45 @@ my $romfile = "rombox.$2"; if (filesize($romfile) > 1000) { - copy($romfile, ".rockbox/$romfile"); + copy($romfile, "$rockbox_root/$romfile"); } } } - mkdir ".rockbox/docs", 0777; + mkdir "$rockbox_root/docs", 0777; for(("COPYING", "LICENSES", "KNOWN_ISSUES" )) { - copy("$ROOT/docs/$_", ".rockbox/docs/$_.txt"); + copy("$ROOT/docs/$_", "$rockbox_root/docs/$_.txt"); } if ($fonts) { - copy("$ROOT/docs/profontdoc.txt", ".rockbox/docs/profontdoc.txt"); + copy("$ROOT/docs/profontdoc.txt", "$rockbox_root/docs/profontdoc.txt"); } for(("sample.colours", "sample.icons" )) { - copy("$ROOT/docs/$_", ".rockbox/docs/$_"); + copy("$ROOT/docs/$_", "$rockbox_root/docs/$_"); } # Now do the WPS dance if(-d "$ROOT/wps") { - system("perl $ROOT/wps/wpsbuild.pl -r $ROOT $ROOT/wps/WPSLIST $target"); + my $wps_build_cmd="perl $ROOT/wps/wpsbuild.pl "; + $wps_build_cmd=$wps_build_cmd."-v " if $verbose; + $wps_build_cmd=$wps_build_cmd." --rockroot=$rockbox_root -r $ROOT $ROOT/wps/WPSLIST $target"; + print "wpsbuild: $wps_build_cmd\n" if $verbose; + system("$wps_build_cmd"); + print "wps_build_cmd: done\n" if $verbose; } else { print STDERR "No wps module present, can't do the WPS magic!\n"; } # and the info file - copy("rockbox-info.txt", ".rockbox/rockbox-info.txt"); + copy("rockbox-info.txt", "$rockbox_root/rockbox-info.txt"); # copy the already built lng files - glob_copy('apps/lang/*lng', '.rockbox/langs/'); + glob_copy('apps/lang/*lng', "$rockbox_root/langs/"); } @@ -403,7 +418,7 @@ sub runone { my ($target, $fonts)=@_; - # build a full install .rockbox directory + # build a full install .rockbox ($rockbox_root) directory buildzip($target, $fonts); unlink($output); @@ -414,23 +429,23 @@ } if($target && ($target !~ /(mod|ajz|wma)\z/i)) { # On some targets, the image goes into .rockbox. - copy("$target", ".rockbox/$target"); + copy("$target", "$rockbox_root/$target"); undef $target; } if($verbose) { - print "$ziptool $output .rockbox $target >/dev/null\n"; + print "$ziptool $output $rockbox_root $target >/dev/null\n"; } if($sim) { - system("cp -r .rockbox archos/ >/dev/null"); + system("cp -r $rockbox_root archos/ >/dev/null"); } else { - system("$ziptool $output .rockbox $target >/dev/null"); + system("$ziptool $output $rockbox_root $target >/dev/null"); } # remove the .rockbox afterwards - rmtree('.rockbox'); + rmtree("$rockbox_root"); }; if(!$exe) { Index: tools/root.make =================================================================== --- tools/root.make (revision 19163) +++ tools/root.make (working copy) @@ -185,27 +185,27 @@ $(SILENT)etags -o $(BUILDDIR)/TAGS $(filter-out %.o,$(SRC) $(OTHER_SRC)) fontzip: - $(SILENT)$(TOOLSDIR)/buildzip.pl $(VERBOSEOPT) -t \"$(MODELNAME)\" -r "$(ROOTDIR)" -f 1 -o rockbox-fonts.zip $(TARGET) $(BINARY) + $(SILENT)$(TOOLSDIR)/buildzip.pl $(VERBOSEOPT) -t \"$(MODELNAME)\" -r "$(ROOTDIR)" --rockroot="$(RBDIR)" -f 1 -o rockbox-fonts.zip $(TARGET) $(BINARY) zip: $(SILENT)for f in `cat $(BUILDDIR)/apps/features`; do feat="$$feat:$$f" ; done ; \ - $(TOOLSDIR)/buildzip.pl $(VERBOSEOPT) -t \"$(MODELNAME)$$feat\" -i \"$(TARGET_ID)\" -r "$(ROOTDIR)" $(TARGET) $(BINARY) + $(TOOLSDIR)/buildzip.pl $(VERBOSEOPT) -t \"$(MODELNAME)$$feat\" -i \"$(TARGET_ID)\" -r "$(ROOTDIR)" --rockroot="$(RBDIR)" $(TARGET) $(BINARY) mapzip: $(SILENT)find . -name "*.map" | xargs zip rockbox-maps.zip fullzip: $(SILENT)for f in `cat $(BUILDDIR)/apps/features`; do feat="$$feat:$$f" ; done; \ - $(TOOLSDIR)/buildzip.pl $(VERBOSEOPT) -t \"$(MODELNAME)$$feat\" -i \"$(TARGET_ID)\" -r "$(ROOTDIR)" -f 2 -o rockbox-full.zip $(TARGET) $(BINARY) + $(TOOLSDIR)/buildzip.pl $(VERBOSEOPT) -t \"$(MODELNAME)$$feat\" -i \"$(TARGET_ID)\" -r "$(ROOTDIR)" --rockroot="$(RBDIR)" -f 2 -o rockbox-full.zip $(TARGET) $(BINARY) 7zip: $(SILENT)for f in `cat $(BUILDDIR)/apps/features`; do feat="$$feat:$$f" ; done; \ - $(TOOLSDIR)/buildzip.pl $(VERBOSEOPT) -t \"$(MODELNAME)$$feat\" -i \"$(TARGET_ID)\" -o "rockbox.7z" -z "7za a -mx=9" -r "$(ROOTDIR)" $(TARGET) $(BINARY) + $(TOOLSDIR)/buildzip.pl $(VERBOSEOPT) -t \"$(MODELNAME)$$feat\" -i \"$(TARGET_ID)\" -o "rockbox.7z" -z "7za a -mx=9" -r "$(ROOTDIR)" --rockroot="$(RBDIR)" $(TARGET) $(BINARY) tar: $(SILENT)rm -f rockbox.tar $(SILENT)for f in `cat $(BUILDDIR)/apps/features`; do feat="$$feat:$$f" ; done; \ - $(TOOLSDIR)/buildzip.pl $(VERBOSEOPT) -t \"$(MODELNAME)$$feat\" -i \"$(TARGET_ID)\" -o "rockbox.tar" -z "tar -cf" -r "$(ROOTDIR)" $(TARGET) $(BINARY) + $(TOOLSDIR)/buildzip.pl $(VERBOSEOPT) -t \"$(MODELNAME)$$feat\" -i \"$(TARGET_ID)\" -o "rockbox.tar" -z "tar -cf" -r "$(ROOTDIR)" --rockroot="$(RBDIR)" $(TARGET) $(BINARY) bzip2: tar $(SILENT)bzip2 -f9 rockbox.tar Index: apps/settings.h =================================================================== --- apps/settings.h (revision 19163) +++ apps/settings.h (working copy) @@ -57,10 +57,15 @@ #define ROCKBOX_DIR "." #define ROCKBOX_DIR_LEN 1 #else -#define ROCKBOX_DIR "/.rockbox" -#define ROCKBOX_DIR_LEN 9 + +/* ROCKBOX_DIR is now defined in autoconf.h for flexible build types */ +#ifndef ROCKBOX_DIR +#error ROCKBOX_DIR not defined (should be in autoconf.h) #endif +#define ROCKBOX_DIR_LEN sizeof(ROCKBOX_DIR) +#endif + #define FONT_DIR ROCKBOX_DIR "/fonts" #define LANG_DIR ROCKBOX_DIR "/langs" #define WPS_DIR ROCKBOX_DIR "/wps" Index: wps/wpsbuild.pl =================================================================== --- wps/wpsbuild.pl (revision 19163) +++ wps/wpsbuild.pl (working copy) @@ -8,32 +8,60 @@ # $Id$ # -$ROOT=".."; +use strict; +use Getopt::Long qw(:config pass_through); # pass_through so not confused by -DTYPE_STUFF -if($ARGV[0] eq "-r") { - $ROOT=$ARGV[1]; - shift @ARGV; - shift @ARGV; -} - +my $ROOT=".."; my $verbose; -if($ARGV[0] eq "-v") { - $verbose =1; - shift @ARGV; -} - my $firmdir="$ROOT/firmware"; +my $rockbox_root=".rockbox"; +my $wpslist; +my $target; -my $wpslist=$ARGV[0]; +# Get options +GetOptions ( 'r|root=s' => \$ROOT, + 'v|verbose' => \$verbose, + 'rockroot=s' => \$rockbox_root, # If we want to put in a different directory + ); -my $target = $ARGV[1]; +($wpslist, $target) = @ARGV; + my $cppdef = $target; my @depthlist = ( 16, 8, 4, 2, 1 ); +# These parameters are filled in as we parse wpslist +my $wps; +my $wps_prefix; +my $rwps; +my $width; +my $height; +my $font; +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; +my $selecttype; +my $iconset; +my $viewericon; +my $lineselecttextcolor; +my $filetylecolor; + +# LCD sizes +my ($main_height, $main_width, $main_depth); +my ($remote_height, $remote_width, $remote_depth); +my $has_remote; + + if(!$wpslist) { print "Usage: wpsbuilds.pl \n", "Run this script in the root of the target build, and it will put all the\n", - "stuff in .rockbox/wps/\n"; + "stuff in $rockbox_root/wps/\n"; exit; } @@ -71,7 +99,7 @@ open(GETSIZE, "$c|"); - my ($height, $width); + my ($height, $width, $depth); while() { if($_ =~ /^Height: (\d*)/) { $height = $1; @@ -96,15 +124,15 @@ { my $wpsdir = $wps; $wpsdir =~ s/\.(r|)wps//; - mkdir ".rockbox/wps", 0777; - mkdir ".rockbox/themes", 0777; + mkdir "$rockbox_root/wps", 0777; + mkdir "$rockbox_root/themes", 0777; - if( -d ".rockbox/wps/$wpsdir") { + if( -d "$rockbox_root/wps/$wpsdir") { #print STDERR "wpsbuild warning: directory wps/$wpsdir already exists!\n"; } else { - mkdir ".rockbox/wps/$wpsdir", 0777; + mkdir "$rockbox_root/wps/$wpsdir", 0777; } } @@ -112,9 +140,9 @@ { #copy the backdrop file into the build dir if ($backdrop ne '') { - $dst = $backdrop; + my $dst = $backdrop; $dst =~ s/(\.[0-9]*x[0-9]*x[0-9]*)//; - $cmd = "cp $ROOT/$backdrop .rockbox/$dst"; + my $cmd = "cp $ROOT/$backdrop $rockbox_root/$dst"; `$cmd`; } } @@ -123,10 +151,10 @@ { #copy the font specified by the theme - $o=$font; + my $o=$font; $o =~ s/\.fnt/\.bdf/; - `mkdir .rockbox/fonts/ >/dev/null 2>&1`; - $cmd ="$ROOT/tools/convbdf -f -o \".rockbox/fonts/$font\" \"$ROOT/fonts/$o\" "; + mkdir "$rockbox_root/fonts"; + my $cmd ="$ROOT/tools/convbdf -f -o \"$rockbox_root/fonts/$font\" \"$ROOT/fonts/$o\" "; `$cmd`; } @@ -164,10 +192,10 @@ # print "$req_t_wps $req_g_wps\n"; if (-e "$dir/$req_t_wps" ) { - system("cp $dir/$req_t_wps .rockbox/wps/$wps"); + system("cp $dir/$req_t_wps $rockbox_root/wps/$wps"); } elsif (-e "$dir/$req_g_wps") { - system("cp $dir/$req_g_wps .rockbox/wps/$wps"); + system("cp $dir/$req_g_wps $rockbox_root/wps/$wps"); open(WPSFILE, "$dir/$req_g_wps"); while () { @@ -178,12 +206,12 @@ if ($#filelist >= 0) { if (-e "$dir/$wps_prefix/$req_g") { foreach $file (@filelist) { - system("cp $dir/$wps_prefix/$req_g/$file .rockbox/wps/$wps_prefix/"); + system("cp $dir/$wps_prefix/$req_g/$file $rockbox_root/wps/$wps_prefix/"); } } elsif (-e "$dir/$wps_prefix") { foreach $file (@filelist) { - system("cp $dir/$wps_prefix/$file .rockbox/wps/$wps_prefix/"); + system("cp $dir/$wps_prefix/$file $rockbox_root/wps/$wps_prefix/"); } } else { @@ -210,11 +238,11 @@ \# $cfg generated by wpsbuild.pl \# $wps is made by $author \# -wps: /.rockbox/wps/$wps +wps: /$rockbox_root/wps/$wps MOO ; if($font) { - push @out, "font: /.rockbox/fonts/$font\n"; + push @out, "font: /$rockbox_root/fonts/$font\n"; } if($fgcolor && $main_depth > 2) { push @out, "foreground color: $fgcolor\n"; @@ -231,7 +259,7 @@ } else { # clip resolution from filename $backdrop =~ s/(\.[0-9]*x[0-9]*x[0-9]*)//; - push @out, "backdrop: /.rockbox/$backdrop\n"; + push @out, "backdrop: /$rockbox_root/$backdrop\n"; } } if($lineselectstart && $main_depth > 2) { @@ -256,13 +284,13 @@ push @out, "filetype colours: $filetylecolor\n"; } if($rwps && $has_remote ) { - push @out, "rwps: /.rockbox/wps/$rwps\n"; + push @out, "rwps: /$rockbox_root/wps/$rwps\n"; } - if(-f ".rockbox/wps/$cfg") { + if(-f "$rockbox_root/wps/$cfg") { print STDERR "wpsbuild warning: wps/$cfg already exists!\n"; } else { - open(CFG, ">.rockbox/themes/$cfg"); + open(CFG, ">$rockbox_root/themes/$cfg"); print CFG @out; close(CFG); } @@ -273,11 +301,15 @@ ($remote_height, $remote_width, $remote_depth) = getlcdsizes(1); #print "LCD: ${main_height}x${main_width}x${main_depth}\n"; -$has_remote = 1 if ($remote_height && $remote_width && remote_depth); +$has_remote = 1 if ($remote_height && $remote_width && $remote_depth); +my $isrwps; +my $within; + open(WPS, "<$wpslist"); while() { my $l = $_; + # remove CR $l =~ s/\r//g; if($l =~ /^ *\#/) { @@ -334,7 +366,7 @@ my $wpsdir = $1; # If this WPS installable on this platform, one of the following # two files will be present - foreach $d (@depthlist) { + foreach my $d (@depthlist) { next if ($d > $rdepth); $req_g = $rwidth . "x" . $rheight . "x" . $d;