TweetFollow Us on Twitter

Open Source Macintosh

Volume Number: 15 (1999)
Issue Number: 8
Column Tag: Open Source

Open Source on the Macintosh

by Steve Huntsberry

How Apple developers can benefit from the Apple Public Source project

Introduction to Open Source

In March, Apple announced that they were the first mainstream operating system provider to release their source code to the public with the launch of Darwin. Some may question this statement, given the popularity of Linux and other open source operating systems, but the fact remains that there are now some components of the Mac OS that are available as open source. This article will analyze Apple's commitment to open source and how Apple developers can benefit. At the end of this article are several Internet URLs where you can find the details of many of the topics discussed.

What is Open Source? The term "open source" has become popular recently in the media due to Linux, which some consider to be a threat to Microsoft Windows. The concept of open source has been around for quite some time. The definition used by Apple comes from the Open Source Initiative, which has determined that the Apple Public Source License conforms to their definition of open source.

The Apple Public Source License (APSL) binds the users of Apple's open source code and determines what you can and cannot do with it. The complete text of the APSL is available at the Apple Public Source web site. The key points of the APSL allow you to use the code provided for whatever purposes you wish without paying Apple, but if you modify any of the Apple-supplied portions, you must submit the changes back to Apple. Therefore you can write your own code that builds on Apple open source code without needing to hand all of your code over to Apple.

There are several goals for the Apple Public Source project. Apple benefits by having a group of developers to provide it with free improvements and bug fixes for its source code. Apple will also contribute their bug fixes and incremental improvements back to the open source community. One of the Darwin engineers made a presentation at the USENIX Technical Conference in June, describing Apple's plans for using open software in their commercial operating system.

Developers benefit by obtaining a better understanding of the system to allow them to fine-tune their application performance and to reduce development time. Developers can also add specific features to Apple software that Apple might not add by itself, in order to improve their own specialized applications.

Open Source is not the same as Free Software. The Free Software Foundation (FSF) was established many years ago by Richard Stallman, president of the FSF, founder of the GNU project, and principal author of the GNU C compiler (gcc), GNU symbolic debugger (gdb), and GNU emacs. The principal project of the FSF is the GNU operating system, a free version of Unix. The FSF is dedicated to eliminating restrictions on any copying, modification, or redistribution of computer programs. They advocate that all software should be completely free, and that developers should make their living through providing support for such free software.

The GNU General Public License (GPL) uses "copyleft" (rather than copyright) protection. It requires developers using GPL-protected source code to make all of their source code available. Therefore, if you write a new compiler using code from gcc, you must publish all of the source code to your new compiler under GPL, in addition to any modifications you made to the original gcc code. Richard Stallman has written a document detailing his problems with the Apple Public Source License, since it does not conform to the GPL definition of free software.

Apple does have support for its open source project from many of the other members of the open source community. Besides the approval of the Open Source Initiative, Apple has support from FreeBSD and NetBSD, two open source Unix operating systems based on Berkeley Standard Distribution (BSD) Unix.

Microsoft is not ignoring the developments in open source. Their external party line is that they do not consider open source to be a concern, however last year in October the "Halloween Documents" appeared on the Internet. These were leaked internal Microsoft memos describing the threat posed to the traditional Windows proprietary closed source model from open source software and from Linux in particular. It will be interesting to see what transpires in this arena.

Apple Open Source Projects

Currently there are three open source projects at Apple. OpenPlay is a network abstraction layer that runs on Mac OS 8 and Windows. The Darwin Streaming Server is a QuickTime streaming server that runs on Mac OS X Server. Darwin is the Mach plus FreeBSD foundation of Mac OS X and runs as a stand-alone Unix implementation. Apple indicates there are more open source projects in the works, but they do not plan to reveal them until they actually become available.

OpenPlay was originally developed for "Myth: The Fallen Lords" from Bungie Software, to support cross-platform network games between Mac OS 8 and Windows computers. OpenPlay provides a network abstraction layer for the Open Transport and WinSock APIs. It supports TCP/IP and AppleTalk (on Macintosh). It provides a plug-in architecture to allow developers to add new protocols. It is useful for any cross-platform networking application, not just for games.

Darwin Streaming Server sends streaming QuickTime data to clients across the Internet. It uses industry standard RTP, RTCP, and RTSP protocols. RTP is the Real-time Transport Protocol, providing transport layer functionality for real-time data over multicast or unicast connections. RTCP is the Real-Time Control Protocol, using RTP to synchronize transmissions between sender and receiver. RTSP is the Real-Time Streaming Protocol, providing VCR-like controls for content delivery, such as play, stop, pause, etc. Darwin Streaming Server has some limitations in that it requires hinted QuickTime files generated by QuickTime Pro, so providing streaming content is not entirely free. It also uses reflection and not true multicast, such that it is not scalable and is limited to about 1000 receivers per transmission.

Darwin is a stand-alone Unix implementation consisting of the Mach kernel plus the FreeBSD set of Unix tools. Darwin is perhaps the most exciting piece of Apple open source in that it is the core of Mac OS X (both Client and Server), such that any improvements made to Darwin will become improvements in Mac OS X. Darwin also provides several pieces of Apple technology, including AppleTalk networking, the HFS+ file system, and NetInfo (directory services from Mac OS X Server).

Darwin is useful for developers in two ways. Because it is the core of Mac OS X, improvements can be made by developers to Darwin that will later improve their applications running on Mac OS X. Darwin is also useful by itself, as it provides a full set of Unix tools and command-line interface that work with the Macintosh file system.

In May, Sassafras Software reported they were able to add AppleTalk networking support to the Mac OS X Server version of their KeyServer license metering product within a week. Their development work was greatly assisted by access to Darwin low-level source code. The key benefit was the ability to reconcile discrepancies between documentation and implementation quickly, which reduced their debugging time dramatically.

Currently Darwin runs on PowerPC hardware, although Apple is considering making it work on Intel hardware. The original NextStep ran on Intel, so there is no technical reason preventing Darwin from running on Intel hardware. However, Apple wants to concentrate on PowerPC development, and supporting Intel hardware would require additional development work and additional testing. Such a commitment remains under consideration. If Intel support is important for you, then you may want to voice your opinion to Apple.

Other Open Source Projects

As noted above, the Apple open source project is relatively new to the world of open source. To find out more about open source, one should look into the existing open source projects. The GNU Project and the Free Software Foundation were discussed above. Perhaps the most popular open source project today is Linux, an open source Unix operating system. Red Hat, Inc. is one of the most well-known Linux distributors. Although Linux is free, Red Hat packages it with a number of useful tools and support and sells it on CD-ROM. Debian is another Linux distributor. The GNOME project is designing an open source user interface for Linux. One of the major drawbacks of any Unix-like operating system is the command-line interface, which is difficult to use for people used to a windowing environment. Some people think that once Linux has a modern user interface it will pose a real threat to Microsoft Windows. Other open source Unix operating systems include FreeBSD, NetBSD, and OpenBSD.

There also a few open source applications. The Apache project maintains an open source HTTP server that is used on over sixty percent of the Web sites on the Internet. The Mozilla project is the open source version of Netscape Communicator, the Web browser and e-mail/news client. Both of these projects invite outside developers to help to improve their respective applications.

Open Source on the Web

Apple Open Source Infrastructure

Apple has put together a number of resources to assist developers with open source on the Macintosh. The Apple Public Source web page contains a wealth of information, including open source news, developer registration, Internet mailing lists, Usenet newsgroups, etc. Soon they plan to have centralized bug tracking, most likely following the Bugzilla model used by the Mozilla project. At the Apple Worldwide Developers Conference (May 10), Apple quoted figures of 33,000 registered developers and 185,000 downloads of open source software, following its initial release on March 16.

Recently Apple announced support for source code management through Concurrent Versions System (CVS). This is a source code management system similar to SourceSafe or Perforce. CVS enables access to the very latest source code releases, change logs, and incremental updates. CVS access is not yet available, but should be soon. Mac OS 8 users can use MacCVS Pro, a CVS client sponsored by Mozilla. The Mozilla Web site is also a good source for CVS documentation.

Installing Open Source Software

Once you have registered as an open source developer and downloaded the appropriate software, you will need to get it installed. As this is a new project for Apple, installation can be tricky and frustrating. Eventually Apple plans to have a more robust installation solution, but for now you will just have to bear with them.

Installing OpenPlay is reasonably straightforward. The OpenPlay distribution consists of a StuffIt archive containing CodeWarrior projects, C source and header files, and documentation. The code files are split into folders labeled Macintosh, Windows, and Common (with cross-platform code). There is also a test application so you can see how it works. The documentation is fairly spartan, but everything seems to be there.

Installing Darwin Streaming Server is somewhat trickier. The Darwin Streaming Server distribution consists of a zipped tar archive containing C++ source and header files, along with the requisite Makefiles and a few PowerPC binary files. There is one documentation file but it merely provides an overview; for the most part you are on your own.

Installing Darwin itself is the most convoluted process. Darwin has the same hardware requirements as Mac OS X Server, namely a Power Macintosh G3 with 64 MB of RAM. The installation requires 60 MB of free disk space. After you download the 45 MB Darwin image, you need to find a blank 1 GB or larger ATA or SCSI hard drive (fast-wide SCSI is not supported). Then use the Apple Software Restore utility to install the image on the hard disk. The hard disk will end up with a 1 GB UFS partition called "Darwin Root" containing the Darwin software, with any remaining space formatted as a Macintosh HFS+ format volume. You then use the System Disk utility to select the "Darwin Root" volume and restart. Eventually you will end up with a system which can be dual-booted in either Darwin or Mac OS mode.

This article covers Darwin version 0.2, released on May 10. There are two major changes that will occur between now and the release of Mac OS X client. First is that Mach 3.0 will be replacing Mach 2.5 as the kernel. Second is that IOKit will be replacing DriverKit for drivers. Therefore if you plan to modify or use code from either one of these areas, you may want to wait until Apple releases these modifications, or write your code in such a way that the switch will not be too painful.

Darwin Project Ideas

Apple would like to see more software that runs on Darwin. Currently Darwin is limited to basic Unix tools and a few Apple technologies such as AppleTalk. Apple would like to see real installer utilities, both to install Darwin itself, as well as to install other Darwin applications. They would also like developers to implement additional device drivers and file systems so Darwin can be made more universal. Another project might be some kind of user interface beyond the command-line interface, such as X-Windows. I am under the impression the Darwin team would like to see Darwin become a living, breathing operating system that can stand on its own merits, and not merely the core of Mac OS X.

Your Next Step

Open source on the Macintosh provides a number of new opportunities for developers. You can use the supplied libraries such as OpenPlay and Darwin Streaming Server to add features to your applications without reinventing the wheel. You can work with the Darwin source code to understand and/or improve the Mac OS X core so your Mac OS X applications run better. You can design entire applications to run on Darwin to provide services to users who may want to use the Mac kernel with BSD on PowerPC hardware, but who may not want the additional overhead of the Mac OS X environment.

Open source can also help Apple to make the Mac OS a better operating system. Darwin developers can work on core OS features to improve performance and to add special features. Apple system engineers can concentrate on Apple-specific pieces of technology, such as improving the user interface, ColorSync, QuickTime, Sherlock, and speech recognition.

You must decide for yourself how to make best use of open source on the Macintosh. You may even decide that your application is outside the scope of the open source libraries provided by Apple, and that you do not want to work on the Darwin core of Mac OS X. Even so, you may find that because others are working on the Apple open source projects, the Mac OS will be improved, and it will become a better place for you, your applications, and your users to exist.


Steve Huntsberry is a Computer Scientist in the Type Engineering department at Adobe Systems Inc. He is the Technical Lead for the Macintosh Type On Call 4.2 and Adobe Type Library 2.0J products. Steve can be reached at shuntsbe@adobe.com.

 
AAPL
$105.01
Apple Inc.
+0.18
MSFT
$45.45
Microsoft Corpora
+0.43
GOOG
$539.20
Google Inc.
-4.79

MacTech Search:
Community Search:

Software Updates via MacUpdate

BusyCal 2.6.3 - Powerful calendar app wi...
BusyCal is an award-winning desktop calendar that combines personal productivity features for individuals with powerful calendar sharing capabilities for families and workgroups. BusyCal's unique... Read more
calibre 2.7 - Complete e-library managem...
Calibre is a complete e-book library manager. Organize your collection, convert your books to multiple formats, and sync with all of your devices. Let Calibre be your multi-tasking digital... Read more
Skitch 2.7.3 - Take screenshots, annotat...
With Skitch, taking, annotating, and sharing screenshots or images is as fun as it is simple.Communicate and collaborate with images using Skitch and its intuitive, engaging drawing and annotating... Read more
Delicious Library 3.3.2 - Import, browse...
Delicious Library allows you to import, browse, and share all your books, movies, music, and video games with Delicious Library. Run your very own library from your home or office using our... Read more
Art Text 2.4.8 - Create high quality hea...
Art Text is an OS X application for creating high quality textual graphics, headings, logos, icons, Web site elements, and buttons. Thanks to multi-layer support, creating complex graphics is no... Read more
Live Interior 3D Pro 2.9.6 - Powerful an...
Live Interior 3D Pro is a powerful yet very intuitive interior designing application. View Video Tutorials It has every feature of Live Interior 3D Standard, plus some exclusive ones: Create multi... Read more
The Hit List 1.1.7 - Advanced reminder a...
The Hit List manages the daily chaos of your modern life. It's easy to learn - it's as easy as making lists. And it's powerful enough to let you plan, then forget, then act when the time is right.... Read more
jAlbum Pro 12.2.4 - Organize your digita...
jAlbum Pro has all the features you love in jAlbum, but comes with a commercial license. With jAlbum, you can create gorgeous custom photo galleries for the Web without writing a line of code!... Read more
jAlbum 12.2.4 - Create custom photo gall...
With jAlbum, you can create gorgeous custom photo galleries for the Web without writing a line of code! Beginner-friendly, with pro results Simply drag and drop photos into groups, choose a design... Read more
ExpanDrive 4.1.7 - Access remote files o...
ExpanDrive builds cloud storage in every application, acts just like a USB drive plugged into your Mac. With ExpanDrive, you can securely access any remote file server directly from the Finder or... Read more

Latest Forum Discussions

See All

nPlayer looks to be the ultimate choice...
Developed by Newin Inc, nPlayer may seem like your standard video player – but is aiming to be the best in its field by providing high quality video play performance and support for a huge number of video formats and codecs. User reviews include... | Read more »
Fighting Fantasy: Caverns of the Snow Wi...
Fighting Fantasy: Caverns of the Snow Witch Review By Jennifer Allen on October 24th, 2014 Our Rating: :: CLASSY STORYTELLINGUniversal App - Designed for iPhone and iPad Fighting Fantasy: Caverns of the Snow Witch is a sterling... | Read more »
A Few Days Left (Games)
A Few Days Left 1.01 Device: iOS Universal Category: Games Price: $3.99, Version: 1.01 (iTunes) Description: Screenshots are in compliance to App Store's 4+ age rating! Please see App Preview for real game play! **Important: Make... | Read more »
Toca Boo (Education)
Toca Boo 1.0.2 Device: iOS Universal Category: Education Price: $2.99, Version: 1.0.2 (iTunes) Description: BOO! Did I scare you!? My name is Bonnie and my family loves to spook! Do you want to scare them back? Follow me and I'll... | Read more »
Intuon (Games)
Intuon 1.1 Device: iOS Universal Category: Games Price: $.99, Version: 1.1 (iTunes) Description: Join the battle with your intuition in a new hardcore game Intuon! How well do you trust your intuition? Can you find a needle in a... | Read more »
Ravenous Rampage (Games)
Ravenous Rampage 1.0 Device: iOS Universal Category: Games Price: $.99, Version: 1.0 (iTunes) Description: | Read more »
Partia 2 (Games)
Partia 2 1.0.1 Device: iOS Universal Category: Games Price: $5.99, Version: 1.0.1 (iTunes) Description: Partia 2 is a SRPG (Strategy Role-playing) video game inspired by Fire Emblem and Tear Ring Saga series. In a high fantasy... | Read more »
Puzzle to the Center of the Earth Review
Puzzle to the Center of the Earth Review By Campbell Bird on October 23rd, 2014 Our Rating: :: SPELUNKING PUZZLESUniversal App - Designed for iPhone and iPad Do some puzzles to make some platforms in this smart and fun free-to-play... | Read more »
Puzzle to the Center of the Earth – Tips...
Dig this: Would you like to know what we thought of all this puzzling-around the deep recesses of the planet? Check out our Puzzle to the Center of the Earth review! Puzzle to the Center of the Earth is a surprisingly deep and challenging puzzle... | Read more »
Sleep Attack TD Review
Sleep Attack TD Review By Jennifer Allen on October 23rd, 2014 Our Rating: :: A TRUE TWISTUniversal App - Designed for iPhone and iPad Sleep Attack TD is a tower defense game with a difference – you can rotate the layout – and it’s... | Read more »

Price Scanner via MacPrices.net

13-inch 2.5GHz MacBook Pro on sale for $949,...
Best Buy has the 13″ 2.5GHz MacBook Pro available for $949.99 on their online store. Choose free shipping or free instant local store pickup (if available). Their price is $150 off MSRP. Price is... Read more
Save up to $125 on Retina MacBook Pros
B&H Photo has the new 2014 13″ and 15″ Retina MacBook Pros on sale for up to $125 off MSRP. Shipping is free, and B&H charges NY sales tax only. They’ll also include free copies of Parallels... Read more
Apple refurbished Time Capsules available sta...
The Apple Store has certified refurbished Time Capsules available for up to $60 off MSRP. Apple’s one-year warranty is included with each Time Capsule, and shipping is free: - 2TB Time Capsule: $255... Read more
Textilus New Word, Notes and PDF Processor fo...
Textilus is new word-crunching, notes, and PDF processor designed exclusively for the iPad. I haven’t had time to thoroughly check it out yet, but it looks great and early reviews are positive.... Read more
WD My Passport Pro Bus-Powered Thunderbolt RA...
WD’s My Passport Pro RAID solution is powered by an integrated Thunderbolt cable for true portability and speeds as high as 233 MB/s. HighlightsOverviewSpecifications Transfer, Back Up And Edit In... Read more
Save with Best Buy’s College Student Deals
Take an additional $50 off all MacBooks and iMacs at Best Buy Online with their College Students Deals Savings, valid through November 1st. Anyone with a valid .EDU email address can take advantage... Read more
iPad Air 2 & iPad mini 3 Best Tablets Yet...
The new iPads turned out to be pretty much everything I’d been hoping for and more than I’d expected.”More” particularly in terms of a drinking-from-a-firehose choice of models and configurations,... Read more
Drafts 4 Reinvents iOS Productivity App
N Richland Hills, Texas based Agile Tortoise has announced the release of Drafts 4 for iPhone and iPad. Drafts is a quick capture note taking app with flexible output actions. Drafts 4 scales from... Read more
AT&T accepting preorders for new iPads fo...
AT&T Wireless is accepting preorders for the new iPad Air 2 and iPad mini 3, cellular models, for $100 off MSRP with a 2-year service agreement: - 16GB iPad Air 2 WiFi + Cellular: $529.99 - 64GB... Read more
Apple offering refurbished Mac Pros for up to...
The Apple Store is offering Apple Certified Refurbished 2013 Mac Pros for up to $600 off the cost of new models. An Apple one-year warranty is included with each Mac Pro, and shipping is free. The... Read more

Jobs Board

*Apple* Solutions Consultant - Apple Inc. (U...
…important role that the ASC serves is that of providing an excellent Apple Customer Experience. Responsibilities include: * Promoting Apple products and solutions Read more
Senior Event Manager, *Apple* Retail Market...
…This senior level position is responsible for leading and imagining the Apple Retail Team's global event strategy. Delivering an overarching brand story; in-store, Read more
*Apple* Solutions Consultant (ASC) - Apple (...
**Job Summary** The ASC is an Apple employee who serves as an Apple brand ambassador and influencer in a Reseller's store. The ASC's role is to grow Apple Read more
Project Manager / Business Analyst, WW *Appl...
…a senior project manager / business analyst to work within our Worldwide Apple Fulfillment Operations and the Business Process Re-engineering team. This role will work Read more
*Apple* Retail - Multiple Positions (US) - A...
Job Description: Sales Specialist - Retail Customer Service and Sales Transform Apple Store visitors into loyal Apple customers. When customers enter the store, Read more
All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.