MacPython Logo from __future__ import *

buy music albums Silver Apples buy mp3 albums Tarrus Riley buy tracks mp3 Kravits buy Reaper albums mp3 buy Kravits albums music buy music Evita CD online albums mp3 Silver Apples download Madonna CD music buy tracks music Kravits download music albums Silver Apples

2005-02-09

Creating standalone Mac OS X applications

Filed under: macosx, py2app, python — bob @ 3:28 pm

py2app 0.1.8 will ship with a new script: macho_standalone (in svn already)

This script takes an application bundle as a parameter, and it does the following:

  • Scans every file in the application bundle for Mach-O files
  • Builds a dependency graph of every Mach-O file, copying in Mach-O files that are not part of the bundle already and not in a system location (/System or /usr except for /usr/local). Frameworks are a special case, they are copied in wholesale and then also scanned for additional Mach-O files (plugins, etc.).
  • Normalizes the Mach-O headers to point to the right place. Normally this means they will point to @executable_path/../Frameworks style paths.
  • Strips everything

The functionality in this script is used internally by py2app, with some additional special cases for frameworks. However, this script could be used for applications not written in Python.. perhaps as an alternative to the "copy files build phase" for frameworks in Xcode, or as part of the build process for other py2app-like environments (RubyCocoa, CamelBones, etc.)

Of lesser interest is the new macho_find script. Like the find tool, it walks files/directories and prints each on its own line to stdout. macho_find simply matches files that have the Mach-O signature, and could be used as input to a tool such as strip.

No Comments »

No comments yet.

RSS feed for comments on this post.

Leave a comment

What's a blog without spam? WP-Hashcash.

Powered by WordPress