====== Build Targets ======
WvdS FPC RAD Studio supports various build targets for different platforms.
===== Overview =====
^ Target ^ Compiler ^ Output ^ Runtime Environment ^
| GUI | FPC | Native Binary | Desktop (Windows/Linux/macOS) |
| TUI | FPC | Native Binary | Terminal |
| Web | pas2js | JavaScript | Browser/Node.js |
| Extension | pas2js | JavaScript | VS Code Extension Host |
===== GUI Target =====
Native desktop applications with graphical user interface.
==== Technology ====
* **Compiler:** Free Pascal Compiler (FPC)
* **UI Framework:** LCL (Lazarus Component Library)
* **Output:** .exe (Windows), Binary (Linux/macOS)
==== PXAML Rendering ====
PXAML → IR → GUI Renderer → LCL Controls
**Supported Controls:**
* All standard LCL controls
* Custom WvdS Controls
* Native widgets per platform
==== Build Configuration ====
[build]
target=gui
platform=windows-x64
[gui]
widgetset=win32 # or: gtk2, qt5, cocoa
===== TUI Target =====
Terminal-based user interfaces for servers and CLI.
==== Technology ====
* **Compiler:** Free Pascal Compiler (FPC)
* **UI Framework:** WvdS TUI Framework
* **Output:** Native Binary with ANSI/VT100 output
==== PXAML Rendering ====
PXAML → IR → TUI Renderer → ANSI Escape Sequences
**Supported Controls:**
* TextBlock, Label
* TextBox (single-line input)
* Button (with keyboard navigation)
* ListBox, Table
* ProgressBar
* Border, Panel
==== Build Configuration ====
[build]
target=tui
platform=linux-x64
[tui]
colors=256 # or: 16, truecolor
unicode=true
===== Web Target =====
Browser applications via pas2js transpilation.
==== Technology ====
* **Compiler:** pas2js
* **Output:** JavaScript bundle
* **Runtime:** Browser, Electron, PWA
==== PXAML Rendering ====
PXAML → IR → Web Renderer → DOM/CSS
**Supported Controls:**
* All HTML-native controls
* CSS-based styling
* Flexbox/Grid layout
==== Build Configuration ====
[build]
target=web
platform=browser
[web]
minify=true
sourcemaps=true
===== Extension Target =====
VS Code Extensions in Pascal.
==== Technology ====
* **Compiler:** pas2js
* **Output:** CommonJS module
* **Runtime:** VS Code Extension Host (Node.js)
==== Specifics ====
* No DOM access
* VS Code API available
* WebView for UI
==== Build Configuration ====
[build]
target=extension
platform=vscode
[extension]
minversion=1.85.0
===== Platform Matrix =====
^ Feature ^ GUI ^ TUI ^ Web ^ Extension ^
| Windows | Yes | No | Yes | WebView |
| Dialogs | Yes | Limited | Yes | Quick Input |
| Menus | Yes | No | Yes | Contributes |
| File Access | Yes | Yes | Limited | Yes |
| Network | Yes | Yes | CORS | Yes |
| Multi-Threading | Yes | Yes | Web Workers | No |
===== Code Sharing =====
Common code for all targets is located in ''sources/common/'':
sources/common/
├── core/ # Base types, utilities
├── ui/
│ ├── controls/ # Control abstraction
│ ├── runtime/ # PXAML Runtime
│ └── targets/
│ ├── gui/ # GUI-specific
│ ├── tui/ # TUI-specific
│ └── web/ # Web-specific
**Conditional Compilation:**
{$IFDEF TARGET_GUI}
uses LCLType, Forms;
{$ENDIF}
{$IFDEF TARGET_WEB}
uses JS, Web;
{$ENDIF}
{$IFDEF TARGET_TUI}
uses WvdS.TUI.Console;
{$ENDIF}
===== See Also =====
* [[.:architektur|Architecture Overview]]
* [[.:build-pipeline|Build Pipeline]]
* [[.:pxaml-pipeline|PXAML Pipeline]]