diff --git a/common/core/desktop/tests/unit/kmx/028 - smp.kmn b/common/core/desktop/tests/unit/kmx/028 - smp.kmn index 772193d88d..5bfbbe4bd2 100644 --- a/common/core/desktop/tests/unit/kmx/028 - smp.kmn +++ b/common/core/desktop/tests/unit/kmx/028 - smp.kmn @@ -4,7 +4,6 @@ c expected: \U0001F601yx c context: store(&version) '10.0' -store(&name) '028smp' begin Unicode > use(Main) diff --git a/common/core/desktop/tests/unit/kmx/meson.build b/common/core/desktop/tests/unit/kmx/meson.build index bc3ac94e7c..5c6073cac5 100644 --- a/common/core/desktop/tests/unit/kmx/meson.build +++ b/common/core/desktop/tests/unit/kmx/meson.build @@ -77,7 +77,7 @@ tests = [ ] if build_machine.system() == 'windows' - kmcomp = find_program('kmcomp.exe', required: false) + kmcomp = find_program(join_paths(meson.source_root(),'..','..','..','windows','bin','developer','kmcomp.exe'), 'kmcomp.exe', required: false) kmcomp_cmd = [kmcomp] copy_cmd = [find_program('cmd.exe', required: true), '/c', 'copy'] cat_cmd = [find_program('cmd.exe', required: true), '/c', 'type'] diff --git a/windows/src/global/delphi/general/CompilePackage.pas b/windows/src/global/delphi/general/CompilePackage.pas index 3fd11676f4..fa366eab5b 100644 --- a/windows/src/global/delphi/general/CompilePackage.pas +++ b/windows/src/global/delphi/general/CompilePackage.pas @@ -159,6 +159,7 @@ function TCompilePackage.Compile: Boolean; var buf: array[0..260] of Char; n: Integer; + b: Boolean; f: TSearchRec; begin Result := False; @@ -187,10 +188,15 @@ begin FTempPath := buf; GetTempFileName(PChar(FTempPath), 'kmn', 0, buf); - FTempPath := buf; - if FileExists(FTempPath) then DeleteFile(FTempPath); + FTempPath := buf + '.dir'; + b := CreateDir(FTempPath); + if not b then + begin + FatalMessage('Unable to create temp folder '+FTempPath); + if FileExists(buf) then DeleteFile(buf); + Exit; + end; - CreateDir(FTempPath); try Result := BuildKMP; finally @@ -205,6 +211,7 @@ begin FindClose(f); end; RemoveDirectory(PChar(FTempPath)); + if FileExists(buf) then DeleteFile(buf); end; end;