We value your input!
Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey

Archicad C++ API
About Archicad add-on development using the C++ API.
SOLVED!

Creating an add on for both Windows and Mac machines

yahavsa
Contributor

Hi,

I created an add-on using VS2022 on Windows 11 OS. I obtained an .apx file and tried to use it on both Windows and Mac machines. It works fine on Windows, but on the Mac, I couldn't find a way to make it work. Even when I changed the extension to .bundle, it still didn't work.

What should I do to ensure the same add-on works on both Windows and Mac machines?

Thanks, all!

1 ACCEPTED SOLUTION

Accepted Solutions
Solution
Viktor Kovacs
Graphisoft
Graphisoft

Short answer

 

You will need a Mac. You can find the setup instructions on the GitHub page I've linked.

 

Long answer

 

I don't know any solution that could cross-compile native C++ code from Windows to Mac.

 

A solution can be to set up a CI system (like GitHub actions) that builds your solution in the cloud both for Windows and Mac. The CMake template example does this, you can find the corresponding action here: https://github.com/GRAPHISOFT/archicad-addon-cmake/blob/master/.github/workflows/build.yml

 

Another challenge here is that on Mac you need to code sign and notarize your Add-On. For this you need an Apple Developer ID and set up the workflow. As far as I know you will need a Mac along the process.

View solution in original post

3 REPLIES 3
kovacsv
Booster

Add-Ons must be compiled separately for Windows and Mac. If you use platform independent code it should not be a problem, but the build should happen separately.

 

I recommend using the cmake template that is prepared for both platforms:

https://github.com/GRAPHISOFT/archicad-addon-cmake

Thank you very much for the quick answer!

If I am currently working in VS2022 on a computer with a Windows 11 OS and want to release an add-on for Mac, do I actually need to work on another IDE? Is it possible to do this through a Windows computer? Is it possible to do this using VS2022? Do I need to download any software for this to work? I would appreciate a brief explanation of whether and how I can produce a Mac add-on from a Windows computer. Thanks again!

Solution
Viktor Kovacs
Graphisoft
Graphisoft

Short answer

 

You will need a Mac. You can find the setup instructions on the GitHub page I've linked.

 

Long answer

 

I don't know any solution that could cross-compile native C++ code from Windows to Mac.

 

A solution can be to set up a CI system (like GitHub actions) that builds your solution in the cloud both for Windows and Mac. The CMake template example does this, you can find the corresponding action here: https://github.com/GRAPHISOFT/archicad-addon-cmake/blob/master/.github/workflows/build.yml

 

Another challenge here is that on Mac you need to code sign and notarize your Add-On. For this you need an Apple Developer ID and set up the workflow. As far as I know you will need a Mac along the process.