为cx_Freeze打包后的EXE加上ICON图标

import sys  
from cx_Freeze import setup, Executable

base = None
if sys.platform == "win32":
base = "Win32GUI"

setup(
  name = "MyApp",  
version = "1.0",
description = "MyApp",
executables = [Executable("MyApp.py",base = "Win32GUI",icon = "MyApp.ico")])

 

icon = "MyApp.ico" 就是生成的EXE文件的图标

你可能感兴趣的:(icon)