Difference between revisions of "Mac OS X:Build from source:Native OS X"

From Gramps
Jump to: navigation, search
(Restructure pages)
 
(7 intermediate revisions by 7 users not shown)
Line 1: Line 1:
[[Category:Developers/Packaging]]
 
 
== 2.2.x series (Native PPC only) ==
 
== 2.2.x series (Native PPC only) ==
  
Gramps on OSX native does just about work. It is not as functional as the X11 version (see ) but it does require less dependencies.
+
GRAMPS on OS X native does just about work. It is not as functional as the X11 version (see ) but it does require fewer dependencies.
  
 
=== Caveats ===
 
=== Caveats ===
  
* As far as I know I am the only person ever to have got this to work (let me know if you know different: rjt-gramps (at) thegrindstone.me.uk)
+
* Only a few people are known to have got this to work (let me know if you know different: rjt-gramps (at) thegrindstone.me.uk)
 
* If you loose your database don't blame me.
 
* If you loose your database don't blame me.
 
* This is in no way a supported port.
 
* This is in no way a supported port.
  
 
'''Note: there is no compiling or any scary geekery necessary to make this work!'''
 
'''Note: there is no compiling or any scary geekery necessary to make this work!'''
 
 
  
 
=== Installing dependencies ===
 
=== Installing dependencies ===
Line 22: Line 19:
  
  
=== Patching gramps ===
+
=== Patching GRAMPS ===
  
Once you unpack gramps you need to make one small change. The pygtk build has a broken cairo so you need to turn off the cairo support in the Pedigree view, otherwise bad things happen.
+
Once you unpack GRAMPS you need to make one small change. The pygtk build has a broken cairo so you need to turn off the cairo support in the Pedigree view, otherwise bad things happen.
  
 
  cd src/DataViews
 
  cd src/DataViews
Line 60: Line 57:
  
 
Or, you may download this readymade bundle - [[Media:Gramps.zip|Gramps.app]].
 
Or, you may download this readymade bundle - [[Media:Gramps.zip|Gramps.app]].
 +
 +
If you have python installed in a different place than /usr/bin, or you have several versions installed in different places (such as /opt/local/bin), then just open the main.scpt file in Script Editor in the GRAMPS package and edit the script.
  
 
* Then, copy the "src" directory from the GRAMPS source code to the Resources directory of Gramps.app.
 
* Then, copy the "src" directory from the GRAMPS source code to the Resources directory of Gramps.app.
Line 67: Line 66:
 
=== Issues ===
 
=== Issues ===
  
I had to export my database from my existing fink based install into gramps XML format and then import it into the native version. I doubt that the two versions will coexist very nicely.
+
I had to export my database from my existing fink based install into GRAMPS XML format and then import it into the native version. I doubt that the two versions will coexist very nicely.
Many things don't work. I know that drag and drop does not work, there are issues with mouse click on menus going missing and anything that calls an external programme will not work e.g. help etc.
+
 
 +
Many things don't work. I know that drag and drop does not work, there are issues with mouse click on menus going missing and anything that calls an external program will not work e.g. help etc.
 +
 
 +
[[Category:Developers/Packaging]]

Latest revision as of 03:56, 24 February 2012

2.2.x series (Native PPC only)

GRAMPS on OS X native does just about work. It is not as functional as the X11 version (see ) but it does require fewer dependencies.

Caveats

  • Only a few people are known to have got this to work (let me know if you know different: rjt-gramps (at) thegrindstone.me.uk)
  • If you loose your database don't blame me.
  • This is in no way a supported port.

Note: there is no compiling or any scary geekery necessary to make this work!

Installing dependencies

You will need gtk and pygtk and these in turn require Python 2.4.4. The only packaged builds of pygtk/gtk that I know of are at: http://sourceforge.net/project/showfiles.php?group_id=175176 , these are only for PPC. If you know of any other packaged builds please let me know. The lack of a universal binary package is the only reason why these instructions will not work on Intel Macs.


Patching GRAMPS

Once you unpack GRAMPS you need to make one small change. The pygtk build has a broken cairo so you need to turn off the cairo support in the Pedigree view, otherwise bad things happen.

cd src/DataViews

edit _PedigreeView.py, remove the following lines:

try:
    import cairo
    cairo_available = True
except:
    cairo_available = False

replace them with:

cairo_available = False


Running

To run GRAMPS from the terminal you need to do the following:

cd src/
python gramps.py

If you would rather have an OS X style bundle (.app) you may follow these steps:

  • Using Script Editor save the following AppleScript as an application bundle
tell application "Terminal"<br/>
	do script "Python /Applications/Gramps.app/Contents/Resources/src/gramps.py"<br/>
end tell<br/>
tell application "System Events"<br/>
	set visible of process "Terminal" to false<br/>
end tell

Or, you may download this readymade bundle - Gramps.app.

If you have python installed in a different place than /usr/bin, or you have several versions installed in different places (such as /opt/local/bin), then just open the main.scpt file in Script Editor in the GRAMPS package and edit the script.

  • Then, copy the "src" directory from the GRAMPS source code to the Resources directory of Gramps.app.

That is it. This can be used like any other application. However, unless you change the path in the script the bundle must reside in /Applications.

Issues

I had to export my database from my existing fink based install into GRAMPS XML format and then import it into the native version. I doubt that the two versions will coexist very nicely.

Many things don't work. I know that drag and drop does not work, there are issues with mouse click on menus going missing and anything that calls an external program will not work e.g. help etc.