lp:~metacollin/kicad/osx_distribution

Created by metacollin and last modified

This makes some minor changes to the build system that improves binary-compatibility across a wide number of OS X versions. This makes no changes to building LOCALLY, but instead is intended for situations where one wants to generate a binary .app bundle suitable for public distribution.

Applications that have python scripting Cocoa API elements (like KiCad with python scripting enabled, even if wxPython is in between) must include their own embedded python framework and interpreter for stability and security reasons, and for this reason, Python has been removed entirely from the OS X SDK versions 10.9 and onward.

Additionally, certain PPC specific architecture options have been removed, as the last OS X version to support PPC binaries was 10.4u. This branch can be made to work with as early as 10.6, but in its current form, it only works with 10.7-10.10, as using 10.6 requires some changes that negatively impact later versions.

Usage steps (will be in a script soon enough):

1. Download the Python 2.7.9 source code.
2. Make and install Python 2.7.9 somewhere easy to point KiCad's build system at, make sure MACOSX_DEPLOYMENT_TARGET=10.x environment variable is set. I use 10.7.
3. You should have a Python.framework and bin directory in that folder. cd to Python.framework/Versions/2.7/
4. chmod +w Python
5. install_name_tool -id @executable_path/../Frameworks/Python.framework/Versions/2.7/Python Python
6. chmod -w Python
7. cd to Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS
8. use otool -L Python and find the Python link path. then do install_name_tool -change <path you found with otool -L> @executable_path/../Frameworks/Python.framework/Versions/2.7/Python Python
9. Great! The framework is ready. Now build wx/wxPython, with a 5th new argument in the osx_build_wx script which is the path to the python interpreter. Pass it the path to the folder that contains your python Framework, that you built, but bin/python in that folder.

10. Finally, when building kicad, set the -PYTHON_EXECUTABLE and PYTHON_LIBRARY CMake paths to <framework path>/bin/python and <framework path>/Python.framework/Versions/2.7/Python respectively. Also, enabled KICAD_NEW_BOOST.

11. Go eat a sandwich while a nice, correctly bundled boost and python that will work on multiple versions of OS X without issue has built! Yay!

Get this branch:
bzr branch lp:~metacollin/kicad/osx_distribution
Only metacollin can upload to this branch. If you are metacollin please log in for upload directions.

Branch merges

Related bugs

Related blueprints

Branch information

Owner:
metacollin
Project:
KiCad
Status:
Development

Recent revisions

5354. By metacollin

Merged with head rev. 5369

5353. By metacollin

Merge.

5352. By metacollin

Merge.

5351. By metacollin

Merged with 5351

5350. By metacollin

Merged with 5440

5349. By metacollin

Added KICAD_NEW_BOOST CMake build option.

5348. By Alexander Golubev

Fix Bug #1381287 (CvPCB ignores the footprint filter field on aliased components)

5347. By jean-pierre charras

Update ecc83 demo. default KISYS3DMOD definition on Linux: add /usr/local/kicad/share/kicad/module/package3d test to find a suitable value.

5346. By jean-pierre charras

Cvpcb: force project name in stand alone mode, to allow access to project fp lib table. In project mode: disable the read netlist option (the netlist is read when Cvpcb is started by eeschema)
Dialog fp lib table editor: now shows the table full filenames, to help users.

5345. By jean-pierre charras

Fix a minor issue in fp lib wizard.
Remove a duplicate code for dialog select dir list.

Branch metadata

Branch format:
Branch format 7
Repository format:
Bazaar repository format 2a (needs bzr 1.16 or later)
Stacked on:
lp:kicad/product
This branch contains Public information 
Everyone can see this information.

Subscribers