This commit is contained in:
2026-06-12 16:25:41 +08:00
parent ef4c1cca32
commit 2d8a0c3bca
23 changed files with 2904 additions and 525 deletions
+6 -2
View File
@@ -9,17 +9,21 @@ import config as _config
def _get_qmt():
"""获取 QMT 模块(配置优先于平台检测)"""
if _config.use_simulated_qmt:
print('[qmt] 配置指定模拟模式 → qmt_dummy')
from core.qmt_dummy import qmtv
return qmtv
if sys.platform == 'win32':
try:
print('[qmt] Windows 平台,尝试加载 qmt_real...')
from core.qmt_real import qmtv as real_qmtv
print('[qmt] qmt_real 加载成功')
return real_qmtv
except ImportError:
pass
except ImportError as e:
print(f'[qmt] qmt_real 加载失败: {e},回退 qmt_dummy')
# 非 Windows 或导入失败,使用模拟器
print('[qmt] 使用模拟模式 qmt_dummy')
from core.qmt_dummy import qmtv
return qmtv