← Back to team overview

kicad-developers team mailing list archive

Re: Mac OSX build, with scripting, codename "wife"


That looks quite much to the wrapping I had to do in MacOX to avoid static linking, 
where it's uncommon for normal users to put new libraries in the system paths:

I rename pcbnew to pcbnew.bin and put the loader as "pcbnew", same for all the other apps,
it just builds a pointer to the libraries, the python path, and kicad stock libraries, and then
boots the app itself.


# this is script wraps the original binary application, 
# and sets the library paths just before launching

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

export KICAD_APP=$DIR/../../../kicad.app
export KICAD_DATA=$DIR/../../../data

# let the apps find the libraries at startup

# let python scripting find our modules
export PYTHONPATH=$KICAD_APP/Contents/Frameworks/python2.7/site-packages/:$PYTHONPATH


$DIR/`basename $0`.bin $*

Miguel Angel Ajo
skype: ajoajoajo

On 11/03/2013, at 15:33, Dick Hollenbeck <dick@xxxxxxxxxxx> wrote:

> For the 4th time, yes.  And it would not bother me at all to be
> different from a decade of other python users, but like blender users.
> I am happy to be different, when I know I am helping myself.
> Maintaining a distinction between two categories of kicad python
> modules is a low priority to me.
> For linux users, the installer can set PYTHONPATH on the commandline,
> and this can be done in a desktop launcher (icon or menu):
> $ PYTHONPATH=<writeable-convenient-dir>:$PATHONPATH  pcbnew
> $ PYTHONPATH=<writeable-convenient-dir>:$PATHONPATH  kicad
> I believe these settings would last as long as the program is running,
> only.  Which is about what we want.
> Might need to to put sh in front of that.

Follow ups