Why is there no Deluge 2.0 exe for Windows

Specific support for Deluge on Microsoft Windows OS
kwyjiboo
New User
New User
Posts: 1
Joined: Sun Jun 16, 2019 7:41 am

Why is there no Deluge 2.0 exe for Windows

Post by kwyjiboo »

Hi everyone

I'm not complaining (well maybe a little ;) ) I just wanted to know what is the reason the new Deluge is not available for Windows as a single exe for us n00bs.

Is it some license reason that one of the tools to compile is not free or sth? If someone can explain it to me, I would be more knowledgeable :)

Cheers and keep up the great work to anyone who contributated

kwyjiboo
Ironclad17
New User
New User
Posts: 6
Joined: Sun Jul 07, 2019 11:30 pm

Re: Why is there no Deluge 2.0 exe for Windows

Post by Ironclad17 »

I managed to install deluge 2.0.3 following the ticket, but how do I now update/install the server? I also installed the default plugins that I use from the repo.

FYI some of the required links are dead. These worked: https://www.lfd.uci.edu/~gohlke/pythonlibs/
idiocracy
Leecher
Leecher
Posts: 99
Joined: Tue Jul 23, 2019 11:04 am

Re: Why is there no Deluge 2.0 exe for Windows

Post by idiocracy »

Curious, if you managed to build it, can't you just share that installer. Wouldn't that be easier?
darkred
Member
Member
Posts: 12
Joined: Mon May 06, 2019 4:57 pm

Re: Why is there no Deluge 2.0 exe for Windows

Post by darkred »

Greetings

I've followed the steps in https://dev.deluge-torrent.org/ticket/3201 (using win10)
and so I'm now able to run deluge 2.0.3 via:

Code: Select all

set PATH=C:\gvsbuild\release\bin;%PATH%
deluge.exe
Now, I'd like to make an standalone installer.

So, I download https://git.deluge-torrent.org/deluge/snapshot/deluge-deluge-2.0.3.zip,
unzip its contents,
and then I try to follow what's on its Win32 README.txt :
= Deluge Installer for Windows =

Instructions for building the Deluge NSIS Installer for Windows XP/Vista/7.

== Dependencies ==
* Deluge build: http://dev.deluge-torrent.org/wiki/Inst ... pendencies
* Bbfreeze: http://pypi.python.org/pypi/bbfreeze
* NSIS: http://nsis.sourceforge.net/Download

== Build Steps ==

1. Build and Install Deluge on Windows.

2. Run the bbfreeze script from the win32 directory:

python deluge-bbfreeze.py

The result is a bbfreeze'd version of Deluge in `build-win32/deluge-bbfreeze-build_version`.

3. Run the NSIS script (right-click and choose `Compile with NSIS`)

The result is a standalone installer in the `build-win32` directory.
So, open a command prompt,
type
cd C:\Users\Kostas\Desktop\deluge-deluge-2.0.3\packaging\win32
and python deluge-bbfreeze.py
I get:

Code: Select all

Traceback (most recent call last):
  File "deluge-bbfreeze.py", line 23, in <module>
    import bbfreeze
ModuleNotFoundError: No module named 'bbfreeze'
And, if I try: pip install bbfreeze
then I get:

Code: Select all

Collecting bbfreeze
  Downloading https://files.pythonhosted.org/packages/aa/90/5635b1cc9bd7cc7068bda3701c29dde1449fda37bd5279338b71c30abf81/bbfreeze-1.1.3.zip (65kB)
     |████████████████████████████████| 71kB 351kB/s
    ERROR: Command errored out with exit status 1:
     command: 'c:\users\kostas\appdata\local\programs\python\python36\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Kostas\\AppData\\Local\\Temp\\pip-install-oq_dg_14\\bbfreeze\\setup.py'"'"'; __file__='"'"'C:\\Users\\Kostas\\AppData\\Local\\Temp\\pip-install-oq_dg_14\\bbfreeze\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base pip-egg-info
         cwd: C:\Users\Kostas\AppData\Local\Temp\pip-install-oq_dg_14\bbfreeze\
    Complete output (7 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\Kostas\AppData\Local\Temp\pip-install-oq_dg_14\bbfreeze\setup.py", line 15, in <module>
        version = get_version()
      File "C:\Users\Kostas\AppData\Local\Temp\pip-install-oq_dg_14\bbfreeze\setup.py", line 13, in get_version
        return d["__version__"]
    KeyError: '__version__'
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Could you please help?
obraca
New User
New User
Posts: 1
Joined: Tue Jul 30, 2019 6:28 am

Re: Why is there no Deluge 2.0 exe for Windows

Post by obraca »

bbfreeze is unmantained and won't work on python 3. There is an unofficial version you can try that kind of works with python 3:

Code: Select all

pip install git+https://github.com/cas--/bbfreeze
darkred
Member
Member
Posts: 12
Joined: Mon May 06, 2019 4:57 pm

Re: Why is there no Deluge 2.0 exe for Windows

Post by darkred »

Thanks for the suggestion, obraca: after installing Git and Build Tools for Visual Studio 2019, bbfreeze was installed ok.

So now, I installed NSIS (I tried NSIS versions 3.04 and 2.51)
and when I try to right-click 'deluge-win32-installer.nsi' and choose `Compile with NSIS`, unfortunately I get:

Code: Select all

!define: "MUI_INSERT_NSISCONF"=""

Changing directory to: "C:\Users\Kostas\Desktop\deluge-deluge-2.0.3\packaging\win32"

Processing script file: "C:\Users\Kostas\Desktop\deluge-deluge-2.0.3\packaging\win32\deluge-win32-installer.nsi" (ACP)
!define: "DELUGE_INSTALLER_VERSION"="1.0"
!define: "PROGRAM_NAME"="Deluge"
!searchparse /file: error opening "VERSION.tmp"
Error in script "C:\Users\Kostas\Desktop\deluge-deluge-2.0.3\packaging\win32\deluge-win32-installer.nsi" on line 17 -- aborting creation process
Last edited by darkred on Tue Jul 30, 2019 8:30 pm, edited 4 times in total.
mhertz
Moderator
Moderator
Posts: 2195
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: Why is there no Deluge 2.0 exe for Windows

Post by mhertz »

Sorry don't know anything about this, but found in an old deluge changelog entry that there was added the generation of a version.tmp file to the bbfreeze script, which the NCIS script reads and uses. I don't know why it now craps out with "error opening version.tmp", but check if the file was generated by the bbfreeze script and no permission or format errors either. Also, possibly amend the NCIS script to hardcode PROGRAM_VERSION (and build_version?) and remove the searchparse line(line 17). Alternatively manually make version.tmp beforehand(if not generated automatically) - the bbfreeze script makes it with this code, so just one line/variable:

Code: Select all

 #Copy version info to file for nsis script.
with open('VERSION.tmp', 'w') as ver_file:
    ver_file.write('build_version = "%s"' % build_version)
darkred
Member
Member
Posts: 12
Joined: Mon May 06, 2019 4:57 pm

Re: Why is there no Deluge 2.0 exe for Windows

Post by darkred »

Thanks.
So, I added the above code as a version.tmp and now the "Compile with NSIS" moves forward, but it stops at:

Code: Select all

!include: could not find: "install_files.nsh"
Error in script "C:\Users\Kostas\Desktop\deluge-deluge-2.0.3\packaging\win32\deluge-win32-installer.nsi" on line 163 -- aborting creation process
mhertz
Moderator
Moderator
Posts: 2195
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: Why is there no Deluge 2.0 exe for Windows

Post by mhertz »

The entire end of the bbfreeze script isn't run it seems i.e first the function for generating version.tmp and then the two last subsequent functions for generating install_files.nsh and uninstall_files.nsh.

I guess they could be made manually or with some shell or python code. Sorry cannot help more.

Code: Select all

 # Copy version info to file for nsis script.
with open('VERSION.tmp', 'w') as ver_file:
    ver_file.write('build_version = "%s"' % build_version)

# Create the install and uninstall file list for NSIS.
filedir_list = []
for root, dirnames, filenames in os.walk(build_dir):
    dirnames.sort()
    filenames.sort()
    filedir_list.append((root[len(build_dir) :], filenames))

with open('install_files.nsh', 'w') as f:
    f.write('; Files to install\n')
    for dirname, files in filedir_list:
        if not dirname:
            dirname = os.sep
        f.write('\nSetOutPath "$INSTDIR%s"\n' % dirname)
        for filename in files:
            f.write('File "${BBFREEZE_DIR}%s"\n' % os.path.join(dirname, filename))

with open('uninstall_files.nsh', 'w') as f:
    f.write('; Files to uninstall\n')
    for dirname, files in reversed(filedir_list):
        f.write('\n')
        if not dirname:
            dirname = os.sep
        for filename in files:
            f.write('Delete "$INSTDIR%s"\n' % os.path.join(dirname, filename))
        f.write('RMDir "$INSTDIR%s"\n' % dirname)
Post Reply