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-1.8.2-10.4.diff
This patch modifies the MacPorts 1.8.2 source to build against the 10.4u
SDK.

== MacPorts-ports.diff
This patch against a MacPorts 1.8.2 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 /opt/local-universal-10.4 that won't interfere with your
normal MacPorts installation in /opt/local. These instructions were done
with MacPorts 1.8.2 on Mac OS X 10.6.2.

1. Install MacPorts to be universal.
	tar xzvf MacPorts-1.8.2.tar.gz
	cd MacPorts-1.8.2
	patch -p1 < MacPorts-1.8.2-10.4.diff
	sudo mkdir /Library/Tcl/macports-universal-10.4
	./configure --prefix=/opt/local-universal-10.4 --with-tclpackage=/Library/Tcl/macports-universal-10.4 --with-applications-dir=/opt/local-universal-10.4/Applications --with-universal-archs="i386 ppc"
	make
	sudo make install
2. Update the ports tree.
	sudo /opt/local-universal-10.4/bin/port sync
3. Set up a local ports tree.
	mkdir -p ~/macports-sources
	cd ~/macports-sources
	ln -s /opt/local-universal-10.4/var/macports/sources/rsync.macports.org/release/ports ports.orig
	mkdir -p ~/macports-sources/ports/{gnome,lang,perl,python,x11}
	cp -R ports.orig/gnome/gnome-doc-utils ports/gnome/
	cp -R ports.orig/lang/python26 ports/lang/
	cp -R ports.orig/perl/p5-locale-gettext ports/perl/
	cp -R ports.orig/python/{py26-gobject,py26-py2app-devel} ports/python/
	cp -R ports.orig/x11/{gtk2,pango} ports/x11/
4. Patch the tree
	patch -p0 < MacPorts-ports.diff
5. Build a port index.
	cd ~/macports-sources/ports
	/opt/local-universal-10.4/bin/portindex
6. Edit the file /opt/local-universal-10.4/etc/macports/sources.conf.
   Add a line
	file:///Users/user/macports-sources/ports
   above the rsync line.
7. Edit the file /opt/local-universal-10.4/etc/macports/sources.conf.
   Add the lines
	+universal
	+no_atlas
	+no_gcc43
8. Install the dependencies of Zenmap.
	sudo /opt/local-universal-10.4/bin/port install py25-gtk py25-py2app-devel

Here are instructions for updating the patch to keep up with MacPorts
changes. First, sync the original ports tree.
	sudo /opt/local-universal-10.4/bin/port sync
Restore a pristine partial ports tree:
	rsync -rv --existing --delete --exclude=PortIndex ports.orig/ ports/
Reapply the patch. Resolve any conflicts.
	patch -p0 --no-backup-if-mismatch < macports-1.8.0-universal.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
	/opt/local-universal-10.4/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.
