https://blog.dummzeuch.de/2014/04/10/delphi-console-applications/
Delphi Console Applications