Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Content-Type: text/plain; charset="iso-8859-1" From: John Dallaway Organization: eCosCentric Limited To: cygwin AT cygwin DOT com Subject: Re: Determining the location of a cygwin installation Date: Wed, 26 Mar 2003 20:22:34 +0000 User-Agent: KMail/1.4.3 References: <200303261832 DOT 53052 DOT jld AT ecoscentric DOT com> <20030326185632 DOT GD7391 AT redhat DOT com> In-Reply-To: <20030326185632.GD7391@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-Id: <200303262022.34828.jld@ecoscentric.com> 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/