*OLD-THREAD - SEE NEW* [Unofficial] Deluge 2.0.x installer

Specific support for Deluge on Microsoft Windows OS
JGAS2
New User
New User
Posts: 6
Joined: Thu Jul 16, 2020 1:49 pm

Re: [Unofficial] Deluge 2.0.x installer

Postby JGAS2 » Thu Jul 16, 2020 2:00 pm

Hi to all
First of all a big thanks to mherz, petersasi and all who have contributed to this project, great job!
I'm testing a portable install of "deluge-2.0.4.dev38-ltlibtorrent1.2.7.03ed6fa64f-boostboost1.73.0-python3.8.3-openssl1.1.1g-GTK3.24.20" on a W10x64 machine with a couple of thousand torrents.
I'm running deluge.exe and every time I open the Deluge GUI CPU spikes, it becomes unresponsive and goes to "all torrents" and begins scrolling non stop making almost impossible interacting with it. If I minimize to tray CPU goes back to very low and speeds are great maxing my oldish HDD's speed so the daemon seems to work fine and it is just the GUI part that is a problem.
I've read most of this thread and haven't found a similar issue, any one can help fixing this problem?
TIA
EDIT:
Using the daemon and thin client mostly fixed the problem, still a bit sluggish but perfectly usable.

petersasi
Leecher
Leecher
Posts: 80
Joined: Sun Nov 17, 2019 8:09 am

Re: [Unofficial] Deluge 2.0.x installer

Postby petersasi » Sat Jul 18, 2020 1:46 am

Hi,
Quite frankly I have never tried the portable version but I also use a daemon and thin client with thousands of torrents and I am also seeing this rapid scrolling of torrents for seconds, but it stops and normalizes for me.
This may be related to some gui setting doing the seemingly frail winGTK bad.
1. So I would like to suggest you backup your profile, delete it, start deluge to create a pristine newsletter profile and copy your torrents only back to the new profile.
2. If this does not fix it maybe you can start the deluge Web daemon, log in with the default credentials (through your browser) and see if that can iterate through your many torrents.
I do know that the current gtk build misses a few files (locale files are the ones I have noticed) but I don't think that should really make gtk hang with full cpu drain. Gui settings are much more probable.

mhertz
Compulsive Poster
Compulsive Poster
Posts: 828
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: [Unofficial] Deluge 2.0.x installer

Postby mhertz » Sat Jul 18, 2020 9:48 am

Just wanted to say that portable deluge is exactly same as normal, with only changes done and added in the NSIS installer script, e.g. disables/disallows torrent/magnet-assocs(as reg-entries aren't portable), and same with the reg-entries normally set for adding deluge to the windows add/remove apps dialog, plus change default/suggested install-folder away from '%programfiles%\deluge' and into '%cd%\deluge', and disables startmenu/desktop shortcuts. I believe that's all, but know for sure the deluge files themselves are exact the same(as I needed make deluge portable in first place to make it be possible to be used in an installer with configurable install-locations, as originally had hard-coded paths to python(w).exe inside).

Remember some have issues in other apps with GTK_CSD=0, so test uncheck that if having it enabled. Btw, the reason I allowed that in also portable mode, is that I didn't set that through the registry, but from python code I added in path.pth when selecting that option, and only set for the running session, so still portable.

https://gitlab.gnome.org/GNOME/gtk/-/issues/801

Also, seemingly it was reported that in other app(inkscape), using a theme without backdrops would help, and I don't know if I even included one without backdrops, but you can check yourself in the theme folder if any files with backdrop in name, png files usually I believe, is in used theme.

https://gitlab.gnome.org/GNOME/gtk/-/issues/2302

There's also several older threads stating performance issues on windows in gtk3 vs gtk2 with and without GTK_CSD=0.

Most gtk devs are on *nix, so windows usually isn't prioritized very much, or atleast didn't use too.

Anyway, this issue, plus another issue with deluge crashing as soon as connecting to daemon, plus another where crashes as soon as adding a torrent, is some of the issues reported a few times throughout this thread with unfortunetly no answer to currently, but shouldn't to my knowledge be an installer issue, but of deluge and/or GTK3, and some of these reports where also on deluge1 too btw. I never posted bug-tickets to deluge-bugtracker upon getting these reports, as could never reproduce them, when testing connecting both from windows to windows and windows to linux and vice-versa etc and both on VMs and physical machines, so some strange compatibility issue occuring for select few.

Sorry, just wanted to state the portable install wasen't special and to mind possibly the GTK_CSD setting, and didn't mean to interrupt here with my longwinded bablings :)

As usual follow the sound advice of petersasi :)

Edit: Hmm, come to think of it, then the portable install mode actually isn't fully portable, as I never even thought about that it still reads and writes by default to '%appdata%\deluge'. This could very easily be fixed by a quick little change to the python code where default profile path is listed, or so i'm guessing shouldn't be hard atleast, as e.g. previously in the beginning changed default path of where to start local daemon from when selecting 'start daemon' from connection-manager, and button for adding magnet/torrent-assocs, back when still a 'Scripts' sub-folder was used(as per python default), but regardless, just wanted to add that I didn't think that fully through when implementing that lol :) So it's only a semi-portable option then.

Edit2: Sorry for keeping on with this, but just annoyed me that I had made an error with that option, so I quickly had a go at it, and it can be changed under 'INSTALLDIR\Lib\site-packages\deluge\common.py'. However, I then came to think why not again utilize the python code in path.pth file I already used for different needed things, to just override the %appdata% folder to the deluge install-folder for the current running session, and it worked fine. This is preferred because will be a static fix, and if just copying over a patched common.py file from the NSIS script, then that will change later on in further deluge updates and even differ between stable vs dev deluge, so this would be best imho as need no interventions between updates. I don't have time to add this to the NSIS script currently(it's little more tricky than one would think with dependant checkboxes(portable mode with/without gtk_csd) in NSIS etc and needs prefunction-scripting added and whatnot when checkboxes overlap etc, as NSIS works little strange for that), and also up to petersasi if even want to include or not, but if any of you wan't this functionality to a portable deluge install already made, so as be fully portable, then add the following small python code following what's allready there under: 'INSTALLDIR\Lib\site-packages\path.pth', and it should all be a single line by purposse btw, or else won't work(no reason to go into here, but just trust me):

Code: Select all

; os.environ["APPDATA"] = "../data"

This will make deluge make a deluge profile folder under the install-dir's 'data' folder, or you can copy inplace your own deluge profile folder there to retain all settings. Maybe would be better to have it in the main dir, or dedicated 'config' dir under it, I dunno, but just thought 'data' was a well suited place.
Last edited by mhertz on Mon Jul 20, 2020 9:20 am, edited 2 times in total.

mhertz
Compulsive Poster
Compulsive Poster
Posts: 828
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: [Unofficial] Deluge 2.0.x installer

Postby mhertz » Sun Jul 19, 2020 2:17 pm

Sorry, last post became to big with my several added edits, so just wanted to close this issue with final post and butt-out again :)

@petersasi, obviously it's up to you if wanna add this, but just in case then here's instructions if choosing so:

Unzip nsis-portable.zip into 'C:\deluge2' and it will add another folder named 'portable' into there, with needed things for the changed NSIS install script, and then there's also two extra files added into 'C:\deluge2': one is my changed nsis script which has the additions added to implement this, which if wanted you could just move and overwrite the old one at 'C:\deluge2\nsis\packaging\win32\deluge-installer.nsis' with, but as you have changed the old one already e.g the added boost and libtorrent etc. version-numbers shown in titlebar during installing, then so as to not loose your already made customizations, then I also included as alternative a patch instead, so as to only change the needed things, but please make a backup first of your nsis script before/if approaching this, just in case.

To apply patch run from a cmd-prompt: 'C:\msys64\usr\bin\patch C:\deluge2\nsis\packaging\win32\deluge-installer.nsi < nsis.patch', and afterwards just delete the patch and/or the ready-made of mine 'deluge-installer.nsi'.

I tested the different path.pth's was applied conditionally correctly in 4 re-installs; normal, gtk_csd, portable and portable-gtk_csd, so should be working.

I don't think the portable option is very much used, or so i'd guess isn't, and so isn't important much really, but as said just annoyed me that I haden't thought it fully through initially and so just wanted to correct that :) Anyway, It might also be a nice option btw for deluge1 users wanting to "test-the-waters-out" with deluge2 before deciding to leave-behind deluge1, and of-course also just in general for people preferring/wanting a portable install in-first-place.

mhertz
Compulsive Poster
Compulsive Poster
Posts: 828
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: [Unofficial] Deluge 2.0.x installer

Postby mhertz » Mon Jul 20, 2020 7:00 pm

I came to think about my scripts didn't update the geoip database file, and so you would need to do that manually once in a while. Generally it's recommended to update it once a month I read, and I believe that's also the rate the used database is updated at. Might as well automate that I was thinking, so if you wan't, then add following into the files in 'C:\deluge2\installer-build', just before the makensis line(s):

installer-stable.cmd:

Code: Select all

curl https://dl.miyuru.lk/geoip/maxmind/country/maxmind4.dat.gz | "%programfiles%\7-Zip\7z" x -si -tgzip -so > %var1%\GeoIP.dat

installer-dev.cmd:

Code: Select all

curl https://dl.miyuru.lk/geoip/maxmind/country/maxmind4.dat.gz | "%programfiles%\7-Zip\7z" x -si -tgzip -so > %var2%\GeoIP.dat

installer-both.cmd:

Code: Select all

curl https://dl.miyuru.lk/geoip/maxmind/country/maxmind4.dat.gz | "%programfiles%\7-Zip\7z" x -si -tgzip -so > %var1%\GeoIP.dat
curl https://dl.miyuru.lk/geoip/maxmind/country/maxmind4.dat.gz | "%programfiles%\7-Zip\7z" x -si -tgzip -so > %var2%\GeoIP.dat

Btw, that is the ipv4 version of the database as I originally used, as deluge by default only listens to IPv4 when using libtorrent 1.2.x, as deluge is hardcoded listening to 0.0.0.0 which only resolves additionally to IPv6 using libtorrent 1.1.x and not libtorrent 1.2.x(ltconfig plugin can be used to specify listenening on IPv6 additionally in libtorrent 1.2.x, by altering listen_interfaces libtorrent setting directly(using e.g. '0.0.0.0:port,[::]:port'), but the deluge options for setting listen interface, doesn't allow a comma, and that is needed to specify several IPs/interfaces in libtorrent, so there you only can define to listen on IPv4 or IPv6, but not both, which come to think about it, I need submit bugticket about that to deluge bugtracker(Edit: https://dev.deluge-torrent.org/ticket/3417#ticket). Anyway, If you want to add the above, and deem it more appropriate to use the database file that also includes ipv6, which probably would be better in hindsight imho, then just omit the '4' from the curl links above.

(Edit: I have never checked deluge's peer-list using an IPv6 enabled database, and now just noticed the website providing the updated database states: "In IPv6/IPv4 databases, IPv4 address are mapped as IPv6 address", so maybe that would be somewhat annoying/confusing, I dunno, and just wanted to add as didn't knew before.)

(Edit2: I just checked in deluge just in case, and with the database including IPv6, deluge shows a blank list under the 'peers' dialog, so don't omit the '4' if choosing to include this, as currently deluge would needs code-change to parse such lists through pygeoip, which I checked supports IPv6 also, and it's API docs just lists in it's IPv6 example that the database there where named GeoIPv6.dat, so just in case I renamed it accordingly and changed the deluge code to load by default the new name from current dir, but still blank peer-list, so more needs done for that e.g i'm guessing the peer-list generating deluge code probably trips over the IPv4 to IPv6 mapped addresses I'd presume, or else the pygeoip backend lib doesn't support such mappings either, but haven't dwelled much into it honestly, e.g. I didn't even enable/read the deluge debug-output or anything, and just quickly tested the IPv6 database to add this extra info to you)

Lastly, I remember you stated to have changed the vars of my scripts to be more verbose, so of-course you need change '%var1%' and '%var2%' to whatever you choosen instead for it to work on your end also.

mystikfox
New User
New User
Posts: 3
Joined: Sun Jun 07, 2020 10:32 pm

Re: [Unofficial] Deluge 2.0.x installer

Postby mystikfox » Fri Jul 24, 2020 10:08 pm

Been awhile since I've tested this, but thought I'd check in to see if deluge-console was working yet. I just downloaded the 2.0.4.dev installer off of the Google Drive linked on the first post, installed it (portable, just to see if it was working) and gave it a try:

Code: Select all

deluge-console.exe info
Traceback (most recent call last):
  File "C:\Users\admin\Downloads\Deluge\lib\runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Users\admin\Downloads\Deluge\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Users\admin\Downloads\Deluge\deluge-console.exe\__main__.py", line 7, in <module>
  File "C:\Users\admin\Downloads\Deluge\lib\site-packages\deluge\ui\console\__init__.py", line 19, in start
    Console().start()
  File "C:\Users\admin\Downloads\Deluge\lib\site-packages\deluge\ui\console\console.py", line 154, in start
    from deluge.ui.console.main import ConsoleUI  # import here because (see top)
  File "C:\Users\admin\Downloads\Deluge\lib\site-packages\deluge\ui\console\main.py", line 31, in <module>
    from deluge.ui.console.modes.preferences import Preferences
  File "C:\Users\admin\Downloads\Deluge\lib\site-packages\deluge\ui\console\modes\preferences\__init__.py", line 3, in <module>
    from deluge.ui.console.modes.preferences.preferences import Preferences
  File "C:\Users\admin\Downloads\Deluge\lib\site-packages\deluge\ui\console\modes\preferences\preferences.py", line 33, in <module>
    from deluge.ui.console.widgets.sidebar import Sidebar
  File "C:\Users\admin\Downloads\Deluge\lib\site-packages\deluge\ui\console\widgets\sidebar.py", line 12, in <module>
    import curses
  File "C:\Users\admin\Downloads\Deluge\lib\curses\__init__.py", line 13, in <module>
    from _curses import *
ModuleNotFoundError: No module named '_curses'


I checked the changelog and do see that a patch was made to work around this issue on Windows though. I used

Code: Select all

pip install windows-curses
as mentioned in the changelog, but something still seems a bit off. Any recommendations?

mhertz
Compulsive Poster
Compulsive Poster
Posts: 828
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: [Unofficial] Deluge 2.0.x installer

Postby mhertz » Sat Jul 25, 2020 9:27 am

I recently retested petersasi's installer and there deluge-console worked out-of-the-box because of his nice fixes. I used the libtorrent 1.2.7 version, so presumably not all his installers include the fixes and probably there for if having issues with newest ones so as for backwards-compatibility-reasons. I agree it's slightly confusing with the additional versions just named after the dev-build/release, but if you check the file info/properties of each version on his link, then you can see the one without libtorrent-info etc is older than the e.g libtorrent 1.2.7 specified version.

Sorry for answering the question btw for petersasi and I didn't answer it yesterday when saw it because of that, but then today thought it was little stupid not helping out with the answer until petersasi sees it, when knowing the answer already, and so I hope he doesn't mind. Annoying this board doesn't have the "@ feature" to give people notifications when they're mentioned, but there's always the DM route(direct message) too of course.

mystikfox
New User
New User
Posts: 3
Joined: Sun Jun 07, 2020 10:32 pm

Re: [Unofficial] Deluge 2.0.x installer

Postby mystikfox » Sat Jul 25, 2020 5:56 pm

Good call. I downloaded the file you recommended and it does appear to be working now. Thanks!

ss4johnny
Member
Member
Posts: 14
Joined: Fri Sep 08, 2017 11:44 pm

Re: [Unofficial] Deluge 2.0.x installer

Postby ss4johnny » Sat Jul 25, 2020 7:46 pm

I'm not sure if this has been commented on or not, but I've noticed that because of the way that the bottom bar (the side bar also does this) disappears, there is a torrent that is impossible to see unless you completely maximize the screen or wait for the bar to disappear.

petersasi
Leecher
Leecher
Posts: 80
Joined: Sun Nov 17, 2019 8:09 am

Re: [Unofficial] Deluge 2.0.x installer

Postby petersasi » Mon Jul 27, 2020 4:43 pm

Sorry for the confusion and thanks to mherz for helping out with the suggestion, indeed only the files with their date after the change log date contain the changelog changes.

I was keeping the old ones around just as fallbacks, should I mess the new versions up, but I guess I can remove the old ones at least, no major complaints received with the installers.

To MHerz: big thanks for the portability and geoip update improvements too, I will try to merge both of them into my next build!

mystikfox wrote:Good call. I downloaded the file you recommended and it does appear to be working now. Thanks!


Return to “Windows OS”

Who is online

Users browsing this forum: No registered users and 3 guests