MediaElch icon indicating copy to clipboard operation
MediaElch copied to clipboard

[Dev] Create static build of Windows releases

Open bugwelle opened this issue 3 years ago • 0 comments

For the past few years I dynamically linked to Qt libraries. The results was that the ZIP files contained many *.dll files since Qt had to be shipped together with MediaElch. While this won't change in the near future (as other parts such as ffmpeg can't be or shouldn't be statically linked), I would like to statically link Qt in the future.

In the past I thought that this was a legal requirement, but my assumption was only half-true. It is necessary to dynamically link to Qt if your software is proprietary (i.e. has a commercial license) but if your software is licensed under LGPL as well, we can use static linking.

Source: https://www.qt.io/licensing/open-source-lgpl-obligations

In case of dynamic linking, it is possible, but not mandatory, to keep application source code proprietary as long as it is “work that uses the library” – typically achieved via dynamic linking of the library. In case of static linking of the library, the application itself may no longer be “work that uses the library” and thus become subject to LGPL. It is recommended to either link dynamically, or provide the application source code to the user under LGPL.

Benefits: Easier distribution of MediaElch. I don't have to check that each single library is packaged correctly, etc. This will also make the switch to Qt6 easier (I hope).

See also: https://www.gnu.org/licenses/gpl-faq.en.html#LGPLStaticVsDynamic

bugwelle avatar Nov 22 '21 10:11 bugwelle