Mac:Quirks

From AMSN
Jump to: navigation, search

Contents

Intro

This page is designed to help anyone who is new to mac development, but is fairly proficient with the shell, and knows how to use a computer without a GUI. It's just a place to document all the strange and wonderful things that the mac team for aMSN do to make aMSN work on the Mac as a "native" desktop application.

This guide assumes the you have a Mac, are running the bash shell, and have Xcode tools installed with the "cross compiling SDKs" option enabled during the XCode install (namely the 10.4u SDK).

Build Dependencies

If you wish to build aMSN as a universal binary, you'll need aMSN's dependencies installed as universal binaries as well. Such as libjpeg and libpng. The easiest way is through MacPorts. After it installs, run:

sudo /opt/local/bin/port install jpeg +universal
sudo /opt/local/bin/port install libpng +universal

Compiling

Now that Apple have hardware with PPC and Intel cpu's we at aMSN should ideally provide transparent support for both architectures.

The basic step to compiling aMSN as a universal binary is to run the following before configuring:

export CFLAGS='-arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.3'
export CXXFLAGS=$CFLAGS
export LDFLAGS=$CFLAGS

And then configure, make, and run the finishbuild script:

./configure --prefix=/opt/local
make
./utils/macosx/finishbuild.sh

Make install is currently useless on OS X, as the installation process is very different for a native application.

Installation

The current proffered way of installing any mac application is to download a file called a "disk image" (.dmg) which contains a read only file system which the operating system mounts. It has the application bundle (the .app file), and usually a symbolic link to /Applications so the user can drag the .app to the link, to install the application.

.app Bundle

The .app bundle is a folder with a specific structure that the OS treats like an .exe on windows. There is no need to create this, as we simply modify the Wish.app bundle that is provided by Danien Steffen of the TclTk project. You can download the Wish.app files from here.

Packaging

Tools

Personal tools