Sfoglia il codice sorgente

Replace primary licence entry with Communist sharing agreement

Angel 23 ore fa
parent
commit
fb856915b6

+ 32 - 0
COMMUNIST-AGREEMENT.txt

@@ -0,0 +1,32 @@
+PCL Communist 共产共享协议
+Communist Commons Agreement · 版本 1.0 · 2026-10-23
+
+让所有颜色属于所有人,让共同的改进回到共同体。
+
+一、适用范围
+
+本协议仅适用于 PCL Communist 维护者有权授权的原创修改、新增代码、原创美术和文档。上游 PCL 代码、MeloongCore、其他依赖与第三方素材继续适用各自的许可及版权声明。本协议不替代这些许可,也不代表其权利人授予额外权利。
+
+二、共同享有
+
+任何人均可免费使用、学习、复制、修改及再分发本协议覆盖的内容。使用权不以地区、身份、政治立场、赞助或付费为条件。自愿赞助可以支持维护,不能成为使用颜色的门票。
+
+三、改进共享
+
+再分发本协议覆盖内容的修改版时,应保留本协议及作者署名,清楚标明修改,并同时提供这些修改的可获取源码。请明确标识第三方修改版,尊重每一位贡献者的劳动。
+
+四、平等开放
+
+基于本协议覆盖内容制作并再分发的版本,应保持主题、隐藏主题、成就和客户端下载入口对用户平等开放,不得新增以付费、赞助、邀请码或地区为条件的解锁门槛。下载资源本身的权利与使用条件由相应权利人决定。
+
+五、用户自主
+
+本版本仅保留资源下载及微软正版登录所需的联网功能。程序不以接受政治主张或点击同意本协议作为启动条件;本协议在关于页面供用户随时查阅。
+
+六、来源与责任
+
+上游 PCL 原始说明见 licenses/PCL-UPSTREAM.txt;依赖许可随各组件保留。PCL Communist 是基于 PCL 独立修改的第三方项目,非 Minecraft 官方产品。
+
+本协议覆盖的内容按现状提供,在适用法律允许的范围内不作保证。请自行备份游戏、设置与重要数据。
+
+Copyright (c) 2026 PCL Communist 贡献者

+ 5 - 6
Plain Craft Launcher 2/Pages/PageOther/PageOtherAbout.xaml

@@ -530,7 +530,10 @@
                     </Grid>
                 </StackPanel>
             </local:MyCard>
-            <local:MyCard Margin="0,0,0,15" Title="法律信息" IsSwapped="True" CanSwap="True">
+            <local:MyCard x:Name="CardCommunistAgreement" Margin="0,0,0,15" Title="☭ 共产共享协议" IsSwapped="True" CanSwap="True">
+                <TextBlock x:Name="TextCommunistAgreement" Margin="25,39,23,20" LineHeight="19" TextWrapping="Wrap" />
+            </local:MyCard>
+            <local:MyCard Margin="0,0,0,15" Title="网络与来源说明" IsSwapped="True" CanSwap="True">
                 <StackPanel Margin="25,39,23,20">
                     <TextBlock Text="网络功能" TextWrapping="Wrap" Margin="0,6,0,4" FontWeight="Bold" />
                     <TextBlock Margin="0,0,0,2" LineHeight="17" Text="本版本只保留资源下载和微软正版登录所需的联网功能,已移除匿名上报、启动器远程更新和配置下发。" TextWrapping="Wrap" />
@@ -539,15 +542,11 @@
                     <TextBlock Text="其他信息" TextWrapping="Wrap" Margin="0,10,0,4" FontWeight="Bold" />
                     <TextBlock Margin="0,0,0,2" LineHeight="17" Text="Copyright © 成都瓜皮龙科技有限公司&#13;计算机软件著作权登记号:2020SR0875133&#13;违法违规行为举报投诉邮箱:[email protected]&#13;非 MINECRAFT 官方产品。未经 MOJANG 或 MICROSOFT 批准,也不与 MOJANG 或 MICROSOFT 关联。" TextWrapping="Wrap" />
                     <StackPanel Orientation="Horizontal" Height="35" HorizontalAlignment="Left" Margin="0,12,0,0">
-                        <local:MyButton Text="用户协议与免责声明" Width="170" Padding="13,0" Margin="0,0,20,0" ColorType="Highlight" 
-                                        local:CustomEventService.EventType="打开网页" local:CustomEventService.EventData="https://shimo.im/docs/rGrd8pY8xWkt6ryW#anchor-RnU9" />
-                        <local:MyButton Text="PCL 分发有限许可" Width="170" Padding="13,0" Margin="0,0,20,0" 
-                                        local:CustomEventService.EventType="打开网页" local:CustomEventService.EventData="https://shimo.im/docs/rGrd8pY8xWkt6ryW#anchor-X0bo" />
                         <local:MyButton Text="源代码" Width="140" Padding="13,0" local:CustomEventService.EventType="打开网页" local:CustomEventService.EventData="https://github.com/Angelhellwolf/PCL-Communist" />
                     </StackPanel>
                 </StackPanel>
             </local:MyCard>
-            <local:MyCard Margin="0,0,0,15" Title="PCL 分发许可与存储库指南" IsSwapped="True" CanSwap="True">
+            <local:MyCard Margin="0,0,0,15" Title="上游来源与原始许可" IsSwapped="True" CanSwap="True">
                 <TextBlock x:Name="TextBundledLicence" Margin="25,39,23,20" LineHeight="19" TextWrapping="Wrap" />
             </local:MyCard>
             <local:MyCard Margin="0,0,0,15" Title="许可与版权声明" IsSwapped="True" CanSwap="True">

+ 5 - 0
Plain Craft Launcher 2/Pages/PageOther/PageOtherAbout.xaml.vb

@@ -11,6 +11,11 @@ Public Class PageOtherAbout
         IsLoaded = True
 
         ItemAboutPcl.Info = ItemAboutPcl.Info.Replace("%VERSION%", VersionDisplay).Replace("%VERSIONCODE%", VersionCode).Replace("%BRANCH%", CInt(BuildType))
+        Using AgreementStream = Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream("PCL.CommunistAgreement.txt")
+            Using Reader As New StreamReader(AgreementStream, Encoding.UTF8)
+                TextCommunistAgreement.Text = Reader.ReadToEnd()
+            End Using
+        End Using
         Using LicenceStream = Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream("PCL.Licence.txt")
             Using Reader As New StreamReader(LicenceStream, Encoding.UTF8)
                 TextBundledLicence.Text = Reader.ReadToEnd()

+ 2 - 1
Plain Craft Launcher 2/Plain Craft Launcher 2.vbproj

@@ -122,7 +122,8 @@
   </PropertyGroup>
   <ItemGroup>
     <Compile Include="Modules\RedPolicy.vb" />
-    <EmbeddedResource Include="..\LICENCE" LogicalName="PCL.Licence.txt" />
+    <EmbeddedResource Include="..\COMMUNIST-AGREEMENT.txt" LogicalName="PCL.CommunistAgreement.txt" />
+    <EmbeddedResource Include="..\licenses\PCL-UPSTREAM.txt" LogicalName="PCL.Licence.txt" />
     <EmbeddedResource Include="..\.local\build-credentials.json" Condition="'$(IncludePrivateBuildCredentials)' == 'true' And Exists('..\.local\build-credentials.json')" LogicalName="PCL.RedBuildCredentials.json" />
     <Reference Include="CacheCow.Client, Version=2.13.1.0, Culture=neutral, processorArchitecture=MSIL">
       <SpecificVersion>False</SpecificVersion>

+ 8 - 3
README.md

@@ -6,7 +6,7 @@
 
 基于 Plain Craft Launcher 的第三方独立修改版。原作者为龙腾猫跃及 PCL 贡献者;本项目由社区独立维护。
 
-[下载单文件 EXE](https://github.com/Angelhellwolf/PCL-Communist/releases/latest) · [查看源代码](https://github.com/Angelhellwolf/PCL-Communist) · [反馈问题](https://github.com/Angelhellwolf/PCL-Communist/issues)
+[下载单文件 EXE](https://github.com/Angelhellwolf/PCL-Communist/releases/latest) · [共产共享协议](COMMUNIST-AGREEMENT.txt) · [查看源代码](https://github.com/Angelhellwolf/PCL-Communist) · [反馈问题](https://github.com/Angelhellwolf/PCL-Communist/issues)
 
 ![启动器主页](docs/images/launcher.png)
 
@@ -33,6 +33,7 @@
 - 保留微软正版登录、账号刷新、正版购买验证、离线模式,以及游戏、Java、加载器、模组和整合包下载所需的元数据。
 - 移除启动器远程更新、配置下发、遥测、联网主页、远程帮助、EasyTier、第三方登录和在线皮肤管理。
 - 首次启动直接进入主页,移除“协议授权”弹窗和启动阻断。
+- 关于页面可离线查看《共产共享协议》:免费共享、全部主题平等开放、修改源码公开;启动无需点击同意。
 
 ## 为什么我们把它叫作“共产主义”
 
@@ -78,10 +79,14 @@ GitHub Actions 自动构建 Release 并运行 WPF 检查。`tools/SmokeTest` 覆
 
 已有本机检查覆盖单 EXE 首次启动、全部主题和实际客户端下载。微软完整账号授权需要用户自行完成,未代替用户实登。问题和改进建议请提交到本仓库 Issues 或 Pull Requests。
 
-## 来源与许可
+## 共享协议与来源
+
+本项目有权授权的原创修改、新增代码、美术和文档适用自定义的[《共产共享协议》](COMMUNIST-AGREEMENT.txt)。任何人均可免费使用、学习、修改和再分发这些内容;再分发修改版应公开相应修改的源码,并保持主题、隐藏主题、成就及客户端下载入口平等开放。
+
+协议不以政治立场、地区或赞助区分用户,也不作为启动器的强制同意弹窗。协议正文已嵌入单文件 EXE,可在“关于 → ☭ 共产共享协议”离线查阅。
 
 - PCL 源码基线:`lZiMUl/PCL2`,提交 `6b9a50df911c9d68b69b24c979efba477fb14b67`,2.99.0.0 正式版。
 - MeloongCore 固定提交:`98157d65c7627721c816c02e8be96ac4fe61d615`。
 - 原作者:龙腾猫跃及 PCL 贡献者。[原作者赞助页面](https://meloong.com/afd/a/LTCat)。
-- 本仓库公开修改源码;上游 PCL 沿用其有限分发许可,详见 [LICENCE](LICENCE)。依赖保留各自许可和版权声明。
+- 上游 PCL 原始说明保存在 [licenses/PCL-UPSTREAM.txt](licenses/PCL-UPSTREAM.txt),内容完整保留;上游及依赖继续适用各自许可和版权声明。本项目的共享协议仅覆盖维护者有权授权的内容。
 - 主题配色为本修改版补全实现。此版本由第三方独立修改,非 Minecraft 官方产品。

+ 0 - 0
LICENCE → licenses/PCL-UPSTREAM.txt


+ 13 - 0
tools/SmokeTest/Program.cs

@@ -113,6 +113,8 @@ internal static class Program {
                 launcher.GetCustomAttribute<AssemblyProductAttribute>()?.Product == "PCL Communist", "Executable metadata uses PCL Communist");
             using (var licence = new StreamReader(launcher.GetManifestResourceStream("PCL.Licence.txt")!))
                 Check(licence.ReadToEnd().Contains("PCL 分发有限许可"), "Distribution licence is embedded in the single executable");
+            using (var agreement = new StreamReader(launcher.GetManifestResourceStream("PCL.CommunistAgreement.txt")!))
+                Check(agreement.ReadToEnd().Contains("PCL Communist 共产共享协议"), "Communist sharing agreement is embedded for offline viewing");
 
             // Route every test setting to the isolated host directory, including registry settings.
             var entries = (IDictionary)T("Settings").GetField("Entries", Static)!.GetValue(null)!;
@@ -211,7 +213,18 @@ internal static class Program {
             var about = (UIElement)Activator.CreateInstance(T("PageOtherAbout"))!;
             ((Border)Control(window, "PanMainRight")).Child = about;
             Pump(200);
+            about.GetType().GetMethod("PageOnEnter")!.Invoke(about, null);
+            Pump(500);
+            Check(((TextBlock)Control(about, "TextCommunistAgreement")).Text.Contains("使用权不以地区、身份、政治立场、赞助或付费为条件"), "About page shows the new sharing agreement without a network request");
             Check(((TextBlock)Control(about, "TextBundledLicence")).Text.Contains("PCL 分发有限许可"), "About page shows bundled distribution licence without a sidecar file");
+            var agreementCard = (FrameworkElement)Control(about, "CardCommunistAgreement");
+            agreementCard.GetType().GetProperty("UseAnimation")!.SetValue(agreementCard, false);
+            agreementCard.GetType().GetProperty("IsSwapped")!.SetValue(agreementCard, false);
+            Pump(200);
+            ((ScrollViewer)Control(about, "PanBack")).ScrollToVerticalOffset(
+                agreementCard.TranslatePoint(new Point(0, 0), (UIElement)Control(about, "PanMain")).Y);
+            Pump(200);
+            Capture(window, Path.Combine(output, "Communist-agreement.png"));
             File.WriteAllLines(Path.Combine(output, "smoke-results.txt"), report);
             Console.WriteLine("PASS: " + checks + " runtime checks; home and theme screenshots saved.");
             Environment.Exit(0);