From 4be65b25ee6fe9d7e319bf837abeb87252770b9f Mon Sep 17 00:00:00 2001 From: peardox Date: Tue, 9 Aug 2022 03:38:45 +0100 Subject: [PATCH] Add an Exit(Result); if Windoze --- src/Embeddable/PyEnvironment.Embeddable.pas | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Embeddable/PyEnvironment.Embeddable.pas b/src/Embeddable/PyEnvironment.Embeddable.pas index 28fa50e..c8bda2f 100644 --- a/src/Embeddable/PyEnvironment.Embeddable.pas +++ b/src/Embeddable/PyEnvironment.Embeddable.pas @@ -244,6 +244,8 @@ function TPyCustomEmbeddableDistribution.FindExecutable: string; Result := TPath.Combine(GetEnvironmentPath(), 'python.exe'); if not TFile.Exists(Result) then Exit(String.Empty); + // If we get this far and we're in a Windows only section then we're done so just exit with the Result intact + Exit(Result); {$ELSEIF DEFINED(ANDROID)} //Let's try it in the library path first - we should place it in the library path in Android Result := TPath.GetLibraryPath();