[HOWTO] Install Deluge 1.3.3 with Macports

Support for Deluge on Apple Mac OS
Post Reply
carbncl
Leecher
Leecher
Posts: 92
Joined: Sun Nov 28, 2010 7:36 pm

[HOWTO] Install Deluge 1.3.3 with Macports

Post by carbncl »

Hey,

EDIT : Edited wiki with these instructions: feel free to comment / edit wiki first : http://dev.deluge-torrent.org/wiki/Installing/MacOSX
I will try to complete the wiki page later, in order to deprecate this (too) long thread... What follows is left for "history" until i complete the wiki page :
Some time ago I wrote: Noticed that the official guide is outdated... (http://dev.deluge-torrent.org/wiki/Installing/MacOSX)
So just edited that guide, i guess that might help some people...
Port package seems to have been improved, making install a lot easier, thanks to "devans", for maintaining that package.
This just worked for me on Snow Leopard 10.6.5 with Deluge 1.3.1

EDIT : 1.3.3 / Lion : Looks like deluge 1.3.3 macports package (and its dependencies) has been mostly fixed, the following procedure should be working except for libnotify dependency.
Just remove that dependency, which is in fact optional, by deleting the line mentioning notify dependency, you can use that to do so:

Code: Select all

sudo port edit deluge
(Maybe I'm wrong, but I doubt deluge will use growl anyway...)

EDIT : 1.3.2 version : Macports has been updated, this howto still works

EDIT : The short version :
  • Without X11 (Quartz-GTK) :

    Code: Select all

    sudo port install boost +python26 gtk2 +no_x11+quartz libnotify +no_x11+quartz deluge
    or if that doesn't work :

    Code: Select all

    sudo port install boost +python26 pango +no_x11+quartz cairo +no_x11+quartz gtk2 +no_x11+quartz libnotify +no_x11+quartz deluge
  • With X11 :

    Code: Select all

    sudo port install boost +python26 deluge
EDIT : The long version (you should also read replies) :
These instructions assume a clean install of Snow Leopard (no XQuartz, Darwine, Winebottler, or MacPorts / Fink installed before starting at step 1).
  1. Install X11 from your Leopard CD (it should already be installed as it installs by default on Leopard and Snow Leopard)
  2. Download Xcode tools from Apple Developer Connection (free registration required for download).
  3. Download and install Mac Ports from MacPorts.org. (1.9.2 as of this writing).
  4. Open a terminal prompt (from Utilities) :

    Code: Select all

    sudo port install deluge
    Yes that's almost all you need, really, and patience... (1.8GB downloaded, 3~4h of total build time with CPU @ 100%)
  5. After some time (1~2 hours), while building libtorrent it will ask to install boost with +python26 option, just issue the command proposed. that will take... again 1h or so.

    Code: Select all

    sudo port install boost +python26
  6. then resume deluge install, again :

    Code: Select all

    sudo port install deluge
    That one liner should also do the job (untested, too lazy to uninstall all and get that 5h compilation again ) :

    Code: Select all

    sudo port install boost +python26 deluge
Then you are done! you can now use deluge :
  1. Open terminal, assuming port is in your path (/opt/local/bin) :
  2. Start deluged daemon:

    Code: Select all

    deluged-2.6 &
  3. Start deluge:

    Code: Select all

    deluge-2.6 &
Last edited by carbncl on Sun Oct 09, 2011 7:27 pm, edited 13 times in total.
carbncl
Leecher
Leecher
Posts: 92
Joined: Sun Nov 28, 2010 7:36 pm

[HOWTO] Install Deluge 1.3.1 with Macports / without X11

Post by carbncl »

Hey, just figured how to avoid using X11, making deluge GUI more "mac-ish", and probably faster, by using GTK-Quartz (GTK using native OSX Quartz instead of X11)
It is still a macports install method. There might be a cleaner method, I'm not a python/gtk/linux coder... Found this by just playing with google and macports.
  1. Assuming you're starting from the previous guide, that you have a functional Deluge 1.3.1 install with X11.
  2. The goal is to change the following libraries to use their "NO X11/Quartz" variants (+no_x11+quartz), then to rebuild deluge using them :

    Code: Select all

    cairo pango gtk2 libnotify
  3. To do that you have to uninstall not only these librairies, but also all the one depending on it:

    Code: Select all

    sudo port uninstall deluge py26-notify-python librsvg libgsf gnome-vfs gconf libnotify py26-gtk libglade2 gtk2 pango py26-cairo cairo libnotify
    (If it complains about dependent package, uninstall them)
  4. then install +no_x11+quartz variants :

    Code: Select all

    sudo port install pango +no_x11+quartz cairo +no_x11+quartz gtk2 +no_x11+quartz libnotify +no_x11+quartz
  5. you can now reinstall deluge, which will be compiled against these variants

    Code: Select all

    sudo port install deluge
If you're installing deluge from scratch and want to use GTK-Quartz:
  1. install quartz package variants first :

    Code: Select all

    sudo port install pango +no_x11+quartz cairo +no_x11+quartz gtk2 +no_x11+quartz libnotify +no_x11+quartz
  2. then install deluge :

    Code: Select all

    sudo port install deluge
    That one liner should also do the job (untested, too lazy to uninstall all and get that 5h compilation again :) ) :
    • Code: Select all

      sudo port install boost +python26 pango +no_x11+quartz cairo +no_x11+quartz gtk2 +no_x11+quartz libnotify +no_x11+quartz deluge
Last edited by carbncl on Tue Nov 30, 2010 9:53 am, edited 1 time in total.
Cas
Top Bloke
Top Bloke
Posts: 3679
Joined: Mon Dec 07, 2009 6:04 am
Location: Scotland

Re: [HOWTO] Install Deluge 1.3.1 with Macports

Post by Cas »

Good work, do you have screenshots of deluge with gtk-quartz?
carbncl
Leecher
Leecher
Posts: 92
Joined: Sun Nov 28, 2010 7:36 pm

Re: [HOWTO] Install Deluge 1.3.1 with Macports

Post by carbncl »

Sorry, no screenshots yet, but basically got the same as zachtib http://forum.deluge-torrent.org/viewtop ... 13&t=25915

Some additions on previous posts :
  • Noticed a misssing dependency in deluge-gtk logs, not sure of what is is used for, nor if it is mandatory, anyway :

    Code: Select all

    sudo port install hicolor-icon-theme
  • To get a better look with GTK (like the Clearlooks engine) :
    1. install additionnal gtk engines (themes) :

      Code: Select all

      sudo port install gtk-engines2
      (Note there are others : http://www.macports.org/ports.php?by=name&substr=engine)
    2. then set your favorite engine by creating the gtkrc file like that :

      Code: Select all

      echo 'gtk-theme-name = "Clearlooks"' | sudo tee /opt/local/etc/gtk-2.0/gtkrc
    3. I don't think there is nothing to rebuild after that, maybe I'm wrong.
Last edited by carbncl on Fri Dec 03, 2010 1:51 pm, edited 1 time in total.
CSB
Leecher
Leecher
Posts: 66
Joined: Fri Dec 03, 2010 1:55 am

Re: [HOWTO] Install Deluge 1.3.1 with Macports

Post by CSB »

I just replaced my antiquated virtualenvs method installation using the quartz method. Very easy, and painless. The only way this could be easier (besides the X11 version, of course) is if Deluge was bundled as an app.

BTW,

I put a file containing the following in my Applications folder:

Code: Select all

#!/bin/bash
deluge-gtk-2.6 &
Make sure it is executable (I simply used chmod 755)
The file can now be double clicked to open the deluge gtk app.

Then, I applied the Deluge icon to the file. Required finding a nice big version, and then converting it to a .icns file.
/opt/local/var/macports/software/deluge/1.3.1_0/opt/local/Library/Frameworks/Python.framework/Versions/2.6/share/icons/hicolor/192x192/apps/deluge.png and I used http://iconverticons.com/ to make the .icns. I then removed the extension from the icns file, opened finder info windows (command+i) for the script, and the icns file, and copied and pasted the icon in the upper left from the icns to the script.
MacOSXDeluge
New User
New User
Posts: 3
Joined: Tue Feb 23, 2010 11:54 pm

Re: [HOWTO] Install Deluge 1.3.1 with Macports

Post by MacOSXDeluge »

That one liner should also do the job (untested, too lazy to uninstall all and get that 5h compilation again :) ) :
  • Code: Select all

    sudo port install boost +python26 pango +no_x11+quartz cairo +no_x11+quartz gtk2 +no_x11+quartz libnotify +no_x11+quartz deluge
The one liner worked great but I'm a bit of a beginner at this and cannot figure out how to get the cleartheme to install or work.
Im a bit confused where this is suppose to be created

Code: Select all

mate /opt/local/etc/gtk-2.0/gtkrc
carbncl
Leecher
Leecher
Posts: 92
Joined: Sun Nov 28, 2010 7:36 pm

Re: [HOWTO] Install Deluge 1.3.1 with Macports

Post by carbncl »

MacOSXDeluge wrote:The one liner worked great but I'm a bit of a beginner at this and cannot figure out how to get the cleartheme to install or work.
Im a bit confused where this is suppose to be created

Code: Select all

mate /opt/local/etc/gtk-2.0/gtkrc
I used textmate to do this with its mate command line tool, you can also just do :

Code: Select all

echo 'gtk-theme-name = "Clearlooks"' | sudo tee /opt/local/etc/gtk-2.0/gtkrc
MacOSXDeluge
New User
New User
Posts: 3
Joined: Tue Feb 23, 2010 11:54 pm

Re: [HOWTO] Install Deluge 1.3.1 with Macports

Post by MacOSXDeluge »

That worked perfectly thanks :D

Now, I have a problem that I have no idea what to do with. I'm trying to get deluge to use a port but it won't use it and is telling me no incoming connections. It just uses what ever port it wants it seems.

I seem to have another problem as well when trying to open a torrent in Deluge it says no such file directory.

Edit:
It wont use my port forwarded port but it will use uPNP..

Edit #2: I tried using a different port on my router and it is now working without uPNP. So thats one problem down but why wont it open the torrented file when I click open folder?

This is what terminal says:

Code: Select all

Unhandled error in Deferred:
Traceback (most recent call last):
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/twisted/internet/gtk2reactor.py", line 270, in run
    self.__run()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/deluge/ui/gtkui/menubar.py", line 312, in on_menuitem_open_folder_activate
    component.get("SessionProxy").get_torrent_status(torrent_id, ["save_path"]).addCallback(_on_torrent_status)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/twisted/internet/defer.py", line 260, in addCallback
    callbackKeywords=kw)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/twisted/internet/defer.py", line 249, in addCallbacks
    self._runCallbacks()
--- <exception caught here> ---
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/twisted/internet/defer.py", line 441, in _runCallbacks
    self.result = callback(self.result, *args, **kw)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/deluge/ui/gtkui/menubar.py", line 310, in _on_torrent_status
    deluge.common.open_file(status["save_path"])
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/deluge/common.py", line 224, in open_file
    subprocess.Popen(["xdg-open", "%s" % path])
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/subprocess.py", line 623, in __init__
    errread, errwrite)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/subprocess.py", line 1141, in _execute_child
    raise child_exception
exceptions.OSError: [Errno 2] No such file or directory
keepitcomplicated
Member
Member
Posts: 29
Joined: Wed Sep 29, 2010 1:40 pm

Re: [HOWTO] Install Deluge 1.3.1 with Macports

Post by keepitcomplicated »

Finally! After 3 weeks of trying to figure out for the first time how to do anything remotely like this, this excellent thread pops up! I actually had given up and moved on to rTorrent with ruTorrent WebUI... but now I'm back with Deluge :)

This is how it looks like with the additional instructions from carbncl, using GTK-Quartz instead of X11 with clearlooks... oh, can anyone help me with changing the language from icelandic to english? :P
Attachments
Screen shot 2010-12-04 at 23.17.18.png
Screen shot 2010-12-04 at 23.17.18.png (139.35 KiB) Viewed 23910 times
CSB
Leecher
Leecher
Posts: 66
Joined: Fri Dec 03, 2010 1:55 am

Re: [HOWTO] Install Deluge 1.3.1 with Macports

Post by CSB »

Please, people. Can we keep this thread regarding the install method, not general troubleshooting?
Post Reply