This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Re: Determining the location of a cygwin installation
On Wednesday 26 Mar 2003 18:56, Christopher Faylor wrote:
> >> I need to determine the location of an existing Cygwin net
> >> installation programatically.
>
> On Wed, Mar 26, 2003 at 06:45:42PM -0000, John Morrison wrote:
> >cygpath -w -p /
>
> That's the only sure-fire way to work since there is no guarantee that
> the registry items will be around forever. In fact, I guarantee that
> they won't be.
>
> If you are talking about writing an actual cygwin-linked c program rather
> than a script then you'd use the cygwin_conv_to_full_win32_path call
Both these approaches assume that the script or executable knows where /bin
is already, either to add to the PATH so that cygwin1.dll is found or to
invoke the cygpath tool.
It would be useful for the net installer to create a registry item which
specified the location of the most recent Cygwin installation. This would
allow those GUI applications which are _not_ typically invoked from a
Cygwin shell prompt to locate Cygwin tools. It would also allow Cygwin
application installers to create desktop shortcuts which specify the Cygwin
/bin directory as the application working directory such that cygwin1.dll
can be located when the application is invoked. Is there any reason why the
generation of such an a 'Cygwin installation path' registry entry should
not be added to the Cygwin net installer?
John Dallaway
--
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/