cvs.gedasymbols.org/archives/browse.cgi   search  
Mail Archives: djgpp/1998/08/28/22:15:34

From: "John M. Aldrich" <fighteer AT cs DOT net>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: How to locate djgpp.env?
Date: Fri, 28 Aug 1998 19:06:26 -0400
Organization: Two pounds of chaos and a pinch of salt.
Lines: 40
Message-ID: <35E737F2.680FE019@cs.net>
References: <Pine DOT SOL DOT 3 DOT 91 DOT 980827121442 DOT 26553B-100000 AT mercury>
NNTP-Posting-Host: ppp206.cs.net
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Goh Yong Kwang wrote:
> 
> I'm planning to write a utility that can help people to modify the
> djgpp.env file.

As stated, this may not be a good idea.  But to answer your other
questions...

> How do I detect whether DJGPP is installed in a user's computer
> *reliably*?

There is no 100% reliable way to do so, except for searching all drives
on a system (a highly unwelcome thing to do for most users).  However,
if DJGPP is set up and running correctly on a system, any DJGPP program
that does not specifically disable loading of the 'djgpp.env' file will
have a variable called "DJDIR" set in its environment space, which
specifies the root DJGPP directory.  Testing for this is the best way to
go.

> Also, how do I locate the djgpp.env file if the user has not set the DJGPP
> environment variable to indicate djgpp.env's location? (This may sound
> silly since most people installs DJGPP in \DJGPP directory and the file
> can be found there but there is also a minority who has installed DJGPP
> in some other unusual location on their hard disk.) :)

I wouldn't try.  If the user's installation is broken, your program
should at _best_ recommend a fix, but I wouldn't even have it try to
make any changes unless the basics are working.  If a user can't get
DJGPP installed properly, the very last thing he or she should be doing
is fooling with 'djgpp.env'.

-- 
John M. Aldrich, aka Fighteer I <fighteer AT cs DOT net>  UIN# 7406319

-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCS d- s+:- a-->? C++>$ U@>++$ p>+ L>++ E>++ W++ N++ o+>++ K? w(---)
O- M-- V? PS+ PE Y+ PGP- t+(-) 5- X- R+(++) tv+() b+++ DI++ D++ G>++
e(*)>++++ h!() !r !y+()
------END GEEK CODE BLOCK------

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019