如何在商业网站中合法使用 LGPL javascript?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/2015805/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-22 22:24:49  来源:igfitidea点击:

How can I legally use LGPL javascript in a commercial web site?

javascriptjquerygpllgpl

提问by TeddyB

My understanding is that with LGPL, can I link and use an LGPL library for commercial use, as long as I don't copy code?

我的理解是,使用LGPL,只要不复制代码,我可以链接和使用LGPL库用于商业用途吗?

That make sense for programs you compile to binary, but what about JavaScript?

这对于你编译为二进制的程序来说是有意义的,但是 JavaScript 呢?

I want to use the Greyboxplugin for JQuery in my commercial website but don't know how to do that legally since it's LGPL.

我想在我的商业网站中为 JQuery使用Greybox插件,但不知道如何合法地这样做,因为它是 LGPL。

回答by Brian Campbell

The LGPL basically requires (read the full licenseand FAQfor details):

LGPL 基本上要求(阅读完整的许可证常见问题以了解详细信息):

  1. You mention that it is licensed under the LGPL, with reference to the full license.
  2. That you distribute the code, and any changes to it, under the terms of the LGPL. You must release the source code in it's preferred form (not minified or obfuscated), including any changes that you make to it.
  3. That it is dynamically linked in to your application in such a way that the user can replace it with their own version if they want.
  1. 您提到它是根据 LGPL 获得许可的,参考完整许可。
  2. 您根据 LGPL 的条款分发代码及其任何更改。您必须以其首选形式(未缩小或混淆)发布源代码,包括您对其所做的任何更改。
  3. 它以这样一种方式动态链接到您的应用程序,以便用户可以根据需要将其替换为他们自己的版本。

(this is a very brief overview of the requirements, as they would apply to your situation; as I said, see the license and FAQ for more details)

(这是对要求的简要概述,因为它们适用于您的情况;正如我所说,有关更多详细信息,请参阅许可证和常见问题解答)

To comply with (1), see the "Appendix: a convention for releasing free JavaScript programs" in the article The JavaScript Trapfor a proposed convention for how to mention and link to the license of a JavaScript program.

要遵守 (1),请参阅The JavaScript Trap文章中的“附录:发布免费 JavaScript 程序的约定”,了解有关如何提及和链接到 JavaScript 程序许可的提议约定。

To comply with (2), you could just serve the code up as-is. If you need to minify the code for performance reasons, you should include a link in a comment to the un-minified version of the code.

为了遵守 (2),您可以按原样提供代码。如果出于性能原因需要缩小代码,则应在注释中包含指向代码未缩小版本的链接。

To comply with (3) in JavaScript, as long as you keep the code in a separate script file, and don't merge it into one file with your code, you should be fine. Anyone who wants to replace it could use Greasemonkey or UserJS to do so.

遵守JavaScript中的(3),只要你把代码放在一个单独的脚本文件中,不要和你的代码合并成一个文件,就可以了。任何想要替换它的人都可以使用 Greasemonkey 或 UserJS 来替换它。

回答by JCasso

LGPL paragraph 5

LGPL 第 5 款

A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License.

不包含库任何部分的衍生物,但旨在通过编译或链接与库一起使用的程序,称为“使用库的作品”。这样的作品,孤立地,不是图书馆的衍生作品,因此不在本许可证的范围内。

So you can use it freelyIf you do not change it. (Here free means without any headache :) )

所以你可以自由使用它如果你不改变它。(这里免费意味着没有任何头痛:))

回答by Mark Byers

You can use and distribute LGPL libraries on your website and use them in combination with commercial code. The only big restriction is that you must keep the library open source, including any modifications you make to it, and allow your users to obtain the source, licence and copyright information for the library.

您可以在您的网站上使用和分发 LGPL 库,并将它们与商业代码结合使用。唯一的大限制是您必须保持库开源,包括您对它所做的任何修改,并允许您的用户获取库的源代码、许可和版权信息。

You don't have to distribute your commercial code under the LGPL.

您不必在 LGPL 下分发您的商业代码。

This is different to the GPL where you would have to distribute your code under the GPL too.

这与 GPL 不同,在 GPL 中您也必须在 GPL 下分发代码。