<?xml version="1.0"?>
<!DOCTYPE abw PUBLIC "-//W3C//DTD ABW 1.0 Strict//EN" "http://www.abisource.com/awml.dtd">
<abiword version="" fileformat="1.0">
<!-- =====================================================================  -->
<!-- This file is an AbiWord document.                                      -->
<!-- AbiWord is a free, Open Source word processor.                         -->
<!-- You may obtain more information about AbiWord at www.abisource.com     -->
<!-- You should not edit this file by hand.                                 -->
<!-- =====================================================================  -->

<!--         Build_ID          = unknown -->
<!--         Build_Version     = (none) -->
<!--         Build_Options     = (none) -->
<!--         Build_Target      = (none) -->
<!--         Build_CompileTime = 09:13:52 -->
<!--         Build_CompileDate = Jul 20 2001 -->

<lists>
<l id="683860589" parentid="0" type="0" start-value="1" list-delim="%L." list-decimal="."/>
</lists>
<pagesize pagetype="Letter" orientation="portrait" width="8.500000" height="11.000000" units="inch" page-scale="1.000000"/>
<section>
<p props="text-align:center"><c props="lang:en-US; font-weight:bold; font-size: 24 pt">Mac porting guidelines</c></p>
<p props="text-align:center"><c props="lang:en-US">Hubert Figuière &lt;hfiguiere@teaser.fr&gt;</c></p>
<p props="text-align:center"><c props="font-family:Courier; lang:en-US">Revision $Id: MacPort_Documentation.abw,v 1.1 2001/07/20 15:43:14 hub Exp $</c></p>
<p style="Heading 1"><c style="Heading 1" props="lang:en-US">Platform</c></p>
<p><c props="lang:en-US">Target platform for MacOS port is both MacOS 8.6 and higher, using CarbonLib 1.2.5, and MacOS X 10.0.x and higher, using Carbon, CoreGraphics and UNIX (target binary is Mach-O).</c></p>
<p><c props="lang:en-US">Note: unless mentioned, everything that applies to MacOS 9 also applies to older supported version. This is just a writing simplification.</c></p>
<p style="Heading 2"><c style="Heading 2" props="lang:en-US">Why CarbonLib 1.2.5 ? How about MacOS 8.0 ?</c></p>
<p style="Normal Clean"><c style="Normal Clean" props="lang:en-US">We use ATSUI for typography because ATSUI is the recommended way to go under MacOS of advanced typography, and ATSUI is available starting MacOS 8.5. We also plan to use lot of feature like CoreFoundation and Interface builder NIBs that are available as part of CarbonLib. Since MacOS 8.6 is required for CarbonLib starting 1.1 and since this upgrade from MacOS 8.5 is free of charge, we felt that the need for 8.6 was not a bug cut-off.</c></p>
<p style="Normal Clean"><c style="Normal Clean" props="lang:en-US">If someone volunteer to port to an older version, feel free to submit patches.</c></p>
<p style="Heading 2"><c style="Heading 2" props="lang:en-US">Why Carbon on MacOS X and not Cocoa ?</c></p>
<p style="Normal Clean"><c style="Normal Clean" props="lang:en-US">Two reasons:</c></p>
<p level="1" listid="683860589" parentid="0" style="Normal Clean" props="font-family:Times New Roman; font-style:normal; font-weight:normal; bgcolor:transparent; start-value:1; list-style:Numbered List; text-indent:-0.3000in; text-decoration:none; lang:en-US; color:000000; font-size:12pt; margin-left:0.5000in; text-position:normal; field-font:NULL"><c style="Normal Clean" props="lang:en-US"></c><field type="list_label"></field><c type="list_label">	It is better to share as much code as possible between MacOS 9 and MacOS X versions. Hence Carbon is the choice</c></p>
<p level="1" listid="683860589" parentid="0" style="Normal Clean" props="font-family:Times New Roman; font-style:normal; font-weight:normal; bgcolor:transparent; start-value:1; list-style:Numbered List; text-indent:-0.3000in; text-decoration:none; lang:en-US; color:000000; font-size:12pt; margin-left:0.5000in; text-position:normal; field-font:NULL"><c type="list_label"></c><field type="list_label"></field><c type="list_label">	Mixing Objective-C and C++ is not easy. Carbon is raw C and match better what we want to do.</c></p>
<p level="1" listid="0" parentid="0" style="Heading 2" props="color:000000; margin-left:0in; text-decoration:none; start-value:1; text-position:normal; lang:en-US; text-indent:0in; bgcolor:transparent; list-style:Numbered List; font-style:normal"><c type="list_label" style="Heading 2">Why Mach-O and not CFM ?</c></p>
<p level="1" listid="0" parentid="0" style="Normal Clean" props="text-position:normal; margin-left:0in; text-decoration:none; start-value:1; color:000000; lang:en-US; text-indent:0in; bgcolor:transparent; list-style:Numbered List"><c type="list_label" style="Normal Clean">MacOS X port use CoreGraphics that is only available in Mach-O environment (in fact in CFM you have to tweak and manually load it). It is build using GNU tools so Mach-O is the only available target with Apple supplied cc. We want to be as UNIXish as possible on the low-end part, so using Mach-O is also the only way to go.</c></p>
<p level="1" listid="0" parentid="0" style="Normal Clean" props="text-position:normal; margin-left:0in; text-decoration:none; start-value:1; color:000000; lang:en-US; text-indent:0in; bgcolor:transparent; list-style:Numbered List"><c type="list_label" style="Normal Clean">We don’t mind providing 2 different versions, one for MacOS 9, one for MacOS X as both versions will be different.</c></p>
<p level="1" listid="0" parentid="0" style="Heading 1" props="text-position:normal; margin-left:0in; text-decoration:none; start-value:1; color:000000; lang:en-US; text-indent:0in; bgcolor:transparent; list-style:Numbered List"><c type="list_label" style="Heading 1">Building environment</c></p>
<p level="1" listid="0" parentid="0" style="Normal Clean" props="text-position:normal; margin-left:0in; text-decoration:none; start-value:1; color:000000; lang:en-US; text-indent:0in; bgcolor:transparent; list-style:Numbered List"><c type="list_label" style="Normal Clean">First read the BUILD.TXT file if you haven’t yet.</c></p>
<p level="1" listid="0" parentid="0" style="Heading 2" props="text-position:normal; margin-left:0in; text-decoration:none; start-value:1; color:000000; lang:en-US; text-indent:0in; bgcolor:transparent; list-style:Numbered List"><c type="list_label" style="Heading 2">MacOS 9</c></p>
<p level="1" listid="0" parentid="0" style="Normal Clean" props="text-position:normal; margin-left:0in; text-decoration:none; start-value:1; color:000000; lang:en-US; text-indent:0in; bgcolor:transparent; list-style:Numbered List"><c type="list_label" style="Normal Clean">For MacOS 9, there is not yet a pre-made project that is avilable for use with CodeWarrior. Recommended version is CodeWarrior 6. MPW build, even if it is currently committed, is not really working as MrCPP compiler is broken. Switching to CodeWarrior for MPW is a possible solution.</c></p>
<p level="1" listid="0" parentid="0" style="Heading 2" props="text-position:normal; margin-left:0in; text-decoration:none; start-value:1; color:000000; lang:en-US; text-indent:0in; bgcolor:transparent; list-style:Numbered List"><c type="list_label" style="Heading 2">MacOS X</c></p>
<p level="1" listid="0" parentid="0" style="Normal Clean" props="text-position:normal; margin-left:0in; text-decoration:none; start-value:1; color:000000; lang:en-US; text-indent:0in; bgcolor:transparent; list-style:Numbered List"><c type="list_label" style="Normal Clean">MacOS X build is done using the Apple provided cc and the GNU tools. GNU automake is required to build from CVS if you plan to use the autoconf build system (recommended). Otherwise the ancient make system works too.</c></p>
<p level="1" listid="0" parentid="0" style="Normal Clean" props="text-position:normal; margin-left:0in; text-decoration:none; start-value:1; color:000000; lang:en-US; text-indent:0in; bgcolor:transparent; list-style:Numbered List"><c type="list_label" style="Normal Clean">You’ll need around 400 MB of free disk space, including the source tree, and 192MB of RAM seems not always enough.</c></p>
<p level="1" listid="0" parentid="0" style="Heading 1" props="text-position:normal; margin-left:0in; text-decoration:none; start-value:1; color:000000; lang:en-US; text-indent:0in; bgcolor:transparent; list-style:Numbered List"><c type="list_label" style="Heading 1">API and Architecture</c></p>
<p level="1" listid="0" parentid="0" style="Normal Clean" props="text-position:normal; margin-left:0in; text-decoration:none; start-value:1; color:000000; lang:en-US; text-indent:0in; bgcolor:transparent; list-style:Numbered List"><c type="list_label" style="Normal Clean">This will explain the use of the API within AbiWord for Mac.</c></p>
<p level="1" listid="0" parentid="0" style="Heading 2" props="text-position:normal; margin-left:0in; text-decoration:none; start-value:1; color:000000; lang:en-US; text-indent:0in; bgcolor:transparent; list-style:Numbered List"><c type="list_label" style="Heading 2">Graphics</c></p>
<p level="1" listid="0" parentid="0" style="Normal Clean" props="text-position:normal; margin-left:0in; text-decoration:none; start-value:1; color:000000; lang:en-US; text-indent:0in; bgcolor:transparent; list-style:Numbered List"><c type="list_label" style="Normal Clean">This is the hardest part. Choice have been made to use CoreGraphics on MacOS X and QuickDraw (because of no other choice) for MacOS 9. Both graphics will makes use of ATSUI, hence providing a common font handling between the 2 versions.</c></p>
<p level="1" listid="0" parentid="0" style="Normal Clean" props="text-position:normal; margin-left:0in; text-decoration:none; start-value:1; color:000000; lang:en-US; text-indent:0in; bgcolor:transparent; list-style:Numbered List"><c type="list_label" style="Normal Clean">MacOS 9 implementation is in gr_MacQDGraphics while MacOS X implementation is in gr_MacGraphics. There is no problem breaking the source file naming scheme for MacOS 9 as neither MPW nor CW uses the standard build system based on GNU tools.</c></p>
<p level="1" listid="0" parentid="0" style="Heading 2" props="text-position:normal; margin-left:0in; text-decoration:none; start-value:1; color:000000; lang:en-US; text-indent:0in; bgcolor:transparent; list-style:Numbered List"><c type="list_label" style="Heading 2">Dialogs</c></p>
<p level="1" listid="0" parentid="0" style="Normal Clean" props="text-position:normal; margin-left:0in; text-decoration:none; start-value:1; color:000000; lang:en-US; text-indent:0in; bgcolor:transparent; list-style:Numbered List"><c type="list_label" style="Normal Clean">Choice have been made to use Interface Builder for the Carbon dialogs. This makes MacOS X a requirement for this development, but this help fasten the development cycle as Interface Builder is a great tool.</c></p>
<p level="1" listid="0" parentid="0" style="Normal Clean" props="text-position:normal; margin-left:0in; text-decoration:none; start-value:1; color:000000; lang:en-US; text-indent:0in; bgcolor:transparent; list-style:Numbered List"><c type="list_label" style="Normal Clean">NIB files are compatible with MacOS 9 using CarbonLib 1.2.5.</c></p>
<p level="1" listid="0" parentid="0" style="Normal Clean" props="text-position:normal; margin-left:0in; text-decoration:none; start-value:1; color:000000; lang:en-US; text-indent:0in; bgcolor:transparent; list-style:Numbered List"><c type="list_label" style="Normal Clean"></c></p>
</section>
</abiword>
