Deluge Windows Builds

Specific support for Deluge on Microsoft Windows OS
Post Reply
doadin
Seeder
Seeder
Posts: 111
Joined: Mon Jun 30, 2014 9:24 am

Deluge Windows Builds

Post by doadin »

Hello, I have for a long time now had a public git repo for helping build deluge and its deps 100% from source where possible. I have recently updated the powershell script and thought I would update here for anyone interested.

I just recently made some changes so it might not be 100% stable but it worked like a year ago last I tried it. It is in a public repo so happy to accept pull requests for anything not working. :D

Currently it is intended to be run on a clean VM or a VM only used for running the ps script.
It is 100% automated.
It builds using the following deps:

Visual Studio 2017
python-3.7.9
nasm-2.15
strawberry-perl-5.32.1.1(was setup to use activate state but there download links expire so might have issue here)
msys2-x86_64-20211130
boost_1_77_0(last tested using 1.70 but should still work)
openssl master git branch aka latest git commit
GTK3+ gvsbuild tools master git branch aka latest git commit
Libtorrent master git branch aka latest git commit
Deluge master git branch aka latest git commit

some issues may arise from using latest git commits versions of openssl or others but should be easy to choose a working version for the script to use if needed.(small scripts change)

The 32 bit build process is less tested. As noted it may need a few tweaks, I also had been working on making installer for windows that is more like official, last I had plugins didn't work when using the installer I was able to build this will likely need someone like Cas to fix and pretty sure he is well aware of the issue.

PS script: https://github.com/doadin/DelugeBuildFr ... PS/All.ps1
mhertz
Moderator
Moderator
Posts: 2182
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: Deluge Windows Builds

Post by mhertz »

Thanks again doadin, for this and everything else you did/do, and just wanted to say appreciate that mate :)
highvoltage
Leecher
Leecher
Posts: 57
Joined: Mon Apr 11, 2016 11:11 pm
Location: Brazil

Re: Deluge Windows Builds

Post by highvoltage »

Excelent works doadin, thanks very much
Cas
Top Bloke
Top Bloke
Posts: 3679
Joined: Mon Dec 07, 2009 6:04 am
Location: Scotland

Re: Deluge Windows Builds

Post by Cas »

Thanks for sharing Doadin

I am bit out of the loop on the Windows builds, what's the difference between this and the other Windows build?
Cas
Top Bloke
Top Bloke
Posts: 3679
Joined: Mon Dec 07, 2009 6:04 am
Location: Scotland

Re: Deluge Windows Builds

Post by Cas »

Btw thanks to some excellent work by AllSeeingEye there are official libtorrent python windows build now available: https://pypi.org/project/libtorrent/1.2.15/
doadin
Seeder
Seeder
Posts: 111
Joined: Mon Jun 30, 2014 9:24 am

Re: Deluge Windows Builds

Post by doadin »

Cas wrote: Wed Dec 08, 2021 6:22 pm Thanks for sharing Doadin

I am bit out of the loop on the Windows builds, what's the difference between this and the other Windows build?
um, im not 100% sure but it seems like the other build just copies files to where they would be if you just did the steps manually to build and what this script does is just automate the install process including setting up the build environment. With the powershell script I posted you can run it from a clean windows install of pretty much anything win7+ including on server versions and just one click a few min or so later and you have a full install building openssl,libtorent,C++ Boost, and of course deluge from source. from this I have a pyinstaller script or spec w.e. they call it that can make the installer folder structure used for our installer builder like has been used in the past. I seem to remeber needing to make a few changes to the installer script but I don't remember. Also pyinstaller has issues working with deluge plugins. Thats the worst of it as far as I remember, again though last I tried was like a year maybe more ago so might have a bit of a different outcome now maybe better maybe worse idk. I just wanted to share this as its a very simple process(or was again ymmv) but at the time when I started making the script it was boot VM run script thats it all installed, and from there can run "pyinstaller deluge.spec" (which can also be found in that repo) And you would have the folder with all the files needed to add to the installer.

With the powershell script I decided to build from source where I could easily vs installing from prebuild. Could probably do mroe it could probably be cleaner but it was just something I threw together to make builds ez. If people see areas of improvements im open to accepting PRs, I didnt really wana make like installer though(as in I didn't want like a menu and things for the script) just keep it simple one click and done.
doadin
Seeder
Seeder
Posts: 111
Joined: Mon Jun 30, 2014 9:24 am

Re: Deluge Windows Builds

Post by doadin »

Cas wrote: Wed Dec 08, 2021 6:22 pm Thanks for sharing Doadin

I am bit out of the loop on the Windows builds, what's the difference between this and the other Windows build?
I just recently updated the script too to try and use newer versions of build deps but didn't wana change too much. As you could tell it still install and uses python3.7 the script before used like 3.7.4 and now 3.7.9 so still new build but only changed what I hope is minor things for now and later on could try building with newer versions of python and such, I know deluge has had work to work with newer python version but I wasn't sure about all the build tools so I just made a few updates so it doesn't break much I hope. The only thing I didnt add to the script was running pyinstaller at the end and running nsi(NSIS) to make what would essentially be a "official" installer. Maybe I can do that in a few days, I kinda gotta remember where I left off.

I was thinking about posting build maybe since we still don't have a official 2.0 but Im not sure how many people would want deluge without plugins. I mean also if the script still works well feel free to use it to make a official build, idk.

Basically what the script does is like you need VS to build libtorrent from source so it downloads and installs it and does that same thing for all the build tools/source code. Then runs all the commands to build/install everything. So you just run the script and it does everything you need to do to basically kind of have a dev build of deluge ready to make installers to distribute.
mhertz
Moderator
Moderator
Posts: 2182
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: Deluge Windows Builds

Post by mhertz »

doadin wrote: Thu Dec 09, 2021 12:14 am I was thinking about posting build maybe since we still don't have a official 2.0 but Im not sure how many people would want deluge without plugins. I mean also if the script still works well feel free to use it to make a official build, idk.
Please do, whenever time/motivation permits, if wanted, as maybe some nifty windows users can play with it, and hopefully see what the error is, and e.g compare if something(needed files) missed in the freezing, plus if hopefully only default plugins fail, and not 3'rd party ones, and maybe could add the default plugins back in local config folder(having rebuilt them with upped version numbers to take precedence - you could provide zip with them all separate, or even added to nsis script). Though sounds strange if should work from local profile and not default location, unless somethings missed from freezing in the default location, as said.

Btw, everything of newest build components worked last I played with the windows side of things, around 6 months ago, I.e py3.9.x, msvc2019, boost 1.74(or something) etc, maybe small changes needed for some, don't remember it all, but regardless. Also, I remember you posted very nice code-fix to twisted in #3201, and then slightly revised by Cas, which for me during testing fixed annoying bug with not able open connection-manager and preferences without(unless playing with window placement, or strangely through simply enable debug-logging).

Again, awesome work with the freezing, and this :)

Edit: As some private trackers forbid dev-deluge usage, then might look into adding a patch or two from e.g binhex's arch-delugevpn github(or just make yourself), to identify as stable-deluge - last I checked though some time ago, it was reported to possibly not work on all trackers, for whatever reason(apparently some does very thorough checking seemingly), but atleast better than nothing I'm thinking. Anyway, just a thought.
doadin
Seeder
Seeder
Posts: 111
Joined: Mon Jun 30, 2014 9:24 am

Re: Deluge Windows Builds

Post by doadin »

I just finished making some updates to the 64-bit build process there was some embarrassingly bad errors. It should run all commands without error now though, Have not had time yet to check for a working end install... more to come soon.

Edit: also note the ps script is not compatible with powershell 5 and has only been tested on powershell 7.
mhertz
Moderator
Moderator
Posts: 2182
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: Deluge Windows Builds

Post by mhertz »

I looked through your script just quickly, and please forgive me for not just making PR, but I haven't run your scripts and just some quick comments regarding your gvsbuild section, then you need pycario and pygobject and enable gi presumingly etc. Well, maybe you can get it work from pypi building from src, though failed for me - though pycairo have wheels I see, but regardless. Also adwaita-icon-theme needed. Sorry, I know you know all this, atleast if I remember correct, because I initially got help from your old gvsbuild cmd-script and Cas's yaml config, when first looked into gvsbuild long ago and had some trouble with it because non-default msvc-location etc.

Then, fontconfig (gtk3-dep) fails if not having git and won't work from msys2 git neither(even if added to path and working from cmd alone), but works through e.g mingit(-regular/msys2 or busybox, I used busybox version as smaller and reported faster - git for windows btw) extracted and added to path. Librsvg fail fixed now, so don't need cater to that anymore. If not using --python-dir or --same-python, and should be --same-python here, then by default downloads and builds through another python gotten through nuget, currently 3.10(optionally controlled through --python-ver), which not good when need pygobject and pycairo in py3.7 wheels here.

This line works elsewhere for me btw: (haven't tested if all the deps needed though)

Code: Select all

python build.py -d build --gtk3-ver=3.24 --archives-download-dir=%DOWNLOAD_DIR% --build-dir="%BUILD_DIR%" --msys-dir="%MSYSPATH:~1,-9%" --vs-ver=%VS_VER% --platform=x64 --vs-install-path=%MSVC_DIR% --same-python -k --enable-gi --py-wheel enchant gtk3-full pycairo pygobject lz4 --skip gtksourceview,emeus,clutter --capture-out --print-out
Newest python and vc2019 work good also btw, seemingly, in current gvsbuild, openssl, libtorrent and deluge builds/runs. If you ever switch(msvc), then only need these two msvc components btw, saving little space(1gb+ if remember correct):

Code: Select all

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
Last, bsdtar, default in msys2, should be able to extract all needed, so 7z.exe addition redundant.
Post Reply