main.spec 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. # -*- mode: python ; coding: utf-8 -*-
  2. a = Analysis(
  3. ['main.py'],
  4. pathex=['.','workphone'],
  5. binaries=[('config.json','config.json')],
  6. datas=[('wcferry', 'wcferry'),('workphone', 'workphone')],
  7. hiddenimports=[
  8. '_cffi_backend',
  9. 'TransportMessage_pb2',
  10. 'DeviceAuthReq_pb2',
  11. 'DeviceAuthRsp_pb2',
  12. 'ErrorMessage_pb2',
  13. 'WeChatOnlineNotice_pb2',
  14. 'FriendTalkNotice_pb2',
  15. 'WeChatTalkToFriendNotice_pb2',
  16. 'TalkToFriendTask_pb2',
  17. 'TalkToFriendTaskResultNotice_pb2',
  18. 'FriendAddNotice_pb2',
  19. 'FriendPushNotice_pb2',
  20. 'TriggerFriendPushTask_pb2',
  21. 'ChatRoomPushNotice_pb2',
  22. 'ChatRoomMessage_pb2',
  23. 'ConversationPushNotice_pb2',
  24. 'ConversMessage_pb2',
  25. 'HistoryMsgPushNotice_pb2',
  26. 'ChatMessage_pb2',
  27. 'TriggerChatRoomPushTask_pb2',
  28. 'TriggerConversationPushTask_pb2',
  29. 'TriggerHistoryMsgPushTask_pb2'
  30. ],
  31. hookspath=[],
  32. hooksconfig={},
  33. runtime_hooks=[],
  34. excludes=[],
  35. noarchive=False,
  36. optimize=0,
  37. )
  38. pyz = PYZ(a.pure)
  39. exe = EXE(
  40. pyz,
  41. a.scripts,
  42. a.binaries,
  43. a.datas,
  44. [],
  45. name='AI员工',
  46. debug=False,
  47. bootloader_ignore_signals=False,
  48. strip=False,
  49. upx=True,
  50. upx_exclude=[],
  51. runtime_tmpdir='./temp',
  52. console=False,
  53. disable_windowed_traceback=False,
  54. argv_emulation=False,
  55. target_arch=None,
  56. codesign_identity=None,
  57. entitlements_file=None,
  58. icon=['wechat.ico'],
  59. )
  60. import shutil
  61. import os
  62. def create_logs_directory():
  63. logs_path = os.path.join('dist','logs')
  64. if not os.path.exists(logs_path):
  65. os.makedirs(logs_path)
  66. temp_path = os.path.join('dist','temp')
  67. if not os.path.exists(temp_path):
  68. os.makedirs(temp_path)
  69. def copy_file():
  70. shutil.copy("./config.json", "./dist/config.json")
  71. # Call the function to create the logs directory
  72. create_logs_directory()
  73. #copy_file()