VCL dual‑project versus FireMonkey single‑source for Windows/macOS RAD Studio applications
0 reputation · 09 Jan 2021, 17:54 UTC
0 reputation · 09 Jan 2021, 17:54 UTC
When targeting both Windows and macOS with RAD Studio, a developer can either maintain two separate VCL projects—one compiled for each OS—or adopt a single FireMonkey codebase that builds for both platforms. The goal is to choose the approach that satisfies the need for native Windows look‑and‑feel and direct Win32 API access while keeping overall maintenance effort low and runtime performance acceptable on both operating systems. Uncertainty remains about how the performance gap and UI fidelity differences translate into real‑world development effort and user experience.
Which option provides the best trade‑off between startup performance on Windows and visual fidelity on macOS? How does the maintenance overhead of dual VCL projects compare to the single FireMonkey codebase over a typical release cycle? To what extent does limited direct access to Windows‑specific APIs in FireMonkey affect the ability to implement platform‑dependent features?
35775 reputation · 09 Jan 2021, 22:07 UTC
VCL is Windows-only. There is no supported way to compile a VCL project for macOS, so "two VCL projects, one per OS" is not an available strategy. The realistic dual-project option is VCL on Windows plus a FireMonkey (FMX) project on macOS, sharing non-UI code in common units. The single-source option is one FMX codebase compiled for both targets. With that correction, the trade-off becomes clear.
Your requirements pull in opposite directions: native Windows look-and-feel and direct Win32 access favor VCL; low maintenance favors single-source FMX. The deciding question is how hard your Windows fidelity and Win32 requirements really are.
On Windows, VCL generally starts faster and looks native because it wraps Win32 controls directly. FMX apps are native executables but render their own widget tree, so cold start and per-frame rendering carry more overhead. On macOS, FMX fidelity is "close but not native": styles imitate the platform appearance, but menu behavior, retina scaling edge cases, and platform-specific controls can diverge from a true Cocoa app. These gaps are version-sensitive — recent RAD Studio releases have improved FMX rendering and High-DPI support — so measure with your version rather than trusting older comparisons.
A single FMX codebase roughly halves UI work, but concentrates effort in platform-conditional code ({$IFDEF MSWINDOWS}) and per-platform style tuning. Dual projects duplicate every UI change across two forms, but each platform stays fully native and changes are isolated. In both approaches, keeping business logic in shared, UI-free units is what actually controls duplication — the UI layer is where the strategies differ. A practical estimate: implement one representative feature both ways and track the change effort.
This is less limiting than it first appears. An FMX app on Windows is still a native Windows executable and can call Win32 APIs directly; the code just needs conditional compilation so the macOS build doesn't see it. The real cost is that every platform-dependent feature needs a per-platform implementation — Win32 calls on Windows, Cocoa/Objective-C bridging on macOS — which erodes the "write once" benefit in proportion to how many platform-specific features you have. List the specific Win32 APIs you need and confirm each works from an FMX Windows target before committing.
{$IFDEF MSWINDOWS}.Note that macOS deployment requires a Mac with Xcode and PAServer plus Apple signing/notarization regardless of framework — that pipeline overhead is constant across both options.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.