Skip to content

[codex] Add MetaTrader path discovery helpers#84

Merged
NewYaroslav merged 1 commit into
mainfrom
codex/metatrader-terminal-discovery
Jul 17, 2026
Merged

[codex] Add MetaTrader path discovery helpers#84
NewYaroslav merged 1 commit into
mainfrom
codex/metatrader-terminal-discovery

Conversation

@NewYaroslav

@NewYaroslav NewYaroslav commented Jul 15, 2026

Copy link
Copy Markdown
Owner

Summary

Adds reusable MetaTrader path discovery helpers and tidies the MetaTrader file-transport header surface:

  • resolves the default MetaQuotes roaming/Common Files roots through optionx::utils::metatrader;
  • uses Windows known-folder APIs first and a Unicode-safe wide %APPDATA% fallback when needed;
  • exposes result APIs for default path resolution, terminal discovery, and MQL Files directory lookup so callers can distinguish an empty result from filesystem/path-resolution errors;
  • discovers terminal data directories by MQL4/MQL5 folders and exposes their Files paths;
  • records the first discovery error path while continuing past problematic child entries when safe;
  • rejects symlink/reparse-point terminal and MQL child directories during discovery instead of following them outside the MetaQuotes tree;
  • moves MetaTrader file-transport path/id validation helpers out of MetaTraderFileBridgeConfig.hpp into MetaTraderFilePathUtils.hpp;
  • keeps bridge-family leaf/detail headers behind the bridges/metatrader_file.hpp umbrella include context;
  • wires the utility into utils.hpp and the MetaTrader file bridge umbrella/config default root;
  • adds a focused Windows Smoke workflow for MetaTrader file/path tests;
  • keeps metatrader_paths_test lightweight by default, while the focused Windows Smoke workflow explicitly enables lightweight bridge smoke linking to avoid unrelated network dependency failures;
  • enables MSVC /Zc:__cplusplus and NOMINMAX so dependency/header builds see the real C++ standard level and avoid Windows min/max macros;
  • updates the EN/RU file-transport draft and build guide.

The concrete polling bridge class, terminal-discovery integration into that class, and MQL sample code remain intentionally out of scope for the next implementation PR.

Validation

  • cmake -S . -B build-codex-pr68-mingw -DOPTIONX_BUILD_TESTS=ON -DOPTIONX_DEPS_BUILD_DIR=build-codex-pr68-mingw
  • cmake --build build-codex-pr68-mingw --target metatrader_paths_test metatrader_file_config_include_test metatrader_file_bridge_test bridge_umbrella_include_test -j2
  • ./build-codex-pr68-mingw/metatrader_paths_test.exe
  • ./build-codex-pr68-mingw/metatrader_file_config_include_test.exe
  • ./build-codex-pr68-mingw/metatrader_file_bridge_test.exe
  • ./build-codex-pr68-mingw/bridge_umbrella_include_test.exe
  • git diff --check
  • cmake --build build-codex-submodule-consumer --target optionx_submodule_consumer
  • ./build-codex-submodule-consumer/optionx_submodule_consumer.exe

@NewYaroslav
NewYaroslav force-pushed the codex/metatrader-terminal-discovery branch 9 times, most recently from 11f030e to a2e7070 Compare July 16, 2026 22:42
@NewYaroslav
NewYaroslav force-pushed the codex/metatrader-terminal-discovery branch from a2e7070 to 2b54be4 Compare July 17, 2026 08:39
@NewYaroslav
NewYaroslav marked this pull request as ready for review July 17, 2026 09:36
@NewYaroslav
NewYaroslav merged commit 677cbee into main Jul 17, 2026
2 checks passed
@NewYaroslav
NewYaroslav deleted the codex/metatrader-terminal-discovery branch July 17, 2026 09:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant