I have recently tried some quirks to get macOS running in a virtual machine on Windows. Forget it, don't do it. It's just a great waste of time. Apple is successfully blocking its OS from running in a VM.
Buy yourself a cheap Apple hardware, e.g. a mac Mini m4 with 16GB RAM for ~600 EUR. Of course only if the project income allows that.
I did the same recently for HeidiSQL.
On the Lazarus 4.4 side, worth to mention:
* I recommend the aarch64 version, as the Intel side is for older systems only (i think 5 years+).
* before installing Lazarus, install the correct XCode command line tools, like stated on the download page on Sourceforge. This install can take some time. Don't expect to be ready in minutes. Take a coffee or two.
* in Lazarus, open your lpi file, and before you compile, go to the project options > Compiler options > Custom options, and add this conditional:
if TargetOS='darwin' then
CustomOptions := '-WM10.15';
* deploy your compiled executable in an app bundle (which is a zip file with a predefined folder structure)
* if you only have an executable, it may be enough to have that in the folder "yourappname.app\Contents\MacOS\", plus an Info.plist in "yourappname.app\Contents\"
* look into my last macos release zip for getting an idea, you may also copy parts of the Info.plist:
https://github.com/HeidiSQL/HeidiSQL/releases/download/v12.15.1.1/heidisql_12.15.1.1_macos_app.zipThere are many more options for that app bundle, which you might not need when you say you only have one executable and nothing else.
What can still be a problem when you distribute the app is that macOS warns about non signed executable, without code certificate. The user can explicitly ignore that warning with some effort, but that's only an option if you have a handful users only. If you want to sign your app, you need an Apple subscription for 99 EUR per year. The signing process is done with
codesign on the command line.