Explorar o código

完成人工定时

derrickx hai 1 ano
pai
achega
3f9896158a
Modificáronse 3 ficheiros con 2 adicións e 2 borrados
  1. 1 1
      build_exe.py
  2. 0 0
      tools/config.yaml
  3. 1 1
      tools/redis_pool.py

+ 1 - 1
build_exe.py

@@ -12,5 +12,5 @@ PyInstaller.__main__.run([
     '--debug=all',  # 生成调试信息
     '--hidden-import=tkinter',  # 显式指定需要包含的模块
     '--add-data=icon.ico:.',  # 添加图标文件
-    '--add-data=config.yaml;.',
+    '--add-data=config.yaml;tools',  # 添加资源文件到tools文件夹
 ])

+ 0 - 0
config.yaml → tools/config.yaml


+ 1 - 1
tools/redis_pool.py

@@ -11,7 +11,7 @@ class redis_pool:
         # 获取当前目录
         current_dir = os.path.dirname(__file__)
         # 使用相对路径访问 config.yaml 文件
-        config_file = os.path.join(current_dir, '../config.yaml')
+        config_file = os.path.join(current_dir, 'config.yaml')
 
         with open(config_file, 'r') as file:
             config = yaml.load(file, Loader=yaml.FullLoader)