diff --git a/pyproject.toml b/pyproject.toml index e0f9e65..871ea13 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "py2exe-gui" -version = "0.1.13" +version = "0.2.0" description = "GUI for PyInstaller, based on PySide6" keywords = ["PyInstaller", "GUI", "PySide6"] authors = ["muzing "] diff --git a/src/py2exe_gui/Constants/app_constants.py b/src/py2exe_gui/Constants/app_constants.py index 4f6086f..68538a6 100644 --- a/src/py2exe_gui/Constants/app_constants.py +++ b/src/py2exe_gui/Constants/app_constants.py @@ -19,7 +19,7 @@ class AppConstant: """ NAME = "Py2exe-GUI" - VERSION = "0.1.13" + VERSION = "0.2.0" AUTHORS = ["muzing "] LICENSE = "GPL-3.0-or-later" HOME_PAGE = APP_URLs["HOME_PAGE"] diff --git a/src/py2exe_gui/Core/packaging_task.py b/src/py2exe_gui/Core/packaging_task.py index 7960044..7ecd487 100644 --- a/src/py2exe_gui/Core/packaging_task.py +++ b/src/py2exe_gui/Core/packaging_task.py @@ -2,7 +2,7 @@ # For details: https://github.com/muziing/Py2exe-GUI/blob/main/README.md#license from pathlib import Path -from typing import Optional +from typing import Any, Optional from PySide6 import QtCore @@ -40,7 +40,7 @@ def __init__(self, parent: Optional[QtCore.QObject] = None) -> None: self.clean: Optional[bool] = None @QtCore.Slot(tuple) - def handle_option(self, option: tuple[PyinstallerArgs, str]): + def handle_option(self, option: tuple[PyinstallerArgs, Any]): """ 处理用户在界面选择的打包选项,进行有效性验证并保存 \n :param option: 选项 diff --git a/src/py2exe_gui/__init__.py b/src/py2exe_gui/__init__.py index 4454355..82c6a28 100644 --- a/src/py2exe_gui/__init__.py +++ b/src/py2exe_gui/__init__.py @@ -1,4 +1,4 @@ # Licensed under the GPLv3 License: https://www.gnu.org/licenses/gpl-3.0.html # For details: https://github.com/muziing/Py2exe-GUI/blob/main/README.md#license -__version__ = "0.1.13" +__version__ = "0.2.0" diff --git a/src/py2exe_gui/__main__.py b/src/py2exe_gui/__main__.py index d006545..a253501 100644 --- a/src/py2exe_gui/__main__.py +++ b/src/py2exe_gui/__main__.py @@ -35,9 +35,9 @@ def _connect_slots(self) -> None: 连接各种信号与槽 \n """ + self._connect_pyenv_change() self._connect_run_pkg_btn_slot() self._connect_mul_btn_slot(self.subprocess_dlg) - self._connect_pyenv_change() self.center_widget.option_selected.connect(self.packaging_task.handle_option) self.packaging_task.option_set.connect(self.packager.set_pyinstaller_args) @@ -70,6 +70,19 @@ def _connect_pyenv_change(self): ) ) + def _connect_run_pkg_btn_slot(self): + @Slot() + def run_packaging() -> None: + """ + “运行打包”按钮的槽函数 \n + """ + + # 先显示对话框窗口,后运行子进程,确保调试信息/错误信息能被直观显示 + self.subprocess_dlg.show() + self.packager.run_packaging_process() + + self.center_widget.run_packaging_btn.clicked.connect(run_packaging) + def _connect_mul_btn_slot(self, subprocess_dlg): @Slot() def handle_multifunction() -> None: @@ -90,19 +103,6 @@ def handle_multifunction() -> None: # 连接信号与槽 subprocess_dlg.multifunction_btn.clicked.connect(handle_multifunction) - def _connect_run_pkg_btn_slot(self): - @Slot() - def run_packaging() -> None: - """ - “运行打包”按钮的槽函数 \n - """ - - # 先显示对话框窗口,后运行子进程,确保调试信息/错误信息能被直观显示 - self.subprocess_dlg.show() - self.packager.run_packaging_process() - - self.center_widget.run_packaging_btn.clicked.connect(run_packaging) - def closeEvent(self, event: QCloseEvent) -> None: """ 重写关闭事件,进行收尾清理 \n