delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/12/08/02:14:03

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
To: cygwin AT cygwin DOT com
X-Injected-Via-Gmane: http://gmane.org/
Path: not-for-mail
From: Soren A <soren_andersen AT fastmail DOT fm>
Subject: Re: [ANN] cyg-wrapper.sh
Date: Sun, 8 Dec 2002 07:13:44 +0000 (UTC)
Organization: Occasionally Sporadically
Lines: 77
Message-ID: <Xns92DE16B0451AFsoren1Gmane@80.91.224.249>
References: <20021206013757 DOT GA976927 AT ORLYN>
NNTP-Posting-Host: ny-kenton2a-951.buf.adelphia.net
X-Trace: main.gmane.org 1039331624 27224 24.51.95.183 (8 Dec 2002 07:13:44 GMT)
X-Complaints-To: usenet AT main DOT gmane DOT org
NNTP-Posting-Date: Sun, 8 Dec 2002 07:13:44 +0000 (UTC)
User-Agent: Xnews/L5
X-Archive: encrypt

Luc Hermitte <hermitte AT free DOT fr> wrote around 05 Dec 2002 
news:20021206013757 DOT GA976927 AT ORLYN:

> cyg-wrapper v2.2 has been uploaded on my web site:
>     http://hermitte.free.fr/cygwin/#Win32
>     http://hermitte.free.fr/cygwin/cyg-wrapper.sh
Luc posted on my urging; please check out his site and this script which is 
a useful and good piece of hackery.

> cyg-wrapper is a shell script that helps to run, from cygwin,
> command-line applications that have been compiled for windows only ; ie:
> applications un-aware and independant of the cygwin layer.[1] 
> 
> cyg-wrapper converts pathname arguments, passed to win32 programs, from
> the written form (unix/dos/windows ; relative or absolute) to the DOS
> (short [2] ; and absolute) form that win32 command-line programs
> understand.
> 
> It extends what cygpath do, to every pathname arguments, and resolves
> the symbolic links.
> 
> 
> A typical way of use is for instance:
>   alias gvim='cyg-wrapper.sh "C:/Progra~1/Edition/vim/vim61/gvim.exe" 
>      -binary-opt=-c,--cmd,-T,-t,--servername,--remote-send,--remote-expr
>      --fork=1'
> that defines the alias 'gvim' which:
>   - calls the win32 version of Gvim,
>   - converts every pathname argument (identified as beeing those that do
>     not begin with '+' or '-', and that do not directly follow '-c',
>     '--cmd', '-T', ...)
>   - forks immediately ; which replaces the disabled '-f' option of the
>     win32 version of gvim.
> 
> 
> Note: the latest version of cyg-wrapper requires cygUtils and more
> precisally realpath. An older but slower version is also available on
> my web site.
> 
> Feedback appreciated.
I am going to be making cyg-wrapper.sh a part of my bash inifiles, as I
discover uses for it. That is, i'll define aliaii like the above example
to GVIM, in my ~/.profile or ~/.bashrc. 

> [1] BTW, Is there a canonical expression to designate such applications ?
>     I tend to use "native win32 applications/programs", but I'm not sure
>     it is really correct in English.
"Dumb Software" ? ;-). No, the way you wrote it seems proper to me. I don't 
know of a better widely-understood terminology, but I wish there was one, 
because this is an issue I deal with a lot. I use a lot of cross-platform 
software where the application understands a path argument passed to it 
like this:

  someunixyapp -flag1 -flagn C:/datafiles/forwardslashed/data.data

And I have seen here these kinds of path specs called "mixed" paths,
because while they are not POSIX (single-rooted filesystem) they use
forward slashes. Yet people commonly refer to many apps that understand
these kinds of paths (as does the OS itself, in fact, but not its native
shells) as "Native Win32 ports". In this respect there is a further
level of "nativeness" (or really, "dumbness") that could be specified,
but we have no custom or convenient nomenclature for doing so. 

> [2] This form has been privileged because of the MsWindows 9x series.

Hmmm. If you mean that people who run Win9x are more likely to be
running old DOS programs that use 8.3, then ok; otherwise there's no
difference between NT-derived and 9x-type Windows in this respect --
that I know of. 

  Best,
   Soren A

-- 
"So, tell me, my little one-eyed one, on what poor, pitiful,
defenseless planet has my MONSTROSITY been unleashed?"
                       - Dr. Jumba, Disney's "Lilo & Stitch"



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019