<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body smarttemplateinserted="true" bgcolor="#FFFFFF" text="#000000">
<p>Hello,</p>
<p>Currently, under Windows the command-line help information (that is available using soffice --help) and version information (soffice --version) are shown in a dedicated dialog window (CmdlineHelpDialog). That has following problems:</p>
<p>1. The dialog does not allow for scrolling, resizing and selecting. This impairs usability of the information, but it may be fixed.</p>
<p>2. This makes the code unnecessary complicated, OS-dependent, because on every other platform, we output the information to console.</p>
<p>Given that using command-line switches implies some experience with console, it's natural to unify the behavior and use console on Windows OS for this, too.</p>
<p>However, this approach has another problem. As a GUI program, that is launched by another GUI program (soffice.exe launches soffice.bin), LibreOffice does not have its own console from the beginning, and cannot easily get access to parent console (if any:
 it may be launched from yet another GUI app, e.g. from explorer shortcut). And even if we somehow get to that console, we cannot ensure native user experience with it: Windows knows that it started GUI app, and thus console had already displayed command prompt,
 so our output will go after that prompt, and will not be followed by another one.</p>
<p>Another option would be to make LO a console application, and release console early (but not before we handled command line and had output help message). But this is not a good solution, too: marking a Windows executable as console one will force OS to create
 console each time the program is executed from e.g. shortcut (before main()), and that console will flash on start, creating bad UX.</p>
<p>I have posted a patch to gerrit [1], that creates *new* console each time LO is started with --help or --version, even when it is started from console itself. This allows to use console's ability to scroll, select, resize, and also standardises our code.
 IMO, this new window is no worse than new graphic window used previously, given that we ecpect using console using command-line switches.</p>
<p>Could you please share your thoughts on this? Did I miss some way to implement it better?</p>
<p>Thanks!<br>
</p>
<p>1. <a class="moz-txt-link-freetext" href="https://gerrit.libreoffice.org/31059/">
https://gerrit.libreoffice.org/31059/</a></p>
<div class="moz-signature">-- <br>
Best regards,<br>
Mike Kaganski</div>
<span class="st4cursor"></span>
</body>
</html>