Skip to content

Commit 613e3ef

Browse files
committed
Backported Vcl/Fmx wrappers and more from the Embaracadero branch
1 parent bc44bf3 commit 613e3ef

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+6793
-1718
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
*.rsj
1616
*.compiled
1717
*.lib
18+
*.pyd
1819

1920
# Generated source #
2021
###################

Modules/BuildAllModules.bat

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
@echo off
2+
call rsvars.bat
3+
msbuild /t:Clean /t:Build /p:config=Release /p:platform=Win32 DelphiVCL/DelphiVCL.dproj
4+
msbuild /t:Clean /t:Build /p:config=Release /p:platform=Win64 DelphiVCL/DelphiVCL.dproj
5+
msbuild /t:Clean /t:Build /p:config=Release /p:platform=Win32 DelphiFMX/DelphiFMX.dproj
6+
msbuild /t:Clean /t:Build /p:config=Release /p:platform=Win64 DelphiFMX/DelphiFMX.dproj
7+
msbuild /t:Clean /t:Build /p:config=Release /p:platform=Android DelphiFMX/DelphiFMX.dproj
8+
msbuild /t:Clean /t:Build /p:config=Release /p:platform=Android64 DelphiFMX/DelphiFMX.dproj
9+
msbuild /t:Clean /t:Build /p:config=Release /p:platform=Linux64 DelphiFMX/DelphiFMX.dproj
10+
msbuild /t:Clean /t:Build /p:config=Release /p:platform=OSX32 DelphiFMX/DelphiFMX.dproj
11+
msbuild /t:Clean /t:Build /p:config=Release /p:platform=OSX64 DelphiFMX/DelphiFMX.dproj

Modules/BuildAllVersions.bat

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
@echo off
2+
call rsvars.bat
3+
for /L %%G in (4,1,7) do (
4+
echo %%G > DelphiFMX\PythonVersionIndex.inc
5+
echo %%G > DelphiVCL\PythonVersionIndex.inc
6+
rmdir /s /q DelphiFMX\pyd%%G >nul
7+
rmdir /s /q DelphiVCL\pyd%%G >nul
8+
Echo VCL Win32 Index %%G
9+
msbuild /nologo /v:m /t:Clean /t:Build /p:config=Release /p:platform=Win32 DelphiVCL/DelphiVCL.dproj
10+
Echo VCL Win64 Index %%G
11+
msbuild /nologo /v:m /t:Clean /t:Build /p:config=Release /p:platform=Win64 DelphiVCL/DelphiVCL.dproj
12+
echo FMX Win32 Index %%G
13+
msbuild /nologo /v:m /t:Clean /t:Build /p:config=Release /p:platform=Win32 DelphiFMX/DelphiFMX.dproj
14+
Echo FMX Win64 Index %%G
15+
msbuild /nologo /v:m /t:Clean /t:Build /p:config=Release /p:platform=Win64 DelphiFMX/DelphiFMX.dproj
16+
if %%G==7 (
17+
echo FMX Android 32-bit Index %%G
18+
msbuild /nologo /v:m /t:Clean /t:Build /p:config=Release /p:platform=Android DelphiFMX/DelphiFMX.dproj
19+
echo FMX Android 64-bit Index %%G
20+
msbuild /nologo /v:m /t:Clean /t:Build /p:config=Release /p:platform=Android64 DelphiFMX/DelphiFMX.dproj
21+
)
22+
echo FMX Linux64 Index %%G
23+
msbuild /nologo /v:m /t:Clean /t:Build /p:config=Release /p:platform=Linux64 DelphiFMX/DelphiFMX.dproj
24+
rem echo FMX OSX32 Index %%G
25+
rem msbuild /nologo /v:m /t:Clean /t:Build /p:config=Release /p:platform=OSX32 DelphiFMX/DelphiFMX.dproj
26+
echo FMX OSX64 Index %%G
27+
msbuild /nologo /v:m /t:Clean /t:Build /p:config=Release /p:platform=OSX64 DelphiFMX/DelphiFMX.dproj
28+
29+
ren DelphiFMX\pyd pyd%%G
30+
ren DelphiVCL\pyd pyd%%G
31+
)

Modules/DelphiFMX/DelphiFMX.dpr

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
library DelphiFMX;
22

33
uses
4+
System.StartUpCopy,
45
SysUtils,
56
Classes,
67
uMain in 'uMain.pas';

Modules/DelphiFMX/DelphiFMX.dproj

+71-712
Large diffs are not rendered by default.
+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
7

Modules/DelphiFMX/uMain.pas

+3-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@ function PyInit_DelphiFMX: PPyObject;
2525
gEngine.AutoFinalize := False;
2626
gEngine.UseLastKnownVersion := False;
2727
// Adapt to the desired python version - Will only work with this version
28-
gEngine.RegVersion := '3.9';
29-
gEngine.DllName := 'python39.dll';
28+
var PythonVersionIndex := {$I PythonVersionIndex.inc}; // 7 = 3.9
29+
gEngine.RegVersion := PYTHON_KNOWN_VERSIONS[PythonVersionIndex].RegVersion;
30+
gEngine.DllName := PYTHON_KNOWN_VERSIONS[PythonVersionIndex].DllName;
3031

3132
gModule := TPythonModule.Create(nil);
3233
gModule.Engine := gEngine;

Modules/DelphiVCL/DelphiVCL.dproj

+32-707
Large diffs are not rendered by default.
+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
7

Modules/DelphiVCL/uMain.pas

+3-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@ function PyInit_DelphiVCL: PPyObject;
2525
gEngine.AutoFinalize := False;
2626
gEngine.UseLastKnownVersion := False;
2727
// Adapt to the desired python version - Will only work with this version
28-
gEngine.RegVersion := '3.9';
29-
gEngine.DllName := 'python39.dll';
28+
var PythonVersionIndex := {$I PythonVersionIndex.inc}; // 7 = 3.9
29+
gEngine.RegVersion := PYTHON_KNOWN_VERSIONS[PythonVersionIndex].RegVersion;
30+
gEngine.DllName := PYTHON_KNOWN_VERSIONS[PythonVersionIndex].DllName;
3031

3132
gModule := TPythonModule.Create(nil);
3233
gModule.Engine := gEngine;

Modules/PythonFMXandVCL.groupproj

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2+
<PropertyGroup>
3+
<ProjectGuid>{8CE82B03-1B21-45C9-8091-DF9D8A8F4E5C}</ProjectGuid>
4+
</PropertyGroup>
5+
<ItemGroup>
6+
<Projects Include="DelphiFMX\DelphiFMX.dproj">
7+
<Dependencies/>
8+
</Projects>
9+
<Projects Include="DelphiVCL\DelphiVCL.dproj">
10+
<Dependencies/>
11+
</Projects>
12+
</ItemGroup>
13+
<ProjectExtensions>
14+
<Borland.Personality>Default.Personality.12</Borland.Personality>
15+
<Borland.ProjectType/>
16+
<BorlandProject>
17+
<Default.Personality/>
18+
</BorlandProject>
19+
</ProjectExtensions>
20+
<Target Name="DelphiFMX">
21+
<MSBuild Projects="DelphiFMX\DelphiFMX.dproj"/>
22+
</Target>
23+
<Target Name="DelphiFMX:Clean">
24+
<MSBuild Projects="DelphiFMX\DelphiFMX.dproj" Targets="Clean"/>
25+
</Target>
26+
<Target Name="DelphiFMX:Make">
27+
<MSBuild Projects="DelphiFMX\DelphiFMX.dproj" Targets="Make"/>
28+
</Target>
29+
<Target Name="DelphiVCL">
30+
<MSBuild Projects="DelphiVCL\DelphiVCL.dproj"/>
31+
</Target>
32+
<Target Name="DelphiVCL:Clean">
33+
<MSBuild Projects="DelphiVCL\DelphiVCL.dproj" Targets="Clean"/>
34+
</Target>
35+
<Target Name="DelphiVCL:Make">
36+
<MSBuild Projects="DelphiVCL\DelphiVCL.dproj" Targets="Make"/>
37+
</Target>
38+
<Target Name="Build">
39+
<CallTarget Targets="DelphiFMX;DelphiVCL"/>
40+
</Target>
41+
<Target Name="Clean">
42+
<CallTarget Targets="DelphiFMX:Clean;DelphiVCL:Clean"/>
43+
</Target>
44+
<Target Name="Make">
45+
<CallTarget Targets="DelphiFMX:Make;DelphiVCL:Make"/>
46+
</Target>
47+
<Import Project="$(BDS)\Bin\CodeGear.Group.Targets" Condition="Exists('$(BDS)\Bin\CodeGear.Group.Targets')"/>
48+
</Project>

Packages/Delphi/Delphi 10.4+/Python.dpk

+2-1
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ contains
4545
WrapDelphiClasses in '..\..\..\Source\WrapDelphiClasses.pas',
4646
WrapDelphiTypes in '..\..\..\Source\WrapDelphiTypes.pas',
4747
WrapDelphiWindows in '..\..\..\Source\WrapDelphiWindows.pas',
48-
WrapFireDAC in '..\..\..\Source\WrapFireDAC.pas';
48+
WrapFireDAC in '..\..\..\Source\WrapFireDAC.pas',
49+
WrapActions in '..\..\..\Source\WrapActions.pas';
4950

5051
end.

Packages/Delphi/Delphi 10.4+/PythonFmx.dpk

+4-1
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ contains
5050
WrapFmxTypes in '..\..\..\Source\fmx\WrapFmxTypes.pas',
5151
WrapDelphiFmx in '..\..\..\Source\fmx\WrapDelphiFmx.pas',
5252
WrapFmxEdit in '..\..\..\Source\fmx\WrapFmxEdit.pas',
53-
WrapFmxListBox in '..\..\..\Source\fmx\WrapFmxListBox.pas';
53+
WrapFmxListBox in '..\..\..\Source\fmx\WrapFmxListBox.pas',
54+
WrapFmxMedia in '..\..\..\Source\fmx\WrapFmxMedia.pas',
55+
WrapFmxMenus in '..\..\..\Source\fmx\WrapFmxMenus.pas',
56+
WrapFmxStyles in '..\..\..\Source\fmx\WrapFmxStyles.pas';
5457

5558
end.

Packages/Delphi/Delphi 10.4+/PythonVcl.dpk

+6-2
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ requires
3434
rtl,
3535
vcl,
3636
Python,
37-
VclSmp;
37+
VclSmp,
38+
vclimg,
39+
vclwinx;
3840

3941
contains
4042
Vcl.PythonGUIInputOutput in '..\..\..\Source\vcl\Vcl.PythonGUIInputOutput.pas',
@@ -49,6 +51,8 @@ contains
4951
WrapVclGraphics in '..\..\..\Source\vcl\WrapVclGraphics.pas',
5052
WrapVclGrids in '..\..\..\Source\vcl\WrapVclGrids.pas',
5153
WrapVclSamplesSpin in '..\..\..\Source\vcl\WrapVclSamplesSpin.pas',
52-
WrapVclStdCtrls in '..\..\..\Source\vcl\WrapVclStdCtrls.pas';
54+
WrapVclStdCtrls in '..\..\..\Source\vcl\WrapVclStdCtrls.pas',
55+
WrapVclWinXCtrls in '..\..\..\Source\vcl\WrapVclWinXCtrls.pas',
56+
WrapVclThemes in '..\..\..\Source\vcl\WrapVclThemes.pas';
5357

5458
end.

0 commit comments

Comments
 (0)