[Windows] Use gui_scripts for web and daemon entry points

Hide the console cmd popup when using deluge-web.exe ordeluged.exe on
Windows.

By using gui_scripts it will disable stdin and stdout for these
executable but there are `-debug` versions available if that is
required.

Ref: https://packaging.python.org/en/latest/specifications/entry-points/#use-for-scripts
This commit is contained in:
Calum Lind 2022-01-30 15:38:52 +00:00
parent e8fd07e5e3
commit a27a77f8c1
No known key found for this signature in database
GPG Key ID: 90597A687B836BA3
1 changed files with 4 additions and 0 deletions

View File

@ -481,6 +481,10 @@ if not windows_check() and not osx_check():
_entry_points['console_scripts'] = [ _entry_points['console_scripts'] = [
'deluge-console = deluge.ui.console:start', 'deluge-console = deluge.ui.console:start',
]
# On Windows use gui_scripts to hide cmd popup
script_type = 'gui_scripts' if windows_check() else 'console_scripts'
_entry_points[script_type] = [
'deluge-web = deluge.ui.web:start', 'deluge-web = deluge.ui.web:start',
'deluged = deluge.core.daemon_entry:start_daemon', 'deluged = deluge.core.daemon_entry:start_daemon',
] ]