|
Executes an external process/program with specified parameters |
|
Extecutable |
The path and the name of the process executable. |
Parameters |
The command line arguments that will be used with the process executable |
HomeDir |
The directory which will be defined as the root directory for the executed process. |
|
procedure DoStartServer(record LocalManagedServerVc LMSr,record HansaVersionVc HVr)
begin
string 255 exefil;
string 255 workdir;
string 255 hobflr;
string 255 arglist;
exefil = HVr.ProgramFolder & "/hansa-server";
hobflr = HVr.ProgramFolder & "/hob/";
workdir = LMSr.DataFolder;
// /Versions/54071217/HW/hansa-server --workdir /Servers/TEST --hobfolder /Versions/54071217/HW/hob/
arglist = "--workdir " & workdir;
arglist = arglist & " --hobfolder " & hobflr;
if (LMSr.Port>0) then begin
arglist = arglist & " --port " & LMSr.Port;
end;
if (LMSr.HTTPPort>0) then begin
arglist = arglist & " --httpport=" & LMSr.HTTPPort;
end;
if (LMSr.HTTPSPort>0) then begin
arglist = arglist & " --httpsport=" & LMSr.HTTPSPort;
end;
arglist = arglist & " --with-controller";
StartExternalProcess(exefil,arglist,workdir);
return;
end;
««