This is a description of the files in this directory, all of which have
to do with packaging on Mac OS X. They are useful only for those wanting
to build binary distributions of Zenmap for Mac OS X.

== Info.plist
A properties list file that whose contents are merged with the default
properties added by py2app.

== MacPorts-ports.diff
This patch against a MacPorts 1.9.1 ports tree allows building the
dependencies of Zenmap such that they are "universal"
(dual-architecture) and compatible with Mac OS X 10.4.

The following instructions show how to make a 10.4-compatible universal
environment suitable for building Zenmap packages. It will be a separate
installation in $HOME/macports-10.4u that won't interfere with your
normal MacPorts installation in /opt/local. These instructions were done
with MacPorts 1.9.1 on Mac OS X 10.6.4.

1. Install MacPorts to be universal.
	tar xzvf MacPorts-1.9.1.tar.gz
	cd MacPorts-1.9.1
	./configure --with-no-root-privileges --prefix=$HOME/macports-10.4u --with-tclpackage=$HOME/macports-10.4u/Library/Tcl --with-applications-dir=$HOME/macports-10.4u/Applications --with-universal-archs="i386 ppc"
	make
	make install
2. Update the ports tree.
	$HOME/macports-10.4u/bin/port sync
3. Set up a local ports tree.
	cd $HOME/macports-10.4u
	mkdir ports
	ln -s var/macports/sources/rsync.macports.org/release/ports ports.orig
	mkdir -p ports/graphics ports/lang ports/python ports/x11
	cp -R ports.orig/graphics/cairo ports/graphics/
	cp -R ports.orig/lang/perl5.8 ports/lang/
	cp -R ports.orig/python/py26-gobject ports/python/
	cp -R ports.orig/python/py26-gtk ports/python/
	cp -R ports.orig/python/py26-py2app-devel ports/python/
	cp -R ports.orig/python/py26-modulegraph-devel ports/python/
	cp -R ports.orig/x11/gtk2 ports/x11/
	cp -R ports.orig/x11/pango ports/x11/
4. Patch the tree
	patch -p0 < MacPorts-ports.diff
5. Build a port index.
	cd ports
	$HOME/macports-10.4u/bin/portindex
6. Edit the file $HOME/macports-10.4u/etc/macports/macports.conf.
   Add this line at the bottom:
	macosx_deployment_target	10.4
7. Edit the file $HOME/macports-10.4u/etc/macports/sources.conf.
   Add a line
	file:///Users/user/macports-10.4u/ports
   above the rsync line. (Replace "user" with your user name.)
8. Edit the file $HOME/macports-10.4u/etc/macports/variants.conf.
   Add the lines
	+universal
	+no_atlas
	-atlas
	-gcc44
	+no_tkinter
9. Install the dependencies of Zenmap.
	$HOME/macports-10.4u/bin/port install py26-gtk py26-py2app-devel

Here are instructions for updating the patch to keep up with MacPorts
changes. First, sync the original ports tree.
	sudo $HOME/macports-10.4u/bin/port sync
Restore a pristine partial ports tree:
	cd $HOME/macports-10.4u
	rsync -rv --existing --delete --exclude=PortIndex ports.orig/ ports/
Reapply the patch. Resolve any conflicts.
	patch -p0 --no-backup-if-mismatch < MacPorts-ports.diff
Make a new patch.
	diff --unidirectional-new-file -ru -x 'PortIndex*' ports.orig ports | grep -v '^Only in ' > new.diff
Check that it's all right, then rename it.
	mv new.diff MacPorts-ports.diff
Rebuild the port index.
	cd ports
	$HOME/macports-10.4u/bin/portindex

== make-bundle.sh
This script builds a .app bundle. It must be run from the root of the
Zenmap source tree. The finished bundle is put in dist/Zenmap.app.

== test_wrapper.py
This file contains unit tests for zenmap_wrapper.py, because it needs to
do some tricky escaping and substitution of configuration files.

== zenmap.icns
The icon file for the bundle. It was created using the Icon Composer
utility as described at
http://developer.apple.com/documentation/Cocoa/Conceptual/ObjCTutorial/08Configuring/08Configuring.html

== zenmap_auth.c
This is a simple wrapper program that attempts to run zenmap_wrapper.py
with privileges.

== zenmap_wrapper.py
This is a wrapper script that gets installed in the application bundle.
It sets up an execution environment and then calls the main zenmap
executable.
