← Back to team overview

kicad-developers team mailing list archive

Re: Re: New coding guidelines.

 

Dick Hollenbeck wrote:
> Manveru wrote:
>> 2009/1/5 Dick Hollenbeck <dick@...>:
>>
>> 
>>> We may have to start getting more specific for this to be a fruitful
>>> discussion. We will have to track down the code that is using these
>>> hard coded paths. And see what facilities are using them, and if they
>>> need to be hard coded.

This will probably be the hardest part.

>>>
>>> I don't have a problem with a single global config file with a hard
>>> coded name being put into a location that can be known ahead of time.
>>> And from that config file other data files should be findable.
>>>
>>> Anyone else have thoughts on this?
>>> 
>> Hard coded file is a nice and clean solution under Linux (f.e.
>> /etc/kicad.conf or /etc/kicad/default.conf or even others). As idea if
>> .ini files were dropped under Windows some time ago, KiCad could be
>> enabled to hold such data in system registry (this would be configured
>> by Installer). This solutions may enable single installation to be
>> configured individually for different users as it is done in plenty
>> commercial software packages.
>>
>> M.
>>
>> 
> 
> I like your idea about the user specific configuration data. That can 
> be done by choosing a user specific, yet still well known, place to 
> store the master config file. This can be done in a platform 
> independent way, i.e. without requiring use of the Windows registry (a 
> registry which has been unnecessary from the day it was conceived).

I second the no registry motion. I always use config files on Windows.
wxWidgets supports config files on Windows. You just have to either
use wxFileConfig directly or the correct constructor parameters when
using wxConfig. Any config file implementation should use
wxStandardPaths for portability. See the wxPython wxStandardPaths demo
for a nice example of how it works. wxPathList looks like it might be a
clean way to handle searching for files in multiple paths although I
have never used it. You can even add paths to wxPathList using an
environment variable with the AddEnvList() method. A logical place to
implement this would seem to be the WinEDA_App class. I'll take a look
at it as time permits.

Wayne
> 
> 
> Jean-Pierre is probably sitting back and saying, but this is almost what 
> we are already doing :>)
> 
> 
> Most likely we just need to pay some new attention to the issue and 
> clean up any deficiencies so the goals of this thread can be 
> fulfilled. I also think some tweaking to the CMakeLists.txt install 
> support need to be done.
> 
> 
> Dick
> 
> 
> 
> ------------------------------------
> 
> Yahoo! Groups Links
> 
> 
> 
> 
>



 




Follow ups

References