Skip to content

Commit 5fd5c94

Browse files
committed
1 parent 6fc97eb commit 5fd5c94

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

PythonForDelphi/Components/Sources/Core/PythonEngine.pas

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1492,6 +1492,7 @@ TPythonInputOutput = class(TComponent)
14921492
type
14931493
TDynamicDll = class(TComponent)
14941494
private
1495+
FFindPythonVersionRegistered: Boolean;
14951496
function IsAPIVersionStored: Boolean;
14961497
function IsDllNameStored: Boolean;
14971498
function IsRegVersionStored: Boolean;
@@ -1543,6 +1544,8 @@ TDynamicDll = class(TComponent)
15431544
property FatalAbort : Boolean read FFatalAbort write FFatalAbort default True;
15441545
property FatalMsgDlg : Boolean read FFatalMsgDlg write FFatalMsgDlg default True;
15451546
property UseLastKnownVersion: Boolean read FUseLastKnownVersion write FUseLastKnownVersion default True;
1547+
property FindPythonVersionRegistered : Boolean read FFindPythonVersionRegistered
1548+
write FFindPythonVersionRegistered default True;
15461549
property OnAfterLoad : TNotifyEvent read FOnAfterLoad write FOnAfterLoad;
15471550
property OnBeforeLoad : TNotifyEvent read FOnBeforeLoad write FOnBeforeLoad;
15481551
property OnBeforeUnload : TNotifyEvent read FOnBeforeUnload write FOnBeforeUnload;
@@ -3375,7 +3378,8 @@ function TDynamicDll.GetDllPath : String;
33753378

33763379
{$IFDEF MSWINDOWS}
33773380
if DLLPath = '' then begin
3378-
IsPythonVersionRegistered(RegVersion, Result, AllUserInstall);
3381+
if FindPythonVersionRegistered then
3382+
IsPythonVersionRegistered(RegVersion, Result, AllUserInstall);
33793383
end;
33803384
{$ENDIF}
33813385

0 commit comments

Comments
 (0)