[Tilesathome] I noticed $^O eq "cygwin"

Henry Loenwind henry at loenwind.info
Sat Aug 16 02:33:39 BST 2008


Hi,

just a small comment on cygwin-specific behavior in the tah-client: 
cygwin can be mapped to Linux for most purposes, but there is one rather 
big problem: Some external programs (e.g. java, xml, inkscape) are only 
easily available as win32 versions. That means, they need path names 
mapped to their Windows versions.

So if someone really wants to make cygwin changes, he would need to add 
config values for every program to say if its cygwin or win32, and then 
translate the paths given out to each program accordingly. Note: 
Translation can be done with the tool cygpath.

cu
Henry

PS: This is one of he wrappers I use:

#!/usr/bin/perl

use strict;
use warnings;

our $convert = 'cygpath -w -a';

our @a = @ARGV;
our @r = ();

our $cmd = '/c/tah/xml/xml.exe';

foreach my $x (@a) {
         if (-e $x) {
                 my $tmp = `$convert $x`;
                 chomp $tmp;
                 push @r, $tmp;
         } else {
                 push @r, $x;
         }
}

#print STDERR "-Converted from- @ARGV\n-            to- @r\n";
exec $cmd, @r;




More information about the Tilesathome mailing list