mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
ADD: Command line parameter "--no-console" to hide debug console window
This commit is contained in:
parent
17075335f2
commit
68016688ba
2 changed files with 15 additions and 2 deletions
|
|
@ -275,13 +275,14 @@ function mbLoadLibrary(const Name: UTF8String): TLibHandle;
|
|||
function mbSysErrorMessage(ErrorCode: Integer): UTF8String;
|
||||
|
||||
procedure FixFormIcon(Handle: LCLType.HWND);
|
||||
procedure HideConsoleWindow;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
FileUtil, uDebug, uDCUtils, uGlobs
|
||||
{$IF DEFINED(MSWINDOWS)}
|
||||
, Windows, uNTFSLinks, uMyWindows, JwaWinNetWk, uShlObjAdditional
|
||||
, JwaWinCon, Windows, uNTFSLinks, uMyWindows, JwaWinNetWk, uShlObjAdditional
|
||||
{$ENDIF}
|
||||
{$IF DEFINED(UNIX)}
|
||||
, BaseUnix, Unix, uMyUnix, dl
|
||||
|
|
@ -1814,4 +1815,11 @@ begin
|
|||
{$ENDIF}
|
||||
end;
|
||||
|
||||
procedure HideConsoleWindow;
|
||||
begin
|
||||
{$IFDEF WINDOWS}
|
||||
if isConsole then ShowWindow(GetConsoleWindow, SW_HIDE);
|
||||
{$ENDIF}
|
||||
end;
|
||||
|
||||
end.
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ procedure ProcessCommandLineParams;
|
|||
implementation
|
||||
|
||||
uses
|
||||
uDCUtils, uGlobsPaths, FileUtil;
|
||||
uDCUtils, uGlobsPaths, FileUtil, uOSUtils;
|
||||
|
||||
procedure ProcessCommandLineParams;
|
||||
var
|
||||
|
|
@ -22,6 +22,11 @@ begin
|
|||
param := ParamStrUTF8(i);
|
||||
if StrBegins(param, '--config-dir=') then
|
||||
gpCmdLineCfgDir := TrimQuotes(Copy(param, 1 + Length('--config-dir='), MaxInt));
|
||||
|
||||
{$IF DEFINED(NIGHTLY_BUILD)}
|
||||
if StrBegins(param, '--no-console') then
|
||||
HideConsoleWindow;
|
||||
{$ENDIF}
|
||||
end;
|
||||
end;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue