# -*- mode: python ; coding: utf-8 -*- a = Analysis( ['main.py'], pathex=[], binaries=[('config.json','config.json')], datas=[('wcferry', 'wcferry'),('template.db', '.')], hiddenimports=['_cffi_backend'], hookspath=[], hooksconfig={}, runtime_hooks=[], excludes=[], noarchive=False, optimize=0, ) pyz = PYZ(a.pure) exe = EXE( pyz, a.scripts, a.binaries, a.datas, [], name='轻马AI智能助手', debug=False, bootloader_ignore_signals=False, strip=False, upx=True, upx_exclude=[], runtime_tmpdir='./temp', console=False, disable_windowed_traceback=False, argv_emulation=False, target_arch=None, codesign_identity=None, entitlements_file=None, icon=['wechat.ico'], ) import shutil import os def create_logs_directory(): logs_path = os.path.join('dist','logs') if not os.path.exists(logs_path): os.makedirs(logs_path) temp_path = os.path.join('dist','temp') if not os.path.exists(temp_path): os.makedirs(temp_path) def copy_file(): shutil.copy("./config.json", "./dist/config.json") # Call the function to create the logs directory create_logs_directory() copy_file()