Page 1 of 2

Tentative Native OSX build

Posted: Sat Apr 19, 2008 1:31 pm
by angusmcb
I have sucessfully built 0.5.8.9 without X-Windows on Leopard:

http://img120.imageshack.us/img120/9283/picture1xb7.png

Seems to be running sweet with only a few dbus issues to iron out. I will attempt to package into a standalone bundle when time permits, meanwhile if you want to go kamikaze and try it yourself here's the method:

I recommend you install everything into it's own directory tree such as under /opt/gtk and make it writeable by your user, and please don't try this if you are not familiar with building stuff in terminal - it'll end in tears, I promise :shock: .


Prerequsites:
Apple XCode 3.0
GTK+-MacOSX build script (.jhbuildrc) from http://developer.imendio.com/projects/gtk-macosx
GNU libtool-1.5.26 from ftp://ftp.gnu.org/gnu/libtool/libtool-1.5.26.tar.gz
Boost Libraries 1.35 and BJam from http://www.boost.org
dbus, dbus-glib,dbus-python and pyxdg from:
http://dbus.freedesktop.org/releases/db ... 2.1.tar.gz
http://dbus.freedesktop.org/releases/db ... .74.tar.gz
http://dbus.freedesktop.org/releases/db ... 2.3.tar.gz
http://www.freedesktop.org/~lanius/pyxdg-0.15.tar.gz

1. Build bootstrap, Build and install GTK2+ according to http://developer.imendio.com/projects/g ... structions
You will need to alter your .jhbuildrc file to remove the exlusion for the local copy of python2.4.5 - I tried for ages to get this to build with the apple python2.5 on Leopard to no avail. Your mileage may vary.


2. Build and install gnu libtool-1.5.26 to your prefix

3. Build and install python and extensions with

Code: Select all

jhbuild meta-gtk-osx-python

4. Unfotunately the gcc compiler on Leopard is a bit broken so you now need to go back and rebuild the pygtk, pygobject and pycairo extensions again after editing Makefile.am and Makefile.in in the source directories of these extensions. (Should be under ~/Source/gnome).
For each of these extensions, edit Makefile.am and Makefile.in to remove

Code: Select all

-export-symbols-regex [init_....]
and rebuild with

Code: Select all

jhbuild buildone pygobject pycairo pygtk
5. install gtk-engines with

Code: Select all

jhbuild buildone gtk-engines
6. Build and install the pyxdg-0.15 extension

7. Build and install Bjam and the Boost libraries to your prefix

8. Build and install dbus , dbus-glib & dbus-python. You may need to edit {prefix}/etc/dbus-1/session.conf to make sure the unix socket directory path is valid on osx. Make sure you confgure dbus with the --without-x option, otherwise you'll get X-Windows starting as soon as you launch anything that uses dbus.

At this stage if you can run pygtk-demo, then you're probably set to build deluge!

Grab deluge 0.5.8.9 source and build. Unless you want to install librsvg, replace "deluge.svg" in the function get_logo() in common.py with "deluge.png".

I also had to alter "includedirs" in setup.py to use:

Code: Select all

['/opt/gtk/include/python' + python_version,
'/opt/gtk/include/boost-1_35']
Build, install, Then cross your fingers and run!

Hope this helps out - I recommend doing all building from a jhbuild shell ( it sets your environment correctly for installing to your tree).

Update: - forgot to mention that the build process for python sometimes "forgets" what the c compiler is (!) and borks with an error :D if that happens to you, just spawn a jhbuild shell from the option menu, and build that particular package with "jhbuild buildone [package]" then continue as before. good luck!

Re: Tentative Native OSX build

Posted: Sat Apr 19, 2008 1:45 pm
by mvoncken
Great work! , I'm sure the mac users will appreciate it.
I don't think we even use dbus in 0.6 , so building 0.6 could be another option.

Re: Tentative Native OSX build

Posted: Tue Apr 22, 2008 1:55 am
by modug
a standalone package would be amazing. I just spent a few hours trying to get deluge to install on my mac and I never got it.

Re: Tentative Native OSX build

Posted: Tue Apr 22, 2008 11:36 pm
by angusmcb
I can build 0.6 with minor changes, but the instantiation of the dbus connection is breaking if X is not installed. Funny this wasn't the problem with 0.5.8.9.

Re: Tentative Native OSX build

Posted: Wed Apr 23, 2008 7:34 pm
by tomplam
This looks great, dbus just will not work for me at all. Look forward to progress with this :roll:

Re: Tentative Native OSX build

Posted: Sun Apr 27, 2008 1:16 pm
by papaskitch
This is great news! Even if X11 needs to be installed, it's a lot easier than the macports route (for us mere mortals anyways ;)).

Anyone care to share a build? :P

Re: Tentative Native OSX build

Posted: Thu May 08, 2008 10:22 pm
by mynous
I am having quite a difficult time getting jhbuild to install properly. Do you have any place I could look for help or even any words of wisdom yourself?

Re: Tentative Native OSX build

Posted: Sun May 11, 2008 11:05 pm
by angusmcb
What problems exactly with jhbuild?

Re: Tentative Native OSX build

Posted: Tue May 13, 2008 10:17 pm
by mynous
Well I went through everything to build it but it just wouldnt build. I would get to the /make install and got a reply that said nothing to make or something to that effect. Are there dependencies for jhbuild that I could be missing or have installed somewhere else due to MacPorts being installed also?

Re: Tentative Native OSX build

Posted: Mon May 19, 2008 5:46 am
by hill
Hi I got most of this to work but I am unable to launch deluge. I get an error, something about missing glade. I'm going to try installing glade and all the dependencies and see if that resolves the problems. Other than that do you know how to fix it? I'm using 10.5.2 Intel. Thanks.

Code: Select all

bash-3.2$ deluge
/Library/Python/2.5/site-packages/gtk-2.0/gtk/__init__.py:69: Warning: textdomain() must be called before glib i18n initialization
  _gtk.init_check()
Traceback (most recent call last):
  File "/usr/local/bin/deluge", line 43, in <module>
    import deluge
  File "/Library/Python/2.5/site-packages/deluge/__init__.py", line 36, in <module>
    import gtk.glade
ImportError: No module named glade