Author Topic: Using macOS to write plugins  (Read 4422 times)

Offline annuello

  • Droid
  • **
  • Posts: 52
    • View Profile
Using macOS to write plugins
« on: April 29, 2020, 10:56:37 am »
Hi all,

Here is my initial attempt at a tutorial, or perhaps a glorified "note to self so I can forget it later".  The target audience is programmers who need a bit of a guide in setting up a macOS development environment and basic project shell, so they can get on with the fun parts of building their plugin.

I don't run Windows at home (where all my CamBam activity is), so my dev environment is macOS and the target CamBam environment is Debian Linux 32-bit (a LinuxCNC in VirtualBox).  I don't know how well my macOS-specific guide applies to the Windows environment, if at all.  If it's great, let me know.  If not, move along nothing to see. ;D

It's a work in progress.  I'd like to add a few code examples to show how to present your plugins in the menus, tool bar, etc.  I know there are such examples throughout the forum already but I think a guided self-contained multi-chapter PDF also has its place.  Let me know what you think, especially if it helped you write something cool.  If there is interest I'll continue to update the PDF, as I myself learn how to build plugins.  The latest version of the PDF will likely be attached to this first post, assuming I can update the post attachments when I need to.

Annuello.

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 5248
  • Made in England
    • View Profile
Re: Using macOS to write plugins
« Reply #1 on: January 11, 2022, 15:56:17 pm »
I must have missed this at the time, nice write up Annuello, an update would be good.
Filmed in Supermarionation

Offline annuello

  • Droid
  • **
  • Posts: 52
    • View Profile
Re: Using macOS to write plugins
« Reply #2 on: January 12, 2022, 09:05:20 am »
Hi Eddy,

Thanks - I appreciate your comments.  Not much more to report I'm afraid.  I got as far as needing to import some additional .dll dependencies (for further class exploration/compiling) which as far as I could figure out, meant that I had to install CamBam on a Windows machine simply to obtain the .dll.  The specific .dlls escape my memory at the moment but I could not locate them on my Linux setup.  I suspect for the Linux release the relevant compile-time function dependencies are dynamically rolled into Microsoft.Dynamic.dll at linking time, but that doesn't let me resolve/explore very far to do what I wanted to do sans-Windows.

I parked this project and all my CNC activities when I had to enter the worlds longest continuous COVID-19 lockdown (112 days) and additional "aftershock" lockdowns (260+ days total).  Our local hardware stores sell "propeller wood" as alleged flat timber, so if you want flat undamaged stock it requires perusing before purchase.  Us mere mortals (non-trades-people) were not permitted to go to such stores in person to peruse stock.  I wasn't willing to buy wood stock online sight-unseen.  To preserve my sanity I took a haiatus and did other things, stepping away from all things CNC for approx 6 months.

After many months away I began a deliberate process of reflection/introspection.  A frank assessment of the capability of my current retro-fit machine.  I designed and rough-costed an alternative machine build which I might be happy with.  Reflected on what I actually find rewarding in this whole domain.  (Plenty of time for thinking while under lockdowns, max 1 hour of sunshine/exercise per day, etc...)  The first thing that was clear is that the CNC itch didn't go away.  After seeing the Windows-only https://ncnetic.com I dusted off a Win10 laptop given to me by a friend, installed CamBam to make some sample GCode, and took NC Netic for a spin.  It took a few evenings of playing around with the NC Netic kinematics for 4th axis, but I got to a point where I was satistifed that I could become competent using CamBam for efficient 3+1 work and probably simultaneous 4-axis if the need arises.  The second thing that became clear was that I want to spend time "making product", not so much "making things to make product".

After I ultimately caved in to putting CamBam onto a Windows laptop I don't really want to go back to the .mono experience.  I may revisit this project in the future but given Apple's direction with M1 (non-Intel) CPUs and the inevitable end of the road for Win-on-Mac-via-VirtualBox I question where I should spend my time and energy.  The current answer to that question will be fine-tuning a post processor for the Syil X7 (LNC 6800 with 4th axis), which I'm expecting to arrive in the coming months.  And since I won't be putting timber on the new machine I'll be happy to order alum/steel stock online if I find myself under the proverbial "lockdown rock" once more.

Yours,
Annuello.