freeride-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [FR-devel] user config files, pathing, etc.


From: Richard Kilmer
Subject: Re: [FR-devel] user config files, pathing, etc.
Date: Thu, 2 Jan 2003 16:30:12 -0500

I went ahead an made this change.

Let me know how it works on Linux...it should work fine.

I also added the method: base_user_path (in addition to the base_path) method on a @plugin.plugin_configuration. This allows one to get the directory that a plugin was loaded from (base_path) and a place to write stuff to (base_user_path). If base_user_path is nil, a plugin writer can still use base_path (as now), but potential for the same permission errors as before.

Now, since all plugin property files, etc are written to USERPROFILE/freeride or ~/.freeride it is a simple deletion of that directory to reset the state of your FreeRIDE system to the defaults.

Best,

-rich

On Thursday, January 2, 2003, at 10:42 AM, Richard Kilmer wrote:

Hey all,

I ran into a funny problem with the way that properties files are persisted right now into the local USERPROFILE/HOME dir. I added a path to an additional directory to contain plugins (via the config/properties.yaml file). The path I defined was relative (../../somepath) and what was amusing was the way that the properties are persisted it created a directory structure in the USERPROFILE/../../somepath (which is BAD). Anyway, the way in which the current config files are stored was straightforward to implement, but I think leads to potential (or in my case real) problems. I am reviewing the current strategy, and my recommended change is that we change the user_filename to just keep the @@userdir and the deepest dir in the filespec so:

./plugins/rubyide_gui/appframe.yaml
is converted to
USERPROFILE/freeride/rubyide_gui/appframe.yaml
or on linux
HOME/.freeride/rubyide_gui/appframe.yaml

and

../../myotherplugins/test_plugin/properties.yaml
is converted to
USERPROFILE/rubyide/test_plugin/properties.yaml
or on linux
HOME/.freeride/test_plugin/properties.yaml

in addition, i want to add the ability to have access to a modified path through the plugin class so in a plugin wanted to write misc file out it could call plugin.user_filename(filespec) which would call the properties reader to convert.

Thoughts?

Rich



_______________________________________________
Freeride-devel mailing list
address@hidden
http://mail.nongnu.org/mailman/listinfo/freeride-devel





reply via email to

[Prev in Thread] Current Thread [Next in Thread]