delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2011/03/03/11:45:08

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,RCVD_IN_DNSWL_LOW
X-Spam-Check-By: sourceware.org
Message-ID: <4D6FC57F.7000406@cwilson.fastmail.fm>
Date: Thu, 03 Mar 2011 11:44:47 -0500
From: Charles Wilson <cygwin AT cwilson DOT fastmail DOT fm>
Reply-To: Charles Wilson <cygwin AT cwilson DOT fastmail DOT fm>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.2.14) Gecko/20110221 Thunderbird/3.1.8
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: distributing executables for windows
References: <AANLkTinuN6YLfhUknPfiVHS-adpdhDagK06-aJi+MvV5 AT mail DOT gmail DOT com> <AANLkTim+8sJhKPYes73Osf9dFkmzM1MWHYk8KW6BpYeZ AT mail DOT gmail DOT com> <AANLkTi=vrPDmPEJwYybCgB0wYr2zOhLF4Ow9qkv0etTN AT mail DOT gmail DOT com> <AANLkTingY5szuLpU7HNwZq96d9gMZ=aKYmZZyNdF_4DE AT mail DOT gmail DOT com> <AANLkTiniLzrJm55EZdve01mJ4Qa8KfHT4D1TugSvh1+E AT mail DOT gmail DOT com>
In-Reply-To: <AANLkTiniLzrJm55EZdve01mJ4Qa8KfHT4D1TugSvh1+E@mail.gmail.com>
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/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

On 3/3/2011 3:10 AM, anctop wrote:
> Thank you very much for your info, it now works.
> 
> Just for curiosity :
> 1. The files in "/usr/share/terminfo/c" are identical to those in
> "/usr/share/terminfo/63", but the former one does not work. What're
> their differences ?

The files in /usr/share/terminfo/<single letter>/ are used by
applications that link against the cygncurses-8.dll or older (e.g.
ncurses-5.5-10 or older). They were compiled using what is now called
'tic0.exe' (and old version of the 'tic' program) and distributed as
part of the terminfo0 and terminfo0-extra packages.

The files in /usr/share/terminfo/<2 digit hex code>/ are used by
applications that link against newer versions of ncurses AND ncursesw
(5.7-1 or newer) -- that is, cygncurses-9.dll or newer.  These files
were compiled by a modern version of the 'tic' program (tic.exe) and
distributed as part of the terminfo and terminfo-extra packages.

/usr/share/doc/Cygwin/ncurses.README
/usr/share/doc/Cygwin/terminfo.README
/usr/share/doc/Cygwin/terminfo0.README

provide additional information:
> As contrasted with the backwards-compatible terminfo0 package, in this
> version the database entries are arranged by the two-char hex code of
> the first letter of the entry name, rather than by that first letter
> itself.  The older arrangement can cause problems on case-insensitve
> file systems. That is:
>    old:   r/rxvt    R/Rxvt    (clash!)
>    new:   72/rxvt   52/Rxvt   (no clash)
> Both versions of the database can be installed at the same time. The
> newer structure is used by cygncurses-9.dll and its clients. The older
> structure is used by cygncurses-8.dll and its clients.


> 2. The "less" executable distributed by the GnuWin32 project depends
> only on a single external library "libpcre", is this possible with
> cygwin ?

Anything is possible. Shall cygwin's less.exe be changed in this manner?

I'm not the less maintainer, but I can almost guarantee the answer is "No."

GnuWin32 distributes native win32 ports.  Cygwin distributes (mostly)
cygwin ports, and (almost) all binaries distributed by cygwin will
depend on the cygwin runtime dll, as a minimum.

Furthermore, cygwin attempts to provide as close to a POSIX or Linux
"experience" as possible -- e.g. all the bells and whistles, including
i18n (and now, native language/code page/encoding) support, extended
terminal handling support, etc.  GnuWin32 is willing to accept somewhat
limited functionality in return for "it just kinda works without a lot
of extra dependencies".

Hence, their less.exe has only a single dep for regular expression
support...but little in the way of terminal handling, highlighting,
color, switch-to-$EDITOR, alternate screen...

=====
However, all of this rather avoids the central question: WHY are you
trying to do all this?

You're jumping thru hoops to create a "mini" cygwin distribution that
(a) is "installed" using some unsupported method -- e.g. not setup.exe
(b) is missing some integral elements -- like the terminfo database, and
(c) doesn't really provide anything OTHER than what a standard 'Base'
cygwin installation installs, except for
(d) an exciting probability that it will be both broken, and break any
existing, working, cygwin installation your users have already installed.

This, to me, does not seem to be the path of wisdom.

Why don't you instead simply do this:

1) download setup.exe
2) run it to install a minimal cygwin instance (it's called the 'Base'
installation because if you try to strip anything MORE from it, you get
a broken install.  As you have discovered the hard way).
   setup.exe --root 'C:/my-custom-cygwin' --categories 'Base' --no-shortcuts

The end.  You can even bundle it with a pre-populated tree of .tar.bz2
(AND -src.tar.bz2 !!!!!) packages, use the --local-install or
--local-package-dir options, and your users won't even need network
access.  There are some tricks here, so if this is of interest start a
new thread and ask about it.


Now, if you want something even smaller, with only a limited collection
of unix utilities but without cygwin's full POSIX environment...perhaps
you shouldn't be looking at cygwin at all.  Maybe you should just use
http://gnuwin32.sourceforge.net/ itself, or
http://unxutils.sourceforge.net/ ?


--
Chuck

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


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