Porting UNIX/Linux Applications to Mac OS X
PDF
Introduction
Overview of Mac OS X
The Family Tree
• BSD
• Mach
• NEXTSTEP
• Earlier Version of the Mac OS
Mac OS X and Darwin
What Macintosh Users Expect
Benefits of Porting to Mac OS X
Responsibilities of Porting to Mac OS X
Preparing to Port
The Mac OS X Command-Line Environment
Installing the Mac OS X Developer Tools
Building Makefile Projects With Xcode
Windowing Environment Considerations
Working with 64-bit Software
Compiling Your Code in Mac OS X
Using GNU Autoconf, Automake, and Autoheader
Compiling for Multiple CPU Architectures
Cross-Compiling a Self-Bootstrapping Tool
Conditional Compilation on Mac OS X
Choosing a Default Compiler
Using the gcc_select Command
Setting Compiler Flags
Understanding Two-Level Namespaces
Executable Format
Dynamic Libraries and Plug-ins
Using Dynamic Libraries at Link Time
Using Dynamic Libraries Programmatically
Compiling Dynamic Libraries and Plugins
Bundles
Application Bundles
Frameworks
For More Information
Using Mac OS X Native Application Environments
Choosing a Native Application Environment
Cocoa
Benefits of Cocoa Development
Drawbacks of Cocoa Development
Example: Calling C or C++ Code With Cocoa
Java
Benefits of Java Development
Drawbacks of Java Development
Carbon
Benefits of Carbon Development
Drawbacks of Carbon Development
Lower-Level Graphics Technologies
Quartz
Benefits of using Quartz
Drawbacks to using Quartz
OpenGL
Benefits of using OpenGL
Drawbacks to using OpenGL
QuickTime
Benefits of using QuickTime
Drawbacks to using QuickTime
Choosing a Graphical Environment for Your Application
What Kind of Application Are You Porting?
How Well Does It Need to Integrate With Mac OS X?
Does Your Application Require Cross-Platform Functionality?
Using Traditional UNIX Graphical Environments
Choosing a UNIX Graphical Environment
X11R6
Benefits of X11R6 Development
Drawbacks of X11R6 Development
Tcl/Tk
Benefits of Tk Development
Drawbacks of Tk Development
Qt
Benefits of Qt Development
Drawbacks in Qt Development
GTK+/GTKmm
Benefits of GTK+/GTKmm Development
Drawbacks in GTK+/GTKmm Development
wxWidgets
Wrapping a Command Line Application with a GUI Interface
Choosing a Wrapping Method
File Access Considerations
For More Information
Porting File, Device, and Network I/O
How Mac OS X File I/O Works
Using Carbon APIs for File I/O
Using Cocoa APIs for File I/O
Presenting File Open and Save Dialog Boxes
How Mac OS X Device I/O Works
File System Organization
How Mac OS Networking Works
Distributing Your Application
Bundles vs. Installers
Packaging Basics
Disk Utility (or Disk Copy)
Creating Disk Images Programmatically Using hdiutil
Tell the World About It
Additional Features
AppleScript and AppleScript Studio
Audio Architecture
Boot Sequence
Configuration Files
Device Drivers
The File System
File-System Structure and Visibility
Supported File-System Types
The Kernel
Open Directory and the dscl Tool
Example: Adding a User From the Command Line
Printing (CUPS)
Bonjour
Scripting Languages
Security and Security Services
Role-Based Authentication
(Re)designing for Portability
What is Portability?
Using Abstraction Layers
Avoid Conditionalizing Code
GUI Abstraction Issues
Other General Rules
Using Plug-Ins and Libraries Effectively
Designing a Plug-In Architecture
Simplicity
Extensibility
Nesting Modules for Shared Functionality
Example: Database Support
Architectural Portability
Glossary
Revision History