We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 18fbf16 commit cf6b53dCopy full SHA for cf6b53d
1 file changed
package/nuitka_build.py
@@ -37,6 +37,7 @@ def main():
37
38
# 基础路径设置
39
base_dir = Path(__file__).parent.parent # 项目根目录
40
+ upx_dir = base_dir / './upx/' # UPX目录
41
42
success_count = 0
43
task_error_list = []
@@ -105,8 +106,19 @@ def main():
105
106
cmd.extend(['--windows-icon-from-ico=icon.ico', str(icon_path)])
107
else:
108
print(f"警告: 图标文件不存在 {icon_path}")
-
109
+
110
+ if arrch == "ARM64":
111
+ print("UPX不支持当前架构")
112
+ else:
113
+ if use_upx:
114
+ if upx_dir.exists():
115
+ cmd.addpend('--plugin-enable=upx')
116
+ cmd.extend(['--upx-binary', str(upx_dir)])
117
+ print(f"使用UPX压缩: {upx_dir}")
118
119
+ print(f"警告: UPX目录不存在 {upx_dir}")
120
121
+ print("不使用UPX压缩")
122
# 添加主Python文件
123
cmd.append(str(python_file))
124
0 commit comments