← Back to team overview

kicad-developers team mailing list archive

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

 

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.















Follow ups

References