Skip to content

Adding native M1/Apple Silicon support

sephamorr requested to merge sephamorr/kicad-mac-builder:m1support into master

This PR (set) adds functionality to build KiCad images for Apple Silicon. Most of the changes are due to a AppleSilicon requirement to sign all Frameworks. Ad-hoc signatures are not acceptable for Python.framework, for example.

This requires 3 changes:

  • This PR into kicad-mac-builder
    • Add missing dependency
    • Make some paths independent of python version
    • Sign all bundles
    • Don't try to bless the DMG with the openfolder attribute. This is not supported on AS
    • Run all the python tests with -B to prevent bytecode generation which makes a mess of the signing process
    • Bump python to version 3.9.9. A version that is distributed as a universal binary is required
    • Performing signing before running the python import checks at the tail end of the build
    • Add a build.sh script which shows my exact build command required. This can be removed before merging.
  • This PR into kicad (Seeing review here before opening a PR with kicad directly, this is just the PR on my fork): sephamorr/kicad!1
    • Pass the python framework path into several fixup_bundle calls
  • This copy of dyldstyle (will make PR): https://gitlab.com/sephamorr/dyldstyle
    • Adds support for universal binaries
    • Optimizes the file type detection process so it's not so slow

I don't have an Intel Mac (that's new enough), so I'd appreciate some testing to make sure this doesn't break the normal build process. The actual testing I've done with the M1 build is pretty light, but it does appear to work as far as I evaluated.

Edited by sephamorr

Merge request reports