Skip to content

Commit 7fa1c7f

Browse files
authored
Merge pull request #29 from Embarcadero/Update_Samples
Update samples Former-commit-id: 59b43bbbf0ad49551e5daac06e1a3066024f65bc [formerly 52fb6750f39ac2f709d047916c56acba33e13deb] [formerly a25bb635e23d1a2e05437f9eec80ee3bb16545bd [formerly 87ed5f34891040a900e756a382fee7c596c9400a]] [formerly 6948dcad7c741f8569c5b0918495c090c5a36d5d [formerly ea68229d6d7dea34107ac378aa12f82b879541a1] [formerly d475c2577729f0b87c384c590839184d1ae35ba5 [formerly b90b8c8d2fdbefccebf6e7cf0623f134acd75a8d]]] Former-commit-id: b0c7236fe90cd49278e59978008bd6305b6ed586 [formerly c249e9a83aa40a3b3fb2b659bcf050eb6f0d4c98] [formerly d1b431091c92c157ab31f6544ff9ead0eb56f059 [formerly a205c718097741a5c8faba4339f9710d6cf93ed7]] Former-commit-id: 4c16503cce5fb6de79bad294aad77be3bbe9ffb3 [formerly be65bb15f68749cc0cf7345bf408a33739fa4904] Former-commit-id: 74f084ec8aa8f53544f7cb9d982d8aea691e52c8 Former-commit-id: db5f9a4
2 parents 842e206 + c33330f commit 7fa1c7f

33 files changed

Lines changed: 1062 additions & 1090 deletions

samples/README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
11
### Welcome to the Samples section of Python Environments for Delphi applicaitons.
22

33
Each one of the samples showcase the various use-cases that we can achieve using **PythonEnvironments**.
4+
5+
- [Sample 00](https://github.com/Embarcadero/PythonEnviroments/tree/Update_Samples/samples/environments/deploy/sample_00_SimpleDeployable)
6+
- [Sample 01](https://github.com/Embarcadero/PythonEnviroments/tree/Update_Samples/samples/environments/deploy/sample_01_ManuallyLoad)
7+
- [Sample 02](https://github.com/Embarcadero/PythonEnviroments/tree/Update_Samples/samples/environments/deploy/sample_02_AutoLoad)
8+
- [Sample 03](https://github.com/Embarcadero/PythonEnviroments/tree/Update_Samples/samples/environments/deploy/sample_03_ExtractPython)
9+
- [Sample 04](https://github.com/Embarcadero/PythonEnviroments/tree/Update_Samples/samples/environments/deploy/sample_04_AsyncLoad)
10+
- [Sample 05](https://github.com/Embarcadero/PythonEnviroments/tree/Update_Samples/samples/environments/deploy/sample_05_AsyncEvents)
11+
- [Sample 06](https://github.com/Embarcadero/PythonEnviroments/tree/Update_Samples/samples/environments/deploy/sample_00_SimpleDeployable)
12+
- [Sample 07](https://github.com/Embarcadero/PythonEnviroments/tree/Update_Samples/samples/environments/deploy/sample_06_SimpleAndroid)
Binary file not shown.

samples/environments/deploy/SimpleDeployable/SimpleDeployable.dpr renamed to samples/environments/deploy/sample_00_SimpleDeployable/SimpleDeployable.dpr

File renamed without changes.

samples/environments/deploy/SimpleDeployable/SimpleDeployable.dproj renamed to samples/environments/deploy/sample_00_SimpleDeployable/SimpleDeployable.dproj

File renamed without changes.

samples/environments/deploy/SimpleDeployable/Unit1.fmx renamed to samples/environments/deploy/sample_00_SimpleDeployable/Unit1.fmx

Lines changed: 38 additions & 1016 deletions
Large diffs are not rendered by default.

samples/environments/deploy/SimpleDeployable/Unit1.pas renamed to samples/environments/deploy/sample_00_SimpleDeployable/Unit1.pas

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,8 @@ TForm1 = class(TForm)
1616
TabControl1: TTabControl;
1717
TabItem1: TTabItem;
1818
TabItem2: TTabItem;
19-
TabItem3: TTabItem;
20-
Image1: TImage;
2119
Image2: TImage;
22-
TabItem4: TTabItem;
20+
TabItem3: TTabItem;
2321
Memo1: TMemo;
2422
Image3: TImage;
2523
procedure PyEmbeddedEnvironment1PluginInstall(const APlugin: TObject;
@@ -50,47 +48,62 @@ implementation
5048

5149
{$R *.fmx}
5250

51+
// Set the default view tab to "Run"
5352
procedure TForm1.FormShow(Sender: TObject);
5453
begin
55-
TabControl1.ActiveTab := TabItem4;
54+
TabControl1.ActiveTab := TabItem3;
5655
end;
5756

57+
// "AfterActivate" Event of PyEmbeddedEnvironment1 is assigned
58+
// to the below procedure
5859
procedure TForm1.PyEmbeddedEnvironment1AfterActivate(Sender: TObject;
5960
const APythonVersion: string; const AActivated: Boolean);
6061
begin
6162
Memo1.Lines.Add(Format('Python %s is active.', [APythonVersion]));
6263
end;
6364

65+
// "AfterSetUp" Event of PyEmbeddedEnvironment1 is assigned
66+
// to the below procedure
6467
procedure TForm1.PyEmbeddedEnvironment1AfterSetup(Sender: TObject;
6568
const APythonVersion: string);
6669
begin
6770
Memo1.Lines.Add(Format('Python %s setup done.', [APythonVersion]));
6871
end;
6972

73+
// "BeforeActivate" Event of PyEmbeddedEnvironment1 is assigned
74+
// to the below procedure
7075
procedure TForm1.PyEmbeddedEnvironment1BeforeActivate(Sender: TObject;
7176
const APythonVersion: string);
7277
begin
7378
Memo1.Lines.Add(Format('Activating Python %s.', [APythonVersion]));
7479
end;
7580

81+
// "BeforeSetUp" Event of PyEmbeddedEnvironment1 is assigned
82+
// to the below procedure
7683
procedure TForm1.PyEmbeddedEnvironment1BeforeSetup(Sender: TObject;
7784
const APythonVersion: string);
7885
begin
7986
Memo1.Lines.Add(Format('Setting up Python %s.', [APythonVersion]));
8087
end;
8188

89+
// "OnError" Event of PyEmbeddedEnvironment1 is assigned
90+
// to the below procedure
8291
procedure TForm1.PyEmbeddedEnvironment1Error(Sender: TObject;
8392
const AException: Exception);
8493
begin
8594
Memo1.Lines.Add(Format('An error has occurred: %s', [AException.Message]));
8695
end;
8796

97+
// "OnPluginInstall" Event of PyEmbeddedEnvironment1 is assigned
98+
// to the below procedure
8899
procedure TForm1.PyEmbeddedEnvironment1PluginInstall(const APlugin: TObject;
89100
const AInfo: TPyPluginInfo);
90101
begin
91102
Memo1.Lines.Add(Format('Installing %s...', [AInfo.Name]));
92103
end;
93104

105+
// "OnReady" Event of PyEmbeddedEnvironment1 is assigned
106+
// to the below procedure
94107
procedure TForm1.PyEmbeddedEnvironment1Ready(Sender: TObject;
95108
const APythonVersion: string);
96109
begin

samples/environments/deploy/SimpleDeployable/enable_python.png renamed to samples/environments/deploy/sample_00_SimpleDeployable/enable_python.png

File renamed without changes.

samples/environments/deploy/SimpleDeployable/scanner_options.png renamed to samples/environments/deploy/sample_00_SimpleDeployable/scanner_options.png

File renamed without changes.

samples/environments/deploy/ManuallyLoad/ManuallyLoad.dpr renamed to samples/environments/deploy/sample_01_ManuallyLoad/ManuallyLoad.dpr

File renamed without changes.

samples/environments/deploy/ManuallyLoad/ManuallyLoad.dproj renamed to samples/environments/deploy/sample_01_ManuallyLoad/ManuallyLoad.dproj

File renamed without changes.

0 commit comments

Comments
 (0)