1. 安装 cx_Freeze
首先,确保你已经安装了 cx_Freeze。你可以通过 pip 安装它:
pip install cx_Freeze
2.创建setup.py
from cx_Freeze import setup, Executable
import os
build_exe_options = {
"packages": ["os"],
"include_files": [
(os.path.join("Config", "device.json"), "Config/device.json"),
(os.path