Skip to content

Commit

Permalink
docs: Add FAQs for license agreement
Browse files Browse the repository at this point in the history
  • Loading branch information
yzy-1 committed Aug 2, 2024
1 parent ac64a6f commit 44c4dfc
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 0 deletions.
30 changes: 30 additions & 0 deletions docs/pages/user-guide/faq.en.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,33 @@ if (str.size() > 1000000) {
// handle error
}
```

## License Agreement

CPLib is licensed under the [LGPL-3.0-or-later](https://www.gnu.org/licenses/lgpl-3.0.html) license. This license is relatively permissive compared to the GPL license. You can use CPLib in any software, including proprietary software, without the need to disclose your own source code.

### What you are required to do

When you distribute software that uses CPLib, the LGPL requires you to:

- Indicate somewhere that the software uses CPLib, and that CPLib is licensed under the LGPL.
- Provide a link to the LGPL license text.

However, you don't need to worry about this, as when using the DefaultInitializer, the program written using CPLib will automatically output the relevant information when called with the `--help` command-line argument.

Without constituting a fork, the LGPL license is almost entirely equivalent to the 2-clause BSD license. This will be explained further in the following.

### Forking

Forking CPLib means modifying CPLib itself and distributing software based on the modified CPLib. In this case, there are additional requirements:

- If you want to distribute software based on the modified CPLib, you must provide the modified CPLib under the LGPL license.
- The only content you must provide under the LGPL is the modified CPLib. You still do not need to provide any other software under the LGPL, not even software that uses CPLib or your modified CPLib.

Simply using CPLib in your software does not constitute a fork. Forking CPLib involves modifying the CPLib files themselves in some way. The LGPL also explicitly states (in Section 0) that subclassing CPLib classes (also known as inheriting from CPLib classes, such as customizing the initializer) does not constitute a fork.

### Why is CPLib, a header-only library, compatible with LGPL?

This question has been addressed in the LGPL version 3. The relevant part is in Section 3.

Linking, whether static or not, does not apply to CPLib, as it only contains header files. In CPLib, there is no linkable content.
30 changes: 30 additions & 0 deletions docs/pages/user-guide/faq.zh.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,33 @@ if (str.size() > 1000000) {
// handle error
}
```

## 许可协议

CPLib 采用 [LGPL-3.0-or-later](https://www.gnu.org/licenses/lgpl-3.0.html) 协议.它(相较于 GPL 协议)相当宽松.你可以将 CPLib 用于含专有软件在内的任何软件,而无需披露属于自己的源代码.

### 你被要求做什么

当你分发使用 CPLib 的软件时,LGPL 要求你:

- 在某处说明该软件使用 CPLib,并且 CPLib 是 LGPL 许可的.
- 提供 LGPL 许可证文本的链接.

不过这点你并不需要担心,因为在使用 DefaultInitializer 时,以 `--help` 命令行参数调用使用 CPLib 编写的程序会自动输出有关信息.

在不构成 fork 的情况下,LGPL 许可协议与 2-clause BSD 许可协议几乎完全相同.这点将会在后续进行说明.

### Fork

Fork CPLib 意味着修改 CPLib 本身并根据修改后的 CPLib 分发软件.在这种情况下,还有以下附加要求:

- 如果你要基于修改后的 CPLib 分发软件,则必须在 LGPL 许可证下提供修改后的 CPLib.
- 你必须在 LGPL 下提供的唯一内容是修改后的 CPLib.你仍然不必在 LGPL 下提供任何其他软件,甚至不需要使用 CPLib 的软件或使用你修改的 CPLib 的软件.

仅在软件中使用 CPLib 并不构成 fork.Fork CPLib 涉及以某种方式修改 CPLib 自己的文件.LGPL 还明确指出(在第 0 节中)子类化 CPLib 类(也称为从 CPLib 类继承,例如自定义 initializer)并不构成 fork.

### CPLib 是 headery-only 的库,为何它适配 LGPL?

该问题已在 LGPL 第 3 版中得到解决.LGPL3 的相关部分是第 3 节.

链接,无论是否静态,都不适用于 CPLib,它仅包含头文件.在 CPLib 中,没有任何可链接的内容.

0 comments on commit 44c4dfc

Please sign in to comment.