pas2jsdsgn: push WebServerFileName to simplewebservergui

This commit is contained in:
mattias 2022-04-11 10:55:48 +02:00
parent af36d4da8f
commit 19d03a5ea8
2 changed files with 15 additions and 3 deletions

View File

@ -282,13 +282,23 @@ begin
aProject:=LazarusIDE.ActiveProject;
if aProject=nil then exit;
if not WithDebug then
exit; // compile normally and run the run parameters
IsWebProject:=aProject.CustomData[PJSProjectWebBrowser]='1';
if not IsWebProject then
exit;
if SimpleWebServerController.Options.ServerExe='compileserver'+GetExeExt then
begin
// simplewebservergui package has default value
if CompareFilenames(ExtractFilename(PJSOptions.WebServerFileName),'compileserver'+GetExeExt)=0 then
begin
// this package has a compileserver -> for compatibility set our value
SimpleWebServerController.Options.ServerExe:=PJSOptions.WebServerFileName;
end;
end;
if not WithDebug then
exit; // compile normally and run the run parameters
ServerPort:=StrToIntDef(aProject.CustomData[PJSProjectPort],-1);
URL:=aProject.CustomData[PJSProjectURL];
if (ServerPort<0) and (URL='') then

View File

@ -175,7 +175,9 @@ Const
Var
S : String;
{$IFDEF UNIX}
L : String;
{$ENDIF}
begin
FPackageDir:=IncludeLeadingPathDelimiter(FPackageDir);