-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfpcmac.adp
289 lines (269 loc) · 14.1 KB
/
fpcmac.adp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
<master>
<property name="title"><trn key="website.fpcmac.title" locale="en_US">Free Pascal - Free Pascal on the Macintosh</trn></property>
<property name="entry">develop</property>
<property name="subentry">fpcmac</property>
<property name="header"><trn key="website.fpcmac.header" locale="en_US">Free Pascal on the Macintosh</trn></property>
<trn key="website.fpcmac.macintosh" locale="en_US">
<p>Welcome to the FreePascal on the Macintosh page. Here is information
especially for you who want to write a program for the Macintosh. </p>
</trn>
<h2><trn key="website.fpcmac.news" locale="en_US">News:</trn></h2>
<trn key="website.fpcmac.news20090209" locale="en_US">
<b>2009-02-09:</b> <br>
<br>
<p> The download statistics indicate that the snapshots below are still downloaded a lot. Note that all fixes from those snapshots are also in the official release of FPC 2.2.2 (and will be also in later versions, when they become available), which was released in August 2008. Since FPC 2.2.2 also contains many additional fixes, we recommend you to use that version. It is available from the regular download pages. </p>
</trn>
<trn key="website.fpcmac.news20071114" locale="en_US">
<b>2007-11-14:</b> <br>
<br>
<p> There are some errors in the new linker shipped with Xcode 3.0/Mac OS X 10.5. A detailed overview was posted to the <a href="http://lists.freepascal.org/lists/fpc-pascal/2007-October/015365.html">fpc-pascal mailing list</a>. We have worked around most of those issues and created (stable) development snapshots for both <a href="ftp://ftp.freepascal.org/pub/fpc/snapshot/v22/powerpc-macosx/fpc-2.2.1-r8950.powerpc-macosx.dmg">PowerPC</a> and <a href ="ftp://ftpmaster.freepascal.org/pub/fpc/snapshot/v22/i386-macosx/fpc-2.2.1-r8950.intel-macosx.dmg">Intel</A>. These are intended to be installed on top of the 2.2.0 release version. Future releases will have these fixes incorporated. </p>
<p> One linker bug cannot be completely worked around in the compiler, which is related to the Stabs debugging format. For this reason, we recommend to switch to the Dwarf debugging format on Mac OS X 10.5. On the command line, you can do this by using -gw instead of -g to generate debugging information. In the Xcode projects, add -gw at the end of the <b>FPC_SPECIFIC_OPTIONS</b> project setting for the <i>Debug</i> configuration. </p>
</trn>
<trn key="website.fpcmac.news20060827" locale="en_US">
<b>2006-08-27:</b> <br>
<br>
Regular snapshots of FPC 2.1.1 (both for PowerPC and for Intel - the latter
denoted as i386) are now generated by and available from <a href="http://wiki.lazarus.freepascal.org/index.php/Lazarus_Snapshots_Downloads">the Lazarus team</a>. <br>
<br>
If you only need the compiler (to either use it from the command line or from Xcode),
you only have to download and install the "fpc" package. <br>
<br>
</trn>
<trn key="website.fpcmac.news20051218" locale="en_US">
<b>2005-12-18:</b> <br>
<br>
Version 2.0.2 that was released a few weeks ago has all fixes and improvements of the 2.1.1 snapshot that was here (like Mac Pascal style objects and creation
of dynamic libraries). Additionally, it doesn't suffer from the installation
problems the 2.1.1 snapshot installer had. Get the release <a href="http://www.freepascal.org/down/powerpc/macosx@x@">here</a>. <br>
<br>
</trn>
<trn key="website.fpcmac.news20050823" locale="en_US">
<b>2005-07-23:</b> <br>
<br>
The 2.1.1 snapshot that was here is no longer available. <br>
<br>
If you really need to be up to date with FPC,
please consider using Subversion, and build the compiler by your self. <br>
<br>
Some changes:
<ul>
<li> No more "_main" symbol in the system unit (so can link with C main programs) </li>
<li> Shared library creation support under Mac OS X </li>
<li> Several bugfixes related to overflow checking on PPC </li>
</ul>
</trn>
<trn key="website.fpcmac.news20050629" locale="en_US">
<b>2005-06-29:</b> <br>
<br>
There is now a <a href="http://wiki.freepascal.org/Porting_from_Mac_Pascal"> wiki page</a> covering porting issues, from traditional mac pascals to FPC. <br>
<br>
</trn>
<trn key="website.fpcmac.news20050621" locale="en_US">
<b>2005-06-21:</b> <br>
<br>
A FPC 2.1.1 snapshot is available <a href=
"http://www.elis.ugent.be/~jmaebe/nobackup/fpc/fpc-2.1.1.powerpc-macosx.dmg"
> here</a> (10.8 MB, does not include the PDF documentation). It includes:
<ul>
<li> Support for Macintosh Object Pascal in Macpas mode (includes
support for mixing in Delphi-style OOP programming in Macpas mode,
except that you have to use "object" instead of "class" everywhere --
all occurrences of "class" are simply internally replaced by the
_OBJECT compiler token) </li>
<li> Fixed bug which caused stack corruption in procedures receiving
floating point parameters and parameters on the stack (only if the
caller side was compiled by FPC) </li>
<li> Fixed bug in overflow checking of integer operations (some
calculations were buggy if overflow checking is turned on, which is
the case in the default development building style of Xcode if you
use the integration kit) </li>
<li> Fixed bug in division of unsigned numbers > $7fffffff by a power of 2 </li>
</ul>
Should you desire to do so, you can switch back to 2.0 by simply
installing the 2.0 package again. <br>
<br>
</trn>
<trn key="website.fpcmac.news20050515" locale="en_US">
<b>2005-05-15:</b> <br>
<br>
<b>At last !!!!!</b> Free Pascal 2.0 is released for Mac OS X and classic Mac OS,
as well as for other targets. <br>
<br>
This means Free Pascal for the mac is not considered beta anymore.
Get it on one of the <a href="download@x@"> mirror download sites</a>. <br>
<br>
</trn>
<hr>
<trn key="website.fpcmac.targets" locale="en_US">
<h2>Targets on the Macintosh:</h2>
<p>
<TABLE BORDER=1 CELLPADDING=2>
<tr>
<TH WIDTH="22%"> <P ALIGN=LEFT>Target / Processor </th>
<TH WIDTH="9%"> <P ALIGN=LEFT>Status </th>
<TH WIDTH="43%"> <P ALIGN=LEFT>Remark </th>
<TH > <P ALIGN=LEFT>Contact </th>
</tr>
<tr>
<TD WIDTH="22%"><p><a href="#TargetDarwin"><b>Darwin</b> on PowerPC</a> </td>
<TD WIDTH="9%"><p>final </td>
<TD WIDTH="43%"><p>For Mac OS X </td>
<TD ><p><a href="mailto:jonas@SPAM.freepascal.ME.org.NOT">jonas@SPAM.freepascal.ME.org.NOT</a> </td>
</tr>
<tr>
<TD WIDTH="22%"><p><a href="#TargetMacOS"><b>Mac OS</b> on PowerPC</a> </td>
<TD WIDTH="9%"><p>final </td>
<TD WIDTH="43%"><p>Target Mac OS means classic Mac OS, up to System 9.x.
Although it of course also work in the classic
environment in Mac OS X </td>
<TD ><p><a href="mailto:olle.raab@freepascal.org">olle.raab@freepascal.org</a> </td>
</tr>
<tr>
<TD WIDTH="22%"><p>Mac OS on M68K </td>
<TD WIDTH="9%"><p>not planned </td>
<TD WIDTH="43%"><p>If someone is interrested to contribute, there is a
possiblity to implement this target. There is support for
MC68000 in the FPC source code, although not updated for a while. </td>
<TD ><p> </td>
</tr>
</table>
</p>
</trn>
<trn key="website.fpcmac.dialect" locale="en_US">
<h2>Mac Pascal dialect</h2>
The dialect of Pascal supported by popular Pascals on Macintosh is supported in part. <a href="#MacDialect">Read more here. </a>
</trn>
<hr>
<trn key="website.fpcmac.darwin" locale="en_US">
<h1><a name="TargetDarwin"></a>Target Darwin (Mac OS X)</h1>
<!--
<p>Unfortunatelly the official beta release (Free Pascal 1.9.4) has a severe bug
which has showed up for some users.
An updated version of the compiler (Free Pascal 1.9.5 2004-09-10) can instead be
<a href="http://www.elis.ugent.be/~jmaebe/nobackup/fpc/fpc-macosx-1.9.5.dmg">
downloaded here.</a></p>
-->
<p>Free Pascal 2.0 for Mac OS X is the current release. It should at least work
on Mac OS X 10.1 and higher. It requires that you have installed <a href="http://developer.apple.com/tools/macosxtools.html"> XCode from Apple</a>, to have assembler, linker and make tools available to fpc.
For older versions of Mac OS X you should install Apple Development Tools instead.
Both can be downloaded for free from Apple, but requires that you
register yourself as a member of Apple Developer Connection.
Both are also included in the Mac OS X bundle.</p>
<p>To download, go to the <a href="download@x@">Download page</a>,
and choose a mirror site near you (to limit net traffic).
The documentation is included, but can also be downloaded separatelly.
If you want the source code, it has to be downloaded separatelly.</p>
There most recent FPC 2.1.1 snapshot is available <a href=
"ftp://ftp.freepascal.org/pub/fpc/snapshot/v21/powerpc-macosx/fpc-2.1.1.powerpc-macosx.dmg"
> here</a> (10.4 MB)
with, among others, support for mac style object pascal. See above under NEWS.
<p>Note that the compiler is a unix style program and is run from the
Terminal on Mac OS X.</p>
<p>Please report any bugs encountered.</p>
</trn>
<trn key="website.fpcmac.xcode" locale="en_US">
<h2>Using FPC from XCode</h2>
It is possible to use Free Pascal from within XCode (Mac OS X 10.3 is required).
Look at the step-by-step instruction of how to download and install the <A href = "xcode.html">XCode Integration Kit.</a> Thanks to Rolf Jansen for this contribution.
</trn>
<trn key="website.fpcmac.classic" locale="en_US">
<p>
<h1><a name="TargetMacOS"></a>Target Mac OS (Classic Mac OS)</h1>
<p>Free Pascal 2.0 for Mac OS is the current release. It will work on
latest classic Mac OS (that is 9.2.2) and below, probably down to 7.1.2 (the first
Mac OS for PowerPC), and also in the classic compatibility environment on Mac OS X.
However it has only been tested on Mac OS 9 and Mac OS X classic environment.</p>
<p>It requires that you have installed Macinstosh Programmers Workshop (MPW)
which can be <a href="http://developer.apple.com/tools/mpw-tools/"> downloaded for free from Apple</a>.</p>
<p>To download, go to the <a href="download@x@">Download page</a>,
and choose a mirror site near you (to limit net traffic).
The documentation, as well as the source code (if you need it),
has to be downloaded separatelly.</p>
<p>Note that the compiler is an MPW tool.</p>
<p>Please report any bugs encountered.</p>
</trn>
<trn key="website.fpcmac.status" locale="en_US">
<h2>Current status of classic Mac OS</h2>
<p>
<TABLE BORDER=1>
<tr>
<TD WIDTH=116><p><b>Native FPC compiler (as an MPW tool)</b> </td>
<TD WIDTH=146><p>Almost complete </td>
<td></td>
</tr>
<tr>
<TD WIDTH=116><p><b>Unit System.pp</b> </td>
<TD WIDTH=146><p>Complete </td>
<td><p>The system unit is implicitly used by every program. Contains basic file and
memory handling among others. </td>
</tr>
<tr>
<TD WIDTH=116><p><b>Unit Dos.pp</b> </td>
<TD WIDTH=146><p>Complete </td>
<td><p>Contrary to what its name suggests, the DOS unit is cross
plattfrom and contains utility routines for file and date
handling, beyond that in System.pp. It is reminiscent from
Turbo Pascal. </td>
</tr>
<tr>
<TD WIDTH=116><p><b>Unit Sysutils.pp</b> </td>
<TD WIDTH=146><p>Planned </td>
<td><p>A moderner alternative to unit DOS, compatible with
Delphi. </td>
</tr>
<tr>
<TD WIDTH=116><p><b>Unit MacOS</b> </td>
<TD WIDTH=146><p>Complete </td>
<td><p>API to the Macintosh Toolbox </td>
</tr>
<tr>
<TD WIDTH=116><p><b>Units strings objpas heaptrc getopts etc</b> </td>
<TD WIDTH=146><p>Implemented. </td>
<td><p>They are target independent. </td>
</tr>
<tr>
<TD WIDTH=116><p><b>Other units</b> </td>
<TD WIDTH=146><p>Non-existent. Some will be implemented. </td>
<td><p>Implementation will depend on how important the unit is
and if difficulties arise. </td>
</tr>
</table>
</p>
</trn>
<trn key="website.fpcmac.debugging" locale="en_US">
<h2>Debugging</h2>
<p> There is some limited possibilities to debug programs in classic Mac OS. See <a href="http://wiki.freepascal.org/MPW_debugging">MPW debugging</a> in the wiki. </p>
<p> As an alternative, you might do the main debugging in a Mac OS X/Darwin
version of your program. </p>
<h1><a name="MacDialect"></a>The Mac Dialect</h1>
<p>There are three major Pascal dialects: Turbo Pascal (extended to
Delphi, supported by FreePascal, and partially by Gnu Pascal),
Extended Pascal (an ISO standard, supported by Gnu Pascal, DEC
Pascal, Prospero Pascal), and the dialect originating from Apple
(commonly used in the Mac community, supported by MPW Pascal,
Metrowerks Pascal and Think Pascal). We call this dialect Mac Pascal
and there is a special language mode for it: MacPas. </p>
<p>Mode MacPas is a compatibility mode. It is probably not
possible to mimic the Mac Pascal dialect in detail. So the goal is to
implement often used constructs, if this doesn't require too much
effort, as well as easy-to-implement constructs.</p>
<p>To use MacPas, add <I>-Mmacpas</I> to the command line or insert the
compiler directive <I>{$MODE MACPAS}</I> in the source code.</p>
<p>Note that the mac pascal dialect and mac targets are not
interrelated. It is thus possible to write a mac program with the
turbo dialect and to write a Windows program with the mac dialect. </p>
<p> The following are supported:
Mac compiler directives like $SETC, $IFC, $ELSEC, $ENDC, $J, $Z.
Most of the constructs found in interface files, especially
Apples Universal Interfaces. Cycle, Leave, Otherwise. More is planned.
<p> More updated info on the <a href="http://wiki.freepascal.org/Mode_MacPas">Wiki page</a>.
</trn>
<trn key="website.fpcmac.questions" locale="en_US">
<hr>
<p>By Olle Raab</p>
<p> For questions and suggestions, we suggest subscribing on our <a href="http://www.freepascal.org/maillist.html"> mailing lists </a>,
in particular FPC-pascal for questions about using Free Pascal. </p>
<p>Or write to <a href="mailto:olle.raab@freepascal.org">olle.raab@freepascal.org</a> </p>
<p>Latest modified 2005-07-28</p>
</trn>
</html>