Mail Archives: djgpp/1998/08/28/22:15:34
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 -