Changes

Jump to: navigation, search

Mac OS X:Application package

22 bytes removed, 05:06, 28 July 2009
How the Apple binary application works: Spelling
== How the Apple binary application works ==
The application called gramps on the desktop is actually a complete directory hierarchy called gramps.app stored in the directory ~/Desktop, where ~ is the home directory of the logged-in user. The contents of the application directory hierarchy can be seen in finder by selecting the application and choosing View Show Package Contents from the context (right-click) menu. Using cd and ls in a shell at a unix terminal, the "hidden" contents of the package are actually always visible and not hidden at all.
Gramps is a Python interpreted application and changing the program requires no build step. It's possible to change the downloaded binary application by choosing View Show Package Contents in Finder, navigating in Finder to the gramps Gramps Python code in gramps.app/Contents/ReourcesResources/share/gramps in Finder, and choosing Open With... TextEdit for the .py file to change. (There seems to be a bug in the Mac implementation of the Python runtime editor "Idle". Opening the .py file with that doesn't work.) Editing the .py file and saving the new version will cause gramps Gramps to use it next time it is started. It won't change a gramps Gramps which is currently running. There are .pyc files also stored in the application, compiled Python byte-code, which can be ignored.
The binary gramps application contains not only the gramps Python sources and all their internationalised trasnlationstranslations, but also a complete Python 2.6.2 interpreter, and the Python code libraries distributed with that, and the compiled C libraries for graphics features like gtk, glade and pango. These are all fixed for a particular version of the distributed binary applciationapplication. The only way to change them is to download a new distributed binary gramps application. This is intended to fix a major issue with earlier Gramps Mac implementationimplementations, where the program depended on so many different distributions that were always changing that determining what change introduced what bug was very hard.
One downside of the way that Mac packages work is that, to achieve a reasonable download size, some libraries and programs are missed out of the packaged applciationapplication. This can cause gramps Gramps crashes, or sometimes just cause some program features to be missing. Crashes of the packaged applciation application usually produce messages on the console, which can be seem seen (even after the crash has finished) by choosing Finder-Applications-Utilities-Console [Is that System Console? I'm not at a Mac] . There is a delay of perhaps up to a minute between the crash occurring and the messages appearing on the console.
A simpler way to see messages from grampsGramps, should any appear, is to start it from a unix terminal. To do this, open a terminal with Finder-Applications-Utilities-Terminal, and type (for a gramps Gramps application on the Desktop)
cd / ; ~/Desktop/gramps.app/Contents/MacOS/gramps
and that should run gramps Gramps and produce any messages with no delay. The file ~/Desktop/gramps.app/Contents/MacOS/gramps is a shell script, as is ~/Desktop/gramps.app/Contents/MacOS/gramps-bin which it calls. gramps-bin calls the Python 2.6.2 interpreter ~/Desktop/gramps.app/Contents/MacOS/python to run the gramps code which is stored in ~/Desktop/gramps.app/Contents/Resources/share/gramps. Local translations are stored in ~/Desktop/gramps.app/Contents/Resources/share/locale. Standard python code is in ~/Desktop/gramps.app/Contents/Resources/lib/python2.6, and the compiled C libraries are in ~/Desktop/gramps.app/Contents/Resources/lib/*.dylib. Only the gramps python Gramps Python source is shipped in the binary applciationapplication. If other sources are needed, the gramps build environment must be used.
Should gramps Gramps produce a message indicating that it crashed because it could not find a particular library or source file, then do please post a message on the gramps Gramps users or developers mailing list, or post a bug. These tedious issues are usually easy to fix. Packaging gramps Gramps like this (as opposed to including everything and the kitchen sink) reduces the download size by more than a factor of three.
The binary application is built by downloading a Whole Pile of applications programs from various places on the web (about forty applicationsprograms) and building each of them to produce a utility to help building, or a library, or something. Just one of these applications is the gramps Gramps code developed with such effort by the gramps Gramps developers, so it's clear just how much work has gone into the whole thing.
==Building Gramps from Scratch==
57
edits

Navigation menu