Subject:
|
Re: LDRAWPREDIRS LDRAWPOSTDIRS - additional search paths
|
Newsgroups:
|
lugnet.cad.dev, lugnet.cad.dev.mac
|
Date:
|
Mon, 1 Mar 2004 23:03:15 GMT
|
Viewed:
|
5733 times
|
| |
| |
Where to store the preferences?
While I've been aware of this thread, I haven't actually been following it, so
correct me if I've got the wrong end of the stick.
> Ok now as Travis pointed out, we still need to find the LDRAWDIR
> directory. We also need environment variables to find the other
> places ldraw.ini (or .ldrawrc) could reside; the WINDIR, USERPROFILE,
> and HOME directories. So we can't completely abandon environment
> variables. However there are there are reasons like java and macos9
> why we might want to limit their use.
MacOS 9 and earlier is a single user environment and it was easy to place (and
therefore find) any environment variables in the "Preferences" directory.
However, with the migration to MacOS X the rules changed and there is both a
main "System" directory as well as seperate user directories.
As far as I can tell this discussion relates to what information should be
stored in the "System" directory so that all compatable applications can
automatically access a series of global variables such as the location of the
LDRAW directory.
As James has indicated, under MacOS X to make changes to the system directory
the user has to have administration priveleges, this means that the proposed
.ini file would need to static once installed.
With my "full install" version of MBC, I include the LDRAW directory which my
installer then loads into the "System" directory. With this approach, any user
has access the LDRAW files and more importantly, updates made by the
administrator will be automatically available to all users. Likewise, casual
users cannot mess with the LDRAW directory or it's files.
However this does have two distinct disadvantages - uninstalling MBC under this
approach requires more than just dragging the application to the trash (not very
Mac-like) and only administrators can update the LDRAW directory.
> > Another thing regards the location of the ini file. In past weeks I
> > got several questions regarding the central installation of LDraw
> > and MLCad, where universities and schools are trying to install
> > everything on a server, read-only for the user. Users should either
> > not have the possiblity to change configs ore should be restricted
> > somehow.
>
> > So my suggestion is to have one ini file in the ldraw directory
> > itself, and another one optionally in the users home directory.
In the users home directory, I (or actually MacOS X) stores the .plist file
containing my applications settings. At present, this includes MBC specific
settings as well as the location of the LDRAW directory.
Personally I favor having each user store ther own configs seperately. Also
consider something else, under MacOS X the system itself stores information in
the users .plist file that even the programmer may not be aware of. For example,
if I look in the MBC .plist file there are window location details that I don't
put there, likewise when I activated the "Open recent" command, MacOS X then
uses MBC's .plist file to store this info. So at least under MacOS X, it must be
considered that any preferences file may be altered without the programmers or
users knowledge.
> I think we need to allow for an ldraw.ini in the Windows directory
> for backwards compatibliity with old programs and older single user
> Windows systems, but it should be the last place searched. Ie.
> search HOME, LDRAWDIR, and then Windows. Also, you may want to do
> a different search for the LDRAWDIR. First look in the environment,
> then the HOME directory, then the WINDOWS directory. On unix/MacOsX
> could we substitute /etc for the Windows directory?
>
> Andrew, it'd be nice if an active Mac developer spoke up on this.
>
> Finally, if we start putting ldraw.ini in the LDRAWDIR, how do we
> decide what belongs in ldraw.ini and ldconfig.ldr? For instance if we
> go with the <LDRAWDIR>p form (without the slash character), the
> default search paths are platform independent and could conceivably be
> worked into the ldconfig.ldr file.
Personally, I see this as the crux of the issue - what is stored in the
environment file?
If it's static information only such as the location of the LDRAW / LGEO
directories etc, then the main System directory would be OK under MacOS X.
Finally, MBC automatically, first searches the LDRAW directory, the open models'
file directory and then the users directory for files. So for me storing the
location of finding the LDRAW directory isn't as critical as protecting this
directory from unwanted invasions (in the case of puplic or multi user
environments).
Andrew...
|
|
Message is in Reply To:
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
|
|
|
|