|
1 | 1 | :doctitle: Compiling PasDoc from sources |
| 2 | +:sectnums: |
| 3 | +:toc: left |
| 4 | +:toclevels: 4 |
2 | 5 |
|
3 | | -How to compile link:index[PasDoc]? |
| 6 | +## Get the source code |
4 | 7 |
|
5 | | -## [[fpc]] FPC |
6 | | - |
7 | | -The preferred http://www.freepascal.org/[FreePascal] version should always be the latest stable FPC release. Any FPC >= 2.6.0 is supported, although compilation with older versions is less extensively tested. Using the latest stable FPC is always the best option. |
8 | | - |
9 | | -Compile by simply executing |
| 8 | +First of all, get https://github.com/pasdoc/pasdoc/[our source code from GitHub]. E.g. |
10 | 9 |
|
11 | 10 | ``` |
12 | | -make |
| 11 | +git clone https://github.com/pasdoc/pasdoc.git |
13 | 12 | ``` |
14 | 13 |
|
15 | | -in the main repository directory. |
16 | | - |
17 | | -NOTE: You must use GNU make. Under Linux this is the standard `make`. Under Windows it is included with FPC installation (you can also get it with http://www.mingw.org/[MinGW] or http://www.cygwin.com/[Cygwin]). Under FreeBSD it's called `gmake`. |
18 | | - |
19 | | -### [[lazarus]] Lazarus |
| 14 | +## [[fpc]] Build with command-line FPC |
20 | 15 |
|
21 | | -Lazarus version required is 1.0.10 or later. Using the latest stable Lazarus version is always adviced and best tested. |
| 16 | +You can build with command-line https://www.freepascal.org/[Free Pascal Compiler (FPC)]. |
22 | 17 |
|
23 | | -* You can install pasdoc components by installing `source/packages/lazarus/pasdoc_package.lpk`. This package is used by console `pasdoc` and by `pasdoc_gui`. |
24 | | -* You can compile console pasdoc from Lazarus by compiling `source/console/pasdoc.lpi`. |
25 | | -* You can compile `pasdoc_gui` from Lazarus by compiling `source/gui/pasdoc_gui.lpi`. |
| 18 | +_Requirements_: We need FPC with `Generics.Collections` support, which implies FPC >= 3.2.0. |
26 | 19 |
|
27 | | -## [[delphi]] Delphi |
| 20 | +From the command-line, compile by simply executing |
28 | 21 |
|
29 | | -In theory, the project can support even Delphi versions >= 5. However, it wasn't tested with so old Delphi versions for a long time. Using Delphi >= 11 is advised. |
| 22 | +``` |
| 23 | +make |
| 24 | +``` |
30 | 25 |
|
31 | | -### [[compiling-from-the-ide-1]] Compiling from the IDE |
| 26 | +in the main repository directory. |
32 | 27 |
|
33 | | -Open the Delphi project in `source/console/` and build as usual. |
| 28 | +[NOTE] |
| 29 | +==== |
| 30 | +You must use _GNU make_. |
34 | 31 |
|
35 | | -NOTE: The reason why the project file does not contain a list of all units including full filenames is that older versions of Delphi do not support a forward slash in paths while Kylix does not support backslashes. We may fix it, since we longer support Kylix. |
| 32 | +- Under Linux this is the standard `make`. |
| 33 | +- Under Windows it is included with FPC installation (you can also get it with http://www.mingw.org/[MinGW] or http://www.cygwin.com/[Cygwin]). |
| 34 | +- Under FreeBSD it's called `gmake`. |
| 35 | +- Under MacOS it's called `gmake` and you can install it with `brew install make` (using https://brew.sh/[Homebrew]). |
| 36 | +==== |
36 | 37 |
|
37 | | -### [[compiling-using-the-makefile-1]] Compiling using the Makefile |
| 38 | +### [[lazarus]] Build with Lazarus |
38 | 39 |
|
39 | | -You can compile using the command |
| 40 | +https://www.lazarus-ide.org/[Lazarus is an IDE using FPC under the hood]. |
40 | 41 |
|
41 | | -``` |
42 | | -make build-delphi-win32 |
43 | | -``` |
| 42 | +_Requirements_: Any Lazarus version that supports FPC >= 3.2.0 should be able to compile pasdoc. |
44 | 43 |
|
45 | | -### [[delphi-5-specific-notes]] Delphi 5 specific notes |
| 44 | +- First, open and build the package with our components by installing `source/packages/lazarus/pasdoc_package.lpk`. |
46 | 45 |
|
47 | | -You must do one specific thing to compile pasdoc with Delphi 5 (and not later): |
| 46 | +- Build the command-line PasDoc by opening the `source/console/pasdoc.lpi` project in Lazarus and compiling it. |
48 | 47 |
|
49 | | -* Add "..\component\strutils" to your units search path. |
| 48 | +- Build the GUI PasDoc by opening the `source/gui/pasdoc_gui.lpi` project in Lazarus and compiling it. |
50 | 49 |
|
51 | | -### [[using-fastmm-memory-manager]] Using FastMM memory manager |
| 50 | +## [[delphi]] Build with Delphi |
52 | 51 |
|
53 | | -You can speed up pasdoc a little (about 17%) by using http://sourceforge.net/projects/fastmm[FastMM memory manager]. Just download FastMM, add it to your Delphi units path, and define symbol USE_FASTMM when compiling. |
| 52 | +_Requirements_: Any Delphi with `Generics.Collections` support should be good, which in theory means >= 2009. We actively test (using GitHub Actions) with Delphi 10 and 12 right now. |
54 | 53 |
|
55 | | -This is not necessary with newer Delphi versions, as they already include FastMM. |
| 54 | +To build the command-line PasDoc, open the Delphi project in `source/console/` and build as usual. |
56 | 55 |
|
57 | 56 | ## [[see-also-release-making]] See also: release making |
58 | 57 |
|
|
0 commit comments