Qt for Python - closed-source application as single executable?
-
Hello,
I want to create application using Open Source version of Qt + Qt for Python. The distribution requirements is: it has to be single executable with all dll/files bundles inside. The application will be closed source.
- Can i do this technically?
- No licensing problems?
-
Nope...when you use python you accept that the code is distributed in multiple files. If you must do single file executable then write it in C++ and hope that static linking is fully supported on your platform.
Also, generally speaking you cannot do a statically linked closed source program if it contains open source code in it.
-
@kent-dorfman said in Qt for Python as single executable.:
Also, generally speaking you cannot do a statically linked closed source program if it contains open source code in it.
What do you mena by that? When I compile application and I link all dll, I'm not modifying the source of those dll library's. And if someone puts his ow version of the library's at the same folder where the executable is, Dynamic-Link Library Redirection will load those custom library's instead of the linked ones, at least on Windows. So the LGPL requirement is fulfill.
-
@alienquake you inferred static linking where there is one executable (all dll/files inside). that would be verboten under LGPL.
-
@kent-dorfman said in Qt for Python - closed-source application as single executable?:
@alienquake you inferred static linking where there is one executable (all dll/files inside). that would be verboten under LGPL.
Static linking is not forbidden under LGPL. If the app uses statically linked LGPL library, all you have to do is provide your object files and the LGPL requirement is still satisfied. Or use Dynamic-Link Library Redirection feature. It's written inside LGPL FAQ: https://www.gnu.org/licenses/gpl-faq.en.html#LGPLStaticVsDynamic
-
@ALIENQuake said in Qt for Python - closed-source application as single executable?:
Can i do this technically?
Yes. Check out pyinstaller or nuitka.
-
@ALIENQuake check the scriptableapplication example. It's a Qt/C++ application that includes a Python interpreter, so you can access some of the Qt C++ objects from Python.
Then it will be a matter of how you compile/package your app.
If you app follows LGPL, then you need to make the code available. If you hold a Qt Commercial license, then you can not make the code available and distribute the application.