@@ -107,8 +107,10 @@ TPyDelphiComponent = class (TPyDelphiPersistent)
107107 function CreateComponent (AOwner : TComponent) : TComponent; virtual ;
108108 procedure SubscribeToFreeNotification ; override;
109109 procedure UnSubscribeToFreeNotification ; override;
110+ { $IFNDEF FPC}
110111 function InternalReadComponent (const AResFile: string;
111112 const AInstance: TComponent): boolean; virtual ;
113+ { $ENDIF}
112114 // Exposed Methods
113115 function GetParentComponent_Wrapper (args : PPyObject) : PPyObject; cdecl;
114116 function HasParent_Wrapper (args : PPyObject) : PPyObject; cdecl;
@@ -244,8 +246,9 @@ TPyDelphiBasicAction = class (TPyDelphiComponent)
244246implementation
245247
246248uses
247- TypInfo, System.IOUtils , System.Rtti;
249+ TypInfo { $IFNDEF FPC } , System.Rtti{ $ENDIF } ;
248250
251+ { $IFNDEF FPC}
249252type
250253 TPyReader = class (TReader)
251254 private
@@ -258,6 +261,7 @@ TPyReader = class(TReader)
258261 public
259262 constructor Create(APyObject: TPyDelphiObject; Stream: TStream; BufSize: Integer);
260263 end ;
264+ { $ENDIF}
261265
262266{ Register the wrappers, the globals and the constants }
263267type
@@ -892,6 +896,7 @@ function TPyDelphiComponent.HasParent_Wrapper(args: PPyObject): PPyObject;
892896 end ;
893897end ;
894898
899+ { $IFNDEF FPC}
895900function TPyDelphiComponent.InternalReadComponent (const AResFile: string;
896901 const AInstance: TComponent): boolean;
897902
@@ -930,7 +935,7 @@ function TPyDelphiComponent.InternalReadComponent(const AResFile: string;
930935 LInput: TFileStream;
931936 LOutput: TMemoryStream;
932937begin
933- if AResFile.IsEmpty or not TFile.Exists (AResFile) then
938+ if AResFile.IsEmpty or not FileExists (AResFile) then
934939 Exit(false);
935940
936941 LInput := TFileStream.Create(AResFile, fmOpenRead);
@@ -956,6 +961,7 @@ function TPyDelphiComponent.InternalReadComponent(const AResFile: string;
956961 end ;
957962 Result := true;
958963end ;
964+ { $ENDIF}
959965
960966function TPyDelphiComponent.GetAttrO (key: PPyObject): PPyObject;
961967Var
@@ -1655,6 +1661,7 @@ function TPyDelphiStrings.Set_Text(AValue: PPyObject;
16551661 end ;
16561662end ;
16571663
1664+ { $IFNDEF FPC}
16581665{ TPyReader }
16591666
16601667constructor TPyReader.Create(APyObject: TPyDelphiObject; Stream: TStream;
@@ -1750,6 +1757,7 @@ procedure TPyReader.SetName(Component: TComponent; var Name: string);
17501757 end ;
17511758 FInstance := Component;
17521759end ;
1760+ { $ENDIF}
17531761
17541762initialization
17551763 RegisteredUnits.Add(TClassesRegistration.Create);
0 commit comments