← Back to team overview

kicad-developers team mailing list archive

Re: KiCad-OSX Where are the help files supposed to be located?

 

Dick,

That’s a really great explanation of where the files should reside. Thanks again for your invaluable help. I already owe you a lot.

And looking at the code you showed me, I now understand why I have so many problems with OSX builds.

Like you said, I have yet to find a way to set env variables that stick in OS X. I can do it easily when in a shell,
but when launching an app the normal way (using finder and double click in app name), the variables are lost.
maybe I need a wrapper around the apps to set the variables and launch the apps from a shell.

That’s why I also have a hell of a time trying to install the libraries. KISYSMOD and KIGITHUB are never set either.
KIPRJMOD seems to be OK, I am not sure how. Maybe when loading a project and adding a project library will set that.

I am surprised that Marco did not try to take care of that. He told me that he had been working since 2008 to make the OS X build possible.

So if I start to learn the OS X way of kicad today, I might be good in 2017 or 2018. LOL

I created manually the path /Applications/kicad/share/doc/help, and moved all the pdf files there to no avail.
so the OS X build doesn’t even look there.
I might have to adjust the “make” process, and hardcode the various paths corresponding to all those env variables.

My final goal is to build for OS X with just “make” and “sudo make install”. But that’s a long way to go.
I’ll get there eventually.
Meanwhile, I will build for Linux in a VM on my Mac for the projects that I am working on now.


Jean-Paul




On May 9, 2014, at 11:34 PM, Dick Hollenbeck <dick@xxxxxxxxxxx> wrote:

> On 05/09/2014 08:05 PM, Jean-Paul Louis wrote:
>> Marco,
>> 
>> The problem is the same for kicad, eeschema, cvpcb, pcbnew, gerbview, pl_editor
>> 
>> I cannot figure out where to put the pdf files that are called by the “Help” menu.
>> I have tried to put them in the app directory (“/Applications/kicad”). That does not work.
>> I have tried to put them in the app bundle in the resource sub-dir. That does not work either.
>> I looked at the code, and could see the request for the two kicad help files, but no clue about
>> where they should go.
>> 
>> The error message gives the filename, but not the path.
>> 
>> Please help.
>> This might be an OSX only issue.
>> 
>> Jean-Paul
> 
> http://bazaar.launchpad.net/~kicad-product-committers/kicad/product/view/head:/common/searchhelpfilefullpath.cpp#L38
> 
> Jean-Paul,
> 
> The help file wanted is returned by code shown at the above link.  This is in
> common/searchhelpfilepath.cpp, line 38.
> 
> Notice there are a number of possibilities, any of which will succeed.
> 
> Look at lines 57 through 60.  They append a path fragment of "share/doc/kicad/help" to a
> number of possibilities which precede that:
> 
> 1) DEFAULT_INSTALL_PATH, this is equal to your CMAKE_INSTALL_PREFIX setting when you
> invoke CMake.  Line 47.
> 
> 2) The contents of the KICAD environment variable.  Forget that, apparently the Mac does
> not let users set environment variables and live to tell about it.  Line 50.
> 
> So now we have a total of 4 possibilities, two fragment starts times two path fragment
> continuations = 4.  Then there is a 3rd path fragment possibility, and that is the
> language path fragment, that comes in at line 83 and 84.  This multiplies the
> possibilities list by another 9 languages, up to about 36 possible directories or so.
> 
> For linux, a smart user is using scripts/kicad_install.sh and it uses CmakeLists.txt from
> repo kicad-docs to install the help files.  That script may be of interest to you for the
> Mac know how.
> 
> It simply uses "make install" for all 3 repos: src, docs, and libs. From the kicad-docs
> repo, to install the help files.
> 
> The actual install statements are here:
> 
> http://bazaar.launchpad.net/~kicad-developers/kicad/doc/view/head:/doc/help/CMakeLists.txt
> 
> line 1 shows that for English, the English help file will go into the language suffix "en".
> 
> The base directory target of the install, is given by the variable ${KICAD_HELP} on line 5.
> 
> This variable is set here:
> http://bazaar.launchpad.net/~kicad-developers/kicad/doc/view/head:/CMakeLists.txt
> 
> line 20 for linux.  if( UNIX ) means both APPLE and LINUX.  Line 11 & 12 shows that
> KICAD_HELP is never set to a default for APPLE.  That code block is empty.   Moreover,
> that variable may not be set on the command line for APPLE, since it is never declared in
> the CMake script.  So running "make install" result in a questionable result on the Mac.
> 
> You need some statements in that block, between lines 11 and 12 of the kicad-doc repo, top
> level CMakeLists.txt file in order to use the make install feature of that particular repo.
> 
> 
> I am away from my normal computer for a week starting now.  And doing email from my phone
> is no fun.
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> _______________________________________________
> 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



References