This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: distributing executables for windows


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]