diff --git a/Demos/Demo01/Unit1.pas b/Demos/Demo01/Unit1.pas index 75370c0b..02c074c9 100644 --- a/Demos/Demo01/Unit1.pas +++ b/Demos/Demo01/Unit1.pas @@ -8,7 +8,7 @@ interface Classes, SysUtils, Windows, Messages, Graphics, Controls, Forms, Dialogs, StdCtrls, ComCtrls, ExtCtrls, - PythonEngine, PythonGUIInputOutput; + PythonEngine, Vcl.PythonGUIInputOutput; type TForm1 = class(TForm) diff --git a/Demos/Demo02/Unit1.pas b/Demos/Demo02/Unit1.pas index a995af9b..47ee2da2 100644 --- a/Demos/Demo02/Unit1.pas +++ b/Demos/Demo02/Unit1.pas @@ -8,7 +8,7 @@ interface Classes, SysUtils, Windows, Messages, Graphics, Controls, Forms, Dialogs, StdCtrls, ComCtrls, ExtCtrls, - PythonEngine, PythonGUIInputOutput; + PythonEngine, Vcl.PythonGUIInputOutput; type TForm1 = class(TForm) diff --git a/Demos/Demo03/Unit1.dfm b/Demos/Demo03/Unit1.dfm index c6c31ca2..64b330b1 100644 --- a/Demos/Demo03/Unit1.dfm +++ b/Demos/Demo03/Unit1.dfm @@ -47,9 +47,6 @@ object Form1: TForm1 ParentFont = False ScrollBars = ssBoth TabOrder = 1 - ExplicitTop = 164 - ExplicitWidth = 528 - ExplicitHeight = 136 end object Panel1: TPanel Left = 0 @@ -59,8 +56,6 @@ object Form1: TForm1 Align = alBottom BevelOuter = bvNone TabOrder = 0 - ExplicitTop = 300 - ExplicitWidth = 528 object Button1: TButton Left = 6 Top = 8 diff --git a/Demos/Demo03/Unit1.pas b/Demos/Demo03/Unit1.pas index 42b46633..6aa4787f 100644 --- a/Demos/Demo03/Unit1.pas +++ b/Demos/Demo03/Unit1.pas @@ -8,7 +8,7 @@ interface SysUtils, Classes, Windows, Messages, Graphics, Controls, Forms, Dialogs, StdCtrls, ComCtrls, ExtCtrls, - PythonEngine, PythonGUIInputOutput; + PythonEngine, Vcl.PythonGUIInputOutput; type TForm1 = class(TForm) diff --git a/Demos/Demo04/Unit1.pas b/Demos/Demo04/Unit1.pas index 7dbe3f4c..333fc897 100644 --- a/Demos/Demo04/Unit1.pas +++ b/Demos/Demo04/Unit1.pas @@ -8,7 +8,7 @@ interface SysUtils, Classes, Windows, Messages, Graphics, Controls, Forms, Dialogs, StdCtrls, ComCtrls, ExtCtrls, - PythonEngine, PythonGUIInputOutput; + PythonEngine, Vcl.PythonGUIInputOutput; type TForm1 = class(TForm) diff --git a/Demos/Demo05/Unit1.dfm b/Demos/Demo05/Unit1.dfm index e8342513..762973c6 100644 --- a/Demos/Demo05/Unit1.dfm +++ b/Demos/Demo05/Unit1.dfm @@ -49,7 +49,6 @@ object Form1: TForm1 Align = alBottom BevelOuter = bvNone TabOrder = 0 - ExplicitTop = 306 object Button1: TButton Left = 6 Top = 8 diff --git a/Demos/Demo05/Unit1.pas b/Demos/Demo05/Unit1.pas index 1d315d7c..70ae2a69 100644 --- a/Demos/Demo05/Unit1.pas +++ b/Demos/Demo05/Unit1.pas @@ -8,7 +8,7 @@ interface SysUtils, Classes, Windows, Messages, Graphics, Controls, Forms, Dialogs, StdCtrls, ComCtrls, ExtCtrls, - PythonEngine, PythonGUIInputOutput; + PythonEngine, Vcl.PythonGUIInputOutput; type TForm1 = class(TForm) diff --git a/Demos/Demo06/Unit1.pas b/Demos/Demo06/Unit1.pas index 1c8029ff..afc9b592 100644 --- a/Demos/Demo06/Unit1.pas +++ b/Demos/Demo06/Unit1.pas @@ -8,7 +8,7 @@ interface SysUtils, Classes, Windows, Messages, Graphics, Controls, Forms, Dialogs, StdCtrls, ComCtrls, ExtCtrls, - PythonEngine, PythonGUIInputOutput; + PythonEngine, Vcl.PythonGUIInputOutput; type TForm1 = class(TForm) diff --git a/Demos/Demo07/Unit1.pas b/Demos/Demo07/Unit1.pas index a4c43b05..43ceb659 100644 --- a/Demos/Demo07/Unit1.pas +++ b/Demos/Demo07/Unit1.pas @@ -8,7 +8,7 @@ interface SysUtils, Classes, Windows, Messages, Graphics, Controls, Forms, Dialogs, StdCtrls, ComCtrls, ExtCtrls, - PythonEngine, PythonGUIInputOutput; + PythonEngine, Vcl.PythonGUIInputOutput; type TForm1 = class(TForm) diff --git a/Demos/Demo08/Unit1.pas b/Demos/Demo08/Unit1.pas index e5fb7ec6..2d92f78a 100644 --- a/Demos/Demo08/Unit1.pas +++ b/Demos/Demo08/Unit1.pas @@ -8,7 +8,7 @@ interface SysUtils, Classes, Windows, Messages, Graphics, Controls, Forms, Dialogs, StdCtrls, ExtCtrls, ComCtrls, - PythonEngine, PythonGUIInputOutput; + PythonEngine, Vcl.PythonGUIInputOutput; type TForm1 = class(TForm) diff --git a/Demos/Demo09/Unit1.pas b/Demos/Demo09/Unit1.pas index f9b2f03d..8bbc8a67 100644 --- a/Demos/Demo09/Unit1.pas +++ b/Demos/Demo09/Unit1.pas @@ -8,7 +8,7 @@ interface SysUtils, Classes, Windows, Messages, Graphics, Controls, Forms, Dialogs, StdCtrls, ExtCtrls, ComCtrls, - PythonEngine, PythonGUIInputOutput; + PythonEngine, Vcl.PythonGUIInputOutput; type TForm1 = class(TForm) diff --git a/Demos/Demo10_FireDAC/fmMain.pas b/Demos/Demo10_FireDAC/fmMain.pas index 4a806b51..f7abfe37 100644 --- a/Demos/Demo10_FireDAC/fmMain.pas +++ b/Demos/Demo10_FireDAC/fmMain.pas @@ -5,7 +5,7 @@ interface uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, System.Types, System.UITypes, - ComCtrls, ExtCtrls, StdCtrls, PythonEngine, PythonGUIInputOutput, Db, + ComCtrls, ExtCtrls, StdCtrls, PythonEngine, Vcl.PythonGUIInputOutput, Db, Grids, DBGrids, Datasnap.DBClient, FireDAC.Stan.Intf, FireDAC.Stan.Option, FireDAC.Stan.Error, FireDAC.UI.Intf, FireDAC.Phys.Intf, FireDAC.Stan.Def, FireDAC.Stan.Pool, FireDAC.Stan.Async, FireDAC.Phys, FireDAC.FMXUI.Wait, diff --git a/Demos/Demo16/Example1/Unit1.dfm b/Demos/Demo16/Example1/Unit1.dfm index c687f93c..56e61e47 100644 --- a/Demos/Demo16/Example1/Unit1.dfm +++ b/Demos/Demo16/Example1/Unit1.dfm @@ -133,7 +133,6 @@ object Form1: TForm1 Align = alClient BevelOuter = bvNone TabOrder = 1 - ExplicitWidth = 372 object Splitter2: TSplitter Left = 0 Top = 153 @@ -204,7 +203,6 @@ object Form1: TForm1 ParentFont = False ScrollBars = ssBoth TabOrder = 0 - ExplicitWidth = 372 end object Memo2: TMemo Left = 0 @@ -219,7 +217,6 @@ object Form1: TForm1 Font.Style = [] ParentFont = False TabOrder = 1 - ExplicitWidth = 372 end end object PythonEngine1: TPythonEngine diff --git a/Demos/Demo16/Example1/Unit1.pas b/Demos/Demo16/Example1/Unit1.pas index 9f67b561..429785de 100644 --- a/Demos/Demo16/Example1/Unit1.pas +++ b/Demos/Demo16/Example1/Unit1.pas @@ -8,7 +8,7 @@ interface SysUtils, Classes, Windows, Messages, Graphics, Controls, Forms, Dialogs, StdCtrls, ExtCtrls, ComCtrls, - PythonEngine, PythonGUIInputOutput; + PythonEngine, Vcl.PythonGUIInputOutput; type TForm1 = class(TForm) diff --git a/Demos/Demo16/Example2/Unit1.pas b/Demos/Demo16/Example2/Unit1.pas index 79809db8..de336e96 100644 --- a/Demos/Demo16/Example2/Unit1.pas +++ b/Demos/Demo16/Example2/Unit1.pas @@ -8,7 +8,7 @@ interface Classes, SysUtils, Windows, Messages, Graphics, Controls, Forms, Dialogs, StdCtrls, ComCtrls, ExtCtrls, - PythonEngine, PythonGUIInputOutput; + PythonEngine, Vcl.PythonGUIInputOutput; type TForm1 = class(TForm) diff --git a/Demos/Demo17/Unit1.dfm b/Demos/Demo17/Unit1.dfm index 1ce71011..d5def1fd 100644 --- a/Demos/Demo17/Unit1.dfm +++ b/Demos/Demo17/Unit1.dfm @@ -42,8 +42,6 @@ object Form1: TForm1 ParentFont = False ScrollBars = ssBoth TabOrder = 1 - ExplicitTop = 276 - ExplicitHeight = 100 end object Panel1: TPanel Left = 0 @@ -53,7 +51,6 @@ object Form1: TForm1 Align = alBottom BevelOuter = bvNone TabOrder = 0 - ExplicitTop = 349 object Button1: TButton Left = 6 Top = 8 diff --git a/Demos/Demo17/Unit1.pas b/Demos/Demo17/Unit1.pas index 524c0565..9d6c744e 100644 --- a/Demos/Demo17/Unit1.pas +++ b/Demos/Demo17/Unit1.pas @@ -8,7 +8,7 @@ interface SysUtils, Classes, Windows, Messages, Graphics, Controls, Forms, Dialogs, StdCtrls, ComCtrls, ExtCtrls, - Variants, PythonEngine, PythonGUIInputOutput; + Variants, PythonEngine, Vcl.PythonGUIInputOutput; type TForm1 = class(TForm) diff --git a/Demos/Demo21/Unit1.pas b/Demos/Demo21/Unit1.pas index ba81156a..3705a5e3 100644 --- a/Demos/Demo21/Unit1.pas +++ b/Demos/Demo21/Unit1.pas @@ -8,7 +8,7 @@ interface Classes, SysUtils, Windows, Messages, Graphics, Controls, Forms, Dialogs, StdCtrls, ComCtrls, ExtCtrls, - PythonEngine, PythonGUIInputOutput; + PythonEngine, Vcl.PythonGUIInputOutput; type TForm1 = class(TForm) diff --git a/Demos/Demo22/Unit1.pas b/Demos/Demo22/Unit1.pas index 5b758d30..d51d7591 100644 --- a/Demos/Demo22/Unit1.pas +++ b/Demos/Demo22/Unit1.pas @@ -8,7 +8,7 @@ interface Classes, SysUtils, Windows, Messages, Graphics, Controls, Forms, Dialogs, StdCtrls, ComCtrls, ExtCtrls, - PythonEngine, PythonGUIInputOutput; + PythonEngine, Vcl.PythonGUIInputOutput; type TForm1 = class(TForm) diff --git a/Demos/Demo23/Unit1.pas b/Demos/Demo23/Unit1.pas index a180ec4a..772b7e03 100644 --- a/Demos/Demo23/Unit1.pas +++ b/Demos/Demo23/Unit1.pas @@ -8,7 +8,7 @@ interface Classes, SysUtils, Windows, Messages, Graphics, Controls, Forms, Dialogs, StdCtrls, ComCtrls, ExtCtrls, - PythonEngine, PythonGUIInputOutput; + PythonEngine, Vcl.PythonGUIInputOutput; type TForm1 = class(TForm) diff --git a/Demos/Demo25/fmMain.pas b/Demos/Demo25/fmMain.pas index f2fce0f1..17632424 100644 --- a/Demos/Demo25/fmMain.pas +++ b/Demos/Demo25/fmMain.pas @@ -8,7 +8,7 @@ interface Classes, SysUtils, Variants, Windows, Messages, Graphics, Controls, Forms, Dialogs, ExtCtrls, StdCtrls, ComCtrls, - PythonEngine, PythonGUIInputOutput, Contnrs; + PythonEngine, Vcl.PythonGUIInputOutput, Contnrs; type TMain = class(TForm) diff --git a/Demos/Demo26/Unit1.pas b/Demos/Demo26/Unit1.pas index 93cf4caf..1d70e40b 100644 --- a/Demos/Demo26/Unit1.pas +++ b/Demos/Demo26/Unit1.pas @@ -8,7 +8,7 @@ interface SysUtils, Classes, Windows, Messages, Graphics, Controls, Forms, Dialogs, StdCtrls, ExtCtrls, ComCtrls, - PythonEngine, PythonGUIInputOutput; + PythonEngine, Vcl.PythonGUIInputOutput; type TForm1 = class(TForm) diff --git a/Demos/Demo27/Unit1.pas b/Demos/Demo27/Unit1.pas index 637b1267..699fa354 100644 --- a/Demos/Demo27/Unit1.pas +++ b/Demos/Demo27/Unit1.pas @@ -4,7 +4,7 @@ interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, - Dialogs, PythonEngine, PythonGUIInputOutput, StdCtrls; + Dialogs, PythonEngine, Vcl.PythonGUIInputOutput, StdCtrls; type TMySeq = class(TPyObject) diff --git a/Demos/Demo28/Unit1.pas b/Demos/Demo28/Unit1.pas index 17a28cab..6ef15472 100644 --- a/Demos/Demo28/Unit1.pas +++ b/Demos/Demo28/Unit1.pas @@ -8,7 +8,7 @@ interface Classes, SysUtils, Windows, Messages, Graphics, Controls, Forms, Dialogs, StdCtrls, ComCtrls, ExtCtrls, - PythonEngine, PythonGUIInputOutput; + PythonEngine, Vcl.PythonGUIInputOutput; type TPyStringList = class(TPyObject) diff --git a/Demos/Demo29/Unit1.dfm b/Demos/Demo29/Unit1.dfm index 6cb32951..c149398f 100644 --- a/Demos/Demo29/Unit1.dfm +++ b/Demos/Demo29/Unit1.dfm @@ -81,8 +81,6 @@ object Form1: TForm1 ScrollBars = ssBoth TabOrder = 2 WordWrap = False - ExplicitLeft = 16 - ExplicitTop = 352 end object Memo2: TMemo Left = 8 diff --git a/Demos/Demo29/Unit1.pas b/Demos/Demo29/Unit1.pas index b17184f8..9ca6caa4 100644 --- a/Demos/Demo29/Unit1.pas +++ b/Demos/Demo29/Unit1.pas @@ -10,7 +10,7 @@ interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, - Dialogs, ExtDlgs, StdCtrls, ExtCtrls, PythonEngine, PythonGUIInputOutput; + Dialogs, ExtDlgs, StdCtrls, ExtCtrls, PythonEngine, Vcl.PythonGUIInputOutput; type TForm1 = class(TForm) diff --git a/Demos/Demo30/Unit1.pas b/Demos/Demo30/Unit1.pas index bf36abe9..808b4a6c 100644 --- a/Demos/Demo30/Unit1.pas +++ b/Demos/Demo30/Unit1.pas @@ -8,7 +8,7 @@ interface Classes, SysUtils, Windows, Messages, Graphics, Controls, Forms, Dialogs, StdCtrls, ComCtrls, ExtCtrls, - PythonEngine, PythonGUIInputOutput; + PythonEngine, Vcl.PythonGUIInputOutput; type TForm1 = class(TForm) diff --git a/Demos/Demo31/Unit1.pas b/Demos/Demo31/Unit1.pas index e090e56f..b079c711 100644 --- a/Demos/Demo31/Unit1.pas +++ b/Demos/Demo31/Unit1.pas @@ -8,7 +8,7 @@ interface SysUtils, Classes, Windows, Messages, Graphics, Controls, Forms, Dialogs, StdCtrls, ExtCtrls, ComCtrls, - PythonEngine, PythonGUIInputOutput, WrapDelphi, ActnList, System.Actions; + PythonEngine, Vcl.PythonGUIInputOutput, WrapDelphi, ActnList, System.Actions; type TForm1 = class(TForm) diff --git a/Demos/Demo32/Unit1.pas b/Demos/Demo32/Unit1.pas index 2c5508c2..90b75c09 100644 --- a/Demos/Demo32/Unit1.pas +++ b/Demos/Demo32/Unit1.pas @@ -15,7 +15,7 @@ interface Windows, Messages, Graphics, Controls, Forms, Dialogs, StdCtrls, ExtCtrls, ComCtrls, WrapDelphi, WrapDelphiClasses, - PythonEngine, PythonGUIInputOutput; + PythonEngine, Vcl.PythonGUIInputOutput; type TForm1 = class(TForm) diff --git a/Demos/Demo33/ThSort.pas b/Demos/Demo33/ThSort.pas index 876af12f..cac6ed8b 100644 --- a/Demos/Demo33/ThSort.pas +++ b/Demos/Demo33/ThSort.pas @@ -8,7 +8,7 @@ interface SysUtils, Classes, Windows, Messages, Graphics, Controls, Forms, Dialogs, ExtCtrls, StdCtrls, - PythonEngine, PythonGUIInputOutput, SortThds; + PythonEngine, Vcl.PythonGUIInputOutput, SortThds; type TThreadSortForm = class(TForm) diff --git a/Demos/Demo34/Unit1.pas b/Demos/Demo34/Unit1.pas index 305b8f6c..dfc8a693 100644 --- a/Demos/Demo34/Unit1.pas +++ b/Demos/Demo34/Unit1.pas @@ -8,7 +8,7 @@ interface SysUtils, Classes, Windows, Messages, Graphics, Controls, Forms, Dialogs, StdCtrls, ExtCtrls, ComCtrls, PythonVersions, - PythonEngine, PythonGUIInputOutput; + PythonEngine, Vcl.PythonGUIInputOutput; type TForm1 = class(TForm) diff --git a/Source/PythonEngine.pas b/Source/PythonEngine.pas index 67e1db70..bf62224a 100644 --- a/Source/PythonEngine.pas +++ b/Source/PythonEngine.pas @@ -2670,6 +2670,7 @@ function PythonToDelphi( obj : PPyObject ) : TPyObject; function IsDelphiObject( obj : PPyObject ) : Boolean; procedure PyObjectDestructor( pSelf : PPyObject); cdecl; procedure FreeSubtypeInst(ob:PPyObject); cdecl; +procedure Register; function PyType_HasFeature(AType : PPyTypeObject; AFlag : Integer) : Boolean; function GetPythonVersionFromDLLName(const DLLFileName : string): string; @@ -8791,6 +8792,12 @@ function IsDelphiObject( obj : PPyObject ) : Boolean; end; end; +procedure Register; +begin + RegisterComponents('Python',[ TPythonEngine, TPythonInputOutput, + TPythonType, TPythonModule, TPythonDelphiVar]); +end; + function GetPythonVersionFromDLLName(const DLLFileName : string): string; begin Result := DLLFileName[{$IFDEF MSWINDOWS}7{$ELSE}10{$ENDIF}] + '.' + DLLFileName[{$IFDEF MSWINDOWS}8{$ELSE}11{$ENDIF}]; diff --git a/Source/vcl/Vcl.PythonGUIInputOutput.pas b/Source/vcl/Vcl.PythonGUIInputOutput.pas index cb1a0d1c..915c1b68 100644 --- a/Source/vcl/Vcl.PythonGUIInputOutput.pas +++ b/Source/vcl/Vcl.PythonGUIInputOutput.pas @@ -92,6 +92,8 @@ TPythonGUIInputOutput = class(TPythonInputOutput) property Output : TCustomMemo read FCustomMemo write FCustomMemo; end; + procedure Register; + implementation {$IFDEF FPC} @@ -246,4 +248,9 @@ procedure TPythonGUIInputOutput.DisplayString( const str : string ); {------------------------------------------------------------------------------} +procedure Register; +begin + RegisterComponents('Python', [TPythonGUIInputOutput]); +end; + end.