kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #12730
Re: Local Variables
On 3/14/2014 5:32 PM, Marco Serantoni wrote:
>
> On 14/mar/2014, at 20:00, Wayne Stambaugh <stambaughw@xxxxxxxxxxx> wrote:
>>>
>>> The idea of keeping Kicad libs in Github is great, but if the
>>> first-time-ever user has to set it up in some system config files or run
>>> bash scripts (think of Windows users!), it will ruin his experience
>>> (sorry for sounding Steve Jobs-ish...). Eagle, DesignSpark and Altium
>>> have libraries working out-of-the box. Why we shouldn't?
>>>
>>> My proposal is add a configuration window (see attachment) that appears
>>> the first time freshly installed Kicad is launched. What do you think of
>>> this approach?
>>
>> Hey Tom,
>>
>> Yes I agree that it should just work and it should. The problem is not
>> in the code AFAICT. The problem appears to be in the location where the
>> default fp_lib_table file is installed on OSX. When either CvPcb or
>> Pcbnew are run for the first time without a define fp_lib_table file in
>> the user's platform dependent home folder, an attempt is made to copy
>> the default fp_lib_table file to the user's home folder. On Linux the
>> default fp_lib_table file is stored in /usr/share/kicad/template and
>> copied to ~/. If the default file cannot be found, then there is no
>> choice but to create an empty fp_lib_table file which is what appears to
>> be happening on OSX. The path(s) searched for the default fp_lib_table
>> are defined in EDA_APP::FindLibraryPath(). If the path that the OSX
>> installer is placing the default fp_lib_table is not in the list of
>> paths, then that is the problem or there is potentially a file
>> permission problem preventing the file from being copied. This used to
>> work fine on both Windows and Linux so if no one changed it, it should
>> still work.
>
>
>
> Wayne the problem is not the code and this is CLEAR.
> The problem is that there isn’t an installer to install programs under OSX, that can be placed by the user anywhere under /Applications directory.
> The other issue is that the /Applications directory is not supposed to guest “support files”, so the combination of the two things doesn’t allow me to hardcode it on FindLibraryPath.
> I’ve also tried to think an arrangement on that, but interacting with Dick on ticket #1267911, i’ve understood with error that EDA_APP is gone, letting me wait Kiway.
> </code>
Where do the KiCad template files get installed on OSX when you install
KiCad using the OSX bundle? That is where the the path should point to
when attempting to copy the default fp_lib_table file to the users home
folder. I would prefer not use EDA_APP::FindLibraryPath() but rather
wxStandardPaths::GetDataDir() with the appropriate subfolders added so
this works out to be:
Windows: path_to_kicad_binary/../share/templates
Linux: prefix/share/kicad/templates
OSX: kicad.app/Contents/SharedSupport/templates
This is valid for windows and linux. Is this not valid for OSX or are
you saying that you cannot copy a file from the application install
folder to the user's home folder? I really am confused because I
thought OSX was essentially BSD which should be posix compliant.
>
> <user_interaction>
> The limit of the previous approach is that the developer/packager choose for the user if use the old libraries or the GitHub approach, not letting the user choose what is better for him.
> Probably the “startup configuration window/wizard” could be a mayor enhancement for the user and solve also the other issue in a single move.
> This was also the spirit that I had when the 31/12/2013 on the ML i’ve asked a button to “fill in” the table starting from the old legacy library path.
>
>
> —
> Marco
>
Follow ups
References