File tree Expand file tree Collapse file tree 1 file changed +49
-0
lines changed Expand file tree Collapse file tree 1 file changed +49
-0
lines changed Original file line number Diff line number Diff line change
1
+ # 如何选择开源共享协议
2
+
3
+ 本文主要是帮助大家简单的理解开源协议与共享协议,科普向。
4
+
5
+ 开源不等于免费,开源也不等于没有约束。
6
+
7
+ ## 开源协议
8
+
9
+ 相信很多小伙伴在开发的时候都默认遵循 ** 不重复造轮子(偷懒)** 这一原则,只要有了大致思路就马上在GitHub搜索一下,看看是否有人已经做了,如果已经有做好的,自然就不客气啦,拿过来修改一下就能用,不由得心中暗喜,又省了好多时间能用来把妹。
10
+
11
+ 经常浏览GitHub的小伙伴可能注意到了,很多开源库的说明文档的最上面可能会有这样的标签 [ ![ License] ( https://img.shields.io/badge/license-Apache%202-green.svg )] ( https://www.apache.org/licenses/LICENSE-2.0 )
12
+
13
+ 而最后面有这样一段看不懂的东西:
14
+
15
+ ### License
16
+
17
+ ```
18
+ Copyright (c) 2016 GcsSloop
19
+
20
+ Licensed under the Apache License, Version 2.0 (the "License");
21
+ you may not use this file except in compliance with the License.
22
+ You may obtain a copy of the License at
23
+
24
+ http://www.apache.org/licenses/LICENSE-2.0
25
+
26
+ Unless required by applicable law or agreed to in writing, software
27
+ distributed under the License is distributed on an "AS IS" BASIS,
28
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
29
+ See the License for the specific language governing permissions and
30
+ limitations under the License.
31
+ ```
32
+ 这就是开源协议啦,说明这个开源库是用什么协议发布的,你如果使用了这个开源库的内容,就需要遵守这一协议,下面我们简单了解一下与开源协议相关的内容。
33
+
34
+ ### 为什么要添加开源协议?
35
+
36
+ 首先是对作者的保护,防止知识成果被恶意利用。
37
+
38
+ * 网络上存在不少打包党,专门寻找开源项目,打包后放到AppStore中售卖或者添加各种恶心的广告后发布,以此来谋利,开源协议可以一定程度上防止这种事情。
39
+ * 除此之外,开源协议中一般都包含免责声明(禁止代码的作者承担代码使用后的风险及产生的后果),比如你开源了一个破解智能锁的代码,如果有人利用这个去盗窃导致他人损失,是与你无关的。
40
+
41
+ 其次是对使用者的保护,方便使用者。
42
+
43
+ * 使用者一看就知道自己允许进行哪些操作,不允许进行哪些操作。
44
+ * 未添加协议的代码默认是作者保留所有权利的,这就像一颗定时炸弹,如果你在项目中使用了这一份没有协议的代码,原作者只要能证明你未经许可使用了他的代码,是能够起诉你的。
45
+
46
+ ### 开源协议有哪些?
47
+
48
+
49
+
You can’t perform that action at this time.
0 commit comments