From Lazarus wiki
Revision as of 18:46, 1 April 2007 by Mischi (talk | contribs) (typos corrected.)

MPW stands for Macintosh Programmers Workshop, a unix inspired environment, created by Apple Computer in the early eighties, to facitlitate development of classic Macintosh programs. Previously a commerial product, it is today free to download and use, MPW or ToolServer is required if one wants to develop fpc programs for Target MacOS. (ToolServer is a stripped down engine for running MPW tools without MPW, and is included within MPW.)

Native Macinstosh files have CR as line ending and also have a file type and creator code, which are not visible to the user.

MPW can also open files with LF (unix) line ending, and will also preserve them when saving the file. It also opens files without a mac file type and creator.

Some tools however, specifically PPCAsm, does not accept LF in its input, although it does not require the file to have a mac file type.

MPW may execute any text file as a script, it doesn't need any extension. However, it requires the file to have a mac file type, and specifically the type 'TEXT'.

With the following MPW command, file type and creator code can be changed:

 SetFile -c 'MPS ' -t 'TEXT' filename

...which changes the file type to 'TEXT' and creator to 'MPS ' which is the creator code for MPW.

Note: Watch out for the blank after MPS in the string 'MPS '.