Delphi-Quellcode:
unit VCL.FeigFrameworkCheck;
interface
const
FeigFramework = '
VCL';
implementation
end.
Delphi-Quellcode:
unit FMX.FeigFrameworkCheck;
interface
const
FeigFramework = '
FMX';
implementation
end.
Delphi-Quellcode:
uses
// Namespace/Unitscope: System, VCL/FMX, [Winapi]
FeigFrameworkCheck,
{$IF Defined(MSWINDOWS) and (FeigFramework = 'VCL')}
{$IF CompilerVersion >= 24}
Winapi.Windows,
{$ELSE}
Windows,
{$IFEND}
{$IFEND}
SysUtils, Math;
Delphi-Quellcode:
uses
// Namespace/Unitscope: System, Vcl/Fmx, [Winapi], [Feig]
// Vcl.ExtCtrls and Fmx.Types for TTimer
{$IF Defined(MSWINDOWS) and (FeigFramework = 'VCL')}
{$IF CompilerVersion >= 24}
Winapi.Windows,
{$ELSE}
Windows,
{$IFEND}
Vcl.ExtCtrls,
{$ELSE}
Fmx.Types,
{$IFEND}
Math, SysUtils, Classes, Feig.Types, Feig.USB, Feig.ISC;
Sieht bei mir so aus, wobei ich grade überlegt das eher auf FeigFrameworkIsVCL und FeigFrameworkIsFMX (Boolean) umzustellen.
Die erste Überlegung war mal ... Wer weiß was nach FMX kommt.

(FMX4, FMX5,
CLX und die vielen .NET-Formsdinger)
Aber sicherheitshalber kommt noch ein
{$IFNDEF MSWINDOWS}
in die
VCL-Datei kommt, falls jemand
VCL auch in iOS/Android/Linux/MacOS definiert hat.
Ein Therapeut entspricht 1024 Gigapeut.