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)