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 / 9528
9527  |  9529
Subject: 
Re: LDRAWPREDIRS LDRAWPOSTDIRS - additional search paths
Newsgroups: 
lugnet.cad.dev
Date: 
Thu, 26 Feb 2004 14:24:07 GMT
Viewed: 
5775 times
  
In lugnet.cad.dev, Lars C. Hassing wrote:
In lugnet.cad.dev, Don Heyse wrote:
In lugnet.cad.dev, Travis Cobbs wrote:
In lugnet.cad.dev, Michael Lachmann wrote:
Good idea, so how about

[LDRAW_SEARCH]
1=SHOW    <MODELDIR>
2=HIDE       <LDRAWDIR>P
3=SHOW    <LDRAWDIR>Parts
4=SHOW    <LDRAWDIR>Models
.
.
.
20=SHOW "C:\A special path with blanks"

Keywords <MODELDIR> ... actual directory where the project/file is located
<LDRAWDIR> ... what it tells us
and finaly paths starting with anything different from "<" as beeing
absolute paths as beeing designed for the operating system

I think two keywords for predefined paths should be enough.

It looks good to me.

Me too. I think it is a good idea with a separate section for the
search directories, it allows shorter keys than suggested in
http://news.lugnet.com/cad/dev/?n=9510 However, I suggest section
name [LDrawSearch] which is more in line with [LDraw].

I also considered suggesting [LDrawSearch] but I held back and went
with the "me too".  I do like [LDrawSearch] better though.

It works for me too.  So we should check the user's home directory
for an ldraw.ini file containing an [LDRAW_SEARCH] section, then if not
found look in the ldraw.ini file in Windows directory.

Yes, first %USERPROFILE%\LDraw.ini, then %WINDIR%\LDraw.ini.
Perhaps we should add the possibility of an LDRAWINI env variable,
this could prove useful, both for temporarily using another setting,
and also on non-windows platforms.

In e.g. Linux, should we read $HOME/LDraw.ini ?  MacOSX ?

Sure, but use lowercase ldraw.ini please!  I'm too lazy to remember to use
the shift key on a case sensitive filesystem.

For myself, because of platform portability considerations, I'll still
check the environment variable LDRAW_SEARCH before looking for an
ldraw.ini file.  I'll separate the entries in the environment variable
with the "|" character.

Me too.
First LDRAWSEARCH01, LDRAWSEARCH02, ...
Next LDRAWSEARCH separated with '|'.

I can live with that.

However, I'm undecided whether to require a HIDE or SHOW tag, or
use only <HIDE> and make SHOW the default.  Will anyone else be
using the environment variable, and if so do you have a preference?

I suggest <HIDE> and <SHOW> as prefixes, <SHOW> as default if none
specified.  Using < > may become useful later for other flags.  If
your program doesn't understand the tag <xxx> then it can simply
ignore it.  Flags as <PARTS> and <PRIMITIVES> could be used for
classifying any file in a given directory not having an "official"
file type header.  (classifying is important, at least to L3P, for
determining e.g. when to use seams)

Yes, I agree with the <> for all tags, and ignore tags you don't
recognize.  I wanted to suggest this for the ldraw.ini file, but once
again I chickened out.  Think about it, flagging a directory as
<PARTS> also helps identify and count things for a parts list.

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

As far as I can tell, that's correct.

Also I suggest a \ after <LDRAWDIR>: "2=<HIDE><LDRAWDIR>\P"
Unix platform should of course convert to /.

I disagree with this one.  It should be implicit in the <LDRAWDIR> and
<MODELDIR> tags.  This way we can define all the current default search
paths without any platform dependent characters.

<MODELDIR>
<LDRAWDIR>P
<LDRAWDIR>PARTS
<LDRAWDIR>MODELS

In the week end I plan to write a small library (in C) for reading
the env vars and LDraw.ini's to set up the directories. I'll also
write an LDrawSetup application with a GUI for editing LDraw.ini.
All open source, if you want to save the effort yourself.

That sounds wonderful.  There is source for getprivateprofilestring()
writeprivateprofilestring() replacement functions here, if it helps.

  http://www.kargs.net/software.html

You must have peeked at the ldglite todo list.  If not, here's the
entry I'm talking about.  It has a few extra ideas for your GUI if
you get really motivated.  I love the idea about making an LDDP
plugin wrapper for the GUI, then it can be used seamlessly by LDDP,
ldglite, and anyone else supporting LDDP style plugins.

Don

----------------------

Make some way to register ldglite since win2k and winXP do not allow
creation of new MIME types via explorer.  Either do something like
ldglite -reg or distribute a ldglite.reg file with instructions on how
to set the directory path of the executable.

Oh, Oh, I know.  This could be a plugin.  The registerme plugin.
That way I can distribute it with the windows binary only, and it'll
already know what directory the executable is installed in.  And it
should also know the name of the executable to register.  However it
should provide a GUI to change it, and add command line arguments.
This could get really fancy and incorporate the ldrawinfotip DLL and
registry settings.  Would this be useful to the lddp folks?

Hmm, maybe it could also create or add the ldraw.ini setting for
the LDRAWDIR if it can't find it.



Message has 1 Reply:
  Re: LDRAWPREDIRS LDRAWPOSTDIRS - additional search paths
 
(...) OK. (...) But you don't declare LDRAWDIR as C:\LDraw\, i.e. with a trailing backslash. We also use %WINDIR%\ldraw.ini and not %WINDIR%ldraw.ini. I think most variable substitution in any (script) language uses explicit delimiters in stead of (...) (21 years ago, 26-Feb-04, to lugnet.cad.dev)

Message is in Reply To:
  Re: LDRAWPREDIRS LDRAWPOSTDIRS - additional search paths
 
(...) Me too. I think it is a good idea with a separate section for the search directories, it allows shorter keys than suggested in (URL) I suggest section name [LDrawSearch] which is more in line with [LDraw]. (...) Yes, first (...) (21 years ago, 25-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
    

Custom Search

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