V
V
Vitaly2015-08-07 02:24:26
MinGW
Vitaly, 2015-08-07 02:24:26

How can I make a hybrid of console and graphical application?

There is a GUI application, but at the same time I would like to teach it to print the version number to the console through the --version argument (very necessary and convenient for scripts). Everything works great on Linux, where the axis does not intercept control over the application, and on Windows everything turns out so that we do not just write a list of applications in the sh-file, but as if we are writing their launch via screen -d -m.
If I compile the application as a pure console application, then when the application is simply opened, an additional window with the console will pop up (I think everyone knows DosBox, that's what I'm talking about, although it has a --no-console argument to not display it).
The task is to be able to safely call the --version argument and at the same time the application works like a typical console application, but if no arguments or arguments do not contain --version, then it works like a typical GUI application.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question