Skip to content

Commit 2479b47

Browse files
ljzlosereee555
andauthored
插件 (#75)
* doc:modify readme and license * feat(plugin): 新增插件系统支持 添加插件管理功能,包括插件进程管理、事件处理、上下文共享和配置管理。主要变更包括: - 新增插件管理器PluginManager - 实现插件进程间通信 - 添加基础插件框架类BasePlugin - 支持事件订阅和分发机制 - 提供插件配置管理功能 --------- Co-authored-by: 👑➕🍋 <50390200+eee555@users.noreply.github.com>
1 parent 4d9b394 commit 2479b47

26 files changed

+1740
-113
lines changed

.gitignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ __pycache__/
77

88
# C extensions
99
*.so
10-
10+
*.exe
1111
# Distribution / packaging
1212
.Python
1313
build/
@@ -165,4 +165,5 @@ toollib/frame.csv
165165
*.evf
166166
*.mvf
167167
old/
168-
发布流程.txt
168+
发布流程.txt
169+
src/plugins/*/*.json

LICENSE

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
# 📄 **LICENSE**
2+
3+
**GNU General Public License Version 3 (GPLv3)**
4+
**with Additional Commercial Restriction and Contributor Revenue Sharing Terms**
5+
6+
---
7+
8+
# **Part I — GNU GPLv3 (Unmodified)**
9+
10+
**The full text of the GNU General Public License version 3 (GPLv3) follows below, unmodified.**
11+
12+
113
GNU GENERAL PUBLIC LICENSE
214
Version 3, 29 June 2007
315

@@ -672,3 +684,79 @@ may consider it more useful to permit linking proprietary applications with
672684
the library. If this is what you want to do, use the GNU Lesser General
673685
Public License instead of this License. But first, please read
674686
<https://www.gnu.org/licenses/why-not-lgpl.html>.
687+
688+
---
689+
690+
# **Part II — Additional Terms under GPLv3 Section 7**
691+
692+
## **A. Commercial Use Restriction**
693+
694+
The following additional restriction is applied to the Program and all derivative works, as permitted under GPLv3 Section 7:
695+
696+
1. **Commercial use of the Program, whether in its unmodified form or in modified or derivative forms, is prohibited without explicit written permission from the original copyright holder (“Owner”).**
697+
Commercial use includes, but is not limited to:
698+
699+
* selling copies;
700+
* paid distribution;
701+
* paid licensing;
702+
* offering the Program as part of a monetized service;
703+
* any activity in which the Program directly or indirectly generates revenue.
704+
705+
2. **Commercial use is permitted only after obtaining explicit written authorization from the Owner.**
706+
Such authorization will be issued through a separate commercial license agreement.
707+
708+
3. Non-commercial use, modification, and redistribution remain fully governed by the GPLv3 without additional restrictions.
709+
710+
---
711+
712+
## **B. Revenue Sharing for Donations, Commercial Licenses, and Related Income**
713+
714+
The following additional term governs the distribution of revenue derived from donations, sponsorships, commercial licenses, or any other income related to the Program:
715+
716+
1. **All monetary income generated from the Program — including but not limited to donations, sponsorships, paid support, and commercial licensing — shall be distributed among all contributors according to their proportional number of commits to the project's primary repository.**
717+
718+
2. The project Owner is responsible for:
719+
720+
* calculating commit proportions;
721+
* collecting income;
722+
* distributing shares to contributors in a fair and transparent manner;
723+
* publishing the distribution records.
724+
725+
3. Contributors are defined as individuals who have authored commits that have been merged into the main branch of the project repository.
726+
727+
4. Commit counts may be weighted or normalized to remove trivial commits (e.g., whitespace-only changes), if the Owner and contributors collectively agree on such rules.
728+
729+
5. Contributors acknowledge that distribution depends on practical factors such as payment processing fees and contributor identity verification.
730+
731+
---
732+
733+
# **Part III — Clarifications (Non-binding but Recommended)**
734+
735+
These clarifications help ensure common understanding:
736+
737+
* “Commercial use” refers to any activity where the Program or its derivatives contribute to revenue, regardless of platform (e.g., Steam, app stores, SaaS, paid bundles).
738+
* Non-commercial redistribution is always permitted under GPLv3.
739+
* Contributors who wish to engage in commercial use must also obtain authorization.
740+
* The Owner may refuse commercial authorization if it violates project ethics or harms contributors.
741+
* Revenue-sharing obligations apply only to income associated with this project, not the contributor's unrelated work.
742+
743+
---
744+
745+
# **Part IV — Informal Summary (Not Legally Binding)**
746+
747+
**You may:**
748+
749+
* Use, study, modify, and redistribute the Program for non-commercial purposes.
750+
* Create derivative works (non-commercial).
751+
* Request commercial licensing from the Owner.
752+
* Receive proportional revenue if you contribute commits.
753+
754+
**You may NOT:**
755+
756+
* Sell or commercially distribute any version without explicit written permission.
757+
* Bypass the revenue-sharing terms for commercial income.
758+
759+
760+
761+
762+

README.md

Lines changed: 49 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,80 +1,81 @@
11
# 元扫雷(Metasweeper)
2+
3+
**[English version is here.](README_EN.md)**
4+
25
- 包含8种模式的专业扫雷版本、第三代扫雷录像播放器及高性能算法工具箱
3-
- project with 8 modes of minesweeper, third generation minesweeper video player and high performance algorithm toolbox
46

57
[![MetaSweeper](https://img.shields.io/badge/MetaSweeper-v3.2.1-brightgreen.svg)](https://github.com/eee555/Solvable-Minesweeper)
68
[![stars](https://img.shields.io/github/stars/eee555/Solvable-Minesweeper)](https://github.com/eee555/Solvable-Minesweeper/stargazers)
79
[![forks](https://img.shields.io/github/forks/eee555/Solvable-Minesweeper)](https://github.com/eee555/Solvable-Minesweeper/forks)
810

9-
1011
## 简介
1112

12-
**元扫雷**是由专业玩家开发的扫雷游戏。这个项目并非简单重复已有的工作,而是集中了一批扫雷游戏的现代化设计。元扫雷所生成的游戏录像得到[开源扫雷网](https://openms.top)的承认并参与世界排名。
13-
14-
优势:
15-
16-
+ 内部集成了**三大判雷引擎+集成的局面状态机+概率计算引擎+光学局面识别(Optical Board Recognition,OBR)引擎**,具备性能优势。
17-
18-
+ 采用Python/PyQt5及Rust编写,模块间相互配合、融为一体,兼顾**开发效率、内存安全与执行速度**。游戏界面与算法高度分离,自研的工具箱同样开源,且遵循更为宽松的MIT协议,通过`pip install ms_toollib`命令即可安装。
19-
20-
+ 游戏模式方面,具有**全部6种无猜扫雷模式+标准+win7**,弱可猜、强可猜的模式都是绝无仅有的。
21-
22-
+ 可以按住ctrl并滚动滚轮任意**调整大小**,能调整窗口的**透明度**。这是罕见的。
13+
**元扫雷(Meta Minesweeper)**由资深扫雷专业玩家与软件工程师共同打造——不是对传统扫雷的简单重复,而是在**算法、性能、可扩展性与工具链层面**的全面现代化。
2314

24-
+ 按下“空格”计算局面中每一格是雷的概率。这是罕见的
15+
元扫雷生成的录像格式已获得[开源扫雷网](https://openms.top)官方认可,并参与国际排行榜
2516

26-
+ 按下“ctrl+空格”能**截屏识别**计算其他扫雷中每一格是雷的概率。这是绝无仅有的。
2717

28-
+ 其装载的录像播放器可以分析录像的高层抽象特征,并实时展示游戏局面中每一格是雷的概率。这是绝无仅有的。能够播放avf、rmv、mvf、evf四种主流格式的录像。这是罕见的。
18+
## 项目优势与技术亮点
2919

30-
+ 能够计算3BV/s、STNB、RQP等指标并展示,能够自定义公式。这是罕见的。
20+
### (1)算法与引擎体系
3121

32-
+ 完备的局面筛选功能,按用户配置来筛选。这是罕见的
22+
元扫雷由`ms_toollib`工具箱赋能,核心竞争力来自后者高度优化的算法组件,构成完整的扫雷智能算法系统
3323

34-
+ 对变速齿轮等多种作弊手段的防御能力。
24+
* **三大判雷引擎**:提供多层次策略推理,覆盖从简单集合到枚举法求解。
25+
* **统一局面状态机**:将游戏局面抽象为自动状态机,提升算法集成度与可扩展性。
26+
* **概率推断引擎**:支持计算局面中任意一格是雷的概率,求解速度仅次于JSMinesweeper。
27+
* **光学局面识别(OBR)引擎**:可从任意扫雷应用的截屏中重建局面,实现跨游戏智能分析。
3528

36-
+ 国际化,包括中、英、德、波兰等语言。
29+
---
3730

38-
目前属于漫长的开发阶段中,约1~3月更新一个版本,欢迎提issue、star、pull request、fork。
31+
### (2)架构与技术栈
3932

40-
## Introduction
33+
项目在性能、安全性、工具链友好度之间取得扎实平衡。
4134

42-
Minesweeper is a mineswering game developed by players who are passionate about the game. This project is not a simple repetition of existing work, but a concentration of modern design elements for minesweeper games.
35+
* **Python / PyQt5 + Rust 复合架构**
4336

44-
Advantages:
37+
* Python 负责 UI、生态扩展;
38+
* Rust 提供核心算法计算的高性能与内存安全。
39+
* **界面与算法完全解耦**,使 UI和工具链可独立推进。
40+
* 完全开源的工具链 **`ms_toollib`(MIT License)**,可通过 `pip install ms_toollib` 直接安装并在其他项目中复用。
4541

46-
+ It **internally integrates three major mine-judging engines, an integrated board state machine, a probability calculation engine, and an Optical Board Recognition (OBR) engine**, offering performance advantages.
42+
---
4743

48-
+ Written using Python/PyQt5 and Rust, the modules cooperate with each other and are integrated into one, balancing **development efficiency, memory safety, and execution speed**. The game interface is highly separated from the algorithms, and the self-developed toolbox is also open-source, following a more permissive MIT license, which can be installed via the command `pip install ms_toollib`.
44+
### (3)游戏模式与交互能力
4945

50-
+ In terms of game modes, it features **all six no-guess minesweeper modes, standard, and win7**, with unique modes for both weak and strong guesswork.
46+
具备目前扫雷软件生态中覆盖度最广、交互方式最现代化的功能。
5147

52-
+ Aesthetically, it appears as a standard minesweeper, but it can **adjust its size** by holding down the ctrl key and scrolling the wheel, and adjust the **transparency** of the window. This is rare.
48+
* 支持 **全部 6 种无猜模式 + 标准 + Win7 模式**;弱可猜 / 强可猜模式均为独家实现。
49+
* **Ctrl + 滚轮** 自由缩放界面尺寸,提供罕见的 UI 灵活度。
50+
* **Space**:即时计算当前盘面每一格的雷概率。
51+
* **Ctrl + Space**:截屏识别并对任何外部扫雷应用执行概率计算(OBR)。
52+
* **局面筛选器**:基于自定义策略的复杂条件过滤。
53+
* **性能指标系统**:内置 3BV/s、STNB、RQP 等指标,并支持自定义公式。
5354

54-
+ Pressing "space" calculates the probability of each cell being a mine in the board. This is rare.
55+
---
5556

56-
+ Pressing "ctrl+space" enables **screenshot recognition** to calculate the probability of each cell being a mine in other minesweeper games. This is unique.
57+
### (4)录像系统与生态兼容
5758

58-
+ Its built-in video player can analyze high-level abstract features of recordings and display the probability of each cell being a mine in real-time. This is unique. It can play four mainstream formats of recordings: avf, rmv, mvf, and evf. This is rare.
59+
元扫雷不仅是游戏本体,也是一套专业分析平台。
5960

60-
+ It can calculate and display metrics such as 3BV/s, STNB, RQP, and allows for custom formulas. This is rare.
61+
* 高级录像播放器:支持高层抽象分析,并实时呈现格子概率。
62+
* 兼容 **avf / rmv / mvf / [evf](https://github.com/eee555/ms_toollib/blob/main/evf%E6%A0%87%E5%87%86.md)** 四大主流录像格式。
63+
* 兼容[**evfs**](https://github.com/eee555/ms_toollib/blob/main/evfs%E6%A0%87%E5%87%86.md)录像集格式。
64+
* 对常见作弊手段(如变速齿轮)具备对抗能力。
65+
* 国际化支持:中文、英文、德文、波兰文等语言。
6166

62-
+ Comprehensive board filtering capabilities, configurable by the user. This is rare.
67+
元扫雷正处于持续演进阶段,通常 **3~12 个月发布一个版本**
68+
欢迎提交 **Issue / PR / Star / Fork** ——您的参与将决定一个开源扫雷生态的未来走向。
6369

64-
+ Defense capabilities against various cheating methods, including speed changers.
65-
66-
+ Internationalization, including languages such as Chinese, English, German, Polish, and more.
67-
68-
Currently in the lengthy development phase, with updates approximately every 1 to 3 months, we welcome issues, stars, pull requests, and forks.
69-
70-
### 开发计划
70+
### 参考连接
7171

7272
+ 使用教程:[https://openms.top/#/guide/[80.%E6%95%99%E7%A8%8B.%E8%BD%AF%E4%BB%B6]%E5%85%83%E6%89%AB%E9%9B%B7%E4%BD%BF%E7%94%A8%E6%95%99%E7%A8%8B](https://openms.top/#/guide/[80.%E6%95%99%E7%A8%8B.%E8%BD%AF%E4%BB%B6]%E5%85%83%E6%89%AB%E9%9B%B7%E4%BD%BF%E7%94%A8%E6%95%99%E7%A8%8B)
7373
+ 算法工具箱地址:[https://github.com/eee555/ms_toollib](https://github.com/eee555/ms_toollib)
7474
+ 算法工具箱文档:[https://docs.rs/ms_toollib](https://docs.rs/ms_toollib)
7575

7676
## 安装
77-
建议在`Windows 10``Windows 11`下运行本游戏,其它操作系统未经测试,可能出现意想不到的问题。
77+
78+
操作系统:仅支持`Windows 10``Windows 11`
7879

7980
### 方案1:通过官方下载链接安装(推荐)
8081
在下面的[下载链接](#下载链接)中找到最新的版本,然后下载,解压,直接运行`main.exe`文件(如果警告请点击“仍然运行”),开箱即用。通过此方法安装的软件,是`正版`的软件,能够对录像文件进行官方的签名(签名功能打包在“metaminesweeper_checksum.pyd”中,占比很小,且是闭源的)。
@@ -120,14 +121,13 @@ Currently in the lengthy development phase, with updates approximately every 1 t
120121
python3 src/main.py # *nix
121122
```
122123

123-
## 实现原理
124-
125-
(还没写,计划弄出3.5以后回头来写)
126-
127124
## 贡献
128125

129126
[CONTRIBUTING.md](https://github.com/eee555/Solvable-Minesweeper/blob/master/CONTRIBUTING.md)
130127

128+
# 协议须知
129+
项目使用了附带额外条款的GPLv3协议,尤其禁止了项目未经授权的商用行为,也规定了项目的收益分配方式。细节参见`LICENSE`
130+
131131
## 荣誉
132132
收录于Awesome Rust Repositories:
133133
[https://twitter.com/RustRepos/status/1636837781765799940](https://twitter.com/RustRepos/status/1636837781765799940)
@@ -140,19 +140,19 @@ Currently in the lengthy development phase, with updates approximately every 1 t
140140
[![Star History Chart](https://api.star-history.com/svg?repos=eee555/Metasweeper&type=Date)](https://star-history.com/?repos=eee555/Metasweeper#repos=eee555/Metasweeper&eee555/Metasweeper&Date)
141141

142142
## 赞助
143-
感谢您考虑支持我们的开源项目,赞助时请备注5+您的昵称,例如“5张先生”。您的赞助将有助于项目的持续发展和改进,使我们能够继续提高软件的质量(owner许诺向所有contributor按获得赞助时commit数量的比例分配赞助得到的收入)
143+
感谢您考虑支持我们的开源项目,赞助时请备注**项目名称+您的昵称+其他要求**,例如`元扫雷+张先生+建议添加**功能`。您的赞助将有助于项目的持续发展和改进,使我们能够继续提高软件的质量。此外,按照本项目协议协议,赞助得到的收入将由贡献者按commit数量的比例进行分配
144144

145145
### 一般赞助者
146-
- 一次性捐款¥3及以上
146+
- 一次性捐款 **¥3** 及以上
147147
- 您的名字将永久出现在项目的贡献者列表中(按照您要求的形式)
148148

149149
### 重要赞助者
150-
- 一次性捐款¥50及以上
150+
- 一次性捐款 **¥50** 及以上
151151
- 一般赞助者的所有的权益
152152
- 独家定期报告项目进展
153153

154154
### 核心赞助者
155-
- 累计捐款¥1000及以上
155+
- 累计捐款 **¥1000** 及以上
156156
- 重要赞助者的所有的权益
157157
- 可行的前提下,按照您的要求来制定开发计划
158158

0 commit comments

Comments
 (0)