From 17359dbf5316eab0f6e873b6e4bfc5374b3d1281 Mon Sep 17 00:00:00 2001 From: Marc Durdin Date: Tue, 31 Jan 2023 15:56:30 +0700 Subject: [PATCH] chore(developer): kmcmpdll debug src path Adds the src build path in for kmcmpdll.dll for debugging purposes, when running from any subdirectory of the KEYMAN_ROOT path. --- developer/src/tike/main/RedistFiles.pas | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/developer/src/tike/main/RedistFiles.pas b/developer/src/tike/main/RedistFiles.pas index 998878e962..b02c956679 100644 --- a/developer/src/tike/main/RedistFiles.pas +++ b/developer/src/tike/main/RedistFiles.pas @@ -139,12 +139,17 @@ function GetDebugKMCmpDllPath: string; var root: string; const + DevPlatform={$IFDEF WIN64}'x64'{$ELSE}'Win32'{$ENDIF}; + DevConfig={$IFDEF DEBUG}'Debug'{$ELSE}'Release'{$ENDIF}; + DevSrcCompilerPath = 'developer\src\kmcmpdll\bin\'+DevPlatform+'\'+DevConfig; DevCompilerPath = 'developer\bin'; begin - if TKeymanPaths.RunningFromSource(root) and - FileExists(root + DevCompilerPath + '\kmcmpdll.dll') - then Result := root + DevCompilerPath - else Result := ExtractFilePath(ParamStr(0)); + if TKeymanPaths.RunningFromSource(root) and FileExists(root + DevSrcCompilerPath + '\kmcmpdll.dll') then + Result := root + DevSrcCompilerPath + else if TKeymanPaths.RunningFromSource(root) and FileExists(root + DevCompilerPath + '\kmcmpdll.dll') then + Result := root + DevCompilerPath + else + Result := ExtractFilePath(ParamStr(0)); Result := GetDebugPath('Debug_KMCMPDLLPath', Result); end;