Skip to content

Commit 4db8784

Browse files
committed
2 parents 6865fa0 + cb7e18c commit 4db8784

39 files changed

+3104
-1478
lines changed

.github/workflows/python-app.yml

Lines changed: 53 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
# This workflow will install Python dependencies, run tests and lint with a single version of Python
2-
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3-
41
name: Build Metaminesweeper
52

63
on:
@@ -14,91 +11,63 @@ on:
1411
branches:
1512
- main
1613
- master
17-
tags:
18-
- '*'
1914
workflow_dispatch:
2015

2116
jobs:
2217
build:
2318
runs-on: windows-latest
2419

2520
steps:
26-
- uses: actions/checkout@v4
27-
28-
29-
- name: Install Qt
30-
uses: jurplel/install-qt-action@v3
31-
32-
- name: transform qrc to py with pyrcc5
33-
run: |
34-
lrelease src/ui/en_US.ts -qm en_US.qm
35-
lrelease src/ui/de_DE.ts -qm de_DE.qm
36-
lrelease src/ui/pl_PL.ts -qm pl_PL.qm
37-
38-
39-
- name: Set up Python 3.12
40-
uses: actions/setup-python@v4
41-
with:
42-
python-version: '3.12'
43-
44-
- name: Install Python dependencies
45-
run: |
46-
python -V
47-
python -m pip install --upgrade pip
48-
pip install flake8 pyinstaller==4.10
49-
pip install -r requirements.txt
50-
51-
52-
# - name: transform ui to py with pyuic5
53-
# run: |
54-
# cd uiFiles
55-
# pyuic5 -o ui_gameSettings.py ui_gs.ui
56-
# pyuic5 -o ui_gameSettingShortcuts.py ui_gs_shortcuts.ui
57-
# pyuic5 -o ui_defined_parameter.py ui_defined_parameter.ui
58-
# pyuic5 -o ui_mine_num_bar.py ui_mine_num_bar.ui
59-
# cd ..
60-
# md src/ui
61-
# cp uiFiles/ui_gameSettings.py src/ui/ui_gameSettings.py
62-
# cp uiFiles/ui_gameSettingShortcuts.py src/ui/ui_gameSettingShortcuts.py
63-
# cp uiFiles/ui_defined_parameter.py src/ui/ui_defined_parameter.py
64-
# cp uiFiles/ui_mine_num_bar.py src/ui/ui_mine_num_bar.py
65-
66-
# - name: transform qrc to py with pyrcc5
67-
# run: |
68-
# cd src
69-
# pyrcc5 src_help_pic.qrc -o src_help_pic_rc.py
70-
# cd ..
71-
72-
73-
- name: Generate metaminesweeper_checksum.pyd
74-
run: |
75-
pip install cython
76-
cd package_tool
77-
python setup.py build_ext --inplace
78-
ren *.pyd metaminesweeper_checksum.pyd
79-
cd ..
80-
move package_tool/metaminesweeper_checksum.pyd src/metaminesweeper_checksum.pyd
81-
del src/metaminesweeper_checksum.py
82-
83-
84-
- name: Package with PyInstaller
85-
run: |
86-
# pyinstaller --icon "./src/media/cat.ico" --noconsole --noconfirm --clean --add-data "./src/media/*:./media" --add-data "./src/de_DE.qm:." --add-data "./src/pl_PL.qm:." --add-data "./src/en_US.qm:." --paths src --name metaminesweeper src/main.py
87-
pyinstaller --icon "./src/media/cat.ico" --noconsole --noconfirm --clean --add-data "./src/media/*:./media" --add-data "./de_DE.qm:." --add-data "./pl_PL.qm:." --add-data "./en_US.qm:." --paths src --name metaminesweeper src/main.py
88-
89-
90-
91-
- name: Move media and qm files
92-
run: |
93-
move dist/metaminesweeper/_internal/media dist/metaminesweeper/media
94-
move dist/metaminesweeper/_internal/en_US.qm dist/metaminesweeper/en_US.qm
95-
move dist/metaminesweeper/_internal/de_DE.qm dist/metaminesweeper/de_DE.qm
96-
move dist/metaminesweeper/_internal/pl_PL.qm dist/metaminesweeper/pl_PL.qm
97-
98-
# upload the result package as an artifact
99-
- name: Upload artifacts
100-
uses: actions/upload-artifact@v4
101-
if: success()
102-
with:
103-
name: Metaminesweeper-snapshot
104-
path: dist/
21+
- uses: actions/checkout@v4
22+
23+
- name: Install Qt
24+
uses: jurplel/install-qt-action@v3
25+
26+
- name: Generate translation qm files
27+
run: |
28+
lrelease src/ui/en_US.ts -qm src/en_US.qm
29+
lrelease src/ui/de_DE.ts -qm src/de_DE.qm
30+
lrelease src/ui/pl_PL.ts -qm src/pl_PL.qm
31+
32+
- name: Set up Python 3.12
33+
uses: actions/setup-python@v4
34+
with:
35+
python-version: "3.12"
36+
37+
- name: Install Python dependencies
38+
run: |
39+
python -V
40+
python -m pip install --upgrade pip
41+
pip install flake8 pyinstaller>=6.19.0 cython
42+
pip install -r requirements.txt
43+
44+
- name: Generate metaminesweeper_checksum.pyd
45+
run: |
46+
cd package_tool
47+
python setup.py build_ext --inplace
48+
ren *.pyd metaminesweeper_checksum.pyd
49+
cd ..
50+
move package_tool\metaminesweeper_checksum.pyd src\metaminesweeper_checksum.pyd
51+
del src\metaminesweeper_checksum.py
52+
53+
- name: Package with PyInstaller
54+
run: |
55+
pyinstaller `
56+
--icon src/media/cat.ico `
57+
--noconsole `
58+
--noconfirm `
59+
--clean `
60+
--paths src `
61+
--name metaminesweeper `
62+
--add-data "src/media;media" `
63+
--add-data "src/en_US.qm;." `
64+
--add-data "src/de_DE.qm;." `
65+
--add-data "src/pl_PL.qm;." `
66+
src/main.py
67+
68+
- name: Upload artifacts
69+
uses: actions/upload-artifact@v4
70+
if: success()
71+
with:
72+
name: Metaminesweeper-snapshot
73+
path: dist/

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,3 +169,6 @@ old/
169169
src/plugins/*/*.json
170170
src/plugins/*/*.db
171171
.vscode/
172+
src/history.db
173+
history_show_fields.json
174+
src/out.json

Metaminesweeper.iss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
; 程序名称
77
#define MyAppName "Metasweeper"
88
; 程序版本
9-
#define MyAppVersion "3.2.1"
9+
#define MyAppVersion "3.2.2"
1010
; 发行商
1111
#define MyAppPublisher "eee555"
1212
; 官网

README.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@
44

55
- 包含8种模式的专业扫雷版本、第三代扫雷录像播放器及高性能算法工具箱
66

7-
[![MetaSweeper](https://img.shields.io/badge/MetaSweeper-v3.2.1-brightgreen.svg)](https://github.com/eee555/Solvable-Minesweeper)
8-
[![stars](https://img.shields.io/github/stars/eee555/Solvable-Minesweeper)](https://github.com/eee555/Solvable-Minesweeper/stargazers)
9-
[![forks](https://img.shields.io/github/forks/eee555/Solvable-Minesweeper)](https://github.com/eee555/Solvable-Minesweeper/forks)
7+
[![](https://img.shields.io/github/release/eee555/Metasweeper.svg)](https://github.com/eee555/Metasweeper/releases)
8+
[![stars](https://img.shields.io/github/stars/eee555/Metasweeper)](https://github.com/eee555/Metasweeper/stargazers)
9+
[![forks](https://img.shields.io/github/forks/eee555/Metasweeper)](https://github.com/eee555/Metasweeper/forks)
10+
[![](https://img.shields.io/github/downloads/eee555/Metasweeper/total.svg)](https://github.com/eee555/Metasweeper/releases)
1011

1112
## 简介
1213

@@ -170,6 +171,10 @@
170171

171172
## 下载链接
172173

174+
### 正式版v3.2.2:
175+
添加了插件功能。开始支持播放RMV2录像。修复了在局面边框上按下、局面内释放时,处理错误的严重bug。修复了不能在“cell0”上双击的bug。优化了“关于”菜单。补全了计数器中缺失的若干算子、删除了checksum_ok变量。修复了一个evfs安全漏洞。添加了命令行校验录像工具。现在限制光标不能超出边框时,窗口始终置顶。添加了打开录像、设置目录的菜单选项。
176+
链接:[https://gitee.com/ee55/Metasweeper/releases/download/3.2.2/Metaminesweeper-3.2.2.exe](https://gitee.com/ee55/Metasweeper/releases/download/3.2.2/Metaminesweeper-3.2.2.exe)[https://github.com/eee555/Metasweeper/releases/download/3.2.2/Metaminesweeper-3.2.2.exe](https://github.com/eee555/Metasweeper/releases/download/3.2.2/Metaminesweeper-3.2.2.exe)
177+
173178
### 正式版v3.2.1:
174179
可以保存evfs录像集,可以选择其中任意录像播放,可以多选并另存为evf文件。增加pluck指标,刻画了运气的好坏。增加迟延模式,可以在标识前增加“[lag]”,获取更宽松的作弊判定。录像播放控制、计数器等子窗口可以保存位置坐标。升级了录像播放器,可以多标签切换。将录像格式升级至evf4。调整法埋雷算法升级。回车等于窗口确定。播放器进度条时间修改为3位小数。可以通过拖入文件来进行播放。给计数器添加log, sin, tan, cos, row, column, minenum等函数和变量。优化了国家下拉框的补全交互。删除设置中的透明度属性。修复了计数器公式不能包含百分号%、回放时脸不动、窗口超出屏幕后无法移回、文件权限相关问题等已经发现的bug。
175180
链接:[https://gitee.com/ee55/Metasweeper/releases/download/3.2.1/Metaminesweeper-3.2.1.exe](https://gitee.com/ee55/Metasweeper/releases/download/3.2.1/Metaminesweeper-3.2.1.exe)[https://github.com/eee555/Metasweeper/releases/download/3.2.1/Metaminesweeper-3.2.1.exe](https://github.com/eee555/Metasweeper/releases/download/3.2.1/Metaminesweeper-3.2.1.exe)

README_EN.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@
44

55
* A professional Minesweeper suite featuring 8 gameplay modes, a third-generation replay player, and a high-performance algorithm toolbox.
66

7-
[![MetaSweeper](https://img.shields.io/badge/MetaSweeper-v3.2.1-brightgreen.svg)](https://github.com/eee555/Solvable-Minesweeper)
8-
[![stars](https://img.shields.io/github/stars/eee555/Solvable-Minesweeper)](https://github.com/eee555/Solvable-Minesweeper/stargazers)
9-
[![forks](https://img.shields.io/github/forks/eee555/Solvable-Minesweeper)](https://github.com/eee555/Solvable-Minesweeper/forks)
7+
[![](https://img.shields.io/github/release/eee555/Metasweeper.svg)](https://github.com/eee555/Metasweeper/releases)
8+
[![stars](https://img.shields.io/github/stars/eee555/Metasweeper)](https://github.com/eee555/Metasweeper/stargazers)
9+
[![forks](https://img.shields.io/github/forks/eee555/Metasweeper)](https://github.com/eee555/Metasweeper/forks)
10+
[![](https://img.shields.io/github/downloads/eee555/Metasweeper/total.svg)](https://github.com/eee555/Metasweeper/releases)
1011

1112
## Introduction
1213

requirements.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
pyQt5==5.15.11
2-
ms-toollib==1.5.1
2+
ms-toollib==1.5.3
33
setuptools==80.9.0
4-
pyinstaller==6.16.0
54
msgspec>=0.20.0
65
zmq>=0.0.0
7-
6+
pywin32
87

src/gameAbout.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
from PyQt5 import QtGui
22
from ui.ui_about import Ui_Form
33
from ui.uiComponents import RoundQDialog
4+
from PyQt5.QtWidgets import QShortcut
5+
from PyQt5.QtGui import QKeySequence
6+
from PyQt5.QtCore import Qt
47

58
class ui_Form(Ui_Form):
69
def __init__(self, r_path, parent):
710
# 关于界面,继承一下就好
811
self.Dialog = RoundQDialog(parent)
912
self.setupUi (self.Dialog)
10-
# self.Dialog.setWindowIcon (QtGui.QIcon (str(r_path.with_name('media').joinpath('cat.ico'))))
11-
12-
13-
13+
14+
# 空格键快捷键关闭这个窗口。回车不需要设置,在ui文件中已经设置。
15+
QShortcut(QKeySequence("Space"), self.Dialog, activated=self.pushButton.click)
1416

src/gameRecordPop.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
11
from PyQt5 import QtCore, QtGui
22
from ui.ui_record_pop import Ui_Form
33
from ui.uiComponents import RoundQDialog
4+
from PyQt5.QtWidgets import QShortcut
5+
from PyQt5.QtGui import QKeySequence
46

57
class ui_Form(Ui_Form):
68
def __init__(self, r_path, del_items: list, pb_bbbv, nf_items, parent):
79
self.Dialog = RoundQDialog(parent)
810
self.setupUi(self.Dialog)
911
self.Dialog.setWindowIcon (QtGui.QIcon (str(r_path.with_name('media').joinpath('cat.ico'))))
1012

13+
# 空格键快捷键关闭这个窗口。回车不需要设置,在ui文件中已经设置。
14+
QShortcut(QKeySequence("Space"), self.Dialog, activated=self.pushButton.click)
15+
1116
for i in nf_items:
1217
eval(f"self.label_{i}.setText('NF ' + self.label_{i}.text())")
1318
for i in del_items:

0 commit comments

Comments
 (0)