Testing for operating system in Miletus app

We don't have defines for the supported target platforms but at run time you can use the GetOSVersionP promise to check this.

//Mark as async
[async]
procedure WebButton1Click(Sender: TObject);

//Implementation of WebButton1Click
procedure TForm3.WebButton1Click(Sender: TObject);
var
  os: TMiletusOSVersion;
begin
  os := Await(TMiletusOSVersion, GetOSVersionP);
  if os.Platform = opWindows then
    ShowMessage('I''m on Windows')
  else
    ShowMessage('I''m not on Windows');
end;

This is of course not tied to a button click. You could do the same from the Form.OnCreate event and store the TMiletusOSVersion result.