Pergunta

I had developed an app in python on mac osx for opening different file types on double-clicking any file. Then I converted into app by using py2app. py2app creates a myapp.app within dist folder. I moved myapp.app from dist folder to Applications location. Now, I am able to open any file through myapp just by double-clicking on it. Now, I want to make it work in such a way that, I don't need to drag and drop myapp to Applications location,it should automatically install on system.

Foi útil?

Solução

You can use packagemaker. It makes myapp.pkg file that when double-clicked installa an app in Applications location.

Outras dicas

py2app has a "--dist-dir" option for selecting the output directory (default is "diet"). That said, I have never tested using that option for installation in a directory containing other programs and don't know if "python setup.py py2app --dist-dir=/Applications" is save to use.

The alternative is to use a script that copies the application to /Applications (a simple python script, a shell script, or even a distutils command in your setup.py file that invokes py2app and then copies the resulting application to the right location).

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top