Deluge.app (GTK-OSX based)

Support for Deluge on Apple Mac OS
Cas
Top Bloke
Top Bloke
Posts: 3679
Joined: Mon Dec 07, 2009 6:04 am
Location: Scotland

Deluge.app (GTK-OSX based)

Post by Cas »

Update: A test release has been created by carbncl Deluge.app, that should work on x64 10.6/10.7 OSX.


I looked into py2app, instead of using macports, but it currently does not work with pygtk, however I found an alternative solution using GTK-OSX.

I started testing earlier this year with OSX 10.6.6 in a Virtualbox VM (iso from leohazard) however running a VM is painfully slow on my machine so I couldn't continue with it. I just found the instructions that I had written down and thought I would share them here in case anyone else wants to try.

The instructions below are based on the details found on these website: GTK-OSX, winswitch and tryton.
  1. Validate that gcc-4.0 and the 10.5 sdk are present

    Code: Select all

    /usr/bin/gcc-4.0 -v
    ls -ld /Developer/SDKs/MacOSX10.5.sdk
  2. Install git

    Code: Select all

    curl -O http://git-osx-installer.googlecode.com/files/git-1.7.2.3-intel-leopard.dmg
    open git-1.7.2.3-intel-leopard.dmg
    sudo installer -pkg /Volumes/Git\ 1.7.2.3\ Intel\ Leopard/git-1.7.2.3-intel-leopard.pkg -target /
    hdiutil eject "/Volumes/Git 1.7.2.3 Intel Leopard"
  3. Create a user just for this build, become that user, and prepare the environment

    Code: Select all

    sudo su - gtkosxbuilder
    cat << EOF > ~/.profile
    export PATH=~/.local/bin:~/gtk/inst/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/git/bin
    export DYLD_FALLBACK_LIBRARY_PATH=~/gtk/inst/lib
    EOF
    . ~/.profile
    
  4. Download and run the gtk-osx build setup script

    Code: Select all

    curl -L -O https://github.com/jralls/gtk-osx-build/raw/master/gtk-osx-build-setup.sh
    sh gtk-osx-build-setup.sh
    
  5. Modify .jhbuildrc-custom

    Code: Select all

    sed -i -e 's/^setup_sdk/#setup_sdk/g' .jhbuildrc-custom
    cat << EOF >> .jhbuildrc-custom
    _gtk_osx_use_jhbuild_python = True
    setup_sdk(target="10.5", sdk_version="10.5", architectures=["i386"])
    os.environ["CC"] = "/usr/bin/gcc-4.0"
    os.environ["DYLD_LIBRARY_PATH"] = ""
    build_policy = "updated-deps"
    modules = [ "meta-gtk-osx-bootstrap", "meta-gtk-osx-core", "meta-gtk-osx-python", "librsvg", "meta-gtk-osx-themes", "gtk-quartz-engine" ]
    EOF
    
  6. Build (This will take a while)

    Code: Select all

    jhbuild bootstrap && jhbuild build
carbncl
Leecher
Leecher
Posts: 92
Joined: Sun Nov 28, 2010 7:36 pm

Re: Deluge build using GTK-OSX

Post by carbncl »

Did some work on the mentioned methods and links.
Got some progress with a working jhbuild environment with deluge working in it.

But I have some issues packaging an OSX app, and unfortunately I am not experienced with python.
Right now I'm kinda stuck with pkg_resources errors, from what I understand, this mostly intended to introspect eggs, which I think py2app doesn't support.
(Once again I'm not a python dev and could be completely mistaking)

Does that rings some bells to you Cas?
carbncl
Leecher
Leecher
Posts: 92
Joined: Sun Nov 28, 2010 7:36 pm

Re: Deluge build using GTK-OSX

Post by carbncl »

I was right see this on py2app mailing list.
Will try the suggested solutions. Some help from a python coder would be appreciated ;)
Last edited by carbncl on Thu Oct 20, 2011 5:19 pm, edited 1 time in total.
carbncl
Leecher
Leecher
Posts: 92
Joined: Sun Nov 28, 2010 7:36 pm

Re: Deluge build using GTK-OSX

Post by carbncl »

Good news, as someone suggested on py2app mailing list, just copying the egg to the app bundle... works.
Will cleanup my dirty scripts and setup.py... But looks like I now have a working Deluge.app (70MB) ! :)
fancyclown
Member
Member
Posts: 25
Joined: Mon Oct 01, 2007 8:21 pm

Re: Deluge build using GTK-OSX

Post by fancyclown »

:o :mrgreen:
carbncl
Leecher
Leecher
Posts: 92
Joined: Sun Nov 28, 2010 7:36 pm

Re: Deluge build using GTK-OSX

Post by carbncl »

That's still crashing in classic mode, in libtorrent... will sort this later. But works great with a remote server :)

Just managed to bundle Clearlooks within app, that looks not bad, same as macport gtk-quartz version :
Image
serine
New User
New User
Posts: 4
Joined: Tue Apr 05, 2011 5:15 am

Re: Deluge build using GTK-OSX

Post by serine »

I don't anything constructive to add besides saying that it looks nice!
carbncl
Leecher
Leecher
Posts: 92
Joined: Sun Nov 28, 2010 7:36 pm

Re: Deluge build using GTK-OSX

Post by carbncl »

Sorted the libtorrent issues (was a bad openssl version...), and some others.
Would love some people testing this, that should work on x64 10.6/10.7 OSX...
If that does not, please post error logs / crash reports that you can get from Console.
Cas
Top Bloke
Top Bloke
Posts: 3679
Joined: Mon Dec 07, 2009 6:04 am
Location: Scotland

Re: Deluge build using GTK-OSX

Post by Cas »

Excellent work carbncl. I'm glad my initial work did not got to waste :D
gmichels
New User
New User
Posts: 3
Joined: Wed Jan 26, 2011 1:54 pm

Re: Deluge.app build using GTK-OSX **Test Release Available*

Post by gmichels »

Whoa I'm speechless, it worked flawlessly (thin client mode, have't tried the local daemon). Sure I didn't use it much yet, but so far looks great.

I'll start using this and report back if issues arise.

THANKS FOR YOUR EFFORTS!
Locked