Deluge Portable

Specific support for Deluge on Microsoft Windows OS
Post Reply
Blackhole
New User
New User
Posts: 7
Joined: Tue Aug 07, 2018 6:05 am

Deluge Portable

Post by Blackhole »

Can deluge be used in portable mode by extracting the files from .exe installer? In qbittorrent's github, there is a guide on how to use qbittorrent in portable mode.
.
1.Place the qBittorrent binaries (qbittorrent.exe and qbittorrent.pdb) anywhere you want in your PC. You can extract them from the setup .exe file using 7-zip or similar (setup files are just fancy self-extracting archives).
2.Create a folder called profile in the same directory as the qbittorrent.exe and qbittorrent.pdb files.
3.Execute qbittorrent.exe. It will initialize the needed configuration files within the profile folder and use them during execution.
.
Key note
setup files are just fancy self-extracting archives
So wondering if deluge has something similar as well. If it does, a guide would be nice. Thank you. :)
mhertz
Moderator
Moderator
Posts: 2195
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: Deluge Portable

Post by mhertz »

Unfortunetly it doesn't.

Granted it's a NSIS installer like qbittorrent, meaning you can easilly extract it with 7-zip and run it from wherever, though however still reads/saves from/to %appdata%\deluge, as no native portable mode inplemented, in contrary to your qbittorrent example.

It can be easilly hacked into the code though, e.g. hackily by rewriting %appdata% location to current-folder if lazy(just for deluge, nothing else of-course) - but in the new official installers which are freezed with pyinstaller, then cannot really do that, and so need rebuild and freeze deluge additionally unfortunetly, which need added to such guide also then.

Maybe I could do that one of these days, I mean a portabkle zip, but no promises...

Edit: Actuallty I didn't think about you can actually workaround it by after having extracked installer with 7-zip, then just start deluge by pressing the address-field at top of the folder(ctrl+l) and enter e.g. 'deluge -c profile' and it will save/read from %cd%\profile each time - can also make a batch-file with that line and keep in that folder to just double-click to start deluge. No need for me to rebuild deluge then imho.

Edit2: Just to end, make a deluge.cmd file into extracted deluge folder with e.g.

Code: Select all

cmdow @ /hid
deluge -c profile
The first line hides the cmd-prompt window after a second or so, and can be gotten from a google search(download/extract and place cmdow.exe into deluge extracted folder).
Blackhole
New User
New User
Posts: 7
Joined: Tue Aug 07, 2018 6:05 am

Re: Deluge Portable

Post by Blackhole »

mhertz wrote: Sat Oct 15, 2022 6:24 pm Edit: Actuallty I didn't think about you can actually workaround it by after having extracked installer with 7-zip, then just start deluge by pressing the address-field at top of the folder(ctrl+l) and enter e.g. 'deluge -c profile' and it will save/read from %cd%\profile each time - can also make a batch-file with that line and keep in that folder to just double-click to start deluge. No need for me to rebuild deluge then imho.

Edit2: Just to end, make a deluge.cmd file into extracted deluge folder with e.g.

Code: Select all

cmdow @ /hid
deluge -c profile
The first line hides the cmd-prompt window after a second or so, and can be gotten from a google search(download/extract and place cmdow.exe into deluge extracted folder).
.
https://www.dropbox.com/s/zsfi0vm66a93q ... 3.mp4?dl=0
.
Please check the video and confirm if I have done the steps correctly. Thank you.
mhertz
Moderator
Moderator
Posts: 2195
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: Deluge Portable

Post by mhertz »

Pretty much yes, but you need cmdow.exe additionally in my example, but good you missed it because actually not needed I forgot, so just change your deluge.cmd to instead and you're good:

Code: Select all

@powershell -executionpolicy remotesigned -windowstyle hidden -command ""
"%~dp0\deluge.exe" -c "%~dp0\profile"
I fixed it up to work also if running it from cmd-prompt in another folder, or from a shortcut to the batch-file.

Double-click deluge.cmd to start deluge portable and your profile is in 'profile' folder which gets generated upon first launch, e.g if need include plugins manually etc.
Blackhole
New User
New User
Posts: 7
Joined: Tue Aug 07, 2018 6:05 am

Re: Deluge Portable

Post by Blackhole »

mhertz wrote: Mon Oct 17, 2022 5:40 pm Pretty much yes, but you need cmdow.exe additionally in my example, but good you missed it because actually not needed I forgot, so just change your deluge.cmd to instead and you're good:

Code: Select all

@powershell -executionpolicy remotesigned -windowstyle hidden -command ""
"%~dp0\deluge.exe" -c "%~dp0\profile"
I fixed it up to work also if running it from cmd-prompt in another folder, or from a shortcut to the batch-file.

Double-click deluge.cmd to start deluge portable and your profile is in 'profile' folder which gets generated upon first launch, e.g if need include plugins manually etc.
Sorry for the late reply, I kinda forgot about this thread. I did apply what you suggested and it worked. Now my question is, this will work with every new update, right? Like I just have to extract every new version's setup files over to the existing folder and this command file will work for every version, and all data, and configs will be stored in the local folder instead of C drive.
mhertz
Moderator
Moderator
Posts: 2195
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: Deluge Portable

Post by mhertz »

You got it mate :)
crimson
New User
New User
Posts: 2
Joined: Tue Aug 16, 2022 6:36 am

Re: Deluge Portable

Post by crimson »

So if I understand this

Code: Select all

-c 
is a deluge flag?
Couldn t u just add

Code: Select all

-c "profile"
in a shortcut to the exe instead?
or even

Code: Select all

-c "../profile"
to have the profile folder outside the deluge directory
User avatar
ambipro
Moderator
Moderator
Posts: 417
Joined: Thu May 19, 2022 3:33 am
Contact:

Re: Deluge Portable

Post by ambipro »

crimson wrote: Thu Mar 16, 2023 12:17 am So if I understand this

Code: Select all

-c 
is a deluge flag?
Couldn t u just add

Code: Select all

-c "profile"
in a shortcut to the exe instead?
or even

Code: Select all

-c "../profile"
to have the profile folder outside the deluge directory

You can use relative or definite path's (full path such as C:\profile) in the -c parameter, entirely up to you - as long as the path is valid.

Relative paths will be relative to the executable if no "Start In" path is defined in the shortcut otherwise, if I'm not mistaken.
crimson
New User
New User
Posts: 2
Joined: Tue Aug 16, 2022 6:36 am

Re: Deluge Portable

Post by crimson »

Yeah I get that my point was it would just be simpler!

Ok, so I was gonna ask if u d need to setup similarly for "deluged.exe" -the daemon itself but I see from some documentation that the "-c" is for deluge config as a whole https://dev.deluge-torrent.org/wiki/Use ... aultConfig

I was also going to mention that u d still need python for example which
but I see from some documentation that it as well as some other dependencies are all included. Apart from the c++ redistributable(which a lot of people might already have) https://dev.deluge-torrent.org/wiki/Installing/Windows

So, would this already not be considered portable? Or am I misunderstanding something? I imagine even for those dependencies at most some registry values are set so that deluge exclusively uses them (i.e. they re portable as well - so python s not actually installed in the system). Are any environment variables created even?

So, Is there something that s blocking a potential release of a portable versions? Ofcourse I understand if it s time, manpower, lazyness, maybe devs just dont wanna bother at this moment or something -it s your software- :D I m just asking so I know I ve not missed something for configuring deluge
mhertz
Moderator
Moderator
Posts: 2195
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: Deluge Portable

Post by mhertz »

Yes, extracting windows installer with something supporting NSIS, like 7-zip and run any of the exe's with the '-c' switch should be portable as far I understand.

In a fresh win10 install there used to be missing a single file, included with the msvc-redist, which can be added to the deluge extracted folder, msvcp140.dll, but that was before we had a freezed installer, so not sure if even need anything now, but if do, then probably it.

I don't think anything blocking it officially, other than motivation for it, by included people simply.
Post Reply