Lazarus project files
Project directory structure
Typical directory structure for Lazarus project:
- created - auto-created by IDE or created manually
- VCS - need to be included in Version Control System
| directory name | created | VCS | description |
|---|---|---|---|
| backup | auto | no | Contains backup copies of project source files. |
| lib | auto | no | Contains compiled binary files for different CPU and OS. |
| <Project name>.app | auto | no | macOS (Darwin) "application bundle" files (macOS treats folders with extension .app specially). |
| frames | manual | yes | TFrame descendant files (*.lfm, *.pas), recommended for large projects with many frames. |
| include | manual | yes | Platform-dependent includes. Contains sub-directories for different OS (darwin, linux, win32, win64, etc..) Recommended for multiplatform projects with platform-specific units. |
| languages | manual | yes | Contains *.po files with resource strings for different languages. Recommended for multi-language projects. |
| images | manual | yes | Picture files (*.png, *.jpg, *.ico, *.xpm, etc..), that can be compiled into resource by lazres utility. Recommended for projects and packages with many image files. |
| logs | manual | no | Debug output files (*.txt, *.log). |
Project files extensions
The Lazarus Tutorial#The Lazarus files explains some extensions by an example.
- VCS - need to be included in Version Control System
<thead>
</thead> <tbody>
<code>.p</code></td>
<code>.or</code></td>
</tbody>
An example .gitignore file for Lazarus/Free Pascal
From the Free Pascal wiki, page "Lazarus project files", as it stood on 2022-03-09 after a change by Alextp, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's Licensing page. If you have concerns about this material, message the admin.