From ba509cfde37833dacb31f29aaf7a883abe81b3b9 Mon Sep 17 00:00:00 2001 From: mattias Date: Sun, 14 Jan 2024 12:39:04 +0100 Subject: [PATCH] pas2js: run params: set working directory --- components/pas2js/pjsdsgnregister.pas | 1 + components/pas2js/pjsprojectoptions.pp | 1 + 2 files changed, 2 insertions(+) diff --git a/components/pas2js/pjsdsgnregister.pas b/components/pas2js/pjsdsgnregister.pas index 93b0fe447a..62aa658d01 100644 --- a/components/pas2js/pjsdsgnregister.pas +++ b/components/pas2js/pjsdsgnregister.pas @@ -1717,6 +1717,7 @@ begin RunMode:=AProject.RunParameters.GetOrCreate('default'); RunMode.UseLaunchingApplication:=true; RunMode.LaunchingApplicationPathPlusParams:='"$(Pas2jsElectron)" .'; + RunMode.WorkingDirectory:='$(ProjPath)'; Result:=mrOk; end; diff --git a/components/pas2js/pjsprojectoptions.pp b/components/pas2js/pjsprojectoptions.pp index b6350c47f4..0e8a5457b3 100644 --- a/components/pas2js/pjsprojectoptions.pp +++ b/components/pas2js/pjsprojectoptions.pp @@ -99,6 +99,7 @@ Procedure SetDefaultNodeRunParams(RunParams : TAbstractRunParamsOptionsMode); begin ResetRunParams(RunParams); RunParams.LaunchingApplicationPathPlusParams:='"$(Pas2JSNodeJS)" "$MakeDir($(ProjPath))$NameOnly($(ProjFile)).js"'; + RunParams.WorkingDirectory:='$(ProjPath)'; end; Procedure SetPasJSCompileOptions(CompOpts: TLazCompilerOptions;