Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: buildzip.pl on Cygwin

buildzip.pl on Cygwin

From: Magnus Holmgren <magnushol_at_gmail.com>
Date: Sat, 06 Nov 2010 11:08:18 +0100

Hi,

Found a small issue with buildzip.pl on Cygwin. abs_path() fails, terminating
the script, if the path in question can't be found. This causes an SDL build to
fail if the simdisk/.rockbox folder doesn't exist, when checking if $bindir and
$src are the same.

As a work-around, I moved a glob_mkdir($bindir) up a bit, like this:

Index: tools/buildzip.pl
===================================================================
--- tools/buildzip.pl (revision 28482)
+++ tools/buildzip.pl (working copy)
@@ -126,15 +126,17 @@
          die "ERROR: No PREFIX given\n"
      }

+ # On Cygwin, the path must exist for abs_path to work
+ unless (glob_mkdir($bindir)) {
+ return 0;
+ }
+
      if ((!$app) && $src && (abs_path($bindir) eq abs_path($src))) {
          return 1;
      }

      # binary
      unless ($exe eq "") {
- unless (glob_mkdir($bindir)) {
- return 0;
- }
          glob_install($exe, $bindir, "-m 0775");
      }

Any suggestions for a better solution (my Perl skills are limited)? Or is it OK
to commit this?

-- 
   Magnus
Received on 2010-11-06

Page was last modified "Jan 10 2012" The Rockbox Crew
aaa