Skip to content

Commit 704dbf7

Browse files
committed
feat: 添加 PyInstaller 打包配置文件
1 parent ebf1816 commit 704dbf7

2 files changed

Lines changed: 45 additions & 1 deletion

File tree

PromptComposer/.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ wheels/
2424
*.egg
2525

2626
# PyInstaller
27-
*.spec
27+
build/
2828

2929
# Unit test / coverage
3030
htmlcov/
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# -*- mode: python ; coding: utf-8 -*-
2+
3+
block_cipher = None
4+
5+
a = Analysis(
6+
['prompt_composer.py'],
7+
pathex=[],
8+
binaries=[],
9+
datas=[('templates', 'templates')], # 包含模板文件夹
10+
hiddenimports=[],
11+
hookspath=[],
12+
hooksconfig={},
13+
runtime_hooks=[],
14+
excludes=[],
15+
win_no_prefer_redirects=False,
16+
win_private_assemblies=False,
17+
cipher=block_cipher,
18+
noarchive=False,
19+
)
20+
21+
pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher)
22+
23+
exe = EXE(
24+
pyz,
25+
a.scripts,
26+
a.binaries,
27+
a.zipfiles,
28+
a.datas,
29+
[],
30+
name='PromptComposer',
31+
debug=False,
32+
bootloader_ignore_signals=False,
33+
strip=False,
34+
upx=True,
35+
upx_exclude=[],
36+
runtime_tmpdir=None,
37+
console=False, # 不显示控制台窗口
38+
disable_windowed_traceback=False,
39+
argv_emulation=False,
40+
target_arch=None,
41+
codesign_identity=None,
42+
entitlements_file=None,
43+
icon=None, # 如果有图标文件可以在这里指定
44+
)

0 commit comments

Comments
 (0)