Is there a possibility to make a cross-platform text output from Shell/Bash into a FMX Memo?

  

I have a program that executes .bat files for MS Windows and .command files for macOS. Both of this executables perform as a launch scripts for other program – Render Engine. That Render Engine generates output into console. I want to replace consoles that opens every time I execute a script with more user-friendly interface with estimated time and progress bars, but I need to know what exactly console shows in that moment to be able to calculate all of that. My question, is there any way to get real-time output from console, running in real-time into a Delphi string?

With VCL that was possible to do with JEDI or a GetDosOutput procedure. And that was actually working with VCL applications.

Executing code fragment

{$IFDEF MSWINDOWS}
ShellExecute(0, ‘OPEN’, PChar(‘C:\ProgramData\AErender\aerender’ + i.ToString + ‘.bat’), ”, ”, SW_SHOWNORMAL);
{$ENDIF MSWINOWS}
{$IFDEF POSIX}
//Grab ownership of executable
_system(PAnsiChar(‘chmod +x ‘ + AnsiString(GetEnvironmentVariable(‘HOME’) + ‘/Documents/AErender/aerender’ + i.ToString + ‘.command’)));
//Execute
_system(PAnsiChar(‘open ‘ + AnsiString(GetEnvironmentVariable(‘HOME’) + ‘/Documents/AErender/aerender’ + i.ToString + ‘.command’)));
{$ENDIF POSIX}

Comments are closed.