To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.cad.devOpen lugnet.cad.dev in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 CAD / Development / 9552
9551  |  9553
Subject: 
Re: LDRAWPREDIRS LDRAWPOSTDIRS - additional search paths
Newsgroups: 
lugnet.cad.dev
Date: 
Wed, 3 Mar 2004 16:03:51 GMT
Viewed: 
5940 times
  
In lugnet.cad.dev, Lars C. Hassing wrote:
The data contained in either environment variables or ini files
should have exactly the same format.

I agree, and prefer <> around all tags.

Quotation marks should not be necessay if we use the < >.

You are right but I still would allow them for the rare case of
blanks at the end of a directory name.

Trailing blanks are preserved in both env var and ini files.
So I still don't think quotation marks are necessary...

Ah, but what about leading blanks.  ;^)  Nevermind, I don't think you
can create an absolute path that starts with leading blanks.

I'm almost done writing the library and the LDrawSetup application.
I want the library to be as simple as possible to use.
Reading the env vars and ini files is platform independent,
only the hunt for ini files goes into #ifdef's.

I think having ldraw.ini in LDRAWDIR is contradictory, the hen and
egg problem.  To keep thing simple I would like to have only *one*
ldraw.ini, and since we're going to have it in
HOME/USERPROFILE/windir anyway to find the LDRAWDIR, I don't see any
reason to spread it out.

The hunt for ldraw.ini could be:
Windows:
%LDRAWINI%
%USERPROFILE%\ldraw.ini
%ALLUSERSPROFILE%\ldraw.ini
%windir%\ldraw.ini

But wait.  The reason given for looking in LDRAWDIR is for a central
networked LDRAW installation at a school.  It'd be nice to have a
default ldraw.ini file at the central location that can be overridden
by one in a users home directory.  This doesn't work for that scenario
because %WINDIR% is on the client PC, not on the server.  However, you
still have the chicken/egg problem because you need an LDRAWDIR
setting somewhere on the client to find the LDRAWDIR on the server.
You can however limit the number of chickens by making LDRAWDIR the
only setting required to be set on the client pc.

Or are you promoting LDRAWINI as the one and only setting required to
be on the client?  Should we depreciate the LDRAWDIR environment
variable since it can be set in the file found by the LDRAWINI hunt?
I don't like this.  I think we can use LDRAWDIR if we're clever.

On windows the envronment variables are global.  You don't get a
personal login script to set your own, so I'd look in USERPROFILE
first.  Now an administrator can set the %LDRAWDIR% variable in the
\\PDC\netlogin\login.bat script for all users on an NT style domain.
That solves the chicken/egg problem for the centralized Windows
scenario and eliminates any need for an LDRAWINI variable.

So, how about this search strategy?

Windows:
%USERPROFILE%\ldraw.ini
%ALLUSERSPROFILE%\ldraw.ini
%LDRAWDIR%\ldraw.ini
%WINDIR%\ldraw.ini

Unix:
$HOME/.ldrawrc
$HOME/ldraw.ini
$LDRAWDIR/ldraw.ini
/etc/ldraw.ini

Mac OS X:
~/Library/Preferences/org.ldraw.plist
/Library/Preferences/org.ldraw.plist
$LDRAWDIR/ldraw.ini  (I'm not sure about this one)

Obviously if you don't have LDRAWDIR set by an environment variable
you'll have to skip the step that looks in the LDRAWDIR.

Enjoy,

Don



Message has 3 Replies:
  Re: LDRAWPREDIRS LDRAWPOSTDIRS - additional search paths
 
(...) Oh yeah. One other thing about an ldraw.ini located on a central server. I'd prefer to leave the client OS up to the user. This reinforces my case for the <LDRAWDIR>parts path format without the nasty OS specific slash character. Enjoy, Don (20 years ago, 3-Mar-04, to lugnet.cad.dev)
  Re: LDRAWPREDIRS LDRAWPOSTDIRS - additional search paths
 
"Don Heyse" <dheyse@hotmail.spam....away.com> schrieb im Newsbeitrag news:Hu0CMF.1Fyv@lugnet.com... (...) Ok, agreed too. So with have <HIDE> and optionally <SHOW> - right? (...) I would still like the quotation marks as an option - not a must. If a (...) (20 years ago, 3-Mar-04, to lugnet.cad.dev)
  Re: LDRAWPREDIRS LDRAWPOSTDIRS - additional search paths
 
(...) No, but leading blanks would be preserved as well... (...) Isn't that what %ALLUSERSPROFILE% is for? (...) LDRAWINI is just an opportunity for quickly temporarily using another specific ldraw.ini file. /Lars (20 years ago, 3-Mar-04, to lugnet.cad.dev)

Message is in Reply To:
  Re: LDRAWPREDIRS LDRAWPOSTDIRS - additional search paths
 
(...) The data contained in either environment variables or ini files should have exactly the same format. (...) Trailing blanks are preserved in both env var and ini files. So I still don't think quotation marks are necessary... (...) I didn't mean (...) (20 years ago, 3-Mar-04, to lugnet.cad.dev)

132 Messages in This Thread:
(Inline display suppressed due to large size. Click Dots below to view.)
Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR