On Nov 17, 2015, at 2:16 PM, Jean-Patrick Francoia < email@hidden> wrote:
I'm a python developer, but a beginner with Mac OS. I would like to bundle a package I have created. However, I don't think I can follow a standard and easy procedure.
Here is the tree folder I have:
MyProgram.app/ Contents/ MyProgram-mac-os-x86_64/ MyProgram.app/ ---> THIS APP is executable esky-files/
What I would like is a simple package that will put an icon in the Applications folder of the user. When the user clicks on this icon, the program must start. So the deepest "MyProgram.app" should be executed at that time. But to work, this .app needs this special tree folder.
Is it possible to do that ? If so, how ?
I don't think that this is the right forum for the advice you are looking for. The best forum that I am aware of at the moment would probably be either the MacEnterprise mailing list ( http://www.macenterprise.org), the `python` channel on the MacAdmins slack: (signup: https://macadmins.herokuapp.com), the PyObjC sites (there are multiple), or possibly the lists talking about Munki since that is the largest such app at the moment.
That all being said, I can give you a few pointers:
0. The actual hierarchy that your propose is not an option, and I am not sure what you are trying to communicate there. Be a lot more specific about why you think you need it.
1. A PyObjC app is the most robust, where you write all of your code in Python, but there is an ObjC app wrapping it. Apple no longer officially supports this, but my understanding is that all this machinery still works, but you have to find Xcode templates that work. The last one I am aware of is Greg Neagle's version for Xcode 6: https://github.com/gregneagle/Xcode6CocoaPythonTemplates
2. There are older systems to wrap command-line apps, I am not sure if they are still viable, but:
3. You could create a small AppleScript .app bundle, and then run your script using `do shell script`. This makes it hard to do complex interaction, but can be simple for wrapping admin commands for regular users. It even makes commands that use admin privileges really easy with the `with administrator privileges` option. You do have to inject your script into the `Resources` folder of the .app bundle, but this is easy to do.
4. For very limited things given to limited audiences I have used the '.script' extension that makes Terminal.app open the script and run it in a terminal window (shebang line and executablilty are required). If you have no real user interaction this can work, but opening Terminal.app will scare some users.
|