← Back to team overview

kicad-developers team mailing list archive

Re: eeschema Preferences

 

On 2/24/2015 10:38 AM, Bernhard Stegmaier wrote:
> OK... :)
> 
> I'll try at least to figure out what to change at minimum so that a
> default kicad.pro is created in the kicad preferences folder (instead of
> the "eeschema Preferences" file somewhere else).
> As far as I understood the code this could be the intention - and it
> IMHO would be somewhat similar to what global fp-lib-table in
> preferences folder is for pcbnew.

The .pro file belongs in the path for each project.  It should not
contain system specific paths.  It is created when you create a new
project and contains the project specific settings.  There is no way to
save symbol library paths in the Eeschema application settings at this time.

> 
> I won't touch the search-stack stuff, I promise... :)
> The folders listed as search paths seem to be correct (at least on OSX).
> I think the only thing that is missing is to give config
> load/save/create methods a meaningful default filename/path (=> kicad.pro).
> I'm not sure yet, but it could be a relatively small change (less than
> 10 places where those methods are used in eeschema).

If you need to add a proper path for OSX, this is the best place to add
it for now.  There is a conditional compile section for OSX already in
there.  If you add it somewhere else, you will have to remember to
remove it once the new file format code complete since it wont be needed.

> 
> 
> Regards,
> Bernhard
> 
> On 2015-02-24 16:05, Wayne Stambaugh wrote:
>> On 2/23/2015 5:10 PM, Bernhard Stegmaier wrote:
>>> Hi all,
>>>
>>> I am trying to understand how eeschema gets its preferences (i.e.,
>>> libraries and library path) on a completely fresh machine that has
>>> never seen KiCad before.
>>
>> Me too!  If you figure it out please let me know :)
>>
>> All kidding aside, this is one of the problems that will be fixed after
>> the stable release.  By default Eeschema attempts to create a search
>> path list based on the current path of the executable along with some
>> other platform dependent "typical" paths and the $KICAD environment
>> variable.  This code lives in common/systemdirsappend.cpp.  The easiest
>> way to determine these paths is to run Eeschema directly without opening
>> a schematic and open the library configuration dialog.  The paths listed
>> in the current search path list are the default paths determined at run
>> time.  When you add paths in the user defined search path, they are save
>> in the project (.pro) file.  Yes, it's ugly and will go away once the
>> new schematic file and symbol library code is written.
>>
>>>
>>> From the code, I guess it should find a kicad.pro in the default
>>> search paths eeschema still uses and shall copy it to some location
>>> (common/project.cpp, PROJECT::configCreate):
>>>     ...
>>>     // No suitable pro file was found, either does not exist, or not
>>> readable.
>>>     // Use the template kicad.pro file.  Find it by using caller's
>>> SEARCH_STACK.
>>>     copy_pro_file_template( aSList, cur_pro_fn );
>>>     …
>>> If I am right then cur_pro_fn is always an empty string (default
>>> parameter from definition), so copy_pro_file_template just does nothing.
>>> Then, some default wxFileConfig seems to be created.
>>>
>>> If I start eeschema on a fresh OS X and add some libraries it seems
>>> to creates a file
>>>   ~/Library/Preferences/eeschema Preferences
>>> which looks like a kicad.pro file and has the usual stuff in it (with
>>> the added libraries).
>>> I don’t know who sets this name “eeschema Preferences”.
>>> I didn’t find anything in KiCad and assume it is done by wxWidgets
>>> wxFileConfig.
>>>
>>> First, it is bad that this “eeschema Preferences” file is not in
>>> ~/Library/Preferences/kicad where all other KiCad configs are.
>>> Second, with my previous installs some kicad.pro file was used, which
>>> now doesn’t work any longer (I tried putting it in various paths of
>>> the search stack).
>>>
>>> So, how is initial eeschema preferences supposed to be created and
>>> where?
>>> I haven’t set any environment variables for KiCad.
>>>
>>>
>>> Regards,
>>> Bernhard
>>>
>>>
>>>
>>> _______________________________________________
>>> Mailing list: https://launchpad.net/~kicad-developers
>>> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
>>> Unsubscribe : https://launchpad.net/~kicad-developers
>>> More help   : https://help.launchpad.net/ListHelp
>>>
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~kicad-developers
>> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~kicad-developers
>> More help   : https://help.launchpad.net/ListHelp
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp


Follow ups

References