I succeeded in building deluge 1.1.3 from source on Windows XP Home (with a few tweaks), and to get the add torrents dialog to work
This is what I did, step-by-step
1) Install the dependencies listed
here, except of course from the last MSI file which is deluge itself.
- Python and everything else was installed to the default location C:\Python25. I added c:\python25 to my PATH manually, but I don't think that this is needed if you are willing to type c:\python25\python instead of just python when building.
- The GTK 2.12 runtime can be installed anywhere as long as the location of the 'bin' directory is in the PATH (the GTK runtime installer sets up the PATH automatically).
2) I had to make two modifications to the 1.1.3 source
2a) deluge-1.1.3/deluge/core/core.py
Remove (comment out) the following lines
Code: Select all
# Load the GeoIP DB for country look-ups if available
geoip_db = pkg_resources.resource_filename("deluge", os.path.join("data", "GeoIP.dat"))
if os.path.exists(geoip_db):
self.session.load_country_db(geoip_db)
Otherwise, deluged won't start and I get this error in the log
Code: Select all
[ERROR ] 09:16:15 core:179 Unable to load geoip database!
[ERROR ] 09:16:15 __init__:1021 'session' object has no attribute 'load_country_db'
Traceback (most recent call last):
I'm not sure what's going on here, but I get country flags for my peers without these three lines in core.py.
2b) deluge-1.1.3/deluge/ui/gtkui/preferences.py
Apply the patch in
revision 4820 mentioned by andar earlier in the thread, that is change line 437 to
Code: Select all
self.glade.get_widget("chk_ntf_popup").set_sensitive(False)
instead of
Code: Select all
self.gtkui_config["ntf_popup"].set_sensitive(False)
Without this patch the preferences windows will not open when clicked upon.
3) Now we can build and install deluge
From the root source directory run these commands
Code: Select all
python setyp.py clean -a
python setup.py build
python setup.py install
Now, deluge should be working (check that by running deluge.exe in c:\python25\scripts), but we need to make sure that only one deluge and deluged instance is started, and the file association with .torrent must be set up manually. Also, I want to get rid of the CMD window displaying 1.1.3 (the deluge version) that's "hanging" until I close deluge.
4) Get the startX application from
here, and put startX.exe somewhere. In my case, the exe will be located at c:\mybin\startX.exe (the deluge Windows installer for 1.0.7 put startX.exe in C:\windows, but I prefer a different location).
5) Create a CMD file, called run-deluge.cmd (or whatever), with the following content
Code: Select all
@ECHO OFF
SET DELUGEFOLDER=c:\python25\scripts
IF ""%1"" == """" (
C:\mybin\StartX.exe /B /D%DELUGEFOLDER% "%DELUGEFOLDER%\deluge.exe"
) ELSE (
C:\mybin\StartX.exe /B /D%DELUGEFOLDER% "%DELUGEFOLDER%\deluge.exe "%1""
)
Be careful about the double quotes, they are needed to handle file names with spaces properly (the above syntax corrects a bug in 1.0.7 which could not open torrent files with spaces).
The IF-ELSE part is needed because if I pass an empty string "" to deluge (no argument to run-deluge.cmd), the add-torrents windows will open, even though there is no torrent to add. I guess this a bug in deluge (?), but until this is fixed, the above can be used as a workaround.
IMPORTANT: Before proceeding to the next step, test the CMD file by dragging-and-dropping torrent files onto it. If deluge is running, the current instance of deluge should be used, and if deluge is not running, it should be started by startX. Make sure that things work this way.
6) Set up the file association for TORRENT files
From Windows Explorer, choose "open with" and select run-deluge.cmd. Remember to check the "Always use this program.." box. Now, you should be able to add torrents automatically.
Comments are welcome, including suggestions about things to check (my main interest is connecting to the deluge daemon on my Linux home server, but I will be happy to test deluge+deluged on a single machine). I don't have access to Windows Vista (or WinXP Pro), so if something works differently on Vista compared to XP, I will not be able to help out.