Skip to content

Commit

Permalink
Version 0.1.12
Browse files Browse the repository at this point in the history
新功能:
- 添加通过脚本形式启动 Py2exe-GUI 的功能
- 增加 `PyInstaller命令选项详情` 窗口
- 将 `IconFileDlg` 默认打开目录自动设置为脚本所在目录

修复与增强:
- 增强 `SubProcessTool` 调试能力,添加当子进程发生错误时向终端输出的警告信息;调整启动子进程与显示对话框窗口的顺序,确保子进程输出信息能够被捕获;
- 增强获取运行时信息机制,获取平台、用户语言等;
- 调整部分槽函数位置与组织结构,使能通过 Mypy 检查;

依赖项更新:
- 更新数个开发依赖工具版本
  • Loading branch information
muziing committed Dec 12, 2023
1 parent e8b6652 commit 669a056
Show file tree
Hide file tree
Showing 6 changed files with 71 additions and 103 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ repos:
- id: end-of-file-fixer

- repo: https://github.com/psf/black
rev: 23.11.0
rev: 23.12.0
hooks:
- id: black
args: [--config, "./pyproject.toml"]

- repo: https://github.com/pycqa/isort
rev: 5.12.0
rev: 5.13.1
hooks:
- id: isort
args: [--settings-path, "./pyproject.toml"]
Expand Down
115 changes: 62 additions & 53 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "py2exe-gui"
version = "0.1.11"
version = "0.1.12"
description = "GUI for PyInstaller, based on PySide6"
keywords = ["PyInstaller", "GUI", "PySide6"]
authors = ["muzing <muzi2001@foxmail.com>"]
Expand All @@ -23,16 +23,18 @@ py2exe-gui = 'py2exe_gui.__main__:main'
[tool.poetry.dependencies]
python = ">=3.8,<3.12"
PySide6 = "^6.6.0"
pyyaml = "^6.0.1"

[tool.poetry.group.dev]

[tool.poetry.group.dev.dependencies]
pre-commit = "^3.5.0"
black = "^23.11.0"
isort = "^5.12.0"
black = "^23.12.0"
isort = "^5.13.0"
ruff = "^0.1.7"
mypy = "^1.7.0"
pyinstaller = "^6.2.0"
types-pyyaml = "^6.0.12.12"

[tool.black]
line-length = 88
Expand Down
2 changes: 1 addition & 1 deletion src/py2exe_gui/Constants/app_constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ class AppConstant:
"""

NAME = "Py2exe-GUI"
VERSION = "0.1.11"
VERSION = "0.1.12"
AUTHORS = ["muzing <muzi2001@foxmail.com>"]
LICENSE = "GPL-3.0-or-later"
2 changes: 1 addition & 1 deletion src/py2exe_gui/Core/subprocess_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def start_process(

def abort_process(self, timeout: int = 5000) -> bool:
"""
终止子进程 \n
尝试中止子进程,超时后杀死子进程。若子进程没有运行,则什么都不做。 \n
:param timeout: 超时时间,单位为毫秒
:return: 子进程是否完成
"""
Expand Down
43 changes: 0 additions & 43 deletions src/py2exe_gui/Widgets/dialog_widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,6 @@ def __init__(self, parent: Optional[QWidget] = None) -> None:

super().__init__(parent)

self._setup()

def _setup(self) -> None:
"""
配置脚本路径对话框 \n
"""

self.setAcceptMode(QFileDialog.AcceptMode.AcceptOpen)
self.setViewMode(QFileDialog.ViewMode.Detail)
self.setNameFilters(("Python脚本文件 (*.py *.pyw)", "所有文件 (*)"))
Expand All @@ -49,13 +42,6 @@ def __init__(self, parent: Optional[QWidget] = None) -> None:

super().__init__(parent)

self._setup()

def _setup(self) -> None:
"""
配置应用图标对话框 \n
"""

self.setAcceptMode(QFileDialog.AcceptMode.AcceptOpen)
self.setViewMode(QFileDialog.ViewMode.Detail)
self.setNameFilters(("图标文件 (*.ico *.icns)", "所有文件 (*)"))
Expand All @@ -66,28 +52,6 @@ def _setup(self) -> None:
self.setLabelText(QFileDialog.DialogLabel.Reject, "取消")


class AddDataDlg(QFileDialog):
"""
用于添加附加数据的对话框
"""

def __init__(self, parent: Optional[QWidget] = None) -> None:
"""
:param parent: 父控件对象
"""

super().__init__(parent)

self._setup()

def _setup(self) -> None:
"""
配置添加数据对话框 \n
"""

pass


class AboutDlg(QMessageBox):
"""
用于显示关于信息的对话框
Expand All @@ -101,13 +65,6 @@ def __init__(self, parent: Optional[QWidget] = None) -> None:
super().__init__(parent)

self._about_text: str = ""
self._setup()

def _setup(self) -> None:
"""
配置关于信息对话框 \n
"""

self.setWindowTitle("关于")
self.setStandardButtons(QMessageBox.StandardButton.Ok)
self.setTextFormat(Qt.TextFormat.MarkdownText)
Expand Down

0 comments on commit 669a056

Please sign in to comment.