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: Practical method for automatic Cygwin install?


On Wed, 23 Nov 2005, Christopher Faylor wrote:

> On Tue, Nov 22, 2005 at 09:51:56PM -0600, William J. Leslie wrote:
> >Note: I am rephrasing the question I asked last time (for which the
> >conversation drifted into GPL and licensing issues).
> >
> >My program depends on cygwin DLLs, my installer must make sure these
> >dependencies are satisfied.  I've heard that installing private copies of
> >cygwin DLLs can lead to version mismatches. Instead of installing private
> >copies of the cygwin DLLs, my installer will install a complete (but minimal)
> >cygwin installation to c:\cygwin.
> >
> >There are a few issues that I am not sure how to deal with:
> >
> >1) How to determine whether or not cygwin is already installed? If so, what
> >is the prefix path (e.g. c:\cygwin)?
>
> Right now, the only way to do it is to query the registry.  I think I'm
> convinced that cygwin will always need to add something to the registry
> so the concept of querying the registry to find out if cygwin is
> installed should be useful for the foreseeable future, even if the
> location to query might change (and what a hue and cry there will be if
> it does change).
>
> It is possible to copy the cygwin DLL to a system and just have it work,
> though, so what I would do is:
>
> 0) Look at the current installer to see how it does things.
>
> 1) Try running "mount --version" to see if it is the cygwin version.
> If it succeeds and the word "cygwin" shows up in the output, then cygwin
> is installed. This assumes that mount is in the path.
>
> 2) Look in the registry (in the currently used location) for the cygwin
> root directory.  See if the bin directory under this location contains
> cygwin1.dll.  If it succeeds, then cygwin is installed.

Or you could look at how setup.exe/cygcheck does it and help extract the
mount code into a library that could be linked into other apps.

> >2) If cygwin is already installed, what optional packages are present?
> >What versions?
>
> Use the same method as the current setup (and cygcheck) to determine
> what packages are installed.
>
> >3) If cygwin is NOT installed, how do we install it, without setup.exe
> >prompts?  (I have a gut feeling that it's a bit more complicated than
> >just untarring packages.)
>
> It's not a lot more complicated than that.  You have to get dependencies
> right and you have to deal with post install scripts.

And you have to make sure that whatever non-Cygwin application/library you
use to untar packages understands and can create Cygwin symlinks and hard
links (optional, copies would work just as well).

> >4) If cygwin is installed, but some optional packages need version
> >upgrades, how do we accomplish that?
>
> As Gary said in another message, it sounds like the best way to
> accomplish what you want is to augment setup.exe and make sure that your
> changes show up in the official version.  You contribute to setup.exe
> via the cygwin-apps mailing list.  Maybe you might want to peruse the
> archives of that mailing list to see how that happens.

Another thing that I don't recall mentioned in this thread is that
setup.exe has an unattended mode (which is not scriptable, but that could
be alleviated with custom setup.ini files).  The GUI will still pop up,
but user interaction isn't really necessary.
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

If there's any real truth it's that the entire multidimensional infinity
of the Universe is almost certainly being run by a bunch of maniacs. /DA

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


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