From 44f32f601f0fe4117270f1d7cbb01c2980430ceb Mon Sep 17 00:00:00 2001 From: ZhijuCen Date: Wed, 24 Jun 2026 17:20:19 +0800 Subject: [PATCH] fix: make MT5_BASE configurable via environment variable MT5_BASE env var overrides the default Wine path, supporting non-default installations and other platforms. --- skills/mql5/scripts/mql5_helper.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/skills/mql5/scripts/mql5_helper.py b/skills/mql5/scripts/mql5_helper.py index 1b386ce..8ff8d42 100644 --- a/skills/mql5/scripts/mql5_helper.py +++ b/skills/mql5/scripts/mql5_helper.py @@ -14,13 +14,14 @@ Usage: """ import argparse +import os import shutil import subprocess import sys from pathlib import Path -# Default MT5 paths -MT5_BASE = Path.home() / ".wine/drive_c/Program Files/MetaTrader 5" +# MT5 paths — override via MT5_BASE env var if not default Wine location +MT5_BASE = Path(os.environ.get("MT5_BASE", Path.home() / ".wine/drive_c/Program Files/MetaTrader 5")) MQL5_DIR = MT5_BASE / "MQL5" # Type → directory mapping