Just wanted to say that portable deluge is exactly same as normal, with only changes done and added in the NSIS installer script, e.g. disables/disallows torrent/magnet-assocs(as reg-entries aren't portable), and same with the reg-entries normally set for adding deluge to the windows add/remove apps dialog, plus change default/suggested install-folder away from '%programfiles%\deluge' and into '%cd%\deluge', and disables startmenu/desktop shortcuts. I believe that's all, but know for sure the deluge files themselves are exact the same(as I needed make deluge portable in first place to make it be possible to be used in an installer with configurable install-locations, as originally had hard-coded paths to python(w).exe inside).
Remember some have issues in other apps with GTK_CSD=0, so test uncheck that if having it enabled. Btw, the reason I allowed that in also portable mode, is that I didn't set that through the registry, but from python code I added in path.pth when selecting that option, and only set for the running session, so still portable.https://gitlab.gnome.org/GNOME/gtk/-/issues/801
Also, seemingly it was reported that in other app(inkscape), using a theme without backdrops would help, and I don't know if I even included one without backdrops, but you can check yourself in the theme folder if any files with backdrop in name, png files usually I believe, is in used theme.https://gitlab.gnome.org/GNOME/gtk/-/issues/2302
There's also several older threads stating performance issues on windows in gtk3 vs gtk2 with and without GTK_CSD=0.
Most gtk devs are on *nix, so windows usually isn't prioritized very much, or atleast didn't use too.
Anyway, this issue, plus another issue with deluge crashing as soon as connecting to daemon, plus another where crashes as soon as adding a torrent, is some of the issues reported a few times throughout this thread with unfortunetly no answer to currently, but shouldn't to my knowledge be an installer issue, but of deluge and/or GTK3, and some of these reports where also on deluge1 too btw. I never posted bug-tickets to deluge-bugtracker upon getting these reports, as could never reproduce them, when testing connecting both from windows to windows and windows to linux and vice-versa etc and both on VMs and physical machines, so some strange compatibility issue occuring for select few.
Sorry, just wanted to state the portable install wasen't special and to mind possibly the GTK_CSD setting, and didn't mean to interrupt here with my longwinded bablings
As usual follow the sound advice of petersasi
Edit: Hmm, come to think of it, then the portable install mode actually isn't fully portable, as I never even thought about that it still reads and writes by default to '%appdata%\deluge'. This could very easily be fixed by a quick little change to the python code where default profile path is listed, or so i'm guessing shouldn't be hard atleast, as e.g. previously in the beginning changed default path of where to start local daemon from when selecting 'start daemon' from connection-manager, and button for adding magnet/torrent-assocs, back when still a 'Scripts' sub-folder was used(as per python default), but regardless, just wanted to add that I didn't think that fully through when implementing that lol
So it's only a semi-portable option then.
Edit2: Sorry for keeping on with this, but just annoyed me that I had made an error with that option, so I quickly had a go at it, and it can be changed under 'INSTALLDIR\Lib\site-packages\deluge\common.py'. However, I then came to think why not again utilize the python code in path.pth file I already used for different needed things, to just override the %appdata% folder to the deluge install-folder for the current running session, and it worked fine. This is preferred because will be a static fix, and if just copying over a patched common.py file from the NSIS script, then that will change later on in further deluge updates and even differ between stable vs dev deluge, so this would be best imho as need no interventions between updates. I don't have time to add this to the NSIS script currently(it's little more tricky than one would think with dependant checkboxes(portable mode with/without gtk_csd) in NSIS etc and needs prefunction-scripting added and whatnot when checkboxes overlap etc, as NSIS works little strange for that), and also up to petersasi if even want to include or not, but if any of you wan't this functionality to a portable deluge install already made, so as be fully portable, then add the following small python code following what's allready there under: 'INSTALLDIR\Lib\site-packages\path.pth', and it should all be a single line by purposse btw, or else won't work(no reason to go into here, but just trust me):
Code: Select all
; os.environ["APPDATA"] = "../data"
This will make deluge make a deluge profile folder under the install-dir's 'data' folder, or you can copy inplace your own deluge profile folder there to retain all settings. Maybe would be better to have it in the main dir, or dedicated 'config' dir under it, I dunno, but just thought 'data' was a well suited place.