Bundle python into Qt application dmg and exe
-
HI
I need to execute python script from my desktop application which will run on both mac and windows platform.
I want to take advice what and which will be the best way to bundle python in my Qt standalone application(exe and dmg). I read about Pythonqt cython etc.
Thanks
-
@bhupi
you can bundle the python interpreter executable (there is a portable version of python on the web), extract it and call it with QProcess passing your script.
It's by far not the most beautiful solution. Better notify the user that the system hasn't python installed and that they need to install it in order to use your application.Is this script written by yourself?
If yes and depending on the needed capabilities you might want to use Qt's JavaScript engine instead? -
Thanks I will look into these.
-
Hi,
To add to @raven-worx, OS X has python installed by default, so basically it will rather be a Windows problem.
Did you check the embedding python chapter of Python's documentation ?
-
QMAKE_BUNDLE_DATA is your friend for that