Commit Graph

9 Commits

Author SHA1 Message Date
Calum Lind 2ec6e10c8e
[Lint] Update linter version and fix issues
Notable changes:

* Prettier >=2.3 with more consistent js assignments
* Black now formats docstrings
* Added isort to list of autoformaters
* Update flake8 config for v4

Ref: https://prettier.io/blog/2021/05/09/2.3.0.html
2022-02-13 13:38:27 +00:00
Calum Lind d559f67ab9
[Packaging] Fix pyinstaller to find installed deluge package data
Instead of relying on the source code paths use the pip installed Deluge
package data.
2022-02-09 19:53:17 +00:00
Calum Lind e87236514d
[Build] Fix entry point build errors
Fixed a mistake settings entry points in setup.py. Replaced with simpler
logic since gui_scripts only affect Windows.

Fixed entry point changes affecting pyinstaller build

Corrected deluge-web.exe to have no console instead of
deluge-web-debug.exe
2022-02-06 21:02:43 +00:00
tbkizle 540d557cb2
[Common] Add is_interface to validate network interfaces
Libtorrent now supports interface names instead of just IP address so
add new common functions to validate user input.

* Added is_interface that will verify if a libtorrent interface of name
or IP address.
* Added is_interface_name to verify that the name supplied is a valid
network interface name in the operating system.
  On Windows sock.if_nameindex() is only supported on 3.8+ and does not
return a uuid (required by libtorrent) so use ifaddr package. Using git
commit version for ifaddr due to adapter name decode bug in v0.1.7.
On other OSes attempt to use stdlib and fallback to ifaddr if installed
otherwiser return True.
* Added tests for is_interface & is_interface_name
* Updated UIs with change from address to interface
* Updated is_ipv6 and is_ipv4 to used inet_pton; now supported on
Windows.

Ref: https://github.com/pydron/ifaddr/pull/32
Closes: https://github.com/deluge-torrent/deluge/pull/338
2022-01-30 16:13:27 +00:00
Cirno the Strongest e75ef7e31f
[Packaging] Simplify PyInstaller spec file
This makes the process of editing the file much more pleasant and
removes duplicate code.

Fixed collecting twisted package which brings both build speed
improvements but also decreases package size, as it stops PyInstaller
from bundling tests (actually, some tests might even execute during
import and break build if they're designed to throw!) used by
PyInstaller

Closes: https://github.com/deluge-torrent/deluge/pull/342
2022-01-23 16:04:33 +00:00
tbkizle 2cad0f46f2
[CI] Add pygame to windows package build/spec file
pygame is required by notification plugin for sounds
2022-01-21 13:12:23 +00:00
Calum Lind 4f17fc41a5
[Packaging] Disable GTK CSD by default on Windows
CirnoT reported how they felt that GTK3 is not reliable on Windows.
Seeing some weird issues where clicking Deluge icon on taskbar does
bring window to front but doing so again does not minimize it as one
would expect. By using GTK_CSD=0 this would reduce these problems.

> If changed to 0, this disables the default use of client-side
decorations on GTK windows, thus making the window manager responsible
for drawing the decorations of windows that do not have a custom
titlebar widget.

This can be overridden by a global env var.

Ref: https://github.com/deluge-torrent/deluge/pull/331#issuecomment-1012311605
Ref: https://docs.gtk.org/gtk3/running.html
2022-01-21 12:53:54 +00:00
tbkizle 491a20cb08
Fix Execute and Extractor Plugins
Include missing twisted requirements resulting in errors:

    ModuleNotFoundError: No module named 'twisted.internet.utils'
2022-01-13 22:23:25 +00:00
tbkizle b9a208f18f
Update Windows Packaging
* Rename instances of win32 to generic win or the appropriate bit where applicable
* Remove files used in GTK2
* Add spec file for use with PyInstaller
* Remove Python bbfreeze Script
* Add Github Action To Build Releases
* Add Modified script to make files used by NSIS
* Update Readme

Closes: https://github.com/deluge-torrent/deluge/pull/331
2022-01-13 22:23:08 +00:00