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 / 11154
11153  |  11155
Subject: 
Re: Library search paths.
Newsgroups: 
lugnet.cad.dev
Date: 
Sat, 23 Apr 2011 16:35:16 GMT
Viewed: 
20516 times
  
In lugnet.cad.dev, Don Heyse wrote:
In lugnet.cad.dev, Timothy Gould wrote:
In lugnet.cad.dev, Roland Melkert wrote: • <snip>
So how 'weird' would it be to include the root ldraw dir in search paths by
default, so it becomes (on my system)

C:\Program Files (x86)\ldraw\parts\
C:\Program Files (x86)\ldraw\p\
C:\Program Files (x86)\ldraw\

Anyone think that's a bad idea?

Well those directories are often write-protected and given other sorts of
restrictions. A better place would be {USER}\Documents\ldraw.

I don't think you should use the normal search strategy (enhanced or not)
for ldconfig.ldr because it's a special case.  It's got global scope, and
it's not referenced by name in your ldraw files.  Tim's on the right track.
A good strategy would be to look for more personalized versions first.
Something like:

  1. The directory containing the main ldraw file.
  2. {USER}\Documents\ldraw
  3. LDRAWDIR

I think maybe Lars posted some code for this eons ago, and perhaps that
code made it's way into ldview?

  http://sourceforge.net/projects/ldrawini/

Enjoy,

Don

Lars' project looks interesting but my generic LDraw search handling code is all
done. I'm only looking for a way to get the 'default out of the box' colors in
place upon first start. The user can change that of course but it would be nice
if the color definitions are 'plug able' much like normal LDraw files in means
of non absolute paths.

I could also just use the main library's ldconfig.ldr as a starting point and
let the user (optionally) change replace that with some other absolute file name
in the configuration dialog.

But it would be nice to keep the whole application portable by only needing the
LDraw library(ies) or additional location(s) as absolute paths.

Lars' project also looks interesting as a means of getting the location of the
main LDraw library upon first start, I usually do a 'known places' search my
self (eg C:\ldraw, c:\program files\ldraw, <user>ldraw)

Roland



Message has 1 Reply:
  Re: Library search paths.
 
(...) I would personally advise against it, but can't give a real justification for this recommendation other than the fact that it's non-standard. (...) The spec is very specific about ldconfig.ldr being in the main LDraw directory. LDView (...) (14 years ago, 26-Apr-11, to lugnet.cad.dev)

Message is in Reply To:
  Re: Library search paths.
 
(...) I don't think you should use the normal search strategy (enhanced or not) for ldconfig.ldr because it's a special case. It's got global scope, and it's not referenced by name in your ldraw files. Tim's on the right track. A good strategy would (...) (14 years ago, 23-Apr-11, to lugnet.cad.dev)

5 Messages in This Thread:

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