4
The idea behind the package is to create a full tool-chain from Python upwards. This includes
5
Python, GTK, libglade and PyGTK. This is done using the Gnome jhbuild tool. A few notes before
7
- jhbuild will pick up libraires already on the system. We don't want that. Easiest way to
8
achieve this a new Mac :) For normal people, check /usr/local/lib, /opt/lib etc. Installing
9
XQuartz, using macports, finks, etc will also mess this up.
10
- The order of the jhbuils commands is important. The configure for each parts needs the
11
correct prerequisites in place before it starts or things like libglade will break.
13
First get hold of the jhbuild tool.
16
Then run the following commands:
19
jhbuild build meta-gtk-osx-bootstrap
20
jhbuild build meta-gtk-osx-freetype
22
jhbuild build meta-gtk-osx-core
23
jhbuild build libglade
25
jhbuild build meta-gtk-osx-python
26
jhbuild build meta-gtk-osx-themes
28
Now install all the python prerequisites using the python in ~/gtk/inst/bin/
30
So, first easy install (download and install from here):
31
https://pypi.python.org/pypi/setuptools/1.1.6
33
~/gtk/inst/bin/python setup.py install
38
numpy will fail, but I think it's good enough to work. Not even sure numpy
43
cd ~/software/spud/dxdiff
44
~/gtk/inst/bin/python setup.py install
46
You now have everything required to run Diamond. You can try it using
47
~/gtk/inst/bin/python bin/diamond
50
Finally, download the bundling script that comes with GTK
56
You need to install diamond into the local jhbuild setup
58
DESTDIR=~/gtk/inst/share/ ~/gtk/inst/bin/python setup.py install
60
Using the bundle script that comes with gtk, you run this:
64
chmod +w ~/gtk/inst/lib/libpython2.7.dylib
65
export PATH=$PREFIX/bin:~/.local/bin:$PATH
66
gtk-mac-bundler diamond.bundle
69
This create the Diamond.app folder.
71
The last stage is to create a DMG to distribute. Simply run the create_dmg script
74
Now test this: install it on your system, moving ~/gtk to ~/tmp_gtk to remove the
75
already installed libraries and check that Diamond has everything.
77
Note: if Diamond fails to start, try:
78
/Applications/Diamond.app/Contents/MacOS/diamond
80
to get more information.
b'\\ No newline at end of file'