Mail Archives: cygwin/2005/04/13/23:59:50
Ross Crawford wrote:
>
> I'm pretty new to Cygwin, and I've created a program (using gcc) that I want
> to distribute to people who may not have Cygwin installed. What files do I
> need to provide so they can run the program?
That's a complicated question. The best way to do it is to just tell
them to install cygwin with setup.exe and then install your program.
But, for lots of reasons, that's not always realistic to expect.
You can get a basic idea of which DLLs your program requires by just
doing "cygcheck yourapp.exe". But, depending on which library functions
you call, you may need other files, such as timezone
(/usr/share/zoneinfo/*) or termcap (/usr/share/terminfo/*) files. This
will be a problem even if you distribute those files, because on a
system that does not have Cygwin installed, there will be no mounts, and
so the program will have no idea where "/usr/share" is supposed to be.
If you find this to be the case you will have to check for mounts in
your installer and if there are none, add them such that the required
files can be found. But for heaven's sake don't go trashing existing
mounts, if the user already has Cygwin installed.
Then there's the problem of including a cygwin1.dll with your program.
If the user already has Cygwin installed, or has some other binary that
has Cygwin1.dll included with it, you're going to likely cause something
to break by adding yet another cygwin1.dll to the mix. There should
only ever be one single cygwin1.dll in the PATH search list, otherwise
stuff starts breaking. You should at the least check the PATH for
copies of Cygwin1.dll during your install, and if found check the
version. If the version on disk is newer than yours, do not install
your copy. If it's an older version, delete it and install your newer
version in its place. You will probably have to inform the user about
this and offer them the choice to override whatever you choose.
Finally there is the licensing thing. If you link to cygwin1.dll you
must license your program under the GPL or other OSI approved license.
So you'll need to make sure that the source to your app AS WELL AS the
source to cygwin1.dll (and any other GPL libraries that your program is
linked to) is available to anyone you give your binary to. It's not
sufficient to tell them that they can get the source from cygwin.com,
you must provide it yourself on your own site or by other means.
Brian
--
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/
- Raw text -