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

Specific support for Deluge on Microsoft Windows OS
petersasi
Leecher
Leecher
Posts: 80
Joined: Sun Nov 17, 2019 8:09 am

Re: [Unofficial] Deluge 2.0.x installer

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

Not sure I understand what you mean, but have you tried to use the right side scroll bar (that only appears when the cursor is over it)?

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

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

Re: [Unofficial] Deluge 2.0.x installer

Postby mhertz » Wed Jul 29, 2020 12:57 pm

Last thing...

It was previously in this thread reported that deluge couldn't be pinned to taskbar, well it could, but wouldn't start afterwards when clicked from it, plus wrong icon. Only thing possible was to drag deluge.exe onto taskbar, which would add wrong icon, plus would add another icon next to it whenever starting deluge. I promised I would post a solution if ever finding one, at the time.

I now stumbled on a solution actually. It's an alternative set of setuptools entry_point binary loaders which was developed for this very usecase i.e. better windows integration. Also, whenever running one of deluge's exe's, then when looking in taskmanager etc, then it shows e.g. deluge.exe, instead of before where it was showing python and under there deluge.exe. The reason for that is that these alternative loaders(one for GUI and one for cmd), doesn't fire off a new thread with python, but instead embeds python directly in the process.

I tested it quickly and it seemed to work without issue from quick testing. It uses little more space however, and also because I replaced the icons with resource hacker, to always let the deluge icon show when pinned, which also added little extra space, but all in all it should be under a MiB in total of added space.

Again of-cource fully up to petersasi if wanting to add this, but nonetheless here's directions just in case:

Extract loaders.zip into 'C:\deluge2', which will add new folder there named 'loaders' with the new loaders in. Then add following new line to your build-scripts in 'C:\deluge2\deluge-build', just before the line: '"%programfiles%\Deluge2\Scripts\pip.exe" install git+https://github.com/deluge-torrent/deluge{,@master}':

Code: Select all

copy /y ..\loaders\* "%programfiles%\Deluge2\Lib\site-packages\pip\_vendor\distlib"

That's it :)

Note, on first run of these exe's, windows will ask for firewall approval again, because of the changed loaders i.e. python was allowed before, but now windows sees them not as python anymore, but as the actual deluge binaries.

Again, only tested it quickly, but seemed to not cause any problems there.

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

Multiple big changes-PLEASE TEST!

Postby petersasi » Fri Jul 31, 2020 1:57 pm

Hi folks, took some fiddling but here is a release with several major improvements from MHerz as well as some of my own: PLEASE TEST and report back! :)
  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.

JGAS2
New User
New User
Posts: 6
Joined: Thu Jul 16, 2020 1:49 pm

Re: [Unofficial] Deluge 2.0.x installer

Postby JGAS2 » Fri Jul 31, 2020 3:26 pm

@petersasi
I've copyed the deluge folder from previous portable install (c:\users\user\appdata\roaming\deluge) to X:\portable install folder\Data\deluge" but only settings are kept, torrents are completely ignored. I'm new to Deluge so sorry if this is a stupid question but is there a way to get everything from previous 204rev38lib127 to this one?

TIA

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

Re: [Unofficial] Deluge 2.0.x installer

Postby mhertz » Fri Jul 31, 2020 6:23 pm

JGAS2 and petersasi, I am so sorry, I screwed up big time with that "fix" I see now, damn, i'm really sorry guys about that! :(

I tested it worked initially, but didn't tested with torrents other then having a torrent downloading under non-portable deluge profile folder under %appdata%\deluge, and then copying that folder over into the portable install and starting it, and then for me the download comes through there fine, but then when quiting portable deluge and starting portable deluge again, then no downloads,, and it has emptied torrents.state for some strange reason I cannot understand right now, and so i'm really sorry again to you guys, both to JGAS2 because if you haven't made a backup of your deluge profile(I hope you did, as always should, but regardless), then you will have to re-add the torrents saved under the deluge profile folder in the portable install under the states folder in the deluge-profile-folder there, as it has viped the torrents.state there, so need done manually. Though if you haven't started deluge again after the initial time you saw you had no torrents, then there will be a backup state file there, you can rename back, but take backup first of complete profile if haven't before, If starting deluge once more, then that is wiped however.

Same to petersasi for just making such a nice release and then having my screwup included now, sorry mate.

To everyone that uses the portable installer, then if having reinstalled, then don't copy your deluge profile folder into the portable install as won't work propperly, and to get the old behaviour back of only having it semi-portable, but atleast working, then edit the file under the portable-install's 'Lib\site-packages\path.pth' and delete this part from the file:

Code: Select all

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

@petersasi, again, i'm very sorry and please revert my changes for this when having time so your next release doesn't include it, by downloading this patch and running from a cmd-prompt the following line and delete patch again(you can also delete the portable folder afterwards as uselees afterwards):

Code: Select all

C:\msys64\usr\bin\patch -R C:\deluge2\nsis\packaging\win32\deluge-installer.nsi < nsis.patch

https://srv-file20.gofile.io/download/hhfHPC/nsis.patch

Sorry!

Edit: I know now what the issue is btw, and trying to fix. All the config-files and torrents.state etc, supports being called from a relative path, which is what I used in my fix, but deluge verifies torrents.state with the torrents saved under said state folder there, and that doesn't support relative paths for that since the debug log states it fails parsing those torrents, and when I change my fix to a true hardcoded path, then works again, so I have to change the python code to get real path from said relative path and use instead, so will remain portable.

Edit2: I fixed it now, so if you already have installed a portable install with newest installer of petersasi, then edit the file INSTALL-DIR\Lib\site-packages\path.pth:

Change this part:

Code: Select all

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

Into this here instead:

Code: Select all

; os.environ["APPDATA"] = os.path.abspath("../data")

@petersasi, if wanting at some later point add the fixed portable mode, then forget what I wrote before about the nsis.patch, and just instead delete the folder 'C:\deluge2\portable' and unzip portable.zip into 'C:\deluge2', which will add said 'portable' folder again, with fixed path.pth files. Sorry again for the inconvenience.(you don't have to rebuild deluge for this fix to be added, and fix will be added if just running C:\deluge2\deluge-build\deluge-both.cmd, at the next time you rebuild installers - you most likely know already, and just added for just in case)

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

Re: [Unofficial] Deluge 2.0.x installer

Postby mhertz » Sat Aug 01, 2020 7:19 am

Sorry, last part wrong in previous post, and I meant you only needed run C:\deluge2\installer-build\installer-both.cmd i.e. this is just an installer-fix and not deluge-fix. I mean for your next release sometime in feature of-course. Sorry for new post, but don't like to many edits, as I know they can be missed often from personal experience, as no new notifications shown from board-software.

Btw, impressed with the file-reduction, awesome work mate! :)

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

Re: [Unofficial] Deluge 2.0.x installer

Postby petersasi » Sat Aug 01, 2020 7:22 am

Okay, I'll release it later today, including the fresh of the build GTK 3.24.21 ;)

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

Re: [Unofficial] Deluge 2.0.x installer

Postby mhertz » Sat Aug 01, 2020 7:23 am

Thanks mate and sorry again. What I get for interferring out of place lol :)

Edit: I updated first post with a note about the portable-install makes/reads the 'deluge' profile-folder from under it's install-dir's 'data' subfolder. Also I saw there already was a general note about always needing having your deluge profile-folder backed up when using this installer(which I wasent 100%sure about was there or not), which makes me feel a slightly little bit better about my mistake before(though doesn't help petersasi however).

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

Re: [Unofficial] Deluge 2.0.x installer

Postby petersasi » Sat Aug 01, 2020 11:43 am

As it turns out we do have portable install users out there, thanks for the instant testing JGAS2!

Today I have built another release that delivers the latest GTK besides the fix from MHerz:
1. Fixed the portability move of the profile folder into the install dir.
2. Built GTK 3.24.21 into the new install.
Enjoy, please TEST and report and misbehaving! ;)

JGAS2
New User
New User
Posts: 6
Joined: Thu Jul 16, 2020 1:49 pm

Re: [Unofficial] Deluge 2.0.x installer

Postby JGAS2 » Sun Aug 02, 2020 5:23 pm

petersasi wrote:As it turns out we do have portable install users out there, thanks for the instant testing JGAS2!

Today I have built another release that delivers the latest GTK besides the fix from MHerz:
1. Fixed the portability move of the profile folder into the install dir.
2. Built GTK 3.24.21 into the new install.
Enjoy, please TEST and report and misbehaving! ;)


It works like a charm now. I installed, copyed "deluge" folder inside data and fired it up. All went perfectly. Huge thanks to both Petersasi and Mherz (MHz?). I get the new blue icons and all exexcutables and in Task Manager there is no more pythonw, nice touch!
There is only one silly quirck, "Test active port" seems to have stopped working. I have UPNP enabled in the router and indeed it opens and maps all ports Deluge requests to my PC's IP and https://canyouseeme.org/ also confirms the fixed Deluge port I'm using is reachable. I can also verify this by checking the reported number of active torrents by each trackers which matches the number shown by Deluge. Result stays the same with random port checked or unchecking and using a fixed one. Yet, for some unknown reason, I get a warning sign by the Test button and it doesn't even attempt it, status bar shows IP: n/a


Return to “Windows OS”

Who is online

Users browsing this forum: No registered users and 5 guests