Page 52 of 62

Re: [Unofficial] Deluge 2.0.x installer

Posted: Fri May 29, 2020 4:40 am
by petersasi

I am not yet finished with the polishing yet, but did move the file sharing, please use this link: ... Yl7XuWYpVT


Re: [Unofficial] Deluge 2.0.x installer

Posted: Fri May 29, 2020 7:38 am
by mhertz
Done, thanks :)

Re: [Unofficial] Deluge 2.0.x installer

Posted: Fri May 29, 2020 12:16 pm
by PhiliP

Re: [Unofficial] Deluge 2.0.x installer

Posted: Fri May 29, 2020 1:36 pm
by petersasi
Hi Folks, a bit of an update on me getting acclimatized:
  1. I am standing on shoulders of giants: more specifically cannot thank MHerz enough who has filled the first 50 pages of this story and conquered so many pitfalls, build problems, necessary patching that it is hard to imagine. :o I am running into a few as I am culling through the scrips and am trying to prettify them. BIG KUDOS!
  2. The first addition that you can already see in the download folder is that I had added some powershell commands to query components versions and indicate those in the filename. So going forward you will be able to see and choose / revert to a specific combination of deluge / Python / GTK / OpenSSL
  3. I will have to add the latest LibTorrent version included - currently we are still at 1.2.6 (I beleive the 1.1.x and the fixed 1.2.3 included is of less interest) - DONE
    deluge on low memory configurations. Otherwise I will only prepare speed optimized builds. - DONE
  4. The one after that is to upgrade to the latest version of boost for the latest libtorrent 1.2.x - DONE using boost 1.73
[*]As you can see I have also uploaded the build environment provided by MHerz, including my improvements - so far no instructions on the prerequisites and steps to build - this is another thing I will need to include later. -> TODO!
[*]Just remembered to maybe add 7zip download and install to the install_components instead of taking it for granted. -> TODO!
[*]My next pet project will be is to patch the libtorrent build to optimize for speed instead of space. Let me know if there is anyone here who is running And most importantly: Please give it a try and let me know if I broke anything! :?
Have fun! ;)

Re: [Unofficial] Deluge 2.0.x installer

Posted: Fri May 29, 2020 5:11 pm
by mhertz
Thank you my friend, you're way to kind :oops: , but appreciate it nonetheless! :D

Sorry, just quickly wanted to respond to some previous edits I saw I had missed before.

Strange that you need add -N to patching in lt1.1, when works fine for me, but if works for you then great. Btw, one patch stopped apply after changing from cygwin to msys2, and the easiest workaround was just simply the --binary switch I read and found true, hence my usage of that there.

Under libtorrent folder, there's folders for libtorrent 1.2.3 and 1.1.x. This folder, just like theme folder, is meant for installer-building usage, so when selecting libtorrent 1.2.3 during installing, then that folder contents is copied into place and selecting libtorrent 1.1.x uses the lt1.1 folder. When selecting libtorrent 1.2.x in installer, as is default also, then nothing happens, since is already in place by default under Lib\site-packages in built deluges, so I didn't add a folder for that under libtorrent folder, as wouldn't be needed, as lt1.2 buildingscript already copies libtorrent.pyd into lib\site-packages of deluges + overlay folder, and just can be optionally overwritten by the other installer libtorrent options(these things you can see added in the deluge-installer.nsis script, under nsis/packaging/win32 or something like that, as not home now).

I usually only rebuilt libtorrent 1.2.3 whenever a big python update came out i.e. from 3.7 to 3.8 etc, and don't even know if needed, but just in case. Actually maybe would be better to rebuild between each python update I dunno honestly, I forgot look into that, and wanted often to remove it regardless as didn't really think was needed no more, but didn't hurt either. I used to have a buildscript for it, but I deleted it back when I though I would remove it in next release. If you wanna rebuilt libtorrent 1.2.3, then make buildscript for it, by copying lt1.2 script and name it e.g. lt1.2.3. The lt1.2 script should probably be named lt1.2.x, but as just for me, and I knew the difference, then I ditched the last x part(as for me logically represent RC_1_2 branch, like RC_1_1 for 1.1.x). Anyway, if you then add an extra argument to the git clone command of '-b libtorrent-1_2_3', like the lt1.1. script uses but just other branch, and it's same command to checkout a tag as branch with that -b switch. Ohh, then the script should be made to only 'copy /y' or move, libtorrent.pyd into C:\deluge2\libtorrent\lt1.2.3\Lib\site-packages, and that's all. If you want I can make it for you if need be, then just give me a shout.

I think that optimization option is for boost, as libtorrent is optimized e.g. for low memory or speed or whatever through settings_pack options/presets, but of-course it makes sence to use that anyway, so good find.

It's been a while since I checked boost versions, so maybe it works better today, e.g. the recent commit to support newest boost for libtorrent 1.2.x, but it's not sure anyway it will work for our combo of python and msvc used regardless, but would be nice if you could use newest boost now.

If you look up building docs, then it's stated to setup a user file, cannot remember name sorry, where defining msvc version, and maybe also python version can't remember, but when I tried it, then didn't help my issue, so ditched it, and just configured msvc direct from, as anyways needed patch that for enabling crypto=openssl for enabling https tracker announcing support - I used to specify direct msvc version e.g. at one time 14.00 was needed, instead of just 14 strangely(back when I had 3 msvc versions installed), but that was in older times, with older python, so doesn't is used anymore and didn't bother to remove it as wasen't used, and since with newest python then by default 'msvc' was just simply used, which did work fine for me too(with specific boost), and just means default msvc installed simply.

Anyway, very nice changes you propose/made, kudos for work put in, now, and the later intended implements :)

Re: [Unofficial] Deluge 2.0.x installer

Posted: Sat May 30, 2020 10:05 am
by petersasi
Thanks for the details MHerz!

Patch -N is necessary, since remember I no longer delete the boost folders just link one or the other to C:\boost :)

It would be great if you could restore the lt-1.2.3 build .cmd since for example I do not know what is the latest boost version it can use. :?

MSVC binary format is 14 for a long time now however exaat version for MSVC 2019 is 14.20 and boost seems to have gained support for that so I have changed your patch slightly to reflect this. :)

I will go ahead and try a build of lt-1.2.6++ (If I understand correctly RC_1_2 collects all the patches since 1.2.6) with boost 1.73.

Re: [Unofficial] Deluge 2.0.x installer

Posted: Sat May 30, 2020 12:16 pm
by mhertz
Ahh gotcha, of-course, sorry.

Yes, correctly understood :)

Indeed, msvc 14 is msvc 2015, which I used at one point in time, and as you say 14.20 is msvc 2019, your specific version actually is 14.26, but 14.20 should work, or maybe 14.2 if doesn't, as guessing then means all msvc 2019, though no expert whatsoever in these matters lol. Note, if you change it in the patch in the place where I changed 14 to 14.00, then that is ignored, because doesn't get used at all when using py3.8, and so 'msvc' is used for that python version, which I didn't change as worked fine for msvc 2019, and just is problematic for msvc-2017(14.1 e.g. 14.16 when I used it), but you can precise it more if wanted of-course and sorry in advance if you already was talking about changing it there on the b2 line directly or after my old unused 14.00 change and where states just msvc, before the b2 line.

Btw, forgot a previous edit previous too; you can delete gtk-cache if wanted, but then it will have to download all gtk3 related packages and reclone git repo's instead of pull for updates, so saves time and hence, I kept it and only removed it when/if running uninstall_components.cmd.

It's same boost in lt1.2.3, and I just remade it, though in my usual lazy way, so you will need fixup with your wanted changes afterwards like before. ... 2644845975 (goes in libtorrent-build with the others and it just moves built libtorrent.pyd into single needed place i.e. libtorrent\lt1.2.3\Lib\site-packages, for when user selects lt1.2.3 in installer during install - fully tested working of-course, twice actually, as needed NUL out an extra RD command, as python dir was removed here by uninstaller and just kept for making sure not changing later, though again, bloody ineffecient to do it like this and not keeping python always when not updated, and just using venv's in buildscripts, but as said, lazy :) ) Crap, Just remembered I forgot remove the last pause command, which I only use during testing and remove afterwards, but I think you use that yourself anyway, but otherwise, please delete yourself, thanks.

Btw, up to you, but myself I would only rebuild lt1.2.3 when going from bigger py-upgrade i.e. next when going to 3.9. Why I say that, is because in the beginning I just installed and used the libtorrent.pyd that Cas built and uploaded to pypi, so installed from pip, like deluge itself, called deluge-libtorrent or something of the sort, but later rebuilt it myself as it wasen't built with crypto=openssl, and so didn't support https trackers and showed tracker error upon them as I got reported. Anyway, when installing that libtorrent.pyd with pip, which was from a wheel package, then it had a fixed python version in name and install-file so could only be installed if using py3.6.x, but not e.g. 3.5 or 3.7 etc, so kinda though that it then must have been okay to only rebuild when bigger updates to python came. Maybe it even works also in bigger py updates when building yourself, dunno, probably if not broke compatibility with bigger API changes, but anyway, since python bigger updates only happens rarely, then for me was fine to just redo upon those. but of-course up to you if wanna rebuild more often then that i.e. upon every point update of python.

The user-config.jam, or whatnot, I know is referenced in official libtorrent building guide among others, probably also on deluge main site in it's building guide, though pretty outdated I presume, but still, if wanna try mess with that, and possibly lt1.1.x also works now with a newer or even newest boost, who knows, though as said, didn't change anything with me(that extra user-config.jam file or whatever), and needing patch anyway, but as also said, not tested this boost situation in long time, i.e since boost 1.71 was newest and latest libtorrent was I believe 1.2 or 1.2.1 and older other branch 1.1.11 I believe. Last, I don't use b2 option encryption=on because is default anyways just so don't think I forgot, as e.g. is used in that deluge building guide underneath here.

Sorry for "intruding", carry on :)

Re: [Unofficial] Deluge 2.0.x installer

Posted: Sat May 30, 2020 1:10 pm
by petersasi
MSVC v142 binary format, I read it here: ... ew=vs-2019
How to configure boost for it: ... dio-2019-c they say 14.2
Seems like the boost b2 build system can take this, this it is building it for me:

-> Boost upgraded to 1.73
-> both 1.1.x and 1.2.x libtorrent built optimized for speed now
-> libtorrent and boost version are now also indicated in installer filename
Sorry, something went wrong upon install, so deleted them, will have ti investigate...

Re: [Unofficial] Deluge 2.0.x installer

Posted: Sat May 30, 2020 1:23 pm
by mhertz
Wow, impressed, good job mate :)

Thanks for links, OK so you don't need specify minor update version number cool, as e.g first time I tested install_components.cmd, then it installed msvc 14.25, and next day when wiping it and retrying, then hit 14.26. I just had it as habit from older times to e.g add 14.16 when using that 2017 version, but cool you could just resort to 14.1 then simply(or 14.10), didnt knew that fully, thanks.

You're working fast there, slow down man, but on behalf of the community here, I'm sure, I say thank you for your work, and please insert Philips previous gif or what format it was here, lol :D

Good night to you mate :)

Re: [Unofficial] Deluge 2.0.x installer

Posted: Sat May 30, 2020 1:37 pm
by petersasi
Have you received the error:
''c:\progra~1\deluge2\pythonw.exe' 'c:\program files\deluge\deluge.exe' ': the system cannot find the file specified.

Maybe I should get rid of the usage of Deluge2 in all the build environment and always call it deluge?
It does work if I create a Deluge2 symlink pointing to the Deluge folder in c:\program files