diff --git a/windows/src/developer/TIKE/Tike.dpr b/windows/src/developer/TIKE/Tike.dpr index 57a7b3a029..fab4ce67f7 100644 --- a/windows/src/developer/TIKE/Tike.dpr +++ b/windows/src/developer/TIKE/Tike.dpr @@ -291,7 +291,8 @@ uses Keyman.System.VisualKeyboardImportKMX in 'main\Keyman.System.VisualKeyboardImportKMX.pas', Keyman.UI.Debug.CharacterGridRenderer in 'debug\Keyman.UI.Debug.CharacterGridRenderer.pas', UfrmDebugStatus_Platform in 'debug\UfrmDebugStatus_Platform.pas' {frmDebugStatus_Platform}, - UfrmDebugStatus_Options in 'debug\UfrmDebugStatus_Options.pas' {frmDebugStatus_Options}; + UfrmDebugStatus_Options in 'debug\UfrmDebugStatus_Options.pas' {frmDebugStatus_Options}, + Keyman.Developer.System.KeymanDeveloperPaths in 'main\Keyman.Developer.System.KeymanDeveloperPaths.pas'; {$R *.RES} {$R ICONS.RES} diff --git a/windows/src/developer/TIKE/Tike.dproj b/windows/src/developer/TIKE/Tike.dproj index f39992889c..e174c9396d 100644 --- a/windows/src/developer/TIKE/Tike.dproj +++ b/windows/src/developer/TIKE/Tike.dproj @@ -557,6 +557,9 @@
frmDebugStatus_Options
dfm + +
$R *.RES
+
Cfg_2 diff --git a/windows/src/developer/TIKE/main/Keyman.Developer.System.KeymanDeveloperPaths.pas b/windows/src/developer/TIKE/main/Keyman.Developer.System.KeymanDeveloperPaths.pas new file mode 100644 index 0000000000..ba921dce02 --- /dev/null +++ b/windows/src/developer/TIKE/main/Keyman.Developer.System.KeymanDeveloperPaths.pas @@ -0,0 +1,33 @@ +unit Keyman.Developer.System.KeymanDeveloperPaths; + +interface + +uses + System.SysUtils, + + KeymanPaths; + +type + TKeymanDeveloperPaths = class sealed + private + public + const S_LexicalModelCompiler = 'kmlmc.cmd'; + class function LexicalModelCompilerPath: string; static; + end; + +implementation + +{ TKeymanDeveloperPaths } + +class function TKeymanDeveloperPaths.LexicalModelCompilerPath: string; +var + KeymanRoot: string; +begin + if TKeymanPaths.RunningFromSource(KeymanRoot) + then Result := KeymanRoot + 'windows\src\developer\tike\' + else Result := ExtractFilePath(ParamStr(0)); + + Result := Result + S_LexicalModelCompiler; +end; + +end. diff --git a/windows/src/global/delphi/lexicalmodels/Keyman.Developer.System.LexicalModelCompile.pas b/windows/src/global/delphi/lexicalmodels/Keyman.Developer.System.LexicalModelCompile.pas index 2e8e2d17cb..4e3ba3ba45 100644 --- a/windows/src/global/delphi/lexicalmodels/Keyman.Developer.System.LexicalModelCompile.pas +++ b/windows/src/global/delphi/lexicalmodels/Keyman.Developer.System.LexicalModelCompile.pas @@ -4,7 +4,8 @@ interface uses Keyman.Developer.System.Project.ProjectFile, - Keyman.Developer.System.Project.ProjectLog; + Keyman.Developer.System.Project.ProjectLog, + Keyman.Developer.System.KeymanDeveloperPaths; function CompileModelFile(ProjectFile: TProjectFile; infile, outfile: string; debug: Boolean): Boolean; @@ -25,7 +26,8 @@ var begin ec := 0; logtext := ''; - cmdline := Format('"%skmlmc.cmd" "%s" -o "%s"', [ExtractFilePath(ParamStr(0)), infile, outfile]); + + cmdline := Format('"%s" "%s" -o "%s"', [TKeymanDeveloperPaths.LexicalModelCompilerPath, infile, outfile]); Result := TUtilExecute.Console(cmdline, ExtractFileDir(infile), logtext, ec); logtext := UTF8ToString(AnsiString(logtext));