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

Lines changed: 1 addition & 0 deletions
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

Lines changed: 11 additions & 0 deletions
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

Lines changed: 31 additions & 0 deletions
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

Lines changed: 1 addition & 0 deletions
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

Lines changed: 71 additions & 712 deletions
Large diffs are not rendered by default.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
7

Modules/DelphiFMX/uMain.pas

Lines changed: 3 additions & 2 deletions
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

Lines changed: 32 additions & 707 deletions
Large diffs are not rendered by default.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
7

Modules/DelphiVCL/uMain.pas

Lines changed: 3 additions & 2 deletions
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;

0 commit comments

Comments
 (0)