Macintosh Programmer's Workshop

Last updated
Macintosh Programmer's Workshop
Developer(s) Apple Computer
Initial releaseSeptember 24, 1986;37 years ago (1986-09-24)
Stable release
3.6d7
Operating system Classic Mac OS
Type Software development tool
License closed-source freeware
Website Official MPW website at the Wayback Machine (archived May 14, 2011)

Macintosh Programmer's Workshop (MPW) is a software development environment for the Classic Mac OS operating system, written by Apple Computer. For Macintosh developers, it was one of the primary tools for building applications for System 7.x and Mac OS 8.x and 9.x. Initially MPW was available for purchase as part of Apple's professional developers program, but Apple made it a free download after it was superseded by CodeWarrior. On Mac OS X it was replaced by the Project Builder IDE, which eventually became Xcode.

Contents

Design

MPW provided a command line environment and tools, including 68k and PowerPC assemblers as well as Pascal, C and C++ compilers. The shell environment is somewhat similar to Unix shells in design, but is designed around the Macintosh's character set and GUI, replacing the usual terminal environment with a "worksheet" interface, allowing the user to select and run arbitrary sections of a shell script or to redo commands with no retyping. In addition, command line tools were commonly provided with a somewhat standardized graphical interface named Commando that provided limited access to the command line capabilities of the program. The debuggers were not integrated into MPW like most IDEs of today but the language compilers supported the symbolic debugging information file format used by the debugger. MPW supported a source-level debugger called SADE (Symbolic Application Debugging Environment). SADE was not an MPW Tool, but ran as a separate application with a user interface similar to MPW.

Apple's compilers had some features that were not common on other platformsfor example, the Pascal compiler was object-oriented, while the C and C++ compilers included support for length-prefixed strings (needed for Pascal-oriented APIs).

Pascal was Apple's original preferred language for Macintosh software development, [1] and MPW was initially released with only Pascal support. A C compiler was released with MPW 2.0. The MPW C compiler was written under contract for Apple by Greenhills, a Macintosh-variant of the Green Hills C compiler designed specially for Apple and which was similar to the version that was available for the Lisa Workshop. [2] [3] In addition, the original MPW C compiler was known for its casual and frequently humorous error messages ("we already did this function"), [4] as well as occasionally addressing users by name. [5] These quirks were not carried on after the PowerPC transition, when Apple replaced the originals with compilers written by Symantec. Pascal support was no longer provided by the mid-90s due to declining popularity of the language. MPW was always targeted to a professional audience and was seldom used by hobbyist developers due to the considerable price for the package; by the time it was made freeware it had long since been superseded by offerings from Symantec and Metrowerks, as well as Apple's own development tools inherited from NeXT and distributed for free with OS X. It was also occasionally available as a wrapper environment for third-party compilers, a practice used by both Metrowerks and Absoft among others. Apple has officially discontinued further development of MPW and the last version of OS X to run it is 10.4 'Tiger', the last one to support the Classic environment. Apple maintained a web site and mailing lists that supported the software long after its discontinuation, but that site now redirects to the Xcode page.

MPW Shell

The MPW Shell featured redirection of output to files, as well as to windows. If a file were open, the output would go to the file and to the open window. This redirection of output required significant patching out of the file system calls so that tools need not do anything special to inherit this feature: the MPW Shell did all of the work.

The MPW Shell command language was based on the Unix csh language, but was extended to support the main features of the Macintosh GUI. It had simple commands to create menus, dialogs (prompts), and new shell windows. The cursor could be controlled, and MPW scripts or tools could easily be attached to a menu item. Command key shortcuts could be specified. Window size and location could be controlled. These features were popular in commercial production environments, where complicated build and packaging processes were all controlled by elaborate scripts.

The shell had some important differences from its Unix counterparts. For instance, the classic Mac OS had nothing comparable to Unix fork(), so MPW tools were effectively called as subroutines of the shell; only one could be running at any one time, and tools could not themselves run other tools. These limitations were the inspiration for the MacRelix project, a "Unix-like system" for classic Mac OS. [6]

Look and feel

Functionally, a worksheet is a cross between a text editor document and an xterm window. Each worksheet window is persistently bound to a file. The user may type anything anywhere in the window, including commands, which can be executed via the keyboard's Enter key; command output appears at the insertion point. Unlike an xterm window, an MPW worksheet is always in visual editing mode and can be freely reorganized by its user. Hence a worksheet can be purely a command script or purely a text document or a mixture of the twoan integrated document describing the history, maintenance procedures and test results of a software project. The commercial BBEdit text editor retains a feature it calls "shell worksheets" on Mac OS X. The Emacs text editor provides shell buffers, a similar feature that works across platforms.

Other tools

MPW included a version of make. Its syntax was conceptually similar to that of Unix make, but used the MacRoman long f character to indicate dependencies. More significantly, since the limitations of the shell precluded the make program from running tools itself, it had to work by composing a script of compile/link actions to be run, then delivering that to the shell for execution. While this was good enough most of the time, it precluded makefiles that could make on-the-fly decisions based on the results of a previous action.

Although not implemented as MPW tools, the package also came with several source-level debuggers through its history; SourceBug and SADE (Symbolic Application Debugging Environment) were used on MC680x0 systems, while the Power Mac Debugger (known during development as R2Db [7] ) provided both local and remote debugging services for PowerPC systems, the latter by using a server program known as a "debugger nub" on the computer being debugged.

Writing MPW tools

MPW included a set of standard C libraries sufficient for developers to build their own MPW tools. Many Unix utilities could be ported with little change. One point of difficulty was the Mac OS newline convention, which was different from Unix. Another was the pathname separator, ":" in Mac OS, but many Unix utilities assumed "/". Many Unix utilities also assumed pathnames would not have embedded spaces, a common practice on Macs.

For a number of years, the GNU toolchain included portability support for MPW as part of libiberty. This was used to support MPW-hosted cross-compilers used by General Magic and several other developers.

History

MPW was started in late 1985 by Rick Meyers, Jeff Parrish, and Dan Smith (now Dan Keller). It was going to be called the Macintosh Programmer's System, or MPS. (Notice that coincidentally the three last names start with MPS.) 'MPS ' has always been the creator signature of the MPW Shell as a result of this. Since MPW was to be the successor to the Lisa Workshop, they decided to rename it the Macintosh Programmer's Workshop. Before the arrival of MPW, Mac applications had to be cross-developed on a Lisa.

The MPW Pascal compiler is descended from the Lisa Pascal compiler. Apple's Larry Tesler worked with Niklaus Wirth to come up with Object Pascal extensions which Ken Doyle incorporated in one of the last versions of the Lisa Pascal compiler. This enabled MacApp.

Early contributors included Rick Meyers (project lead and MPW Shell command interpreter), Jeff Parrish (MPW Shell editor), Dan Smith (MPW Shell commands), Ira Ruben (assembler and many of the tools including Backup, PasMat, and more), Fred Forsman (Make, Print, SADE, and assembler macro processor), Al Hoffman (Pascal compiler) Roger Lawrence (Pascal and C compilers, including the error messages), Ken Friedenbach (linker), Johan Strandberg (Rez, DeRez, RezDet), Steve Hartwell (C libraries), and Dan Allen (MacsBug, editor). The Apple Numerics Group also contributed math libraries.

MPW 1.0 was completed on September 24, 1986. A shell memory leak was fixed on October 10, 1986, and MPW 1.0.1 was born. MPW 2.0 was completed on July 20, 1987. MPW 3.0 was done November 30, 1988 and included a completely new C compiler. [8] Around the same time, the beta version of the C++ compiler as well as MacApp 2.0 (for Object Pascal) were made available. [9] MPW 3.1 and 3.2 came in the next few years, with MPW 3.3 released in May 1993, adding distributed tools support and incremental linking. [10] MPW 3.4 was completed July 14, 1995, and MPW 3.5 was done December 17, 1999. MPW 3.6 was under development when work was halted in late 2001.

During MPW's twilight years, Greg Branche supported MPW unofficially through the Apple MPW-dev mailing list. The list, and the lists.apple.com server that hosted it, was planned to be shut down January 17, 2014, [11] a decision that was later reversed. [12]

Legacy

MPW can still be used to develop for Mac OS X, but support is limited to Carbon applications for PowerPC-based computers. To develop Mac OS X applications based on other technologies, one must use either Xcode or another OS X-compatible development environment. MPW also included a version control system called Projector; this has been superseded by modern version control systems and is no longer supported in Mac OS X.

See also

Related Research Articles

An integrated development environment (IDE) is a software application that provides comprehensive facilities for software development. An IDE normally consists of at least a source-code editor, build automation tools, and a debugger. Some IDEs, such as NetBeans and Eclipse, contain the necessary compiler, interpreter, or both; others, such as SharpDevelop and Lazarus, do not.

Carbon was one of two primary C-based application programming interfaces (APIs) developed by Apple for the macOS operating system. Carbon provided a good degree of backward compatibility for programs that ran on Mac OS 8 and 9. Developers could use the Carbon APIs to port (“carbonize”) their “classic” Mac applications and software to the Mac OS X platform with little effort, compared to porting the app to the entirely different Cocoa system, which originated in OPENSTEP. With the release of macOS 10.15 Catalina, the Carbon API was officially discontinued and removed, leaving Cocoa as the sole primary API for developing macOS applications.

AppleScript is a scripting language created by Apple Inc. that facilitates automated control over scriptable Mac applications. First introduced in System 7, it is currently included in all versions of macOS as part of a package of system automation tools. The term "AppleScript" may refer to the language itself, to an individual script written in the language, or, informally, to the macOS Open Scripting Architecture that underlies the language.

The resource fork is a fork or section of a file on Apple's classic Mac OS operating system, which was also carried over to the modern macOS for compatibility, used to store structured data along with the unstructured data stored within the data fork.

<span class="mw-page-title-main">Xcode</span> IDE including tools for developing software for Apple platforms

Xcode is Apple's integrated development environment (IDE) for macOS, used to develop software for macOS, iOS, iPadOS, watchOS, tvOS, and visionOS. It was initially released in late 2003; the latest stable release is version 15, released on September 18, 2023, and is available free of charge via the Mac App Store and the Apple Developer website. Registered developers can also download preview releases and prior versions of the suite through the Apple Developer website. Xcode includes command-line tools which enable UNIX-style development via the Terminal app in macOS. They can also be downloaded and installed without the GUI.

<span class="mw-page-title-main">MacsBug</span> Low-level debugger, originally for Motorola 68000

MacsBug is a low-level debugger for the classic Mac OS operating system. MacsBug is an acronym for Motorola Advanced Computer Systems Debugger, as opposed to Macintosh debugger. The original version was developed by Motorola as a general debugger for its 68000 systems. — it was ported to the Mac as a programmer's tool early in the project's development.

CodeWarrior is an integrated development environment (IDE) published by NXP Semiconductors for editing, compiling, and debugging software for several microcontrollers and microprocessors and digital signal controllers used in embedded systems.

Object Pascal is an extension to the programming language Pascal that provides object-oriented programming (OOP) features such as classes and methods.

<span class="mw-page-title-main">ResEdit</span>

ResEdit is a discontinued developer tool application for the Apple Macintosh, used to create and edit resources directly in the Mac's resource fork architecture. It was an alternative to tools such as REdit, and the resource compiler Rez. For the average user, ResEdit was generally easier to use, because it used a graphical user interface. Although it had been intended to be a developer tool, power users often used it to edit icons, menus, and other elements of an application's GUI, customizing it to their own preferences.

<span class="mw-page-title-main">BBEdit</span> Proprietary text editor

BBEdit is a proprietary text editor made by Bare Bones Software, originally developed for Macintosh System Software 6, and currently supporting macOS.

Bedrock was a joint effort by Apple Computer and Symantec to produce a cross platform programming framework for writing applications on the Apple Macintosh and Microsoft Windows platforms. The project was a failure for a variety of reasons, and after delivering a developer preview version the project was abandoned in late 1993.

MacApp is the object oriented application framework for Apple Computer's discontinued classic Mac OS. Released in 1985, it transitioned from Object Pascal to C++ in 1991's version 3.0 release, which offered support for much of System 7's new functionality. MacApp was used for a variety of major applications, including Adobe Photoshop and SoftPress Freeway. Microsoft's MFC and Borland's OWL were both based directly on MacApp concepts.

<span class="mw-page-title-main">Metrowerks</span>

Metrowerks was a company that developed software development tools for various desktop, handheld, embedded, and gaming platforms. Its flagship product, CodeWarrior, comprised an IDE, compilers, linkers, debuggers, libraries, and related tools. In 1999 it was acquired by Motorola and in 2005 it was spun-off as part of Freescale, which continues to sell these tools. In 2015, Freescale Semiconductor was absorbed into NXP.

Think C is an extension of the C programming language for the classic Mac OS developed by Think Technologies, released first in mid-1986. THINK was founded by Andrew Singer, Frank Sinton & Mel Conway. The firm was later acquired by Symantec Corporation and the product continued to be developed by the original author, Michael Kahl. Versions 3 and later were essentially a subset of C++ and supported basic object-oriented programming (OOP) concepts such as single inheritance, and extensions to the C standard that conformed more closely to the needs of Mac OS programming. After version 6, the OOP facilities were expanded to a full C++ implementation, and the product was rebranded Symantec C++ starting version 7, then under development by different authors. Version 8 brought support for compiling to PowerPC.

The Apple Developer Tools are a suite of software tools from Apple to aid in making software dynamic titles for the macOS and iOS platforms. The developer tools were formerly included on macOS install media, but are now exclusively distributed over the Internet. As of macOS 10.12, Xcode is available as a free download from the Mac App Store.

<span class="mw-page-title-main">FutureBASIC</span>

FutureBasic is a free BASIC compiler for Apple Inc.'s Macintosh.

Absoft Fortran Compilers are set of Fortran compilers for Microsoft Windows, Apple Macintosh, and Linux produced by Absoft Corporation. The compilers are source code compatible across platforms.

References

  1. Webster, Bruce (February 1986). "Programming Tool and the Atari ST". BYTE. p. 331. Retrieved 9 May 2015.
  2. "Re: [Humor ] Old MPW C error messages". Archived from the original on 2014-05-28. Retrieved 2014-05-27.
  3. Allen, Dan (1 January 1988). "Dr Dobb's – The Macintosh Programmer's Workshop" . Retrieved 2021-02-21.
  4. MPW C Error Messages, May 15, 1994 - Robert Lentz
  5. "Re: Will the last one to leave please turn off the lights?". Archived from the original on 2014-05-28. Retrieved 2014-05-27.
  6. "MacRelix Origins".
  7. Short for RISC 2-machine Debugger; Falkenburg, Dave; Topping, Brian. "Debugging on PowerPC". MacTech .
  8. Poole, Lon (April 1989). "Developer Developments". Macworld . Vol. 6, no. 4. p. 93.
  9. Poole, Lon (April 1989). "C++ and MacApp 2.0". Macworld . Vol. 6, no. 4. p. 91.
  10. Cohen, Raines (24 May 1993). "MPW 3.3 release through APDA". MacWeek . Vol. 7, no. 21. p. 12.
  11. "Will the last one to leave please turn off the lights?". Archived from the original on 2014-05-28. Retrieved 2014-05-27.
  12. "Reprieve!". Archived from the original on 2014-02-14. Retrieved 2014-05-27.

Further reading