SMJobBless: single file Xamarin.Mac app with embedded Info.plist, etc.

Sören Kuklau 76 Reputation points
2021-05-31T22:50:38.093+00:00

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?

Developer technologies .NET Xamarin
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.