Here's an article on how to notarize command-line executables:
https://scriptingosx.com/2021/07/notarize-a-command-line-tool-with-notarytool/
It's more than a little tedious to set up. However, you don't need to notarize the executable -- instead, the Init can remove the com.apple.quarantine extended attrribute from the executable. Here's what several of my plugins do:
--[[----------------------------------------------------------------------------
public boolean unquarantinePlugin ()
On Mac, if the file "_quarantined" exists in the current plugin's folder,
removes the "com.apple.quarantine" extended attribute from all files in the
folder and removes the "_quarantined" file. Returns true if successful.
Returns false if there's any sort of error, displaying an error message to the
user, and leaving the "_quarantined" file in place.
On Windows, always returns true.
------------------------------------------------------------------------------]]
function Util.unquarantinePlugin ()
if WIN_ENV then return true end
local path = child (_PLUGIN.path, "_quarantined")
if not LrFileUtils.exists (path) then return true end
local code, err = Util.safeExecute (
"xattr -r -d com.apple.quarantine '" .. _PLUGIN.path .. "'", true)
if code ~= 0 then
Debug.logn ("xattr: ", code, err)
LrDialogs.message ("Problem unquarantining the plugin after download",
"See 'debug.log' for details. The plugin may not run correctly " ..
" -- contact support via the Help page")
return false
end
LrFileUtils.delete (path)
return true
end