From 427cb35971f492cb874f7cbd3bf2ab56452e8300 Mon Sep 17 00:00:00 2001 From: abse4411 Date: Wed, 21 Feb 2024 00:19:34 +0800 Subject: [PATCH] add main.spec --- command/manage.py | 3 ++- main.spec | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 main.spec diff --git a/command/manage.py b/command/manage.py index d969975..9f7fcd2 100644 --- a/command/manage.py +++ b/command/manage.py @@ -13,6 +13,7 @@ # # You should have received a copy of the GNU General Public License # along with this program. If not, see . +import sys from io import StringIO from typing import Any @@ -77,7 +78,7 @@ def execute_cmd(name: str, cmd_line: str): cmd.invoke() # this can be set by QuitCmd if EXIT: - exit(0) + sys.exit(0) def all_cmds(): diff --git a/main.spec b/main.spec new file mode 100644 index 0000000..5ce9e9c --- /dev/null +++ b/main.spec @@ -0,0 +1,38 @@ +# -*- mode: python ; coding: utf-8 -*- + + +a = Analysis( + ['main.py'], + pathex=[], + binaries=[], + datas=[], + hiddenimports=[], + hookspath=[], + hooksconfig={}, + runtime_hooks=[], + excludes=[], + noarchive=False, +) +pyz = PYZ(a.pure) + +exe = EXE( + pyz, + a.scripts, + a.binaries, + a.datas, + [], + name='main', + debug=False, + bootloader_ignore_signals=False, + strip=False, + upx=True, + upx_exclude=[], + runtime_tmpdir=None, + console=True, + disable_windowed_traceback=False, + argv_emulation=False, + target_arch=None, + codesign_identity=None, + entitlements_file=None, + icon=['imgs/projz_icon.ico'], +)