Firemonkey application – launch external app when running under OS X

  

I have a Firemonkey app (Delphi Berlin 10.1) and wish to launch an external program from it. (The external program is a helpfile viewer.)

When I am compiling for Win32, I can simply do this (when the external program is in the same folder as the main executable):

path := ExtractFilePath(ParamStr(0));
path := path + ‘MyViewer.exe’;
ShellExecute(0, ‘open’, PWideChar(path), nil, nil, SW_SHOWNORMAL);

When I’m compiling for OS X, I have the Mac version of the external program, MyViewer.app. Where do I place it? How do I get it into the bundle created by PAServer? What code is required to launch it?

Comments are closed.