Giter Club home page Giter Club logo

deluge2-win-build's Introduction

deluge2-win-build

A set of scripts to prepare prerequisites for and build Deluge Torrent 2.0.x on Windows 10

IMPORTANT!

The current release folder for these builds (the "Deluge2 Unofficial Installer for Windows" Google Drive Folder) contains several older builds with older build logic and library versions just in case you would find it useful to go back. PLEASE switch to List View (top right corner icon) to see the file dates and download the latest version unless you know what you are doing! Your maintainer mostly uses the latest, non-portable dev version with thin client and daemon mode on Windows 10 with the Adwaita-dark theme, so consider that combination the best tested.

BUILDING

To build Deluge2 for windows use the scripts in the below order.

Install the prerequisites

The main goal is to have as little of these as possible not to pollute the building computer. At the same time if something really is needed, I would rather use the original installers (e.g. 7zip vs. 7zip.NET - ended up using the one in MSYS2 - nota bene: feels sluggish compared to the native Win64 version which is also 3 major versions newer). install_components.cmd

  1. 7zip
  2. MSYS2
  3. NullSoft Scriptable Intstaller System
  4. NSprocess plugin for NSIS for process control
  5. StrContains plugin for NSIS
  6. Microsoft Visual Studio 2019
  7. Latest OpenSSL release using openssl-build\openssl.cmd
  8. Create links for the shared code in the lib folder using createlinks.cmd (called by install_components.cmd)

Build

  1. GTK-3 using wingtk/gvsbuild gvsbuild-build\gvsbuild.cmd
  2. Libtorrent, 3 flavours, including and using Boost and it's B2 build system and the latest Python version libtorrent-build\{lt-RC_1_2.cmd,lt-RC_1_1.cmd,lt-1.2.3.cmd}
  3. Deluge: the latest release version and the latest dev version. Including and using the latest Python version. deluge-build\{deluge-dev.cmd,deluge-stable.cmd}
  4. Installers for the above installer-build\installer-build.cmd all|dev|stable

The current set of scripts is a work in progress lacking several flavours of cleanup, see TODO at the end. Priority is given to features so the cleanup is not yet finished, patches / PRs are welcome! ;)

CHANGE LOG

21-Feb-2021 - All new and bugfixed component versions, build system rewamp

  1. Upgraded Deluge Torrent to dev50 version: cas has reactivated and merged for the first tie since 30-Apr-2020. New fixes: (a) [#3441|GTKUI] Add a torrentdetails tabs position menu (b) Hide pygame community banner in console Notifications plugin uses pygame for sound notifications however pygame show a console message "Hello from the pygame community." whenever starting deluge from console. (c) [GTKUI] Fix torrentdetails tab bar position not saving The GTKUI tests were failing and the saved config for the tab bar position was not being restored. Fixed by moving the setting of notebook.tabs_pos to TorrentDetail init. Replaced more deprecated methods that were showing up in tests. (d) [#3440] Fix httpdownloader reencoding torrent file downloads Torrent downloads from rutracker responds with the header: Content-Type: application/x-bittorrent; charset=Windows-1251 The problem is that httpdownloader was using the charset to re-encode the downloaded file, corrupting the binary torrent file download. Fixed by only re-encoding text content types, since it is very rare that non-text content types would actually have a non-utf8 codeset and if there is a requirement we would need to determine it on a type by type basis. (e) [#3337|Core] Fix lt listen_interfaces not comma-separated A typo meant that the interfaces supplied to libtorrent were not comma-separated. (f) [#3325|Core] Fix unable to remove magnet with delete_copies enabled Users were encountering the following error while attempting to delete magnet torrents and had the config 'Delete copy of torrent file' enabled. This was due to removing a magnet before the metadata was downloaded and the torrent.filename was still set to None so raises exceptions when string operations are performed with it. Fixed by both setting a default empty string for self.filename and only deleting the torrent file copy if filename is set. (g) [WebUI] Add country flag alt/title for accessibility This allows viewing the country in textual form by hovering the flag image and displays it if the image couldn't be loaded. (h) [Tests] Fix console tests sometimes failing due to hard coded port (i) [WebUI] Fix tracker icon download error Encoutering an error when webui attempts to download tracker icon: Fixed by ensuring the request.tracker_name is decoded from bytes before looking up the icon name. (j) [Console] Fix setting 'Skip' priority on console Selecting priorities 'Low' and 'Skip' on console will both set the actual priority to 'Low'. Fixed typo. (k) [#3439] Execute plugin fails to run on Windows Fixed TypeError: a bytes-like object is required, not 'str' (l) [Lint] Update pre-commit hook and isort versions
    • Fixed black hook requiring Py3.6 to installed locally. Will now assume Py3.6+ in installed.
    • Added isort traceback in pre-commit flake8 hook fails
    • Updated versions of Black, Prettier and isort
    • Keep Flake8 at 3.7.9 due to E402 issue: https://gitlab.com/pycqa/flake8/-/issues/638
    • New pyproject config for isort v5 with fixes for Python 2 imports.
    • Fixed travis config to run Python 3.6 for lint run. Replaced the virtualenv with_system_site_packages config with Travis specific Python config value so lint run doesn't attempt to append with_system_site_packages to Python 3.6 command.
  2. Ugraded Python version upgraded to 3.9.2 (a) had to find and download a precompiled Twisted cp39, does not build and install using pip on my box (b) switched to using pycairo from pip, works for me (c) excluded more unnecessary components from the installation (TCL/TK, docs) (d) while having some patching trouble I ended up removing a pycairo and a PyGobject init.py patched disabling PATH lookup and instead corrected our path.pth (in 4 places)
  3. Upgraded LibTorrent to 1.2.13 libtorrent has replaced it's setup.py to had to come up with a new way to build with OpenSSL Asked for a backport from LibTorrent 2.0 to 1.2 by the nice LibTorrent devs now we can build again as a side effect they also uncovered an easy way to use LTO/Whole Program Optimization Includes potential performance and bugfixes too!
  4. Build system major rewamp: (a) caught many typos and bugs in the rewamp (b) fixed removing unused files in folders with changing names (due to version numbers) - had to implement a batch-grep bash script to speed it up, also added dry-run mode (c) xternalized common functions to a lib folder, use common resources, e.g. python installer (d) as a result moved pip to pythonInit, and all modules + the deluge buils itself are built in a single pip command (e) easier to review color coded messages (f) scripts now bail out on error, if it completes it's reasonably sure build is successful (g) Tried implementing the Windows CMD scripts in "clean code" the messages along the build explaining the script instead of code comments (h) removed long unused parts (i) updated copyright messages, fixed MHertz's name, sorry! (k) Updated MS Visual Studio Build Tools 2019 to 16.8.4 (l) Updated build MSYS2
  5. Upgraded OpenSSL version to 1.1.1j
  6. Updated to the rebuilt GTK version 3.24.25
  7. Found out my GeoIP download source is no longer working, picked up the new one from MHertz's repo, thanks! :)
  8. Also updated path.pth from MHertz's repo, then fixed it not to use relative paths in PATH :)

18-Sep-2020 - fix 3rd party plugins, build maintainability and readability

  1. Upgraded OpenSSL to 1.1.1h, saved OpenSSL changelog to the download forder for your convenience.
  2. Changed file removal to MSYS2 find command to flexibly handle folder names changing with library versions (e.g. also changing number of version levels and digits for the same package)

18-Sep-2020 - fix 3rd party plugins, build maintainability and readability

  1. Updated MS Visual Studio used for the build from 16.6.0 to 16.7.3 and rebuilt GTK, Boost-LibTorrent
  2. Removed some items from the GTK build also making the installer slightly smaller

17-Sep-2020 - fix 3rd party plugins, build maintainability and readability

  1. Upgraded built in GTK version to 3.24.23
  2. Upgraded built in LibTorrent version to 1.2.10
  3. Upgraded Boost used to build LibTorrent to 1.74.0
  4. Reworked gvsbuild.cmd to (a) use the common PATH init-restore (b) use the common file and folder removal logic (c) use common initPython (d) use common highlight printing.
  5. Externalize common code of (a) Python download, install, initialization and removal to lib. (b) Removal of a list of files and folders (fixed lists, should not have trailing spaces)
  6. Made initpath.cmd smarter: (a) ability to add build specific dirs as well on a single command line (b) not overwrite already saved PATH
  7. restorepath.cmd to check if there is a saved path.
  8. Shortened version numbers in file name even further.

13-Aug-2020 - bug fix and build fix to make these noticed

  1. Fixed log.py patching from last time #2.
  2. Modified deluge-build scripts to bail out and stop the batch execution on all patching and many other build erros so that these can no longer go unnoticed.

10-Aug-2020 - fix 3rd party plugins, build maintainability and readability

  1. Added YaRSS2 plugin to the installer and re-added the files that were missing for those.
  2. Patched out the complex code in log.py trying (and failing on Windows) to monkey-patch the calling module's log attribute, and just leave the original warning there to help the users of 3rd party plugins using deprecated log interfaces, courtesy of MHertz.
  3. Create a single installer build script with paramteres.
  4. Added Build Menu cmd file from MHertz.
  5. Added a lib folder for common build code an createlinks.cmd to create a symlink to it into each build folder
  6. Made sure the curl we use is from the MSYS2 we installed, not the windows one.
  7. Reverted installing 7zip for windows and instead added it to the packages installed in MSYS2.
  8. Start using color to make build messages pop more out of the build output
  9. Unified Copyright notices in all CMD files

3-Aug-2020 - fix missing files for Test connection

  1. The extensive file clean up removed a bit too many files, fixed for test connection problem reported.
  2. Shorten installer filename another 7 characters.

2-Aug-2020 - publish build scripts and guide at on github

  1. Find the scripts and guide on github
  2. Removed the patches from the relese download site as now they are available on github.

1-Aug-2020 - portable install fix and Latest GTK3

  1. Fixed the portability move of the profile folder into the install dir.
  2. Built GTK 3.24.21 into the new install.

31-Jul-2020 - 34% smaller, Win integration, portability&build fixes, new vers

  1. One third smaller installer and Installed Deluge folder through profiling of deluge, deluged, deluge-web and deluge-console using Process Monitor and removing the files not used according to the profiling. EXCEPTIONS are .exe files and folders that have 'locale' or 'hazmat' in their name. PLEASE test and let me know if I have removed too much!!!
  2. Better Windows integration through alternative loaders, courtesy of @MHertz:
    • Now can pin deluge on taskbar
    • shows only one deluge / deluged / deluge-web process, python[w].exe is embedded.
    • loader has Deluge icons
  3. Updated LibTorrent to 1.2.8 released 30-Jul-2020.
  4. Updated to Python to version 3.8.5 released on 20-Jul-2020.
  5. Portable install fix to put the deluge profile folder as well in the data subfolder of the deluge install folder in case of portable installations, courtesy of @MHertz.
  6. Updated te GeoIP database and added the automated GeoIP database update to the build system, courtesy of @MHertz.
  7. Fixed the torrentmanager.py patch from @djlegolas for the stable deluge-build.
  8. Install wheel using pip during deluge-build to avoid build warnings.
  9. Removed LIBTORRENT_REVISION from the file names as it seems useless. Other installer name fixes.
  10. Stopped copying the vcvarsall.bat around to make the LibTorrent build happy using proper build commands.
  11. Added up to date LibTorrent-ChangeLog.txt, GTK-3.24-ChangeLog.txt and Python-ChangeLog.txt to the "Deluge2 Unofficial Installer for Windows" folder to make it easy for you to check what fixes are included in the new version.
  12. Moved earlier releases to an Archive folder.

21-Jun-2020 - make deluge-console.exe work for non-interactive commands

  1. Created a patch to swallow the AttributeError because of not having the signal SIGWINCH on Windows in Python windows-curses. Now you can run: deluge-console.exe status deluge-console.exe info etc. A ticket is submitted with a patch for this.
  2. Created a patch to replace the "Deluge-console does not run in interactive mode on Windows." message and exiting. Instead we just log a debug message and carry on. Now the interactive UI starts but does not accept any input. The log is full of a twister error for win32select. I am stuck here, will have to ask for the help of the devs. A ticket is submitted with a patch for this.
  3. Published patches in a folder on the download site.

20-Jun-2020 - revive deluge-console, updated Deluge patch, reduced build size, enhanced build scripts, ChangeLog

  1. The default ncurses in Python is not supported (and does not work) on Windows. Including windows-curses 2.1.0 in the hope to revive that - it should have a hack to make it work (thanks for the report @mystikfox!)
  2. PR by @djlegolas regarding ignoring untrue libtorrent 1.2.x tracker errors from UIs was updated - replaced the old URL in the deluge-build\deluge-{dev,stable}.cmd scripts.
  3. Refactored the folder cleanup logic in deluge-build\deluge-{dev,stable}.cmd scripts to use a list from a text file instead of the previously 12 later much more lines of rd /s /q ("%programfiles%\deluge\" added to all).
  4. First slimming of the installer by profiling to find files never touched, removed - this round only strips away complete folders unused:
    • test / tests / unittest folders: 18.2MB
    • demos folders: 0.9MB
    • gobject-intospection folders: 1MB
    • legacy folders from the Adwaita theme: 7.6MB
    • ensurepip folders: 2MB
    • doc folders: 0.7MB Result:
    • uncompressed set of install files down from 226MB to 202MB installer size is down 11MB (including the newly added windows-curses)
    • the profile log, filelist and Excel pivots used are uploaded to the CleanUpInstallerByProfiling folder in the dowlnoad site.
  5. Replaced the remaining genric variable names with meaningful names.
  6. Decided to start writing this ChangeLog.txt :-D

02-Jun-2020 - deluge*.exe portability regression fix, build script fixes

  1. update to libtorrent 1.2.7 (thanks for the report @highvoltage!)
  2. I got rid of the remnants of the C:\Program Files\Deluge2 folder, anyways, for a long time this installer too installs into C:\Program Files\Deluge.
  3. Updated deluge-build\deluge-stable.cmd and the deluge-dev.cmd to handle 8.3 paths as well.
  4. updated fixdeluged.py and fixdeluge-web.py did need updates too
  5. indicate the python, OpenSSL and GTK versions used for the build in the installer name.

29-May-2020 - libtorrent and boost upgrades and optimization

  1. boost is updated to 1.73
  2. both 1.1.x and 1.2.x libtorrent builds are optimized for speed not space.
  3. libtorrent and boost versions used for the build are indicated in the installer name.

29-May-2020 - first release in the new download location

  1. New release folder
  2. update to libtorrent 1.2.6

TODO

  • seems like some files for the 'en' and 'en-US' locale are not getting built properly, gotta check out and fix
  • Remove the trailing, 4th level, seemingly useless .0 from LIBTORRENT_VERSION
  • Merge libtorrent build scripts (x3) and deluge-build scripts (x2)
  • Bail out of the scipts on build error: || echo ERROR Command returned error. && exit /b %errorlevel%
  • Make sure the build scripts work in any folder, not only c:\deluge2
  • Refactor the .cmd files into "clean-code": use @echo instead of @rem :)
  • Added the other requested 3rd party plugin, autoremoveplus patched with replacing the deprecated logging by MHertz (the tote94 fork as it has GTK interface too and AFAIK cannot include two forks of the plugin with the same name)
  • Delete unnecessary files independent of the version number in he directory name including them
  • Scrape latest Boost release version instead hard coding into the script
  • Pick up PRs from deluge-torrent github for e.g. interface binding enhancements
  • Use user mode Python instead if installing needing Admin credentials
  • Fix PyGobject name problem
  • Compile an LTO / WPO optimized OpenSSL ourselves (form MHertz)

deluge2-win-build's People

Contributors

mhertz avatar petersasi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

deluge2-win-build's Issues

Feature-proof gvsbuild.cmd.

Whenever gvsbuild themselves updates gtk3 next time, then the patching I added will fail, meaning that new fourth-coming gtk3 updates will not be auto-built anymore and the patch for better readability of win32 theme also not applied.

The following I added in my script to negate that, so if interested then here's instructions for inspiration:

Ditch the gtk3.patch file in 'C:\deluge2\gvsbuild-build' folder, and instead
download linked zip and extract the win32.patch from it into before mentioned folder. Lastly replace the line that patches with gtk3.patch with instead:

copy "%~dp0win32.patch" patches\gtk3-24
sed -i 's/gtk3_24(Tarball/gtk3_24(GitRepo/' gvsbuild\projects.py
sed -i "/prj_dir='gtk3-24',/{n;N;d}" gvsbuild\projects.py
sed -i "/prj_dir='gtk3-24',/a\            repo_url = 'https:\/\/gitlab.gnome.org\/GNOME\/gtk.git',\n            fetch_submodules = False,\n            tag = 'gtk-3-24'," gvsbuild\projects.py
sed -i "/'gtk_update_icon_cache.patch',/a\                'win32.patch'," gvsbuild\projects.py

https://gofile.io/d/HbRXCZ

LTO build of openssl addition.

Most CPU intensive task in libtorrent is hashing I believe, through openssl presumably, so if wanted, then here's instructions for adding LTO(WPO) build of openssl to this project, and sorry if you already know it. I doubt I will add this myself, when already pre-built (non-lto)builds available, but still thinking about it. You could also ditch the CFLAGS/LDFLAGS and just use '/GL' instead, as then '/LTCG' is implied, but is just little faster building if specifically adding '/LTCG', hence I use the flags, as /LTCG cannot be added like /GL on configure line, since unknown options passed to compiler and one is for the linker. It's the default flags used for the VC-WIN64A 'release' build, just with /GL and /LTCG appended, as the flags override and not append - if wanted then remove the '/debug' from linkflags, though doesn't mean debug-build and just generates seperate pdb files with debug-symbols, not included in deluge anyway(and if removing that option, then needs some more changes, as error out during "install" for missing pdb files). There where an error when extracting from pipe through bsdtar, so I needed doing it in steps with the strawberry perl download/"install". You need adapt to your way of doing things of-course e.g. where having stuff installed/located etc. Tested working and links fine during (lto)libtorrent builds.

openssl.cmd

cd "%~dp0"
cd ..
set OUT_DIR="%cd%\OpenSSL-Win64"
set MSVC_DIR="%cd%\msvc"
set NASM_PATH="%cd%\nasm"
set PERL_PATH="%cd%\perl\perl\bin"
set MSYSPATH="%cd%\msys64\usr\bin"
set PATH=%NASM_PATH%;%PERL_PATH%;%MSYSPATH%;%PATH%
rd /s /q OpenSSL-Win64
rd /s /q OpenSSL-Win64
for /f %%i in ('git ls-remote --tags https://github.com/openssl/openssl ^| grep -E 'OpenSSL_[0-9]_[0-9]_[0-9][a-z]' ^| cut -d/ -f3 ^| tr -d "^{}"') do set var=%%i
git clone https://github.com/openssl/openssl -b %var% openssl-build\openssl
call msvc\VC\Auxiliary\Build\vcvars64.bat
cd openssl-build\openssl
perl configure VC-WIN64A --prefix=%OUT_DIR% --openssldir=%OUT_DIR% CFLAGS="/W3 /wd4090 /nologo /O2 /GL" LDFLAGS="/nologo /debug /LTCG"
nmake
nmake install
cd ..\..
rd /s /q openssl-build\openssl
rd /s /q openssl-build\openssl
copy /y OpenSSL-Win64\bin\*.dll overlay\Lib\site-packages
for /f %%i in ('dir /b deluge-2* ^| findstr /v dev') do copy /y OpenSSL-Win64\bin\*.dll %%i\Lib\site-packages
for /f %%i in ('dir /b deluge-2* ^| findstr dev') do copy /y OpenSSL-Win64\bin\*.dll %%i\Lib\site-packages

install-components.cmd:

[...]
for /f %%i in ('curl https://www.nasm.us/ ^| grep releasebuilds/[0-9] ^| cut -d^'^"^' -f2') do set var=%%i
mkdir nasm & curl -L %var%win64/nasm-%var:~42,-1%-win64.zip | bsdtar xf - --strip-components 1 -C nasm
for /f %%i in ('curl https://strawberryperl.com/ ^| grep download/[0-9] ^| cut -d/ -f3') do set var=%%i
mkdir perl & curl -O https://strawberryperl.com/download/%var%/strawberry-perl-%var%-64bit.zip
bsdtar xf strawberry-perl-%var%-64bit.zip --exclude="^c" -C perl
del strawberry-perl-%var%-64bit.zip
[...]

Edit: Just added locally on second thought, why not right... Btw, please add a 'discussion' tab to your repo if you don't mind, i.e. this should rather go there, well probably a PR would be better, but nonetheless.

Buildchain broken

When I run build menu, selecting the things I want it comes back with

The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.

when running gvsbuild manually:

E:\deluge2-win-build-master\gvsbuild-build>cd C:\gtk-build\github\gvsbuild

E:\deluge2-win-build-master\gvsbuild-build>patch -p1  0<"E:\deluge2-win-build-master\gvsbuild-build\gtk3.patch"
can't find file to patch at input line 4
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -urN a/gvsbuild/projects.py b/gvsbuild/projects.py
|--- a/gvsbuild/projects.py     2020-04-20 18:10:24.526745700 +0200
|+++ b/gvsbuild/projects.py     2020-04-29 14:55:19.453130500 +0200
--------------------------
File to patch:
Skip this patch? [y]

Seems to assume you are building on the C: drive as when I copied build menu there, it suddenly starts to work

Abandoned repository? Help?

I tried this out and there seem to be a lot of problems.
I tried running install_components.cmd and then build-menu.cmd, and pressing 6 to install stable deluge and I got an error.

Turns out my PATH environment variable has things with spaces such as "NVIDIA Corporation"...
So I went into lib\initpath.cmd and made some changes to work around this...
image

This let me continue but I eventually had a problem with pip.. turns out I've had MSYS2 with python (without pip) installed for years,
and you make the MSYS2 path higher than the python install path so it uses MSYS2 first.

So I installed pip in my MSYS2 version with pacman -S python-pip since that seemed like the easiest solution instead of editing the batch files further...
This seems to have fixed the pip problem but the python version it installs (3.10.0)
does not seem compatible with the windows-curses package.

Also I get many, many warnings.
image

Also "File Not Found" errors which scare me a bit...
image

I've also tried doing a windows workaround the Deluge docs say you should use before I tried using this repository but that's outdated, uses broken links, etc... https://dev.deluge-torrent.org/ticket/3201#comment:9

Perhaps I should downgrade to Python 3.9 with the ones I have installed.. and try editing the batch source to install
an earlier Python version... I don't know. ๐Ÿ˜ข

Let me know if you can help or if this repository is outdated and I can find a better one!

Gtk3 update issue + more changes.

I discovered that gtk3 is never updated if cached - I always thought it would just get refreshed, but seemingly not, so I added a few rd/del commands for cleaning out gtk3 from the cache, to make sure get fresh clone each time.

I also changed my scripts so now everything is stored portably in deluge2 folder, except msvc which i'll get to later, though cannot be stored portably, but installed there atleast.

Now not locked to C:\deluge2, and can be cloned/downloaded/extracted and run from wherever drive/partition/folder.

Also, as I mentioned before on the forum, now every script can be run without admin rights, except the initial install_components one, because of msvc install.

I use embedded python for the deluge builds, and nuget deluge for the rest, and having that *._pth file to make the deluge builds more isolated to not break when user has possible PYTHONHOME or PYTHONPATH env-vars added.

Possible other stuff I forgot, but anyway, as you know I once in a while still
mess little with this, when feeling like it(though after adding the msvc in
deluge2 folder, I think I will leave it alone, as pretty complete then from my
view). Anyway, I put my fileset up on my github repo, so if interested then you can take a peek for inspiration, and maybe check once in a while, to see if I added or changed something, as I will only post here if finding an actual issue, and not just general updates. It's almost every file I changed, so much better to just up it on github I thought, also for any feature changes possibly coming.

Ohh, I also gonna later borrow your fix for getting deluge-console to work
under windows, thanks.

Last, in gvsbuild.cmd there comes an error when building from an isolated
python(with a *._pth file), which I will get to later to see which path needs
added to that file to fix, but in meantime I just rem'ed it out and used '-E'
switch on python, which should kinda do the same anyway, so not that important,
but just for your info, if wondering about it at some point.

Sorry, very last thing, now that adwaita-icon-theme building is fixed in gvsbuild, with the upgraded librsvg and rust, and so my ticket closed for the issue, then I removed the parts from the gvsbuild script which copies the old adwaita-icon-theme over, as it now works again without such workarounds.

I have only tested my changes quickly and not everything fully yet, so can be issues in places still, but i'll get to them later if any.

'Lib\encodings' lost file,deluge not working

โ€˜โ€™โ€˜
Fatal Python error: init_stdio_encoding: failed to get the Python codec name of the stdio encoding
Python runtime state: core initialized
LookupError: unknown encoding: cp936

Current thread 0x0000012c (most recent call first):

โ€™โ€˜โ€™
'Lib\encodings' lost file, from python3.85 copy file to encodings is working

Save 1.2GiB on msvc install.

I tested through trial and error, what specifically of msvc was needed for building gtk3, libtorrent and openssl, and found only the c++ compiler toolset and win10-sdk needed, in addition to msbuild which is always installed when using vs2019 build tools edition specifically, so if specifying this, instead of previous line which just replicated the scenario of manually running installer and selecting the c++ build tools install-option, then 1.2GiB is saved.

Additionally, then I check for if vs2019 any edition is installed already, and if also includes the above mentioned needed components, and if does, then don't install msvc and just use the already installed, and when running uninstall_components.cmd, then uninstall msvc only if not having it already from the start.

Lastly I install msvc, if needed, in build-dir, though a few things still ends up on C(under '%programfiles(x86)%') like win-sdk and installer, which isn't possible to change at the moment unless overriding programfiles in registry etc. though is a matter of preference I guess(install in build-dir), but some might have limited space on system drive etc. plus little cleaner imho, as also "install"(extract) everything else like NSIS and msys etc in buildfolder also.

If interested, then check my repo, install_components.cmd and uninstall_components.cmd, but here's related snippet from my install_components.cmd:

if exist "%programfiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" "%programfiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -version [16.0,17.0) -prerelease -products * -nologo -requires Microsoft.Component.MSBuild Microsoft.VisualStudio.Component.VC.Tools.x86.x64 | findstr . && if exist "%programfiles(x86)%\Windows kits\10" set dirty=1
if not defined dirty curl -LO https://aka.ms/vs/16/release/vs_BuildTools.exe && vs_BuildTools.exe --quiet --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --add Microsoft.VisualStudio.Component.Windows10SDK.19041 --installPath "%~dp0msvc" --wait && del vs_BuildTools.exe

Sorry for posting in issues section, and as said, would fit better in a discussion section.

Last, off-topic, but I know you work on consolidating and using one python etc, which is cool imho, but i'd suggest not installing python and instead just extracting nuget and/or the embedded python zip, as I stated previously, so just adding again just in case, as really no reason to specifically install python with reg-entries added, needing admin rights and needing uninstall etc etc. but your call of-course.

Very last, the python39._pth as stated is a good idea to include imho, which can fix potentially deluge not starting otherwise, in certain conditions, and furhter isolates deluge and you just need to add a line with 'dll' or 'dlls' cannort remember what folder is called, in addition to what I add, if fyou further continue using the official installer of python.

Deluge won't start at all on Windows 10

No error displayed or anything, double click just shows the hourglass for 1 sec and then nothing.

Latest build downloaded from repository: deluge-2.0.4.dev50-lt1.2.13-boost1.75-py3.9.2-ossl1.1.1j-GTK3.24.25

"Move download folder" doesn't work

2.0.4dev50
Not sure if this is an upstream issue or not... Select a torrent, right click, select move download folder. Enter the new folder, click OK. Nothing happens, the dialog box just stays open.

Deluge from installer don't start on Windows 10 Rus

OS: Windows 10
Version: 19042.746
Language: Ru

Run deluge.exe don't show anything. Run deluge-consule.exe show internal python message:

C:\Program Files\Deluge>deluge-console.exe
Fatal Python error: init_stdio_encoding: failed to get the Python codec name of the stdio encoding
Python runtime state: core initialized
LookupError: unknown encoding: cp1251

Current thread 0x00004218 (most recent call first):
<no Python frame>

image

Downloading nasm-2.13.03-win64.zip Fails

Downloading C:\gtk-cache\nasm-2.13.03-win64.zip
Exception downloading file 'https://www.nasm.us/pub/nasm/releasebuilds/2.13.03/win64/nasm-2.13.03-win64.zip'
<urlopen error [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond>

Is it possible to include some of these items in this github repo to alleviate this problem and then just copy them to the target folder? I know you won't have the latest version of this software but at least it will build.

Deluge build failure.

I just noticed deluge build scripts currently will fail building for new users unfortunetly.

The issue I discovered by chance(from linux), is that I found pip caches previously installed wheels and uses when found during install. Two of the needed wheels are currently removed for some reason from pypi in py3.8 versions(sometimes happens and sometimes returns back later, dunno why, but noticed it once previously with other wheel for deluge, which came back later), and so will fail if not having them already in cache(as I did, and you, since you didn't notice before - cache is in %localappdata%\pip\wheels). The missing wheels here, in py3.8 versions needed, is twisted and setproctitle.

I don't know how to set it up to work automatically through msvc to build from source, through pip, when that happens, but instead luckilly a third-party website has most of deluge needed wheels in up to date versions(even py3.9 versions already!), so I personally in my scripts changed to using that website for getting twisted and setproctitle, before installing deluge, so doesn't fail.

I was about to make a PR, but decided against because I use variable names here, which you before stated you change, and also with the already existing PR, editing same files, I was in doubt if would work if merging one PR before the other in wrong order, possible, but could have added them to same PR of-course instead, but whatever, i'll just provide the workaround/fix here instead.

If wanted to use this, then this is what I added to both my deluge-build-scripts, just before the line copying new loaders in-place, and tested working for both deluge versions, which you can use for inspiration possibly, if wanted:

for /f %%i in ('echo %var2% ^| cut -c 1-3 ^| tr -d "."') do set var3=%%i
for /f %%i in ('git ls-remote --tags --refs https://github.com/twisted/twisted ^| cut -f2 ^| sort --version-sort ^| cut -c 19- ^| tail -1') do C:\python\Scripts\pip install https://download.lfd.uci.edu/pythonlibs/w3jqiv8s/Twisted-%%i-cp%var3%-cp%var3%-win_amd64.whl
for /f %%i in ('git ls-remote --tags --refs https://github.com/dvarrazzo/py-setproctitle ^| cut -f2 ^| sort --version-sort ^| cut -c 19- ^| tail -1') do C:\python\Scripts\pip install https://download.lfd.uci.edu/pythonlibs/w3jqiv8s/setproctitle-%%i-cp%var3%-cp%var3%"-win_amd64.whl

Icons Missing

Deluge Version: 2.0.4.dev50
OS Version: Windows 10 Pro 19042.928

Problem: Many of the icons in the UI have what appear to be a placeholder asset, instead of their intended icons:
image

image

Solutions Tried:

  • Uninstalling and reinstalling with each of the included themes
  • Installing to my C: drive and a different drive

I didn't see any mention in the forum thread or readme about these icons being missing, so I didn't know if this was a known limitation.

Thank you for your work.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.