From: ptkwt@...1.aracnet.com (Phil Tomson) Date: 2002-01-14T06:28:14+09:00 Subject: Re: Best way for platf. independent compression? In article <20020113213008.A6449@prism.localnet>, Massimiliano Mirra wrote: >Currently, rpkg builds packets by tar'ring and gzip'ping the source >directories through GNU tar. > >However it aims to be entirely Ruby-based or at least platform >independent out of the box. If you have any though or warning on the >following subjects, I'd like to hear them: > >- is GNU tar a reasonable external requirement for this, i.e. is it >easily available on every platform that Ruby runs on or even >widespread enough that it is already installed? Unfortunately, it's not gonna generally be available on Windows unless you've installed the Cygwin tools. And since we're moving away from cygwin, you have to assume that people will not have installed tar on Windows. > >- do backquotes for calling external commands work reliably and >uniformly across supported platforms? In other words, will writing >`tar xcf #{pkgdir}` always do the trick or will it need tweakings >depending on the platform? I'm thinking in the direction of >`C:\full\path\to\tar zcf #{pkgdir}` on Windows, which I don't know if >can be avoided (how do you Windows folks usually do?). > Again, you can't rely on it in Windows unless you've got Cygwin installed. >- alternatively, is there any reasonable pure Ruby solution? I have >seen CompressionR, Rubyzip, and Ruby/zlib in the RAA. Could someone >who has used them a bit if not extensively suggest whether the answer >is among them? I think it would probably be best if you used a pure Ruby solution. I can't comment on any of the compressions schemes you've listed because I haven't used them. Phil