SMJobBless: single file Xamarin.Mac app with embedded Info.plist, etc.
I'm trying to give using SMJobBless on Xamarin.Mac a go (for previous discussions, see https://forums.xamarin.com/discussion/90649/run-application-with-root-privileges-when-a-user-run-the-application, https://forums.xamarin.com/discussion/2810/elevated-permissions, https://forums.xamarin.com/discussion/103039/xamarin-mac-multiple-do-shell-script-with-administrator-privilege-with-one-password-request).
One of the things that's apparently required is that the helper tool is a single binary file, rather than a .app bundle. The Info.plist and a launchd.plist need to be embedded (apparently, this can be done with ld -sectcreate
, and https://github.com/ruilisi/macbit also looks promising), but moreover, that means
a) Mono needs to be embedded, or
b) the parent bundle's Mono needs to be referenced
I've found a walkthrough for the tool mkbundle, but I'm not sure on the right path here.
Is mkbundle still the kind of tool I should be looking at for having a single file (not bundle!) contain the binary and all Mono runtime dependencies?