The following code works for WINDOWS:
GetMiletusPath(NP_APPDATA, dbPath) returns the correctly c:\users\lliew\AppData\Roaming
However, nothing is returned for LINUX and MacOS.
I have a database file (created dynamically if not present), and config files (config.ini) - which I need to know the path of the Melitus app to create and read them.
I cannot find any example code online or in this forum.
Some synchronous functions such as GetMiletusPath is only supported on Windows. There are async promise-based versions which you can use on all platforms. In you case GetMiletusPathP would look something like this:
type
TForm1 = class(TMiletusForm)
WebButton1: TWebButton;
[async]
procedure WebButton1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.WebButton1Click(Sender: TObject);
var
p: string;
begin
p := TAwait.ExecP<string>(GetMiletusPathP(NP_APPDATA));
end;