
This seems like such an unnecessary workaround, and maybe this is partially my ignorance to how OSX - Catalina works. app bundle > having it call an applet executable > which then invokes this script > which then calls the executable to be ran with administrator privileges.
Mac executable file on double click .exe#
exe executable file, which resides in a folder that. The big difference in what a user sees if using the GUI is that on Windows, you usually see the. Both Windows and OS X execute binary executable files, although they are in different formats. Kind of works, but this keeps causing my application to throw an exception an exception for some reason, but I can't tell why and to be honest, I don't really like this hacky way of clicking a. When you double-click on one, the system mounts it and you then have access to the files inside. Set installerPath to currentPath & "testscript.app/Content/Resources/Scripts/myGolangApp"ĭo shell script installerPath with admin privilegesĪnd this. I saw some suggestions on apple.stackexchange, one of which got me the closest I suppose in which someone attempted to write a small AppleScript, export it as an application and run something like: set currentPath to POSIX path of ((path to me as text) & "::") I'm trying to get around using the command line for this. myApp.app/Contents/MacOS/myGolangApp, it executes as normal. AgentSetup.app: command not found but if I run sudo. app package structure and then creating a ist file to invoke it like: īut when I double click on the app, it does absolutely nothing at all.
Mac executable file on double click install#
app package and having them enter in the credentials so that the install can proceed. app package and signing it with my Developer ID and then having the user be able to simply double click the.

The problem I'm having is that I would like to be able to distribute this application by creating a. Again, this all works great simply running the commands I listed above and our users are happy with it.

With this myGolangApp it pretty much acts as it's own installer plus does a few more things, in which it needs to be ran as sudo/elevated permissions in order to install some services. So I have an application that I wrote in golang for some users, and whenever I perform a: chmod +x. Based on the comments I just want to add some quick clarity that this question is in regards to running an executable as admin/sudo in macos NOT without having to run it via command line. I just wanted to see if anyone more experienced with MacOS (primarily develop on Windows) can help me with a small issue I'm currently trying to resolve.
