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

Specific support for Deluge on Microsoft Windows OS
mhertz
Compulsive Poster
Compulsive Poster
Posts: 865
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: [Unofficial] Deluge 2.0.x installer

Postby mhertz » Sun Aug 02, 2020 7:34 pm

Sorry, not petersasi, but just wanted to say quickly a few things.

Deluge sometimes show n/a in statusbar, both on windows and linux, though personally I haven't noticed no bad things from, and also happened for me on deluge1 on linux. I checked now that I got it once, in my own windows build just made, that the test-port button worked also, though is using gtk3.24.20, as didn't bothered running gtk3 update script, as has such a long building time to wait for.

I tested petersasi's latest installer, the stable with gtk3.24.21(and the other with gtk3.24.20), it did show IP usually and only a few times not, and this is the same with portable or not, and as said, happens on linux as well. However, the test-button seems defunct as you stated, and that is no-matter if showing n/a or not, or portable or not. Well, maybe it's not defunct and just the icons missing, but I just meant that I could reproduce your issue at least.

In my personal install, I replaced my data folder with petersasi's, and then the test-button gets bad like with petersasi's build, so it's something in gtk3 missing, or changed between revisions, as we both use "release-candidate" branches(unless petersasi changed that on his end), so can be commits in difference too.

If just moving my gtk3's share folder over into petersasi's build, then still shows the wrong icon initially(share holds icon theme), but after a few secs at least shows the correct checkmark symbol. If also moving over the lib folder, then everything works i.e. the loading symbol initially and the checkmark afterwards, so the culprit is either missing files there, or some changes done between our versions, but as files just has been cleaned up, then seems like could be that firstly, but didn't bother mess with file-compare and tests, sorry, after these tests here.

Note, I only tested this and responded, because I was affraid I had screwed up again with my portable fix, and hence my post here about this, as might as well post my findings.

Lastly, no not MHz :) , but just a concatenation of my first(Martin) and last name(just with a sometimes missed 't' ;) )

Edit: Might as well check if was because of newer GTK commit or not, to exclude so petersasi can concentrate on which missing file(s), so just fired off my gtk3 update script and will make new final edit when it finishes building latest gtk3 and I can test deluge with that.

Edit2: Gtk3 build-script just finished, and it worked fine with test-port button, so is a missing file issue.

Edit3: Don't have time to check more sorry, but at least a hint is that I narrowed it down to missing files under 'data\share\icons\adwaita'(which seems reasonable as is the icon theme), and from 'data\lib\gdk-pixbuf-2.0\2.10.0\loaders'. Annoying I ran out of time before finding the actual missing files, but i'm sure you can find it out on your own easilly regardless, by simple process of elimination like I did.

Edit4: Had some more time later. Missing: 'data\share\icons\Adwaita\16x16\emblems\emblem-ok-symbolic.symbolic.png' + whatevers missing under other folder mentioned in previous edit(lib\gtk-pixbuf*).

Edit5: Sorry for the many edits, but last file missing is: 'data\lib\gdk-pixbuf-2.0\2.10.0\loaders\pixbufloader-gdip-gif.dll'. So in short, two missing files in all, repeated here again:

Code: Select all

INSTALL-DIR\data\share\icons\Adwaita\16x16\emblems\emblem-ok-symbolic.symbolic.png
INSTALL-DIR\data\lib\gdk-pixbuf-2.0\2.10.0\loaders\pixbufloader-gdip-gif.dll

@petersasi, if you don't have them anymore, then I can upload them to you, just give me a shout. Hmm, come to think of it, might as well do regardless as e.g. some maybe want to add those files to there own installs if they have just updated, untill petersasi makes new release: https://gofile.io/d/AdNLpN , but as JGAS2 said, then it's not a big issue anyway and you just need to test port-forwarding through other means if need be. Again, this doesn't fix the n/a shown sometimes in statusbar, but that's an unrelated issue, and not a windows installer issue, and from my encounters with it, seemed harmless as never affected me personally in any percievable way, or not that I noticed atleast, on my linux system. I'll maybe submit bug-ticket of it later on though, to deluge bug-tracker. (Done: https://dev.deluge-torrent.org/ticket/3420#ticket)

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

Re: [Unofficial] Deluge 2.0.x installer

Postby petersasi » Mon Aug 03, 2020 3:31 am

Hi,
1. Thanks @JGAS2 for confirming the portable fix now works!

2. Also for reporting the missing files Test Connections and @MHerz for debugging the files!
I have all the files just remove a list (FilesUnusedList.txt on github) that was found never opened - probably because I have never tested the connection while profiling, sorry.
Now I took these files out of the removal list so they should be part of the installers.

3.Just one note for MHerz: you have only indocated the .dll out of:

Code: Select all

INSTALL-DIR\data\lib\gdk-pixbuf-2.0\2.10.0\loaders\pixbufloader-gdip-gif.dll
INSTALL-DIR\data\lib\gdk-pixbuf-2.0\2.10.0\loaders\pixbufloader-gdip-gif.dll

To be on the safe side I have also excluded the .lib version, are those used at all by the installed Deluge / Python underneath or the .dlls only? (there are many other .libs as well).

4. Independently I did look into all the __pycache__ folders as well that we ship. This would not be strictly necessary, only that python would need to re-generate the byte code on the first run if we did not, so I chose not to remove those. What is your view on this?

JGAS2
Member
Member
Posts: 10
Joined: Thu Jul 16, 2020 1:49 pm

Re: [Unofficial] Deluge 2.0.x installer

Postby JGAS2 » Mon Aug 03, 2020 7:27 am

The issue is 100% gone with the latest release. The Test active port works (both animation & checkmark when OK) and status bar now shows IP. Also
Thin Client seems a to have a faster repsonse in the last releases.
Thanks to both, great job!!!
Last edited by JGAS2 on Mon Aug 03, 2020 7:36 am, edited 1 time in total.

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

Re: [Unofficial] Deluge 2.0.x installer

Postby mhertz » Mon Aug 03, 2020 7:30 am

I think the lib's are already statically linked to the dll's, so I guess they could all be removed, but I'm not fully sure as not very well versed in such either and just specifically tested it wasent needed in this specific case here atleast, so please dont just go by my word on this in general.

I did think about that pycache thing you stated, back when I messed with this project, but decided at the time to just leave it, like you, but you're right in that it could go if seeing fit. I tested back then, that I couldn't notice any percievable delay by running without pycache on that first initial run where it's generated if missing.

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

Re: [Unofficial] Deluge 2.0.x installer

Postby mhertz » Wed Aug 05, 2020 5:24 pm

@petersasi, don't know if you find this usefull or not, but just in case, then I was thinking that if needing build several components, then annoying to need go in and out of dirs and also needing always right-click/run-as-admin instead of just double-clicking, so I quickly whipped up another batchfile with some help from google, to have in 'C:\deluge2' root, named build-menu.cmd, which doesn't need rightclick/run-as-admin as will raise UAC prompt even when double-clicking it, and then prompts a build-menu with all 9 components to choose from, and to enter numbers with commas between for whatever wanted built and in which order, but single number alone too is supported:

Code: Select all

Which component(s) would you like to build?

1. openssl
2. libtorrent 1.1.x
3. libtorrent 1.2.3
4. libtorrent 1.2.x
5. gtk3
6. deluge-stable
7. deluge-dev
8. installer-stable
9. installer-dev

Enter number(s), separated by commas without space, and press return:

Probably would be best to remove any 'pause' command at end of each build-script, if using such, and possibly also from build-menu.cmd itself if not wanting it to pause at end and just wanting it to quit. Note, have checked initially all options with some 'echo's', but after replacing them with build-script calls, then I have only checked a couple of them, so there is chance for typo or other mistake, just a warning. Also didn't bother making checks for unsupported/to-many chars and such, so pretty bare-bones/simplistic as-is.

Last, if wanted, you could ditch the 7-Zip depencency, but would need change all instances of 7z.exe in build-scripts into instead the new path of 7za.exe, and add under install_components:

Code: Select all

curl -L https://github.com/uuksu/7z.NET/raw/master/7z.NET/7za.exe > WHEREEVER-SEEING-FIT

I know you have 7-Zip already, but was thinking about your github repo and other new users(I see you install 7-Zip already from there, which is fine to, and was just thinking to cut down on non-portable changes), and good job btw, really nice :) Was also thinking about that, with the build-menu.cmd script, to make less confusing, but dunno. Also, if you want to support other than newest win10 installs, you could replace curl lines with powershell lines, or download with powershell a curl.exe like the 7za.exe, but give me a shout for that later on, if interested/need-help.

Anyway, as said, not important, and was just thinking little out-loud. Add maybe at some later time, or ignore, your call of course :)

Also, damn the installers got small now, that's amazing, props for that :)
Last edited by mhertz on Thu Aug 06, 2020 10:02 am, edited 3 times in total.

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

Re: [Unofficial] Deluge 2.0.x installer

Postby mhertz » Wed Aug 05, 2020 8:52 pm

Crap, I just saw a report in the autoremoveplus plugin thread, by Bobby(reporter), that the plugin didn't work for him in your installer. I had some free time, so checked it, troubleshooted alittle, and found out the issue unfortunetly is the new loaders being used, which you recently added support for. Sorry for more headache coming your way, and from now on i'll keep my mouth shut, promise :) Anyway, humour aside, i'm sorry for the trouble with this, and I guess you'll need revert on your next release unfortunetly. I checked another plugin, to see if was all plugins failing, but that other plugin worked. I looked up the error shown in debug log, and the error was posted online by another python user(not deluge related) which stated he had that error when his python script was an exe file, but if running from just py script, then no issue(which seemingly indicates a loader issue), and he needed remove some code from the script to fix. Maybe it could be requested to the author to remove that code if possible to pinpoint down(in reported case online, it was just some legacy code not important, for something icon related it was stated), but i'm just affraid other plugins also might be affected, but dunno, have only tried one other(ltconfig), plus the default ones, which all worked fine however. Anyway, up to you what to do, as your project. Sorry again! :(

I can send you instructions for removing that portion(new loaders) again from scripts, but you can also just go little back and find the post again from me and just reverse the instructions I added to implement it initially. That is if you do decide reverting of-course, but probably would be wisest imho, but as said, not my call.

Strange there is such differences from one loader to the next, but the new one obviously is more sensitive in some regards, just don't get why/how that interferes later on, as a loader should just be used for, well, loading, the script, that's all, but i'm no expert on this however.

Sorry again!

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

Re: [Unofficial] Deluge 2.0.x installer

Postby petersasi » Thu Aug 06, 2020 6:43 pm

Hi mherz, thanks for the ideas.
- as for the build menu, I was thinking of some kind of aggregation although I wanted to check if a step is needed and build it if no build is available / there is a new version online.
- as for curl I can just use it from msys2 which we have to have anyways.
- as for 7zip, I don't understand the difference? Why is the other better than the official installer?
- I do plan to take a future look at the installer files, as I see a lot of files not found, I may end up moving files around into the locations e. g. GTK is looking for them at. Also take a look at what can be better compressed in the installed folder.
- finally, As for the Loaders vs. Plugins: I see more benefits for *all* users from the new integrated process Loaders. Thus I am unlikely to revert, especially that other plugins can load. Probably the plugin should be fixed. I may however take a look if there is any file not found. Ultimately the users of this plugin can just use any slightly older version from the archive folder in the meantime.

Bobby
Member
Member
Posts: 16
Joined: Wed Aug 05, 2020 7:37 pm

Re: [Unofficial] Deluge 2.0.x installer

Postby Bobby » Thu Aug 06, 2020 6:52 pm

I can confirm, that if we use the older version from the arhcive the plugins is working, both autoremoveplus and yarrs2 plugin. Just if anyone is having issiues like i did.

Btw petersasi and mhertz

Both of you are doing a huge job taking this on, i know there is not so much respons in the forum, but i know there is alot there is using this builds, and are deeply greatfull for the time and effort taking into this, thank you both alot

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

Re: [Unofficial] Deluge 2.0.x installer

Postby mhertz » Thu Aug 06, 2020 8:27 pm

@petersasi,

Thanks for your comments :) I'm looking into if possibly that loader issue can be fixed, but I doubt i'm able to :( I really don't get it, as the debug-log states unicodedecode error and missing encoding decleration for deluge.exe, whenever trying to enable autoremoveplus! Why the heck verify deluge.exe decoding suddenly for that! I could understand if was the plugin that should be verified. And not happening on other loader. Highly strange, I'm looking into if somehow tokenize.py can be patched slightly for this, as is that file which raises the encoding detection issue(e.g. adding an extra 'ignore' parameter on file open/decoding options, but don't know if will have bad effects on other things, or if even will fix it - the loader itself has a utf-8 decleration already, like previous loader, so baffled). I'm not promising anything, as pretty sure it's over my head. Maybe you can make better heads of it than me. Note, I checked also a fresh build from my own original build-scripts and they have exact same issue when using new loader, so it's not a missing file issue on your end, but solely the loader.

Code: Select all

11:38:30 [DEBUG   ][deluge.ui.gtk3.preferences        :65  ] on_plugin_toggled - AutoRemovePlus: False
11:38:30 [DEBUG   ][deluge.core.rpcserver             :65  ] Registering method: autoremoveplus.get_config
11:38:30 [DEBUG   ][deluge.core.rpcserver             :65  ] Registering method: autoremoveplus.get_ignore
11:38:30 [DEBUG   ][deluge.core.rpcserver             :65  ] Registering method: autoremoveplus.get_remove_rules
11:38:30 [DEBUG   ][deluge.core.rpcserver             :65  ] Registering method: autoremoveplus.set_config
11:38:30 [DEBUG   ][deluge.core.rpcserver             :65  ] Registering method: autoremoveplus.set_ignore
11:38:30 [DEBUG   ][deluge.plugins.pluginbase         :65  ] CorePlugin initialized..
11:38:30 [ERROR   ][deluge.pluginmanagerbase          :79  ] Failed to start plugin: AutoRemovePlus
Traceback: <class 'SyntaxError'>: invalid or missing encoding declaration for 'C:\\Users\\fooba\\Downloads\\Deluge\\deluge.exe'
C:\Users\fooba\Downloads\Deluge\lib\site-packages\twisted\internet\defer.py:151:maybeDeferred
C:\Users\fooba\Downloads\Deluge\lib\site-packages\deluge\plugins\init.py:27:enable
c:\users\fooba\downloads\deluge\data\deluge\plugins\autoremoveplus-2.0.0-py3.8.egg\autoremoveplus\core.py:105:enable
C:\Users\fooba\Downloads\Deluge\lib\site-packages\deluge\log.py:314:__getattribute__
C:\Users\fooba\Downloads\Deluge\lib\inspect.py:1514:stack
C:\Users\fooba\Downloads\Deluge\lib\inspect.py:1491:getouterframes
C:\Users\fooba\Downloads\Deluge\lib\inspect.py:1465:getframeinfo
C:\Users\fooba\Downloads\Deluge\lib\inspect.py:796:findsource
C:\Users\fooba\Downloads\Deluge\lib\linecache.py:47:getlines
C:\Users\fooba\Downloads\Deluge\lib\linecache.py:136:updatecache
C:\Users\fooba\Downloads\Deluge\lib\tokenize.py:394:open
C:\Users\fooba\Downloads\Deluge\lib\tokenize.py:371:detect_encoding
C:\Users\fooba\Downloads\Deluge\lib\tokenize.py:335:find_cookie

11:38:30 [DEBUG   ][deluge.pluginmanagerbase          :65  ] Error when disabling plugin AutoRemovePlus: Traceback (most recent call last):
  File "C:\Users\fooba\Downloads\Deluge\lib\site-packages\twisted\internet\defer.py", line 654, in _runCallbacks
    current.result = callback(current.result, *args, **kw)
  File "C:\Users\fooba\Downloads\Deluge\lib\site-packages\deluge\pluginmanagerbase.py", line 199, in on_started_error
    self.disable_plugin(plugin_name)
  File "C:\Users\fooba\Downloads\Deluge\lib\site-packages\deluge\core\pluginmanager.py", line 74, in disable_plugin
    d = deluge.pluginmanagerbase.PluginManagerBase.disable_plugin(self, name)
  File "C:\Users\fooba\Downloads\Deluge\lib\site-packages\deluge\pluginmanagerbase.py", line 228, in disable_plugin
    d = defer.maybeDeferred(self.plugins[name].disable)
--- <exception caught here> ---
  File "C:\Users\fooba\Downloads\Deluge\lib\site-packages\twisted\internet\defer.py", line 151, in maybeDeferred
    result = f(*args, **kw)
  File "C:\Users\fooba\Downloads\Deluge\lib\site-packages\deluge\plugins\init.py", line 30, in disable
    return self.plugin.disable()
  File "c:\users\fooba\downloads\deluge\data\deluge\plugins\autoremoveplus-2.0.0-py3.8.egg\autoremoveplus\core.py", line 129, in disable
    if self.looping_call.running:
builtins.AttributeError: 'Core' object has no attribute 'looping_call'

Lol, good point about curl.exe already being in msys, forgot about that completely.

Indeed you're right and there's no difference really, and is probably just my minimalistic mindset overtaking things. I just always prefer if having the choice, to add a single portable file for a job, instead of installing an extra app on system, with extra files, registry entries, context-menus and needing uninstall afterwards instead of simply deleting single file again, especially when only used/intended for a couple automated extractions in scripts and not for otherwise using the app in general, but I get your point and also doesn't matter in end and I respect your opinion of-course :) It is a file from the official installer(standalone 7z), but the one on the 7-Zip site provided additionally in zip and not 7z was older than the one I found on github and didn't need extra lines for unpacking and delete archive afterwards etc(powershell don't support extract from pipe by default). Anyway, not important as said and please just ignore.

@Bobby, thanks for the nice words mate, appreciate that, although i'm out of the loop now, but for sure I echo your sentiment of thanking petersasi for his comunity efforts, and deluge devs of-course! :)
Last edited by mhertz on Fri Aug 07, 2020 12:02 am, edited 2 times in total.

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

Re: [Unofficial] Deluge 2.0.x installer

Postby mhertz » Thu Aug 06, 2020 9:25 pm

Just wanted to add that the yarss2 issue, is a seperate one and not loader related. It works on deluge2 fresh build from my original build-scripts, and so must be a missing file(s) issue. Debug-log on petersasi's build states missing http.cookies module and when adding needed files for that states missing yarss2.lib.mime module. Sorry don't have time to find all missing files now, but if need be then I can do so probably sometime later tomorrow.

Edit: Missing files needed to make yarss2 be enabled:

Code: Select all

INSTALL-DIR\Lib\http\cookies.py
INSTALL-DIR\Lib\email\_header_value_parser.py
INSTALL-DIR\Lib\email\contentmanager.py
INSTALL-DIR\Lib\email\headerregistry.py
INSTALL-DIR\Lib\email\policy.py
INSTALL-DIR\Lib\email\mime\base.py
INSTALL-DIR\Lib\email\mime\multipart.py
INSTALL-DIR\Lib\email\mime\nonmultipart.py
INSTALL-DIR\Lib\email\mime\text.py


Return to “Windows OS”

Who is online

Users browsing this forum: No registered users and 11 guests