Skip to content

Cross-Platform Build & Color Model — Reference


status: ACTIVE tier: 2 (design reference) last-verified: 2026-09-13 verified-against: 597fb51 procedure-skill: .agents/skills/cross-platform/SKILL.md


Targets

Platform flag Target TFM ATAS refs from
Cross ATAS X (macOS + Windows) net10.0 /Applications/ATAS X.app/Contents/MonoBundle/
AnyCPU ATAS Legacy (Windows) net10.0-windows SMB mount or lib/ATAS_Legacy/ fallback

Shared MSBuild lives in root Directory.Build.props / .targets (refs, deployment targets, platform-conditional compile exclusions: *.Windows.cs excluded on Cross, *.Common.cs excluded otherwise). Both builds must pass with 0 errors for every publish.

Color & rendering rules (indicator code)

  • Property type: CrossColor only; assign via System.Drawing.Color.X.Convert().
  • Render: marshal with .ToGdiColor() inside draw methods; cache pens/fonts/colors as class-level (or static readonly) fields — never allocate in OnRender.
  • No System.Windows.Media, no Avalonia input namespaces, no #if CROSS_PLATFORM guards in indicator files; platform-specific code lives in CrossColorExtensions partials (*.Common.cs / *.Windows.cs).
  • Compliance check: .agents/scripts/check_cross_compliance.sh <file> (WARN about OnRender without .ToGdiColor() is a known false positive for files whose OnRender only delegates to HUD partials).

Publish & deploy

.agents/scripts/publish.sh "<file>" "<name>" "<version>" "<bullet>" → dual build, DLL copy to macOS ATAS X (~/Library/Application Support/ATAS/{Indicators,Strategies}), Dropbox distribution (ATAS X, ATAS Legacy), SMB Legacy when mounted, git commit + push. Versioning: 5/5 changelog rule; header/_version/top-entry lockstep.