tkdnd icon indicating copy to clipboard operation
tkdnd copied to clipboard

Please publish macOS Arm (or Universal 2) binaries

Open aivarannamaa opened this issue 2 years ago • 5 comments

It looks like GitHub Actions is ready for this: https://github.blog/changelog/2024-01-30-github-actions-introducing-the-new-m1-macos-runner-available-to-open-source/

aivarannamaa avatar Feb 06 '24 15:02 aivarannamaa

If only I new how to integrate github actions :-)

petasis avatar Feb 06 '24 16:02 petasis

Hi @petasis ! I am the new maintainer of tkinterdnd2 which uses your binaries and I saw that this is a common request. I saw this thread this morning and didn't know how to use GitHub actions, but I found that it is fairly simple. I was able to fork your repository and successfully build for macOS ARM due to your helpful discussion here: https://github.com/petasis/tkdnd/issues/54

To make a GitHub action for compiling ARM binaries, do the following:

  1. Create a tcl-conf with the changes that you had recommended in the Issue I mentioned above. I have done that in my fork, and the result can be viewed here: https://github.com/Squiblydoo/tkdnd/blob/master/tcl-conf-arm
  2. Click "Actions" at the top of the repository.
  3. Use the template for CMake based, multi-platform projects
  4. Use the following workflow:
name: Build

on:
  push:
    branches:
      - master

jobs:
  release:
    runs-on: macos-14

    steps:
      - name: check out git repository
        uses: actions/checkout@v4
        
      - name: build
        run: |
          brew reinstall tcl-tk
          export PATH="/usr/local/opt/tcl-tk/bin:$PATH"
          export LDFLAGS="-L/usr/local/opt/tcl-tk/lib"
          export CPPFLAGS="-I/usr/local/opt/tcl-tk/include"
          export PKG_CONFIG_PATH="/usr/local/opt/tcl-tk/lib/pkgconfig"
          tclsh tcl-conf-arm
          make install arch=arm64
          
      - name: upload
        uses: actions/[email protected]
        with:
          name: arm64
          path: cmake/runtime/lib/tkdnd2.9.4

This workflow will compile the arm binaries and return the binary below. image

EDIT: I updated the workflow file to resolve the warnings in the image.

Squiblydoo avatar Aug 02 '24 11:08 Squiblydoo