@@ -107,8 +107,10 @@ TPyDelphiComponent = class (TPyDelphiPersistent)
|
107 | 107 | function CreateComponent(AOwner : TComponent) : TComponent; virtual;
|
108 | 108 | procedure SubscribeToFreeNotification; override;
|
109 | 109 | procedure UnSubscribeToFreeNotification; override;
|
| 110 | +{$IFNDEF FPC} |
110 | 111 | function InternalReadComponent(const AResFile: string;
|
111 | 112 | const AInstance: TComponent): boolean; virtual;
|
| 113 | +{$ENDIF} |
112 | 114 | // Exposed Methods
|
113 | 115 | function GetParentComponent_Wrapper(args : PPyObject) : PPyObject; cdecl;
|
114 | 116 | function HasParent_Wrapper(args : PPyObject) : PPyObject; cdecl;
|
@@ -244,8 +246,9 @@ TPyDelphiBasicAction = class (TPyDelphiComponent)
|
244 | 246 | implementation
|
245 | 247 |
|
246 | 248 | uses
|
247 |
| -TypInfo, System.IOUtils, System.Rtti; |
| 249 | +TypInfo {$IFNDEF FPC}, System.Rtti{$ENDIF}; |
248 | 250 |
|
| 251 | +{$IFNDEF FPC} |
249 | 252 | type
|
250 | 253 | TPyReader = class(TReader)
|
251 | 254 | private
|
@@ -258,6 +261,7 @@ TPyReader = class(TReader)
|
258 | 261 | public
|
259 | 262 | constructor Create(APyObject: TPyDelphiObject; Stream: TStream; BufSize: Integer);
|
260 | 263 | end;
|
| 264 | +{$ENDIF} |
261 | 265 |
|
262 | 266 | { Register the wrappers, the globals and the constants }
|
263 | 267 | type
|
@@ -892,6 +896,7 @@ function TPyDelphiComponent.HasParent_Wrapper(args: PPyObject): PPyObject;
|
892 | 896 | end;
|
893 | 897 | end;
|
894 | 898 |
|
| 899 | +{$IFNDEF FPC} |
895 | 900 | function TPyDelphiComponent.InternalReadComponent(const AResFile: string;
|
896 | 901 | const AInstance: TComponent): boolean;
|
897 | 902 |
|
@@ -930,7 +935,7 @@ function TPyDelphiComponent.InternalReadComponent(const AResFile: string;
|
930 | 935 | LInput: TFileStream;
|
931 | 936 | LOutput: TMemoryStream;
|
932 | 937 | begin
|
933 |
| -if AResFile.IsEmpty or not TFile.Exists(AResFile) then |
| 938 | +if AResFile.IsEmpty or not FileExists(AResFile) then |
934 | 939 | Exit(false);
|
935 | 940 |
|
936 | 941 | LInput := TFileStream.Create(AResFile, fmOpenRead);
|
@@ -956,6 +961,7 @@ function TPyDelphiComponent.InternalReadComponent(const AResFile: string;
|
956 | 961 | end;
|
957 | 962 | Result := true;
|
958 | 963 | end;
|
| 964 | +{$ENDIF} |
959 | 965 |
|
960 | 966 | function TPyDelphiComponent.GetAttrO(key: PPyObject): PPyObject;
|
961 | 967 | Var
|
@@ -1655,6 +1661,7 @@ function TPyDelphiStrings.Set_Text(AValue: PPyObject;
|
1655 | 1661 | end;
|
1656 | 1662 | end;
|
1657 | 1663 |
|
| 1664 | +{$IFNDEF FPC} |
1658 | 1665 | { TPyReader }
|
1659 | 1666 |
|
1660 | 1667 | constructor TPyReader.Create(APyObject: TPyDelphiObject; Stream: TStream;
|
@@ -1750,6 +1757,7 @@ procedure TPyReader.SetName(Component: TComponent; var Name: string);
|
1750 | 1757 | end;
|
1751 | 1758 | FInstance := Component;
|
1752 | 1759 | end;
|
| 1760 | +{$ENDIF} |
1753 | 1761 |
|
1754 | 1762 | initialization
|
1755 | 1763 | RegisteredUnits.Add(TClassesRegistration.Create);
|
|
0 commit comments