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