Skip to content

Commit 45b3801

Browse files
committed
修复linux打包失败的扩展名问题,开始打包
1 parent 40891da commit 45b3801

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

Secrandom.spec

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,22 @@ a = Analysis(
4747

4848
pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher)
4949

50+
import sys
51+
52+
# 根据平台设置不同的EXE名称
53+
exename = "SecRandom"
54+
if sys.platform == "linux":
55+
# 在Linux上,EXE会创建一个无扩展名的文件,为避免与COLLECT目录冲突,添加.bin扩展名
56+
exename = "SecRandom.bin"
57+
5058
exe = EXE(
5159
pyz,
5260
a.scripts,
5361
a.binaries,
5462
a.zipfiles,
5563
a.datas,
5664
[],
57-
name="SecRandom",
65+
name=exename,
5866
debug=False,
5967
bootloader_ignore_signals=False,
6068
strip=False,

0 commit comments

Comments
 (0)