File tree 5 files changed +101
-4
lines changed
5 files changed +101
-4
lines changed Original file line number Diff line number Diff line change
1
+ name : 编译
2
+ run-name : 编译
3
+ on :
4
+ workflow_dispatch :
5
+ jobs :
6
+ Build :
7
+ runs-on : windows-2022
8
+ permissions : write-all
9
+ steps :
10
+ - name : 仓库检出
11
+ uses : actions/checkout@v4
12
+ - name : 设置 Python 3.10 # 3.8 一直编译失败,只能改用3.10
13
+ uses : actions/setup-python@v3
14
+ with :
15
+ python-version : " 3.10"
16
+ - name : 安装依赖
17
+ run : |
18
+ python -m pip install --upgrade pip
19
+ pip install -r requirements.txt -U nuitka zstandard ordered-set
20
+ - name : 编译
21
+ run :
22
+ python -m nuitka --mingw64 --assume-yes-for-downloads --standalone --remove-output --jobs=8 --enable-plugins="pyqt5" --output-dir="dist" --main="main.py" --windows-icon-from-ico="icon.ico" --company-name="DaYe" --product-name="WindowsCleaner" --file-version="5.0.0" --product-version="5.0" --file-description="WindowsCleaner" --copyright="DaYe" --trademarks="DaYe"
23
+ - name : 移动文件
24
+ run :
25
+ move WCMain dist/main.dist/WCMain
26
+ - name : 上传文件
27
+ uses : actions/upload-artifact@v4
28
+ with :
29
+ name : WindowsCleaner
30
+ path : dist
Original file line number Diff line number Diff line change
1
+ .idea
2
+ /venv
3
+ /__pycache__
4
+ /build
5
+ /dist
Original file line number Diff line number Diff line change 27
27
### 安装
28
28
一路Next即可,如果想以后方便打开可以勾选上` 创建桌面快捷方式 ` 选项。
29
29
30
- ### 从源代码构建
31
-
32
- - Python 3.8
30
+ ### 手动编译
31
+ #### 源码运行
32
+ - 克隆此仓库
33
+ - 安装 Python 3.8
34
+ - 安装依赖` pip install -r requirements.txt `
35
+ - 运行` python main.py `
36
+ #### 本地编译
37
+ - 先完成源码运行
38
+ - 安装 Nuitka
39
+ ``` pip
40
+ pip install nuitka
41
+ ```
42
+ - 编译` python -m nuitka --mingw64 --assume-yes-for-downloads --standalone --remove-output --windows-console-mode="disable" --enable-plugins="pyqt5" --output-dir="dist" --main="main.py" --windows-icon-from-ico="icon.ico" `
43
+ > [ !tip]
44
+ >
45
+ > 如果您的电脑安装了 Visual Studio 以及 msvc 编译器,可以将编译参数中的` --mingw64 ` 选项删除,否则 Nuitka 会直接从 Github 下载 Mingw64,不论电脑上是否安装!
46
+
47
+ - 将` WCMain ` 文件夹复制到` dist\main.dist ` 下,运行` main.exe ` 即可
48
+ #### GitHub Actions(推荐)
49
+ - 全自动编译,直接运行,运行结束后下载编译产物全部解压即可使用(注:编译时间非常长,大概编译一次需要20-30分钟
33
50
34
51
### [ Bilibili: Mr_Jacek ] ( https://space.bilibili.com/1847808902?spm_id_from=333.1007.0.0 )
35
52
Original file line number Diff line number Diff line change 6
6
],
7
7
"version" : 5 ,
8
8
"language" : " zh_cn" ,
9
- "theme" : 0 ,
9
+ "theme" : 2 ,
10
10
"themeColor" : " #009faa" ,
11
11
"AutoRunEnabled" : " False" ,
12
12
"closeEvent" : 0 ,
Original file line number Diff line number Diff line change
1
+ # -*- mode: python ; coding: utf-8 -*-
2
+
3
+
4
+ a = Analysis (
5
+ ['main.py' ],
6
+ pathex = [],
7
+ binaries = [],
8
+ datas = [],
9
+ hiddenimports = [],
10
+ hookspath = [],
11
+ hooksconfig = {},
12
+ runtime_hooks = [],
13
+ excludes = [],
14
+ noarchive = False ,
15
+ optimize = 0 ,
16
+ )
17
+ pyz = PYZ (a .pure )
18
+
19
+ exe = EXE (
20
+ pyz ,
21
+ a .scripts ,
22
+ [],
23
+ exclude_binaries = True ,
24
+ name = 'main' ,
25
+ debug = False ,
26
+ bootloader_ignore_signals = False ,
27
+ strip = False ,
28
+ upx = True ,
29
+ console = False ,
30
+ disable_windowed_traceback = False ,
31
+ argv_emulation = False ,
32
+ target_arch = None ,
33
+ codesign_identity = None ,
34
+ entitlements_file = None ,
35
+ icon = ['logo.png' ],
36
+ )
37
+ coll = COLLECT (
38
+ exe ,
39
+ a .binaries ,
40
+ a .datas ,
41
+ strip = False ,
42
+ upx = True ,
43
+ upx_exclude = [],
44
+ name = 'main' ,
45
+ )
You can’t perform that action at this time.
0 commit comments