mirror of
https://github.com/yshtcn/heartbeat.git
synced 2025-12-13 17:50:25 +08:00
Update heartbeat.py
- 打包时会自动从临时目录而非当前目录复制配置文件样本
This commit is contained in:
parent
159ab9a839
commit
af7ad40bfe
@ -120,6 +120,8 @@ image = create_image()
|
||||
config_path = os.path.join(current_dir, 'config.ini')
|
||||
if not os.path.exists(config_path):
|
||||
exsample_config_path = os.path.join(current_dir, 'config.Exsample.ini')
|
||||
if getattr(sys, 'frozen', False):
|
||||
exsample_config_path = os.path.join(sys._MEIPASS, 'config.Exsample.ini')
|
||||
shutil.copyfile(exsample_config_path, config_path)
|
||||
|
||||
# 从配置文件读取设置
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user