I am not sure what the best route is going to be but we need something
that can always get the latest versions of GTK3 as we had to use outdated
PyGTK versions as no other builds existed.
It would be good to drop the usage of MSVC and go with msys2 but there are
hurdles to doing that with regards to Twisted and pywin32 (see #3181).
These are the steps for another GTK3 project building with msys2:
https://www.gramps-
project.org/wiki/index.php/Gramps_for_Windows_with_MSYS2
Alternatively we continue with MSVC and roll our own GTK3 builds:
https://github.com/wingtk/gvsbuild
We will also need to move from bbfreeze to most likely pyinstaller but
that is further down the road
Help or suggestion with this would be appreciated
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3201>
Deluge <http://deluge-torrent.org/>
Deluge Project
Old description:
> With the move to a GTK3 UI we need a way to easily create the Windows
> package.
>
> I am not sure what the best route is going to be but we need something
> that can always get the latest versions of GTK3 as we had to use outdated
> PyGTK versions as no other builds existed.
>
> It would be good to drop the usage of MSVC and go with msys2 but there
> are hurdles to doing that with regards to Twisted and pywin32 (see
> #3181). These are the steps for another GTK3 project building with msys2:
>
> https://www.gramps-
> project.org/wiki/index.php/Gramps_for_Windows_with_MSYS2
>
> Alternatively we continue with MSVC and roll our own GTK3 builds:
>
> https://github.com/wingtk/gvsbuild
>
> We will also need to move from bbfreeze to most likely pyinstaller but
> that is further down the road
>
> Help or suggestion with this would be appreciated
New description:
With the move to a GTK3 UI we need a way to easily create the Windows
package.
I am not sure what the best route is going to be but we need something
that can always get the latest versions of GTK3 as we had to use outdated
PyGTK versions as no other builds existed.
It would be good to drop the usage of MSVC and go with msys2 but there are
hurdles to doing that with regards to Twisted and pywin32 (see #3181).
These are the steps for another GTK3 project building with msys2:
https://www.gramps-
project.org/wiki/index.php/Gramps_for_Windows_with_MSYS2
Alternatively we continue with MSVC and roll our own GTK3 builds:
https://github.com/wingtk/gvsbuild
We will also need to move from bbfreeze to most likely pyinstaller but
that is further down the road
Help or suggestions with this would be appreciated as primary development
is on Ubuntu.
--
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3201#comment:1>
Old description:
> With the move to a GTK3 UI we need a way to easily create the Windows
> package.
>
> I am not sure what the best route is going to be but we need something
> that can always get the latest versions of GTK3 as we had to use outdated
> PyGTK versions as no other builds existed.
>
> It would be good to drop the usage of MSVC and go with msys2 but there
> are hurdles to doing that with regards to Twisted and pywin32 (see
> #3181). These are the steps for another GTK3 project building with msys2:
>
> https://www.gramps-
> project.org/wiki/index.php/Gramps_for_Windows_with_MSYS2
>
> Alternatively we continue with MSVC and roll our own GTK3 builds:
>
> https://github.com/wingtk/gvsbuild
>
> We will also need to move from bbfreeze to most likely pyinstaller but
> that is further down the road
>
> Help or suggestions with this would be appreciated as primary development
> is on Ubuntu.
New description:
With the move to a GTK3 UI we need a way to easily create the Windows
package.
I am not sure what the best route is going to be but we need something
that can always get the latest versions of GTK3 as we had to use outdated
PyGTK versions as no other builds existed.
It would be good to drop the usage of MSVC and go with msys2 but there are
hurdles to doing that with regards to Twisted and pywin32 (see #3181).
These are the steps for another GTK3 project building with msys2:
https://www.gramps-
project.org/wiki/index.php/Gramps_for_Windows_with_MSYS2
Alternatively we continue with MSVC and roll our own GTK3 builds:
https://github.com/wingtk/gvsbuild
We will also need to move from bbfreeze to most likely pyinstaller but
that is further down the road: [https://docs.python-
guide.org/shipping/freezing/ Freezing comparison ]
Help or suggestions with this would be appreciated as primary development
is on Ubuntu.
--
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3201#comment:2>
Comment (by Doadin):
Not sure if it will make a difference but back when I was first starting
to make GTK3 changes to deluge I did some work updating bbfreeze to have
better module finding and python 3 support. I got all of the python code
to python 3 but the python c api portion I could not fix.(it doesnt need
much) The code is on my github under ccfreeze if you want to try it out.
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3201#comment:3>
Comment (by Cas):
Yeah thanks, I remember I was impressed you got that working. However
bbfreeze is a dead project now and doesn't support Python 3 so we need to
move on, despite it serving us well.
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3201#comment:4>
Comment (by Cas):
So I have had some success testing out building with gvsbuild scripts and
I have created a fork of gvsbuild so the job artifacts can be downloaded
from appveyor:
https://ci.appveyor.com/project/cas--/gvsbuild
Currently there are a few windows specific issues with the deluge code:
- Remove `py2-ipaddress` lines from `setup.py` and `requirements.txt`.
- Comment out the entire last `try..except` in
`deluge.common.set_env_variable`.
Extract the gvsbuild tarball and add to path. From console in deluge
source dir:
{{{
set PATH=C:\gvsbuild\release;%PATH%
pip install C:\gvsbuild\release\python\pycairo-1.17.1-cp36-cp36m-
win_amd64.whl
pip install C:\gvsbuild\release\python\PyGObject-3.28.3-py3.6-win-
amd64.whl
pip install -r requirements.txt
pip install -e .
}}}
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3201#comment:5>
Comment (by Cas):
To get a nicer theme create a file:
`C:\gvsbuild\release\etc\gtk-3.0\settings.ini` with the following:
{{{
[Settings]
gtk-theme-name=win32
}}}
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3201#comment:6>
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3201#comment:7>
Comment (by Cas):
An update to the above steps:
{{{
pip.exe install C:\gvsbuild\release\python\pycairo-1.18.0-cp36-cp36m-
win_amd64.whl
pip.exe install C:\gvsbuild\release\python\PyGObject-3.32.0-cp36-cp36m-
win_amd64.whl
pip.exe install
https://download.lfd.uci.edu/pythonlibs/t4jqbe6o/Twisted-19.2.1-cp36
-cp36m-win_amd64.whl
pip.exe install
https://download.lfd.uci.edu/pythonlibs/t4jqbe6o/setproctitle-1.1.10-cp36
-cp36m-win_amd64.whl
pip.exe install deluge deluge-libtorrent
}}}
The `deluge-libtorrent` wheel currently needs OpenSSL 1.1.0 installed:
https://slproweb.com/download/Win64OpenSSL_Light-1_1_0k.exe
Check that libtorrent definitely works with:
{{{
python -c "import libtorrent; print(libtorrent.__version__)"
}}}
Before running deluge set the gtk3 `bin` path:
{{{
set PATH=C:\gvsbuild\release\bin;%PATH%
deluge.exe
}}}
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3201#comment:9>
Comment (by DjLegolas):
Windows 10, python3.7, lt-1.2.1 confirmed working.
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3201#comment:10>
Comment (by Doadin):
I just restarted remaking my build systems to update for gtk3 testing
again and pretty much same setup 64-bit and it works except still the
libintel name change. https://github.com/deluge-
torrent/deluge/pull/226/commits/34d24ebe0579fd0cde6934e5460762bb60152224
is that just me or? gtk 3.24? idk.
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3201#comment:11>
Comment (by Doadin):
Also still getting an error with the simulate() workaround in connection
manager
{{{
File "C:\Python\Python37\lib\site-
packages\deluge-2.0b2.dev302-py3.7.egg\deluge\ui\gtk3\connectionmanager.py",
line 144, in show
reactor.simulate()
File "C:\Python\Python37\lib\site-
packages\twisted\internet\_glibbase.py", line 385, in simulate
timeout = min(self.timeout(), 0.01)
TypeError: '<' not supported between instances of 'float' and 'NoneType'
}}}
it seems a timeout is not set. seems like it would be better if the
twisted code checked to see if timeout is set before calling it.
{{{
if timeout is None:
timeout = 0.01
timeout = min(self.timeout(), 0.01)
instead of
timeout = min(self.timeout(), 0.01)
if timeout is None:
timeout = 0.01
}}}
but is there something we are missing?
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3201#comment:12>
Deluge <https://deluge-torrent.org/>
Deluge Project
Comment (by Cas):
Replying to [comment:12 Doadin]:
> Also still getting an error with the simulate() workaround in connection
manager
>
>
> {{{
> File "C:\Python\Python37\lib\site-
packages\deluge-2.0b2.dev302-py3.7.egg\deluge\ui\gtk3\connectionmanager.py",
line 144, in show
> reactor.simulate()
> File "C:\Python\Python37\lib\site-
packages\twisted\internet\_glibbase.py", line 385, in simulate
> timeout = min(self.timeout(), 0.01)
> TypeError: '<' not supported between instances of 'float' and 'NoneType'
> }}}
>
Create a new upstream ticket: https://twistedmatrix.com/trac/newticket
It is an issue with migrating Twisted to Python 3. Python 2 was happy to
compare different types but Python 3 is stricter and raises a `TypeError`.
Your suggested fix needs tweaked:
{{{#!diff
- timeout = min(self.timeout(), 0.01)
- if timeout is None:
- timeout = 0.01
+ timeout = self.timeout()
+ if timeout is None:
+ timeout = 0.01
+ timeout = min(timeout, 0.01)
}}}
In Deluge probably just catch the error and pass or remove it, if it does
nothing anymore. The associated comment is not so helpful:
`# XXX: We need to call a simulate() here, but this could be a bug in
twisted`
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3201#comment:13>
Comment (by Doadin):
ok so i have reported up. and yea seems like we need something to change
in deluge, though doesn't seem like we have too many options other than
just ignore it as in python 3 this error stops the connection manager from
opening at least the first few times you hit it.(i find if i open
preferences then connection manager it opens first time). However this is
almost as annoying as the issue simulate solves.
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3201#comment:14>
Comment (by Cas):
Twisted ticket: https://twistedmatrix.com/trac/ticket/9660
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3201#comment:15>
* cc: niklas.holm.271@… (added)
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3201#comment:16>
* cc: niklas.holm.271@… (removed)
Comment:
Apparently I can't figure out how to just follow an issue. Hopefully
leaving a comment will do the trick.
Keep up the good work :)
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3201#comment:17>
Comment (by OishikR):
Replying to [comment:9 Cas]:
> An update to the above steps:
>
> ...
> 3. Install python dependencies
>
> {{{
> pip.exe install
https://download.lfd.uci.edu/pythonlibs/t4jqbe6o/Twisted-19.2.1-cp36
-cp36m-win_amd64.whl
> pip.exe install
https://download.lfd.uci.edu/pythonlibs/t4jqbe6o/setproctitle-1.1.10-cp36
-cp36m-win_amd64.whl
>
> }}}
>
> ...
Hey all, thanks for the great work you do (that goes straight over my
head!). I'm just commenting to point out that these two links that I've
pointed out in this reply are no longer valid, and will throw 404 errors.
It seems the LFD website has been restructured, and there's not an easily
apparent way to get to these modules. I'm trying to install Twisted and
setproctitle via pip, and I'll update you guys if it goes wrong.
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3201#comment:18>
Comment (by zamadatix):
> It seems the LFD website has been restructured, and there's not an
easily apparent way to get to these modules.
I was able to find the latest links to the modules here
https://www.lfd.uci.edu/~gohlke/pythonlibs/ (there is a clickable index at
the top of the page)
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3201#comment:19>
Comment (by corhsin):
A few quick enhancements to the directions and some observations:
1. Only the 32-bit VC++ executable needs be installed if you are using a
64-bit system.
2. To add the PATH:
2a. Hold the WIN (flag) KEY and press PAUSE(/BREAK) and click ADVANCED
SYSTEM SETTINGS, or, open a RUN box, WIN+R, and type
SystemPropertiesAdvanced.exe.
2b. Click ENVIRONMENT VARIABLES.
2c. Under 'SYSTEM VARIABLES' (the second section) click PATH.
2d. EDIT and verify or add (NEW) the following:
C:\Program Files\Python36\Scripts\
C:\gvsbuild\release\bin
C:\Windows\System32\OpenSSH\
2e. If you did not install for 'All Users' these paths may instead need to
be in your %userprofile% or %appdata% (not verified).
3. Python 3.7 cannot be utilized with the instructions because deluge-
libtorrent is incompatible (it is version 36, and 37 is not in the store).
4. A Desktop or Start Menu / etcetera icon can be created if the PATH
variables are set. The icon should point to: "C:\Program
Files\Python36\Scripts\deluge.exe" . This relies upon default
installation locations and an 'all users' configuration.
4a. Make it pretty with the icon located at: C:\Program Files\Python36\Lib
\site-packages\deluge\ui\data\pixmaps
5. The default plug-ins are not listed. They can be installed from:
"C:\Program Files\Python36\Lib\Site-Packages\Deluge\plugins". They are
currently non-functional (they do not add).
6. The button to associate Magnet links is non-functional.
Keep up the good work!
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3201#comment:20>
* cc: hi@… (added)
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3201#comment:21>
Comment (by bengalih):
So excited for Deluge 2, was a bit disappointed in the Windows state of
things.
I've been reading the bug as well as some forum posts. The title of this
bug "Create Windows package (Py3-GTK3)" seems to infer that Deluge will
work successfully on Windows, but that no easy package installer exists.
However, it appears from reading here that even with doing manual install
of all the components, that Deluge will not be 100% functional on Windows.
Specifically, just from this thread I can see:
- simulate() error in Twisted - due to Python 3 compatibility.
- Plugins don't work
I believe the former doesn't effect functionality (just a cosmetic
thing?).
However the lack of plugins seems a huge issue in Windows users being able
to upgrade.
Is there a more comprehensive list (if more than the above) on why the
plugins won't work.
Or, is there a bug that discusses the status of the plugins for Windows?
I am bringing this up here because it seems to me that deluge not
providing a simple installer is a bit different than deluge not being able
to be run at full functionality *at all* on Windows systems.
I think there are many of us who would go through a manual 100 step
process to get Deluge running on Windows if we knew it would be 100%
functional.
As deluge is using multiple components and some of those components may
simply not work with the chosen version of Python, or certain dependencies
may not work properly on Windows at all, it starts to look bleak for
actual implementation on Windows.
Could we get some more info regarding the status of the actual
functionality and what limitations still need to be overcome for windows
functionality exclusive of the fact there isn't a proper installer?
I'm not much of a Python coder, but if I knew a bit more about what
integration issues we are looking at I wouldn't mind devoting some time to
researching for the greater good here.
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3201#comment:22>
Comment (by mhertz):
The default plugins not working can be fixed by renaming the python
version in there filenames, so 3.7 i to 3.6.
The issues remaining should be about packaging and the instructions given
to use it without an installer should give full functionality I
believe(when renaming plugins).
It lacks a native windows theme and the magnet-association button was
stated to be unfunctionel, though the associations can be made manually
and in this ticket Cas desribed how to get a windows 7 alike theme enabled
also.
Untill a real installer emerges, I've made a 7z-sfx-installer of Deluge2,
but it is simply an installer which will give you same result as if
following the manual instructions, i.e it will be a much bigger install in
size and also needs making additions to Path system-environment-variable.
https://forum.deluge-torrent.org/viewtopic.php?f=12&t=55463
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3201#comment:23>
Comment (by obraca):
To get a native windows theme just create an environment variable:
GTK_CSD with value of 0
There are some details that don't work, like you don't see an arrow
indicating a submenu, but overall it's usable and Windows native.
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3201#comment:24>
Comment (by mhertz):
Thanks for the tip obraca! I did previously read about that and
experimented with it when I made my 7z-sfx-installer, but I stupidly just
thought I could add the option to the settings.ini file, and I also tested
adding it instead from terminal with "cmd /c set GTK_CSD=0 && deluge.exe",
but both ways I couldn't see a difference so ditched it, but I stupidly
did it wrong and so it never got applied propperly to deluge.exe. When
doing it correctly, either by normal ways or e.g. using env.exe from win32
coreutils, then I see it infact does make a difference lol, so thanks for
the tip :)
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3201#comment:25>
Comment (by mhertz):
I wanted to report that when following install-instructions then
thinclient-mode doesn't work and you cannot exit deluge without killing
deluge.exe or python from task-manager or terminal(when thinclient-mode
enabled).
While trying to troubleshoot it, I funny enough found a workaround in
simply enabling debug-logging :)
So, if using thinclient mode with the provided install-instructions, then
add to end of your deluge shortcut-command: ' -L debug -l
%userprofile%\deluge.log'
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3201#comment:26>
Comment (by mhertz):
Sorry, addendum to above, then I found that if you play with window size,
and/or maximize/minimize, then when selecting connection-manager it will
come through, and/or quiting deluge becomes possible, and sometimes more
"playing around" is needed than othertimes. Debug-logging solves this
still though.
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3201#comment:27>
Comment (by mayli):
How about borrow the packaging from quodlibet?
https://quodlibet.readthedocs.io/en/latest/downloads.html#windows
The unpack size is about 159 MB, with a copy of python3 and gtk stuff.
It's building windows app using msys2, with
https://github.com/quodlibet/quodlibet/tree/master/win_installer
{{{
$ cd quodlibet-4.2.1-portable/
$ du -sh *
943K config
172M data
4.0K exfalso.lnk
4.0K quodlibet.lnk
1.0K README.txt
$ du -sh data/*
61M data/bin
68M data/lib
43M data/share
686K data/ssl
$ du -sh data/lib/*
4.0K data/lib/ckport
76K data/lib/engines-1_1
528K data/lib/gdk-pixbuf-2.0
168K data/lib/gio
2.8M data/lib/girepository-1.0
37M data/lib/gstreamer-1.0
60K data/lib/modules
28M data/lib/python3.7
$ du -sh data/share/*
20K data/share/GConf
36K data/share/glib-2.0
28M data/share/icons
568K data/share/libthai
15M data/share/locale
212K data/share/openal
}}}
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3201#comment:28>
Comment (by Paralel):
Is there absolutely any way someone could upload the latest version of
Libtorrent, compiled with all the latest components, for Windows x64 to
PyPi that is compatible with Python 3.6? The Deluge-Libtorrent currently
on PyPi is ancient at this point. I love Deluge, but I'd really like to
keep my Libtorrent up to date.
I know what everyone here is going to say "build it yourself". I seriously
would, but the only set of instructions I know of talk about how to do it
in Windows using Python 2.7, rather than Python 3.6 like the Deluge-
Libtorrent that is available through PyPi. If someone wants to write a set
of instructions on how I can do this myself (the old "Teach a man to
fish... etc...") rather than just upload the file, I'm game. I'll sit here
and beat my head against that wall until it gives I just honestly don't
know enough on how to modify the instructions for the build using Python
2.7 in order to do it for Python 3.6.
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3201#comment:29>
Comment (by mayli):
The tricky part is that we have 2 (or more compilers) on windows, MSVC and
MinGW/GCC. I've uploaded the linux wheel on test, and probably could work
on windows wheel in this weekend.
https://test.pypi.org/project/python-libtorrent-bin/#files
Replying to [comment:29 Paralel]:
> Is there absolutely any way someone could upload the latest version of
Libtorrent, compiled with all the latest components, for Windows x64 to
PyPi that is compatible with Python 3.6? The Deluge-Libtorrent currently
on PyPi is ancient at this point. I love Deluge, but I'd really like to
keep my Libtorrent up to date.
>
> I know what everyone here is going to say "build it yourself". I
seriously would, but the only set of instructions I know of talk about how
to do it in Windows using Python 2.7, rather than Python 3.6 like the
Deluge-Libtorrent that is available through PyPi. If someone wants to
write a set of instructions on how I can do this myself (the old "Teach a
man to fish... etc...") rather than just upload the file, I'm game. I'll
sit here and beat my head against that wall until it gives I just honestly
don't know enough on how to modify the instructions for the build using
Python 2.7 in order to do it for Python 3.6.
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3201#comment:30>
Comment (by Paralel):
Ah, I understand. That didn't even cross my mind. I was strictly thinking
about the instructions above in comment 9. I forgot about those that are
using other compilers. Thank you for explaining that to me. It wasn't my
intent to disregard other users or push for anything. I am more than happy
to wait until whenever to see the end result.
Replying to [comment:30 mayli]:
> The tricky part is that we have 2 (or more compilers) on windows, MSVC
and MinGW/GCC. I've uploaded the linux wheel on test, and probably could
work on windows wheel in this weekend.
>
> https://test.pypi.org/project/python-libtorrent-bin/#files
>
> Replying to [comment:29 Paralel]:
> > Is there absolutely any way someone could upload the latest version of
Libtorrent, compiled with all the latest components, for Windows x64 to
PyPi that is compatible with Python 3.6? The Deluge-Libtorrent currently
on PyPi is ancient at this point. I love Deluge, but I'd really like to
keep my Libtorrent up to date.
> >
> > I know what everyone here is going to say "build it yourself". I
seriously would, but the only set of instructions I know of talk about how
to do it in Windows using Python 2.7, rather than Python 3.6 like the
Deluge-Libtorrent that is available through PyPi. If someone wants to
write a set of instructions on how I can do this myself (the old "Teach a
man to fish... etc...") rather than just upload the file, I'm game. I'll
sit here and beat my head against that wall until it gives I just honestly
don't know enough on how to modify the instructions for the build using
Python 2.7 in order to do it for Python 3.6.
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3201#comment:31>
* cc: tobbez@… (added)
Comment:
Issues I noticed while trying to run Deluge 2 on Windows:
1. `start_daemon` mixes `bytes` and `str` when calling
`subprocess.Popen`: https://dev.deluge-torrent.org/ticket/3313#comment:2
2. The GdkPixbuf (from gvsbuild) seems to have a problem that causes
deluge to exit with an access violation¹ after attempting to loading a few
.ico files (some of which are invalid). There are no messages in the debug
log, but if running in a console it produces the following output:
{{{
c:\apps\deluge2\venv\lib\site-packages\deluge\ui\gtk3\common.py:75:
Warning: cannot register existing type 'GdkPixbufGdipAnim'
return Pixbuf.new_from_file_at_size(filename, size, size)
c:\apps\deluge2\venv\lib\site-packages\deluge\ui\gtk3\common.py:75:
Warning: g_once_init_leave: assertion 'result != 0' failed
return Pixbuf.new_from_file_at_size(filename, size, size)
c:\apps\deluge2\venv\lib\site-packages\deluge\ui\gtk3\common.py:75:
Warning: g_object_new_with_properties: assertion 'G_TYPE_IS_OBJECT
(object_type)' failed
return Pixbuf.new_from_file_at_size(filename, size, size)
}}}
For now I just patched deluge's `get_pixbuf_at_size` (in
`deluge\ui\gtk3\common.py`) and prepended the 4 lines to it:
{{{
#!python
def get_pixbuf_at_size(filename, size):
# current GdkPixbuf is broken somehow and crashes after loading some
number of ico files
if filename.endswith('.ico'):
log.warning('Returning blank pixbuf instead of loading file:
{}'.format(filename))
return create_blank_pixbuf(size)
}}}
That prevents the crash, but obviously means you won't see icons for
trackers that use .ico.
3. The twisted `simulate` issue that has been mentioned previously.
4. Deluge 2 fails to load a state file from Deluge 1.3.x:
{{{
Traceback (most recent call last):
File "c:\apps\deluge2\venv\lib\site-packages\twisted\internet\base.py",
line 1292, in mainLoop
self.runUntilCurrent()
File "c:\apps\deluge2\venv\lib\site-packages\twisted\internet\base.py",
line 913, in runUntilCurrent
call.func(*call.args, **call.kw)
File "c:\apps\deluge2\venv\lib\site-packages\twisted\internet\defer.py",
line 460, in callback
self._startRunCallbacks(result)
File "c:\apps\deluge2\venv\lib\site-packages\twisted\internet\defer.py",
line 568, in _startRunCallbacks
self._runCallbacks()
--- <exception caught here> ---
File "c:\apps\deluge2\venv\lib\site-packages\twisted\internet\defer.py",
line 654, in _runCallbacks
current.result = callback(current.result, *args, **kw)
File "c:\apps\deluge2\venv\lib\site-packages\twisted\internet\task.py",
line 866, in <lambda>
d.addCallback(lambda ignored: callable(*args, **kw))
File "c:\apps\deluge2\venv\lib\site-
packages\deluge\core\torrentmanager.py", line 239, in start
self.load_state()
File "c:\apps\deluge2\venv\lib\site-
packages\deluge\core\torrentmanager.py", line 832, in load_state
state = self.open_state()
File "c:\apps\deluge2\venv\lib\site-
packages\deluge\core\torrentmanager.py", line 812, in open_state
state = pickle.load(_file)
builtins.UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in
position 19: ordinal not in range(128)
}}}
This is likely only a problem when the state files contains non-ASCII,
and can be worked around by manually converting the state file by opening
a Python interpreter and running:
{{{
#!python
import pickle
with open('torrents.state', 'rb') as f:
d = pickle.load(f, encoding='latin1')
with open('torrents.state', 'wb') as f2:
pickle.dump(d, f2)
}}}
5. When starting the daemon (deluged) when using the thin client, the
daemon spawns a console window.
That happens because it's started by `python` instead of `pythonw`,
which could be solved upstream by moving the `deluged` entry point in
`setup.py` to `gui_scripts`².
It also seems like the extra entry point executables (`deluge-debug.exe
`/`deluged-debug.exe`/`deluge-web-debug.exe`) specified in `setup.py` do
not get installed.
As workaround (for users who just want to get this working locally)
running something like the following to convert the executable should
work:
{{{
#!python
# replace PYTHONDIR with the root of your Python installation
with open(r'PYTHONDIR\Lib\site-packages\pip\_vendor\distlib\w64.exe',
'rb') as f:
launcher = f.read()
with open(r'...\path\to\deluged.exe', 'rb') as f:
d = f.read()
with open(r'...\path\to\deluged.exe', 'wb') as f:
f.write(launcher)
f.write(d[d.rindex(b'#!'):])
}}}
But make a backup copy of deluged.exe first.
¹: `echo %errorlevel%` after it exits yields `-1073741819` (=
`0xc0000005`)
²: Non-windows platforms should not be affected since `gui_scripts` are
handled just like `console_scripts` there
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3201#comment:32>
Comment (by mhertz):
Thank you so much tobbez, you seriously rock! :) I have posted your
findings on the deluge-forum also. I'll remake my "installer" tomorrow
with your fixes and thank you many times again!
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3201#comment:33>
Comment (by tobbez):
In addition to my earlier comment, it also appears that the libtorrent
provided by `deluge-libtorrent` (cf. comment:9) is not actually
built/linked against OpenSSL, causing announces to https trackers to fail
with `unsupported URL protocol`.
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3201#comment:34>
Comment (by mhertz):
Good finding again, thank you! I omitted the OpenSSL files from my 7z-sfx-
installer,because it didn't seem to make a difference if including them or
not, though didn't even think of testing https-trackers(I kinda thought it
just was used by deluge to communicate with its daemon encrypted or
something and the files already where in the OS possibly.) Thanks again.
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3201#comment:35>
Comment (by mhertz):
@tobbez, I accidentially asked you a question in wrong ticket, sorry, and
I repost it here because you're not in the Cc list of that other ticket:
---
Do the code you posted for .5 work for you locally?
I used my deluge2 from Cas's install-instructions and because of admin-
rights needed, I copied deluged.exe into my win10 VM's user(fooba)
Downloads folder and changed your code to match my system and then runned
it and it did change the file I could see from the file-properties, and
then I overwrote deluged.exe from Downloads and back to correct place
again(I did backup it first), but the result is same as before and I can
see python and not pythonw.exe runs deluged.exe still and doesn't
background itself.
I apologize in advance if messing up your instructions, as that is very
likely ;)
{{{
# replace PYTHONDIR with the root of your Python installation
with open(r'C:\Program Files\Python36\Lib\site-
packages\pip\_vendor\distlib\w64.exe', 'rb') as f:
launcher = f.read()
with open(r'C:\Users\fooba\Downloads\deluged.exe', 'rb') as f:
d = f.read()
with open(r'C:\Users\fooba\Downloads\deluged.exe', 'wb') as f:
f.write(launcher)
f.write(d[d.rindex(b'#!'):])
}}}
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3201#comment:36>
Comment (by tobbez):
Replace the last line (`f.write(d[d.rindex(b'#!'):])`) with:
`f.write(d[d.rindex(b'#!'):].replace(b'python.exe', b'pythonw.exe'))`
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3201#comment:37>
Comment (by mhertz):
Sorry for continuing to repeat myself, but i'm really gratefull of all
your help mate, works beatifully! :) Thank you again.
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3201#comment:38>
Comment (by mhertz):
@Paralel, I've built latest libtorrent for use with my deluge2 windows 7z-
sfx-installer posted on deluge-forum, and including https-tracker-
announcing support. It was pretty daunting and timeconsuming getting it to
work, as never did it before and no windows user, but seemingly works
fine.
Especially getting openssl support to work was hardest - there is a bug I
believe with defaulting to x32, even though all components used are x64
and setup as x64, but still, and finally when using x32 version of openssl
then it worked, because of said bug I believe. I believe Cas did things
correctly, e.g. see:
https://ci.appveyor.com/project/cas--/libtorrent/builds/20499246 but just
stumbled on same bug, and needing 32bit openssl, as with many runs of
x64-openssl, and several different versions i.e tried 1.1.1, 1.1 and 1.0.2
and it didn't work, even though libtorrent is fixed to work with new names
of dll's of openssl 1.1+. Ohh, newest boost didn't work for me, and I had
go one version down. Here is bug I believe: https://github.com/conan-
community/community/issues/164
http://s000.tinyupload.com/index.php?file_id=62546730573497261812
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3201#comment:39>
Comment (by Paralel):
Thank you so much! Exactly what I was looking for. I really appreciate it.
If you ran into that kind of trouble, I can only imagine how awful it
would have been for me to attempt it. Your work on the installer is also
greatly appreciated.
Replying to [comment:39 mhertz]:
> @Paralel, I've built latest libtorrent for use with my deluge2 windows
7z-sfx-installer posted on deluge-forum, and including https-tracker-
announcing support. It was pretty daunting and timeconsuming getting it to
work, as never did it before and no windows user, but seemingly works
fine.
>
> Especially getting openssl support to work was hardest - there is a bug
I believe with defaulting to x32, even though all components used are x64
and setup as x64, but still, and finally when using x32 version of openssl
then it worked, because of said bug I believe. I believe Cas did things
correctly, e.g. see:
https://ci.appveyor.com/project/cas--/libtorrent/builds/20499246 but just
stumbled on same bug, and needing 32bit openssl, as with many runs of
x64-openssl, and several different versions i.e tried 1.1.1, 1.1 and 1.0.2
and it didn't work, even though libtorrent is fixed to work with new names
of dll's of openssl 1.1+. Ohh, newest boost didn't work for me, and I had
go one version down. Here is bug I believe: https://github.com/conan-
community/community/issues/164
>
> http://s000.tinyupload.com/index.php?file_id=62546730573497261812
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3201#comment:40>
Comment (by mhertz):
Thanks for the kind words and your welcome mate! :)
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3201#comment:41>
Comment (by mhertz):
@Paralel and others, I much apologise, but I found that I must have made a
mistake previously, because I now managed to build libtorrent with x64
openssl libs, so I must have messed the added openssl build-options up I
added to the config-file somehow. Still the command-prompt initially shows
x32 mode as before and the boost build dir named bin.nt86 and not
bin.nt86_64, though 64bit address mode is specified on b2 command-line I
can see, but I was wrong in my previous assumption that x64 openssl libs
couldn't be picked up obviously.
The old libtorrent.pyd I posted works fine, and I tested specifically with
https trackers which openssl relates to and makes supported, and that
worked fine in previous version, but it just seemed more correct to use
x64 openssl libs nonetheless, so here is the updated build, and I
apologise again:
http://s000.tinyupload.com/index.php?file_id=01545958734472286363
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3201#comment:42>
Comment (by mhertz):
I'm sorry, there need to be 3 files added to same location as
libtorrent.pyd which I previously posted zipped link too, which I didn't
noticed before as already had them in my search-path.
Here's a zip with libtorrent.pyd and the three other needed deps, to unzip
and overwrite in e.g. if using my installer: '%programfiles%\Deluge2\Lib
\site-packages', and if using Cas's manual-install-instructions then the
same path except exchange 'Deluge2' folder with 'Python36', and if you
haven't installed python for all users, then instead of '%programfiles%,
then '%userprofile%\AppData\Local\Programs\Python\Python36', or something
along those lines.
Sorry for inconvenience and oversight again, and I will not spam this
ticket more if finding other issues, and so if using this, then please
instead check my thread on deluge-forum for more updates if other issues
should occure.
http://s000.tinyupload.com/index.php?file_id=03756169036650380658
https://forum.deluge-torrent.org/viewtopic.php?f=12&t=55463
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3201#comment:43>
Comment (by mhertz):
Since Cas's install instructions in this thread results in not being able
to announce to https trackers, then i'm trying to build libtorrent v1.1.13
qith openssl, but even without openssl, then it doesn't work right in
deluge2 for me, even though I can import it fine in a python ierminal
still outside of deluge2. I can build latest libtorrent v1.2.2 and run in
deluge2 fine, but just not v1.1.13, and don't get it.
The strange thing also, is that often then right after building it, then
when adding it to deluge2 and firering it up, then deluge2 start fine with
it, but then if disconnecting from daemon and closing deluge2 and starting
it again, then it never works regardless of how many times trying. Is
shows an error 10061 of connection actively refused by destination
computer, and loading it into dependency walker and profiling
it(deluged.exe), shows this error:
{{{
Second chance exception 0xE06D7363 (Microsoft C++ Exception) occurred in
"KERNELBASE.DLL" at address 0x00007FFB59ED50D8.
}}}
In the debug-log of deluge2 it states:
{{{
00:59:07 [DEBUG ][deluge.ui.client :302 ]
sslproxy.disconnect()
00:59:07 [DEBUG ][deluge.ui.gtk3.connectionmanager :319 ] Failed to
connect: Connection was refused by other side: 10061: Der kunne ikke
oprettes forbindelse, fordi destinationscomputeren aktivt nægtede det..
00:59:07 [INFO ][deluge.ui.gtk3.connectionmanager :335 ] Retrying
connection.. Retries left: 1
00:59:07 [DEBUG ][deluge.ui.gtk3.connectionmanager :288 ] Attempting to
connect to daemon...
00:59:07 [DEBUG ][deluge.ui.client :286 ]
sslproxy.connect()
00:59:07 [DEBUG ][deluge.ui.client :212 ] Connecting to
daemon at "127.0.0.1:58846"...
00:59:08 [DEBUG ][deluge.ui.client :219 ] Connection to
daemon at "127.0.0.1:58846" failed: Connection was refused by other side:
10061: Der kunne ikke oprettes forbindelse, fordi destinationscomputeren
aktivt nægtede det..
00:59:08 [DEBUG ][deluge.ui.client :596 ]
on_connect_fail: [Failure instance: Traceback (failure with no frames):
<class 'twisted.internet.error.ConnectionRefusedError'>: Connection was
refused by other side: 10061: Der kunne ikke oprettes forbindelse, fordi
destinationscomputeren aktivt nægtede det..
]
00:59:08 [DEBUG ][deluge.ui.client :302 ]
sslproxy.disconnect()
00:59:08 [DEBUG ][deluge.ui.gtk3.connectionmanager :319 ] Failed to
connect: Connection was refused by other side: 10061: Der kunne ikke
oprettes forbindelse, fordi destinationscomputeren aktivt nægtede det..
}}}
(The danish part means that there couldn't be made a connection because
destination computer actively refused it)
I have tried 5 different boost versions, where most give linking errors,
which either is online reported to be unresolved or fixed by changing
boost version. I know using boost over v1.66 needs a patch added to
jamfile to support python3, but I do add that also, which makes it run,
but fails later with linking errors. I usually stick to v1.66 because was
reported by a libtorrent dev to be recommended as didn't need patches, and
using that, makes it be imported every time in a terminal, but just not in
deluge2, except often right after the building. I always include runtime
files needed, and also used b2 option of static runtime linking without
any change.
I use python v3.68, and msvc build tools latest version(14.23 = 2019), but
have tried also v14.16 = 2017), and change setup.py to reflect the proper
msvc version, which is added to b2 command-line then, and address-model=64
or whatever it is called I also use, and again, I build libtorrent v1.2.2
with openssl fine, and doesn't have this issue and always connects, but it
does however still show a connection error or two of the one posted above,
but always connects fine anyway, as 5 or 6 of those is supported before
failing I can see.
Thanks alot in advance, as this is driving me freakin' crazy soon, as have
run 100 test of this now I'd guess.
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3201#comment:44>
Comment (by mhertz):
Just wanted to add if others should be wondering, or finding this from a
google search, that I overcome the above issue by changing to
msvc-14.00(vc build tools 2015), instead of 2017 or 2019.
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3201#comment:45>
Comment (by Doadin):
Has anyone had an success getting pyinstaller to work?
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3201#comment:46>
Comment (by mhertz):
Sorry no, but just wanted to say thanks alot for your scripts, great stuff
indeed, which I'll be sure to link to on the forum, whenever people ask
for deluge2 on windows. I was looking through Cas's github to see how he
build gtk3 for deluge(gvsbuild) as was thinking about making a new and up
to date with recent fixes gtk3, to include in my "installer", and also
possibly with py3.8 as I wanted to upgrade to that anyways and then need
pygobject wheel for py3.8 which isn't available online anywhere, and when
trying building pygobject alone, with py3.8, then it errors out with a
missing Lib linking error, on several different msvc build tools versions.
Sorry for blabbing on here, and just wanted to say that your efforts, past
and present are greatly appreciated. (I was also looking into possibly
using, if figuring out how such works, your updated bbfreeze, but am a
total beginner in stuff like this unfortunately :) )
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3201#comment:47>
Comment (by Doadin):
when I tried pyinstaller I got a spec file and it got all the
dependencies(or so it looks like) however it said it couldn't find
distribution Deluge. So I must not be giving it the right entry point or
something. However the hooks they have all ready established seem to pick
up everything just fine. And I have been using deluge 2 on windows just
fine so I think its really close to being able to get a windows release
going just needs a little work.
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3201#comment:48>
Comment (by Artemciy):
> With the move to a GTK3 UI we need a way to easily create the Windows
package.
https://github.com/microsoft/vcpkg has packages for both the Python 3 and
GTK 3. I wonder if this can be leveraged somehow. Just my two cents.
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3201#comment:49>
Comment (by Doadin):
I have now added a spec file to my gihtub repository lined above for
building from source. With this spec file its possible to freeze deluge
using pyinstaller. The resulting dist freezes shortly after the main
window loads. Only errors im seeing are:
1. Failed to load dynlib/dll 'libintl-8.dll'. (Which I beleieve is failing
then loading intl.dll which does exist in the dist)
2. Failed to load shared library 'libcairo-gobject.so.2' referenced by the
typelib: 'libcairo-gobject.so.2': The specified module could not be found.
cairo.dll and cairo-gobject.dll both exist in the dist so not sure why its
doing this unless we need to add a find like with libintl?
https://github.com/deluge-
torrent/deluge/blob/632089940cb2a9ebdc66b1f443ab8905daee074d/deluge/i18n/util.py#L121
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3201#comment:50>
Comment (by Paralel):
Just wanted to mention, the gvsbuild tarball, mentioned in the first step
of comment 9 of this ticket:
https://dev.deluge-torrent.org/ticket/3201#comment:9
Has expired and can no longer be downloaded. As such, anyone trying to
build using that set of instructions will be stymied starting at step 1.
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3201#comment:51>
Comment (by mhertz):
Thanks Paralel for the notice.
For all, until Cas has time to upload a new tarball, then you can either
build it yourself, using doadin's repo he presented a couple posts above,
with batchfiles for building from source: deluge, libtorrent, gvsbuild and
openssl:
https://github.com/doadin/DelugeBuildFromSource
Or, alternatively i've up'ed the tarball in question, though link get's
disabled after 30 days without downloads, so contact me if link dies later
on, and i'll re'up it:
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3201#comment:52>
Comment (by Doadin):
I now have a build that doesn't freeze I just need to package the
core(deluged)/web(deluge-web) scripts. It is having a issue with loading
plugins and a few other things. Like:
{{{
TypeError: Gtk.Clipboard.get() takes exactly 1 argument (0 given)
}}}
any time i have a magnet link in clipboard the add torrent dialog freezes.
Other than that the base client seems to work fine from freeze/installer
now.
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3201#comment:53>
Comment (by Doadin):
I guess I've just been late to the party this whole time
https://github.com/deluge-
torrent/deluge/commit/535b13b5f1b7b7d3d104da14c4cb2a4a9502bfe0 I still
don't know how to fix plugins.
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3201#comment:54>
Comment (by ish4d0w):
Hi,
I cannot believe that almost a year later, Deluge 2 for Windows is still
not available.
Is this project completely abandoned? Anyway, I'm trying to compile it
myself but...
Compiling with the latest tools (Visual Studio Enterprise 2019, Python
3.8+ x64 latest) FAILS!
Is this a legacy application that requires Python 3.6?
Can somebody please reup all the dependencies to some credible file
hosting site as ALL the links are down?
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3201#comment:56>
Comment (by mhertz):
Lack of volunteered manpower obviously means less releases/work in these
types of projects, especially on windows, where there's even less
manpower, and when issues additionally puts a hold on things. Releases
don't simply come flying through the thin air magically. Very first post
asked for help from community, which came, but not nearly enough. However,
I'm also surpriced not more volunteered help for such a popular project
has occurred, but that's just the sad reality.
If wanna see if abandoned project then check git commit log of development
branch. It's not abandoned, just pretty slow at times, but just recently
picked up again.
If you're talking about building libtorrent python bindings, then I can
confirm it works with msvc-2019 toolset and python 3.8.2. I personally
have best results with boost 1.70 for libtorrent 1.2.x, and 1.66 with
1.1.x.
Im not at my computer now, but tomorrow I'll upload pygobject and pycairo
latest wheels for py38 and in some other py versions, which I believe I
still have, and an updated gvsbuild gtk3 archive of latest gtk3.24.20.
Pycairo is already at the gohlke wheels site, but not pygobject
unfortunetly, which is harder to find online and need build your own, but
as said I'll post them tomorrow.
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3201#comment:57>
Comment (by Paralel):
Ish4d0w, try checking the forum before complaining on the tickets here.
MHertz and the other Dev's have done plenty of work. MHertz has
essentially taken the herculean task of creating a functional windows
installer solely on his shoulders since Sept. 2019 and subsequently
produced an incredible installer. Literally all the major issues have been
solved, even most of the minor issues have been solved. As of the last few
months all of the dependent packages are completely up to date. Honestly,
MHertz installer should just be designated the official Windows installer.
There is really no good reason not to at this point.
So, since we have what is essentially a complete, fully functional up-to-
date installer, you shouldn't really be complaining.
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3201#comment:59>
Comment (by mhertz):
Paralel, I dropped my jaw reading your post there! :) Thanks alot for the
kind words my friend, really appreciate that and you're way to kind there,
but did make my day nonetheless! Thank you! :)
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3201#comment:60>
Comment (by ish4d0w):
'''mhertz - Excellent! Thank you very much for your answer!'''''''''
Paralel: well... Yes I should have checked it, but since the official
webpage '''denies''' the existence of a Windows installer and directs to
this ticket where the last post was months old without an installer link -
here I am.
I did not know that there is an installer. I didn't know it because the
most likely place where I could find it simply says there isn't one and
that I have to build it from packages myself so that's what I was
attempting to do.
It's not the fact whether this installer official or not (it should be
designated official though), it's rather the fact that the website needs
updating... the very least that the maintainer of the website should do is
to erase the sentence seen below and/or state that there are 3rd-party
installers available".
At the moment it goes like this in case you haven't seen this, Paralel:
"Deluge 2.0 packages are not yet available, please see [docs]
Unfortunately due to move to GTK3 and Python 3 there is no installer
package currently available for Windows. Intrepid users can install Deluge
from separate packages as detailed in issue #3201. [this ticket]"
I understand if the maintainer is busy. But in case he/she is that busy
that they cannot update it in like 8 months then perhaps somebody else
should be doing that.
I'm sorry for not discovering the installer, I fell by the false
information found on the home page.
I really appreciate the fact that MHertz and other Dev's took the time to
finish the job - thank you to them and I'm definitely not complaining
about/to them. I'm complaining about the maintainer of the webpage, that's
it.
Thank you once again MHertz! Both for the installer and for the provided
packages. Excellent job.
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3201#comment:61>
Comment (by Doadin):
I have while questionably very poorly tried to help with the windows side
of things though I will also admit my python skills are very much lacking,
hence unable to contribute to the limiting factor in getting a official
installer. That being said and also said not trying to down play MHertz's
efforts. Without knowing any details of why im sure theres probabbly a
list of reasons why the, I guess one would call it a "portal python
install", method MHertz has used, of distributing python apps is not the
way to go and things like pyexe pyinstaller bbfreze etc etc have come to
be. One reason I do know is the install being ~20% larger then needed.(As
compaired myself with my build which is closer to official installer(only
freezer changed rest updated) and the unofficial installer)
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3201#comment:62>
Comment (by Paralel):
Ish4d0w, in that case, I owe you an apology, I didn't realize the main
page was quite that out of date. As such, I apologize. I shouldn't expect
people to just find things here when they aren't directed to such.
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3201#comment:63>
Comment (by mhertz):
ish4d0w, thanks mate, appreciate that! :)
Doadin, "portal python install" is a very acurate description indeed :)
Although a freezed install is the same I would say. I got bored a reducing
the size after the first several 100mb's of trial and error(though mostly
gtk3 stuff), so could be reduced further. After the change to py38, then
the portable install should be isolated from outside pretty good too.
However, I have stated several times that I don't think that the
unofficial installer should be official in any way, as not done in
ordinary professional fashion like Doadin stated, and has always been ment
as simply something to try if wanted, in mean time, that's all, and never
anything more. I hope it's clear that when I say thank you and that a post
makes me happy, then it's because I am gratefull for the appreciation and
nice words and not because I agree in making it official, quite the
opposite actually, but I didn't see any reason to keep reiterating it,
after the first several times, though honestly does makes me happy to
hear, to be totally honest, but still not wise. If nothing else, then Cas
and other devs shouldn't be getting bug-reports of possibly something i've
myself done to screw something up, or whatever I have added or not added
from other people, and as said, not a "real" installer, but a glorified
manual portable source install, but just thought better than nothing, in
the waiting time, which im sure we can all agree upon. Well, of-course
manually installing from source yourself would be better, but I mean for
people not able to do that, and e.g. there linux seedbox got updated to
2.0.x in meantime. Also, my efforts has for the vast majority been to
include other peoples talented work into the unofficial installer, or
googling stuff and taking bits and pieces, again from others, so please
don't think that I have done something special here, and the ones who ows
the real thanks is Cas, Doadin and co :)
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3201#comment:64>
Comment (by jools772):
About python >= 3.8 and deluge:
You need deluge 2.04 to fix an issue with an added argument to the logger
module, and you also need to upgrade twisted to the latest version, above
20 I think, to have the same fix in twisted.
I had to manually force the upgrade to twisted.
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3201#comment:65>
Comment (by corhsin):
The software was installed on a Windows system months ago. A question is:
how can MAGNET links be successfully associated? Any advice is
appreciated. TIA
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3201#comment:67>
Comment (by jools772):
Don't hijack the topic, open own issue.
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3201#comment:68>
Comment (by corhsin):
Allow me to rephrase. The 'Associate Magnet Links" button from the
installation these instructions created does not function correctly. If
someone had a registry file that will be implemented into the installer
this thread is working on it would be appreciated.
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3201#comment:69>
Comment (by mhertz):
The magnet assoc button in deluge2 GTKUI code, looks like don't set
anything if already having HKCR/magnet set, so if having that, e.g pointed
to something uninstalled, then delete HKCR/magnet e.g with
regedit/reg.exe, press button in GTKUI and possibly restart computer, or
atleast restart browser.
If continue have issues,then different solutions in this thread here:
https://forum.deluge-torrent.org/viewtopic.php?f=12&t=55037
I agree off-topic, but still much talk done on various faults found during
manual source install, so hope I'm not disturbing too much here, with this
posting :)
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3201#comment:70>
* cc: rick3162@… (added)
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3201#comment:71>
Comment (by mhertz):
You only need one each of pycairo and pygobject, and in your python
version installed, so omit the two redundant ones(line 1 and 3 above), but
however shouldn't matter in your example though, as the correct version
would be installed and wrong ones erroring out, like in your report.
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3201#comment:73>
Comment (by corhsin):
Non-programmer here, is dropping in newer libtorrents an option for
existing installations? Can I take 1.2.6 from the zip and put it in the
appropriate folder? Does anyone have a prebuilt Windows build with the
latest libtorrent, or some updated instructions (that aren't across 70
comments)? TIA
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3201#comment:74>
Comment (by Nekotan):
Replying to [comment:74 corhsin]:
> Are non-programmers able to drop in newer libtorrents an option for
existing installations - can someone take 1.2.6 from the zip and put it in
the appropriate folder? Does anyone have a prebuilt Windows build with
the latest libtorrent? Or, is someone willing to provide a condensed set
of some updated compile instructions (that aren't across 70 comments)?
TIA
It's mostly patience and understanding the use of a compiler, if you run
into troubles, you'll probably find a patch somewhere to solve the issue.
you need the corresponding msvc compiler with python version and compile
the latest openssl since libtorrent needs that.
Also the libtorrent version has to be supported by Deluge
For safety reasons I also compiled an openssl for Deluge, but that version
needs to be supported by Deluge
I have a good guide on the forum you can adjust with this knowledge :)
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3201#comment:75>
Comment (by Nekotan):
Replying to [ticket:3201 Cas]:
> With the move to a GTK3 UI we need a way to easily create the Windows
package.
>
> I am not sure what the best route is going to be but we need something
that can always get the latest versions of GTK3 as we had to use outdated
PyGTK versions as no other builds existed.
>
> It would be good to drop the usage of MSVC and go with msys2 but there
are hurdles to doing that with regards to Twisted and pywin32 (see #3181).
These are the steps for another GTK3 project building with msys2:
>
The GVSbuild is better IMHO
Cygwin and Mingw change too much
so its best to use a stable compiler and a stable gtk version
Which can be edited when problems arise
> https://www.gramps-
project.org/wiki/index.php/Gramps_for_Windows_with_MSYS2
>
> Alternatively we continue with MSVC and roll our own GTK3 builds:
>
> https://github.com/wingtk/gvsbuild
>
> We will also need to move from bbfreeze to most likely pyinstaller but
that is further down the road: [https://docs.python-
guide.org/shipping/freezing/ Freezing comparison ]
>
> Help or suggestions with this would be appreciated as primary
development is on Ubuntu.
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3201#comment:76>
Comment (by corhsin):
There is a large project Windows Subsystem for Linux WSL(2) for Win10.
People are running Ubuntu 20 and other applications without difficulty.
It might be less work than the lack of current options. Anyone familiar
with it?
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3201#comment:77>
Comment (by petersasi):
Hi Corhsin,
Look at this topic: https://forum.deluge-
torrent.org/viewtopic.php?f=12&t=55463
(Unofficial) Windows installers are availalable here:
https://drive.google.com/drive/folders/1bCwij_GEy8nhqR6EynXYY_Yl7XuWYpVT
I have built them using MHerz's scripts (improved), with:
- latest deluge 2.0.4dev 38 (2.0.3 also available)
- latest libtorrent 1.2.7 (1.1.x and 1.2.3 also available, selectable
during install)
- latest libboost 1.73.0
- latest openSSL 1.1.1g
- latest Python 3.8.3
- almost latest GTK 3.24.20
- several GTK themes (normal and dark) to choose from
- portable install selectable
So no need to manually drop libtorrent in place or read these 70 comments
/ 50+ pages of the above topic :)
Replying to [comment:74 corhsin]:
> Are non-programmers able to drop in newer libtorrents an option for
existing installations - can someone take 1.2.6 from the zip and put it in
the appropriate folder? Does anyone have a prebuilt Windows build with
the latest libtorrent? Or, is someone willing to provide a condensed set
of some updated compile instructions (that aren't across 70 comments)?
TIA
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3201#comment:78>
Comment (by petersasi):
Yes, we (MHerz & I) are already building our own GTK, maybe I should put
our set of scripts on github?
Replying to [comment:76 Nekotan]:
> Replying to [ticket:3201 Cas]:
> > With the move to a GTK3 UI we need a way to easily create the Windows
package.
> >
> > I am not sure what the best route is going to be but we need something
that can always get the latest versions of GTK3 as we had to use outdated
PyGTK versions as no other builds existed.
> >
> > It would be good to drop the usage of MSVC and go with msys2 but there
are hurdles to doing that with regards to Twisted and pywin32 (see #3181).
These are the steps for another GTK3 project building with msys2:
> >
>
> The GVSbuild is better IMHO
> Cygwin and Mingw change too much
> so its best to use a stable compiler and a stable gtk version
> Which can be edited when problems arise
>
> > https://www.gramps-
project.org/wiki/index.php/Gramps_for_Windows_with_MSYS2
> >
> > Alternatively we continue with MSVC and roll our own GTK3 builds:
> >
> > https://github.com/wingtk/gvsbuild
> >
> > We will also need to move from bbfreeze to most likely pyinstaller but
that is further down the road: [https://docs.python-
guide.org/shipping/freezing/ Freezing comparison ]
> >
> > Help or suggestions with this would be appreciated as primary
development is on Ubuntu.
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3201#comment:79>
Comment (by Nekotan):
That's great progress :)
I didn't follow how far you guys have gotten :)
I'm glad that there is some movement in this
Now I hope the deluge devs chime in on approving this.
IMHO I think this can work as an official build in the future.
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3201#comment:80>
Comment (by Paralel):
Replying to [comment:78 petersasi]:
> Hi Corhsin,
>
> Look at this topic: https://forum.deluge-
torrent.org/viewtopic.php?f=12&t=55463
> (Unofficial) Windows installers are availalable here:
https://drive.google.com/drive/folders/1bCwij_GEy8nhqR6EynXYY_Yl7XuWYpVT
[[BR]]
Excellent contribution! I look forward to how things progress from here.
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3201#comment:81>
Comment (by corhsin):
Awesome job!
Replying to [comment:78 petersasi]:
> Hi Corhsin,
>
> Look at this topic: https://forum.deluge-
torrent.org/viewtopic.php?f=12&t=55463
> (Unofficial) Windows installers are availalable here:
https://drive.google.com/drive/folders/1bCwij_GEy8nhqR6EynXYY_Yl7XuWYpVT
>
> I have built them using MHerz's scripts (improved), with:
> - latest deluge 2.0.4dev 38 (2.0.3 also available)
> - latest libtorrent 1.2.7 (1.1.x and 1.2.3 also available, selectable
during install)
> - latest libboost 1.73.0
> - latest openSSL 1.1.1g
> - latest Python 3.8.3
> - almost latest GTK 3.24.20
> - several GTK themes (normal and dark) to choose from
> - portable install selectable
>
> So no need to manually drop libtorrent in place or read these 70
comments / 50+ pages of the above topic :)
>
> Replying to [comment:74 corhsin]:
> > Are non-programmers able to drop in newer libtorrents an option for
existing installations - can someone take 1.2.6 from the zip and put it in
the appropriate folder? Does anyone have a prebuilt Windows build with
the latest libtorrent? Or, is someone willing to provide a condensed set
of some updated compile instructions (that aren't across 70 comments)?
TIA
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3201#comment:82>
Comment (by tobbez):
Replying to [comment:79 petersasi]:
> Yes, we (MHerz & I) are already building our own GTK, maybe I should put
our set of scripts on github?
Please do publish your scripts to !GitHub.
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3201#comment:83>
* cc: peter.sasi@… (added)
Comment:
Major update to the unofficial Windows installer here:
https://drive.google.com/drive/folders/1bCwij_GEy8nhqR6EynXYY_Yl7XuWYpVT
Forum: https://forum.deluge-torrent.org/viewtopic.php?f=12&t=55463
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: .exe files; 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
MHerz:
- 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
deluge folder in case of portable installations, courtesy of MHerz.
6. Updated te GeoIP database and added the automated GeoIP database
update to the build system, courtesy of MHerz.
7. Fixed a torrentmanager.py patch in 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.
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3201#comment:84>
* cc: peter.sasi@… (removed)
Comment:
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3201#comment:85>
Comment (by petersasi):
Today the unofficial Windows installer got updated again:
1. A Fix form MHerz for his Portability enhancement.
2. Built the latest (3.24.21) GTK with wingtk/gvsbuild.
here:
https://drive.google.com/drive/folders/1bCwij_GEy8nhqR6EynXYY_Yl7XuWYpVT
Forum: https://forum.deluge-torrent.org/viewtopic.php?f=12&t=55463
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3201#comment:86>
Comment (by petersasi):
Hi, I have finally published the build scripts and artifacts with a brief
guide:
https://github.com/petersasi/deluge2-win-build
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3201#comment:88>
Comment (by mhertz):
Please forgive me for off-topic, but just wanted to add that I upped my
deluge2 build-scripts on my github around 5 months ago, and just didn't
announce it because wasen't ment to compete with petersasi's new
maintainership, and just ment for posting my fixes if needed, but as he's
busy at the moment, then I thought I might as well post a link, so if
interrested people can build deluge2 with latest python 3.9.x, deps and
installers, and works as of now atleast.
'''Again, note is not made in normal professional way, as still not
possible because issues, but is just something to mess with if wanted,
untill real official release emerges, using proper building techniques.
-Don't blame Cas or other of the devs for my possible mistakes! '''
I now use the embedded python zip distribution, scripts can be run from
any path/location, not needing admin rights, except initially
install_components.cmd raise UAC dialog for installing msvc. All
components extracted in build-dir instead of installed on system, except
msvc which needs installing, but is installed into build-dir and when
selecting uninstall_components.cmd, then it's uninstalled from there, so
not wiping your own msvc install if having such. Because of msvc you need
a few GB of space for this.
Note, I have extra deluge2 repo's for win7 and x86, which worked at one
time, but I haven't bothered updating them to python 3.9.x etc, so
shouldn't be tried, unless updating scripts yourself manually. Main repo
is win10 x64 only.
I hope petersasi returns again to take over maintainership, or if other
windows user would release installers on the forum, then would be
appreciated, as don't know how long i'm gonna mess with this here more, as
since said, not windows user myself.
Last, there's sometimes missing files reported or warnings, which can be
disregarded, as i'm pretty lazy and sometimes don't bother make checks, or
correct warnings if doesn't affect end-result anyways, so just cosmetics.
If build finishes with a built product, then it did work.
https://github.com/mhertz/deluge2
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3201#comment:89>
* status: new => closed
* resolution: => Fixed
* milestone: 2.1.1 => 2.1.0
Comment:
Finally released, thanks for all the help with this!
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3201#comment:92>