This is the mail archive of the cygwin@cygwin.com 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]

RE: CYGWIN1.DLL



# If I install a cygwin1.dll with my program, where should I install it?
# obviously in some directory that is in the *standard* path for windows

That is not obvious.

If Cygwin itself installs cygwin1.dll, it could reasonably put
it in a public place like that (although what it does instead is
at least as reasonable), but if you distribute cygwin1.dll with 
something else, the most probably place to put it is in the
directory where you install your program.  This does not solve
all of the potential problems, but it solves a couple of them:

1.  You will not accidentally overwrite the dll that Cygwin
    installed (with potentially a different version), thus
    trashing the Cygwin installation (if there is one).  A
    Cygwin upgrade will also not impact your app directly,
    in terms of files installed on the drive.  (What's in
    memory at any given time is another matter.)

2.  If the user uninstalls Cygwin, but keeps your app, it
    will still work.

3.  Since your copy of the DLL is with your app, the user
    at least knows what's what.  This is lost on clueless
    users but important for advanced users trying to track
    down conflicts.

4.  If your app's install directory is customiseable,
    users can install multiple versions of your app,
    provided they don't try to execute them simultaneously.

The problem you do NOT solve by this is that if the
user tries to run your app and some other Cygwin app
at the same time there can be problems in RAM, at
runtime.  Order might matter, and other oddities.

# So if I install my program AFTER cygwin, I got two cygwin1.dll and if I
# install cygwin after my program I got only one, but my program probably no
# longer run...

The above solves this, too.  

The unsolved problem is that it is not safe to run your 
program and another Cygwin program at the same time in
arbitrary order, unless care is taken to synchronise 
versions at every upgrade.  Welcome to the DLL Gaza.

# The only satisfying solution I've found personally is 
# delivering a reduced (ought to be minimal but is not) 
# cygwin install with my program (on the same CDROM).

Simply *requiring* cygwin (and saying "you need at least
versions such-and-such) is an option that seems to solve
most of the problems; you could include a Cygwin install
that will work for those who don't have it, but keep it
optional so that any who *have* Cygwin can skip it.

If the Cygwin DLL is fully backward-compatible, I 
think this solves pretty near all the problems.  
I think.  Probably.  Unless I'm missing something.

-- 
Your font seems to be:    proportional     fixed
                                             ^
                                             |

(Fontmeter only accurate for about 90% of fonts.)

--
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/


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