Inhaltsverzeichnis
Build-Targets
WvdS FPC RAD Studio podržava različite Build-Targets za različite platforme.
Pregled
| Target | Compiler | Izlaz | Runtime-okruženje |
|---|---|---|---|
| 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-aplikacije s grafičkim korisničkim sučeljem.
Tehnologija
- Compiler: Free Pascal Compiler (FPC)
- UI-Framework: LCL (Lazarus Component Library)
- Izlaz: .exe (Windows), Binary (Linux/macOS)
PXAML-Rendering
PXAML → IR → GUI Renderer → LCL Controls
Podržani Controls:
- Svi Standard-LCL-Controls
- Custom WvdS Controls
- Native Widgets po platformi
Build-Konfiguracija
[build] target=gui platform=windows-x64 [gui] widgetset=win32 # ili: gtk2, qt5, cocoa
TUI-Target
Terminal-bazirana korisnička sučelja za servere i CLI.
Tehnologija
- Compiler: Free Pascal Compiler (FPC)
- UI-Framework: WvdS TUI Framework
- Izlaz: Native Binary s ANSI/VT100 izlazom
PXAML-Rendering
PXAML → IR → TUI Renderer → ANSI-Escape-Sekvence
Podržani Controls:
- TextBlock, Label
- TextBox (Single-Line Input)
- Button (s tipkovničnom navigacijom)
- ListBox, Table
- ProgressBar
- Border, Panel
Build-Konfiguracija
[build] target=tui platform=linux-x64 [tui] colors=256 # ili: 16, truecolor unicode=true
Web-Target
Browser-aplikacije putem pas2js-transpilacije.
Tehnologija
- Compiler: pas2js
- Izlaz: JavaScript-Bundle
- Runtime: Browser, Electron, PWA
PXAML-Rendering
PXAML → IR → Web Renderer → DOM/CSS
Podržani Controls:
- Svi HTML-native Controls
- CSS-bazirano stiliziranje
- Flexbox/Grid Layout
Build-Konfiguracija
[build] target=web platform=browser [web] minify=true sourcemaps=true
Extension-Target
VS Code Extensions u Pascalu.
Tehnologija
- Compiler: pas2js
- Izlaz: CommonJS-Modul
- Runtime: VS Code Extension Host (Node.js)
Posebnosti
- Nema DOM-pristupa
- VS Code API dostupan
- WebView za UI
Build-Konfiguracija
[build] target=extension platform=vscode [extension] minversion=1.85.0
Matrica platformi
| Feature | GUI | TUI | Web | Extension |
|---|---|---|---|---|
| Prozori | Da | Ne | Da | WebView |
| Dijalozi | Da | Ograničeno | Da | Quick Input |
| Meniji | Da | Ne | Da | Contributes |
| Pristup datotekama | Da | Da | Ograničeno | Da |
| Mreža | Da | Da | CORS | Da |
| Multi-Threading | Da | Da | Web Workers | Ne |
Dijeljenje koda
Zajednički kod za sve targete nalazi se u sources/common/:
sources/common/ ├── core/ # Bazni tipovi, Utilities ├── ui/ │ ├── controls/ # Control-apstrakcija │ ├── runtime/ # PXAML Runtime │ └── targets/ │ ├── gui/ # GUI-specifično │ ├── tui/ # TUI-specifično │ └── web/ # Web-specifično
Conditional Compilation:
{$IFDEF TARGET_GUI} uses LCLType, Forms; {$ENDIF} {$IFDEF TARGET_WEB} uses JS, Web; {$ENDIF} {$IFDEF TARGET_TUI} uses WvdS.TUI.Console; {$ENDIF}
Vidi također
Zuletzt geändert: 29.01.2026. u 22:30