|
1 | 1 |  |
2 | 2 |
|
3 | | -<h2 align="center">强大易用的 Python 图形界面打包工具</h2> |
| 3 | +<h2 align="center">Easy-to-use Python GUI packaging tool</h2> |
4 | 4 |
|
5 | 5 | <p align="center"> |
6 | 6 | <img alt="GitHub Repo stars" src="https://img.shields.io/github/stars/muziing/Py2exe-GUI"> |
7 | 7 | <img alt="Python Version" src="https://img.shields.io/pypi/pyversions/py2exe-gui"> |
8 | 8 | <a href="https://pypi.org/project/py2exe-gui/"><img alt="PyPI Version" src="https://img.shields.io/pypi/v/py2exe-gui"></a> |
9 | 9 | <a href="https://doc.qt.io/qtforpython/index.html"><img alt="PySide Version" src="https://img.shields.io/badge/PySide-6.2-blue"></a> |
10 | 10 | <a href="https://github.com/psf/black"><img alt="Code style: black" src="https://img.shields.io/badge/code%20style-black-000000.svg"></a> |
11 | | -<a href="http://mypy-lang.org/"><img alt="Checked with mypy" src="http://www.mypy-lang.org/static/mypy_badge.svg"></a> |
| 11 | +<a href="http://mypy-lang.org/"><img alt="Checked with mypy" src="https://img.shields.io/badge/mypy-checked-blue"></a> |
12 | 12 | </p> |
13 | 13 |
|
14 | | -## 简介 |
| 14 | +<p align="center"> |
| 15 | +English | <a href="README_zh.md">简体中文</a> |
| 16 | +</p> |
15 | 17 |
|
16 | | -Py2exe-GUI 是一个基于 [PySide6](https://doc.qt.io/qtforpython/index.html) 开发的 [PyInstaller](https://pyinstaller.org/) 辅助工具,旨在提供完整易用的图形化界面,方便用户进行 Python 项目的打包。 |
| 18 | +## Introduction |
17 | 19 |
|
18 | | - |
| 20 | +Py2exe-GUI is a assist tool based on [PySide6](https://doc.qt.io/qtforpython/index.html), designed to provide a complete yet easy-to-use GUI for [PyInstaller](https://pyinstaller.org/). |
19 | 21 |
|
20 | | -有如下特性: |
| 22 | + |
21 | 23 |
|
22 | | -- 完全图形化界面,易用 |
23 | | -- 支持 PyInstaller 的全部选项 |
24 | | -- (暂未实现)可以调用本地任一 Python 解释器,无需在每个待打包的解释器环境中重复安装 |
25 | | -- 可以显式指定打包时使用的 Python 解释器与对应环境(调用该解释器的 `python3 -m PyInstaller myscript.py` 即可) |
26 | | -- 跨平台,支持 Windows、Linux、MacOS |
| 24 | +It has the following features: |
27 | 25 |
|
28 | | -## 如何使用 |
| 26 | +- All options of PyInstaller are supported. |
| 27 | +- Call any local Python interpreter with the correspoding environment. No need for repeat installations.(Not realized yet) |
| 28 | +- Cross-platform, supports Windows, Linux and MacOS. |
29 | 29 |
|
30 | | -> 注意:Py2exe-GUI 尚处早期开发阶段,使用方式可能频繁变化,注意经常查阅此使用说明。 |
| 30 | +## How to use |
31 | 31 |
|
32 | | -### 方式1:通过 `pip` 安装 |
| 32 | +> Note: Py2exe-GUI is still in the early development stage, the way of using it may change frequently, so please check this instruction frequently. |
33 | 33 |
|
34 | | -首先在待打包的 Python 解释器环境中安装 PyInstaller: |
| 34 | +### Option A: Install with `pip` |
| 35 | + |
| 36 | +First, install PyInstaller in the Python interpreter environment which to be packaged: |
35 | 37 |
|
36 | 38 | ```shell |
37 | | -pip install pyinstaller==5.6 |
| 39 | +pip install pyinstaller==5.6.2 |
38 | 40 | ``` |
39 | 41 |
|
40 | | -然后通过 pip 安装 Py2exe-GUI: |
| 42 | +Then install Py2exe-GUI with `pip`: |
41 | 43 |
|
42 | 44 | ```shell |
43 | 45 | pip install py2exe-gui |
44 | 46 | ``` |
45 | 47 |
|
46 | | -运行 |
| 48 | +Run: |
47 | 49 |
|
48 | 50 | ```shell |
49 | 51 | python -m py2exe_gui |
50 | 52 | ``` |
51 | 53 |
|
52 | | -### 方式2:通过仓库源码运行 |
| 54 | +### Option B: Run through source code |
53 | 55 |
|
54 | | -克隆仓库: |
| 56 | +Clone repo: |
55 | 57 |
|
56 | 58 | ```shell |
57 | 59 | git clone https://github.com/muziing/Py2exe-GUI.git |
58 | 60 | ``` |
59 | 61 |
|
60 | | -安装依赖项(需要提前安装好 [Poetry](https://python-poetry.org/)): |
| 62 | +Install [Poetry](https://python-poetry.org/) and create a virtual environment: |
| 63 | + |
| 64 | +```shell |
| 65 | +poetry init |
| 66 | +``` |
| 67 | + |
| 68 | +Install the dependencies: |
61 | 69 |
|
62 | 70 | ```shell |
63 | 71 | poetry install |
64 | 72 | ``` |
65 | 73 |
|
66 | | -运行 src 目录下的 [Py2exe-GUI.py](src/Py2exe-GUI.py): |
| 74 | +Run [Py2exe-GUI.py](src/Py2exe-GUI.py): |
67 | 75 |
|
68 | 76 | ```shell |
69 | 77 | cd src |
70 | 78 | python Py2exe-GUI.py |
71 | 79 | ``` |
72 | 80 |
|
| 81 | +## Structure |
73 | 82 |
|
74 | | -## 项目结构 |
75 | | - |
76 | | -- 项目所有代码均在 [py2exe_gui](src/py2exe_gui) 目录下 |
77 | | -- [Widgets](src/py2exe_gui/Widgets) 包包含所有界面控件 |
78 | | -- [Core](src/py2exe_gui/Core) 包用于执行打包 |
79 | | -- [Constants](src/py2exe_gui/Constants) 中为常量 |
80 | | - |
81 | | -## TODO |
82 | | - |
83 | | -- [x] 解决相对引用与作为包运行问题 |
84 | | -- [x] 选项参数获取 |
85 | | - - [x] 将参数拼接成完整调用命令 |
86 | | - - [x] 参数预览器控件 |
87 | | - - [ ] 优化拼接代码 |
88 | | -- [x] 调用 `PyInstaller` 子进程 |
89 | | - - [x] 使用 `QProcess` 替代 `subprocess` 以解决界面卡死问题 |
90 | | - - [x] 将子进程的输出与状态显示至单独的弹出窗口 |
91 | | - - [x] 为 `SubProcessDlg` 增加多功能按钮 |
92 | | - - [ ] 优化子进程相关代码,增强异常处理 |
93 | | -- [ ] 增加主界面功能控件 |
94 | | - - [ ] 资源文件添加框 |
95 | | - - [ ] Python 解释器选择器 |
96 | | - - [x] 增加状态栏信息 |
97 | | - - [ ] 「简洁模式」/「详尽模式」切换 |
98 | | -- [ ] 菜单栏功能 |
99 | | - - [ ] `PyInstaller` 选项参数详解表格 |
100 | | - - [ ] 打包任务读写 |
101 | | -- [x] 实现跨平台功能 |
102 | | - - [x] 获取当前运行平台 |
103 | | - - [x] 以合理方式保存至某种全局变量中 |
104 | | - - [x] 定制各平台特有功能 |
105 | | -- [ ] 打包任务 |
106 | | - - [x] 创建打包任务,保存所有选项 |
107 | | - - [ ] ~~定义文件并以适当格式存储(`json`)~~ |
108 | | - - [ ] 创建 [`.spec` 文件](https://pyinstaller.org/en/stable/spec-files.html) |
109 | | - - [ ] `spec` 编辑器 |
110 | | -- [x] 使用 `qrc` 管理[静态资源](src/py2exe_gui/Resources) |
111 | | -- [ ] `logging` 日志记录 |
112 | | -- [ ] QSS 与美化 |
113 | | -- [ ] 动画效果 |
114 | | -- [ ] 翻译与国际化 |
| 83 | +All source code is in the [py2exe_gui] directory. |
| 84 | + |
| 85 | +- [Constants](src/py2exe_gui/Constants) |
| 86 | +- [Core](src/py2exe_gui/Core) |
| 87 | +- [Resources](src/py2exe_gui/Resources) |
| 88 | +- [Widgets](src/py2exe_gui/Widgets) |
| 89 | + |
| 90 | +## License |
| 91 | + |
| 92 | +```text |
| 93 | +Py2exe-GUI |
| 94 | +Copyright (C) 2022 muzing |
| 95 | +
|
| 96 | +This program is free software: you can redistribute it and/or modify |
| 97 | +it under the terms of the GNU General Public License as published by |
| 98 | +the Free Software Foundation, either version 3 of the License, or |
| 99 | +(at your option) any later version. |
| 100 | +
|
| 101 | +This program is distributed in the hope that it will be useful, |
| 102 | +but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 103 | +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 104 | +GNU General Public License for more details. |
| 105 | +
|
| 106 | +You should have received a copy of the GNU General Public License |
| 107 | +along with this program. If not, see <https://www.gnu.org/licenses/>. |
| 108 | +``` |
0 commit comments