According to System.pas, it is documented as True if compiled as console app . There is also a purpose in System.pas
{$IFDEF LINUX} IsConsole := True; ...
I have a strange problem when an application starts from a Delphi application using ShellExecute and then runs into this code, throwing an (unexpected) exception
if System.IsConsole then raise Exception.Create(Msg)
The application is not compiled using Project/Options/Linking/Generate console application . What else can set IsConsole to true?
Note that in Delphi XE2 , OSX applications cannot use this variable because it is always true. See QC Entry 98956 and Why does my OSX FireMonkey app think it's a console app?
source share