Subject:
|
Re: LDRAWPREDIRS LDRAWPOSTDIRS - additional search paths
|
Newsgroups:
|
lugnet.cad.dev
|
Date:
|
Wed, 18 Feb 2004 15:17:11 GMT
|
Viewed:
|
5388 times
|
| |
| |
In lugnet.cad.dev, Travis Cobbs wrote:
> In lugnet.cad.dev, Lars C. Hassing wrote:
> > Right. In case the variable gets too long we can resort to multiple variables:
> > [LDraw]
> > BaseDirectory=C:\LDraw
> > LgeoDirectory=C:\L2P
> > LdrawSearch01=<HIDE>C:\LDrawXtra\MyPrims\In Work
> > LdrawSearch02=C:\LDrawXtra\MyParts\In Work
> > LdrawSearch03=<MODELDIR>
> > LdrawSearch04=<HIDE><LDRAWDIR>\BFC\P
> > LdrawSearch05=<HIDE><LDRAWDIR>\BFC\PARTS
> > LdrawSearch06=<HIDE><LDRAWDIR>\P
> > LdrawSearch07=<LDRAWDIR>\PARTS
> > LdrawSearch08=<LDRAWDIR>\MODELS
> > LdrawSearch09=<LDRAWDIR>\MODELS\TEST
> > LdrawSearch10=C:\LDrawXtra\MyParts\Done
> > LdrawSearch11=\\127.0.0.1\freedrive\public\ldraw\parts
> > LdrawSearch12=<HIDE>/tmp/ldraw-temp-parts/
> >
> > and this goes for environment variables too: LDRAWSEARCH01, LDRAWSEARCH02, ...
> In DOS/Windows the problem with environment space is (I believe)
> more a problem of limited total environment space. I don't think
> there's additional limitations on individual variables. So using
> multiple environment variables might conceivably make things worse.
ME and the NT variants store the environment in the registry so
this would only make things worse for 95 and 98. That said, I'd
still prefer to keep things short for the environment version of
this. One variable, with as many shortcuts as possible to limit
the size. If you need more, you should be using the ini file or
some other platform specific solution. The example above uses
less than 500 chars, even with all the LdrawSearchNN text, and
with only one variable, it uses less than 300 chars:
LdrawSearch="<HIDE>file://C:\LDrawXtra\MyPrims\In Work|
file://C:\LDrawXtra\MyParts\In Work|
<MODELDIR>|<HIDE>BFC\P|<HIDE>BFC\PARTS|
<HIDE>P|PARTS|MODELS|MODELS\TEST|file://C:\LDrawXtra\MyParts\Done|
file://127.0.0.1/freedrive/public/ldraw/parts|
<HIDE>file:///tmp/ldraw-temp-parts"
> Also, while I like the above (and it's very similar to the data I
> store in the registry for LDView), I think we need to keep in mind
> here that Michael already has the parsing working for the format he
> created. Consequently, unless we have some pressing reason, I don't
> think it would be right to come up with a different format that
> produces the same results as his format.
> Unless we have some reason to find his format unacceptable, I think
> we should only modify it by allowing absolute paths, moving the data
> into ldraw.ini instead of MLCad.ini, and checking the user's home
> directory, then the windows directory, for ldraw.ini. His comments
> so far seem to indicate that that would be his preference.
Whatever we end up with in the ini file, I'm still going to check
the environment first.
Ok, so let's look at Michael's .ini file format.
[LDRAW_SEARCH]
HIDE "C:\LDrawXtra\MyPrims\In Work"
SHOW "C:\LDrawXtra\MyParts\In Work"
SHOW MODELDIR
HIDE BFC\P
HIDE BFC\PARTS
HIDE P
SHOW PARTS
SHOW MODELS
SHOW MODELS\TEST
SHOW C:\LDrawXtra\MyParts\Done
SHOW \\127.0.0.1\freedrive\public\ldraw\parts
HIDE /tmp/ldraw-temp-parts/
I like the idea of defaulting to relative paths off of <LDRAWDIR>, but
Lars has a point. I'd like an easy, platform independent way of
quickly identifying an absolute path. What about using a URL for
absolute paths? eg. "file://wherever/the/path/is". This might come
in handy later for files available via http or ftp.
I think I still like <MODELDIR> over MODELDIR since it's not relative
to <LDRAWDIR>. However, I might even go for "." instead of <MODELDIR>
because it's so concise.
The only other problem I have with Michael's format is that it's not
in "key=value" format. Maybe that's just because I don't do enough
Windows programming. I know GetPrivateProfileString() works with
[section]
key=value
formatted entries. Can someone point out the windows function to
parse the MLCAD style entries?
Don
|
|
Message has 1 Reply: | | Re: LDRAWPREDIRS LDRAWPOSTDIRS - additional search paths
|
| "Don Heyse" <dheyse@hotmail.spam....away.com> schrieb im Newsbeitrag news:HtAD4n.BCJ@lugnet.com... <SNIP> (...) <SNIP> (...) FILE:// style is fully machine dependend as well, so there is no need to put file in front, but I'm open to additionaly (...) (21 years ago, 18-Feb-04, to lugnet.cad.dev)
|
Message is in Reply To:
| | Re: LDRAWPREDIRS LDRAWPOSTDIRS - additional search paths
|
| (...) In DOS/Windows the problem with environment space is (I believe) more a problem of limited total environment space. I don't think there's additional limitations on individual variables. So using multiple environment variables might conceivably (...) (21 years ago, 18-Feb-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
|
|
|
|