Python nuitka 不同平台统一打包脚本

import os
import platform

app_name ='douyin_auto'
ico_path =''
output ='output'
main ='main.py'

system =platform.system)
version =platform.release()

if system='Windows':

	if version ='7':

		print("当前操作系统为Windows 7")

		app_name +='_Win7'

	elif version ='10':

		print("当前操作系统为Windows 10")

		app_name +='Win1o

	elif version ='11':

		print("当前操作系统为Windows 11")app_name +='_Win11'

else:

	pass

	build_command ="nuitka --standalone --mingw64 --enable-plugin=pyqt5 --show-memory --show-progress "
	build_command +=f"--windows-disable-console --output-dir={output}"
	build_command+=f"--output-filename={app_name}.exe "
	build_command +=main
	#=======

	print(build_command)

	os.system(build_command)

作者:spike

分类: Python

创作时间:2024-03-01

更新时间:2024-03-01

联系方式放在中括号之中例如[[email protected]],回复评论在开头加上标号例如:#1