Sign in Join
Wiki copytemporary

File extensions: what changed

Revision 1 to 2. Removed lines have a minus sign; added lines have a plus sign.

OldNewLine
11Here are the [[File extension|file extensions]] that are used when developing programs in Pascal. In most cases, these are extensions used by the IDE (Lazarus) and the compiler (FPC).
22
33## Lazarus
44
55### Project files
66
7-<table>
87<thead>
9-<tr>
10-<th>extension</th>
11-<th>description</th>
12-<th>help</th>
13-<th>format</th>
14-</tr>
8+
159</thead>
1610<tbody>
17-<tr>
18-<td>.lpg</td>
19-<td>Lazarus Project Group file</td>
20-<td>[[Project Groups]]</td>
21-<td>XML</td>
22-</tr>
23-<tr>
24-<td>.lpk</td>
25-<td>Lazarus Package file (contains package-specific settings)</td>
26-<td>[[Lazarus Packages]]</td>
27-<td>XML</td>
28-</tr>
29-<tr>
30-<td>.lpi</td>
31-<td>Lazarus Project Information file (contains project-specific settings)</td>
32-<td></td>
33-<td>XML</td>
34-</tr>
35-<tr>
36-<td>.lps</td>
37-<td>Lazarus Project Session file</td>
38-<td>[[IDE Window: Project Options|Project Options]]</td>
39-<td>XML</td>
40-</tr>
41-<tr>
42-<td>.lpr</td>
43-<td>Lazarus Program file, contains Pascal source of main program</td>
44-<td></td>
45-<td>pascal</td>
46-</tr>
47-<tr>
48-<td>.lfm</td>
49-<td>Lazarus Form file - contains all components and their properties. The source code of the form is located in the PAS-file of the same name.</td>
50-<td></td>
51-<td>text</td>
52-</tr>
53-<tr>
54-<td>.pas</td>
55-<td>Unit with Pascal code. It may also contain the code of form (stored in the LFM-file of the same name).</td>
56-<td></td>
57-<td>pascal</td>
58-</tr>
59-<tr>
60-<td>.pp</td>
61-<td>Pascal code</td>
62-<td></td>
63-<td>pascal</td>
64-</tr>
65-<tr>
66-<td>.inc</td>
67-<td>Include file. Contains a part of Pascal code that can be "included" in the program by the [[$include|{$i} directive]]. Not to be confused with INC-files of other programming languages that use the same extension.</td>
68-<td>[[$include]]</td>
69-<td>pascal</td>
70-</tr>
71-<tr>
72-<td>.compiled</td>
73-<td>Compilation session for a project</td>
74-<td></td>
75-<td>XML</td>
76-</tr>
77-<tr>
78-<td>.ppu</td>
79-<td>Unit description file. Not to be confused with the compiled unit, which has the extension ".o"</td>
80-<td><a href="https://www.freepascal.org/docs-html/prog/progse65.html">1</a></td>
81-<td>binary</td>
82-</tr>
83-<tr>
84-<td>.o</td>
85-<td>Compiled unit. Is the result of compilation by FPC (Free Pascal) or any other compiler (e.g. GCC for C++).</td>
86-<td></td>
87-<td>binary</td>
88-</tr>
89-<tr>
90-<td>.or</td>
91-<td>Object resource, automatically generated from {$R} directive</td>
92-<td></td>
93-<td>binary</td>
94-</tr>
95-<tr>
96-<td>.a</td>
97-<td>(1) Compiled unit, code part for smartlinking (on some platforms)<br />
11+
9812(2) Compiled code from other compilers (e.g. gcc) linked into a static library</td>
99-<td></td>
100-<td>binary</td>
101-</tr>
102-<tr>
103-<td>.lrs</td>
104-<td>Lazarus Resource file (this is a generated file; not to be confused with a Windows resource file)</td>
105-<td>[[Lazarus Resources]]</td>
106-<td>text</td>
107-</tr>
108-<tr>
109-<td>.lrt</td>
110-<td>Lazarus Resource string Table created when saving a LFM-file and i18n is enabled. It contains the TTranslateString properties of the LFM-file.</td>
111-<td></td>
112-<td></td>
113-</tr>
114-<tr>
115-<td>.rst</td>
116-<td>Resource String Table created by the compiler for every unit with a "resourcestring" section</td>
117-<td>[[Getting translation strings right]]</td>
118-<td>text</td>
119-</tr>
120-<tr>
121-<td>.rsj</td>
122-<td>Resource String table in JSON format created by FPC 2.7.1 for units with "resourcestring" section</td>
123-<td>[[Using resourcestrings]], <a href="https://www.freepascal.org/docs-html/prog/progse39.html">2</a></td>
124-<td>JSON</td>
125-</tr>
126-<tr>
127-<td>.rc</td>
128-<td>Resource script</td>
129-<td>[[Lazarus Resources]]</td>
130-<td>text</td>
131-</tr>
132-<tr>
133-<td>.res</td>
134-<td>Compiled resource</td>
135-<td>[[Lazarus Resources]]</td>
136-<td>binary</td>
137-</tr>
138-<tr>
139-<td>.ico</td>
140-<td>Icon (typically for a program)</td>
141-<td></td>
142-<td>ico</td>
143-</tr>
144-<tr>
145-<td>.gitignore</td>
146-<td>Ignore list of [[git]]</td>
147-<td></td>
148-<td>text</td>
149-</tr>
13+
15014</tbody>
151-</table>
15215
15316### Subversion or Git
15417
15518These files would normally be stored in a repository as an adequate description of a project:
15619
15720`*.lpi`\
15821`*.lpr`\
15922`*.lfm`\
16023`*.pas`\
16124`*.pp`
16225
16326These files might contain manually-generated or imported information, or might be regenerated by the IDE or build process. In general, if they have the same basename as the project or a form or unit they're IDE-generated, but in all cases should be reviewed individually:
16427
16528`*.inc`\
16629`*.res`\
16730`*.lrs`\
16831`*.rc`\
16932`*.ico`
17033
17134These files are regenerated by the IDE or by a build so do not need to be stored:
17235
17336`*.ppu`\
17437`*.o`\
17538`*.a`\
17639`*.lps`\
17740`*.or`\
17841`*.rst`\
17942`*.compiled`
18043
18144Note that *.lrj files are generated for every form while tracking i18n, loss of these files can cause missing translations.
18245
18346There is an example .gitignore file at [3](https://github.com/github/gitignore/blob/master/Global/Lazarus.gitignore).
18447
18548## [[Delphi]]
18649
18750### Project files
18851
18952`*.dfm`\
19053`   Delphi form module`\
19154`*.dof`\
19255`   Delphi project options file`\
19356`*.dsk`\
19457`   Desktop configuration`
19558
19659### Converting Delphi projects
19760
19861Lazarus can convert at least some Delphi project files into its own format.
19962
20063## Application
20164
20265### General
20366
20467`*.txt`\
20568`   Text file`\
20669`*.po`\
20770`   Gettext Portable Object`\
20871`*.bak`\
20972`   Backup`\
21073`*.cfg`\
21174`   Config file`\
21275`*.chm`\
21376`   Compiled Help File - contains html. See also package `[[chm]]\
21477`*.csv`\
21578`   Comma Separated Values text file format `\
21679`*.exe`\
21780`   Directly executable program`\
21881`*.hlp`\
21982`   Help file`\
22083`*.ini`\
22184`   Initialization file`\
22285`*.odt`\
22386`   OpenDocument text document`\
22487`*.pdf`\
22588`   Portable Document Format`\
22689`*.ps`\
22790`   PostScript `\
22891`*.rtf`\
22992`   Rich Text Format text file`
23093
23194### Image
23295
23396`*.png`\
23497`   Portable network graphic`\
23598`*.bmp`\
23699`   bitmap `\
237100`*.ico`\
238101`   icon `\
239102`*.xpm`\
240103`   pixmap `\
241104`*.ppm`\
242105`   portable pixmap `\
243106`*.pgm`\
244107`   portable graymap `\
245108`*.pbm`\
246109`   portable bitmap `\
247110`*.jpg`\
248111`   compressed image format standardised by the Joint Photographic Experts Group (JPEG)`
249112
250113### XML
251114
252115`*.xml`\
253116`*.dtd`\
254117`*.xsd`\
255118`*.xsl`
256119
257120### Web
258121
259122`*.html`\
260123`   Hypertext Markup Language`\
261124`*.css`\
262125`   Cascading style sheet`
263126
264127### Archive
265128
266129`*.tar`\
267130`   tape archive`\
268131`*.zip`\
269132`   a single file containing one or more compressed files`
270133
271134### Database
272135
273136`*.dbf`\
274137`   Database file`\
275138`*.mdx`\
276139`   Multiple index file`
277140
278141### [[FPSpreadsheet|Spreadsheet]]
279142
280143`*.ods`\
281144`   OpenOffice.org Calc spreadsheet File Format`\
282145`*.xls  `\
283146`   Microsoft Excel File Format`\
284147`*.xlsx  `\
285148`   Microsoft Office Open XML Excel File Format `
286149
287150## Operating system
288151
289152### Linux and Unix (excluding Darwin)
290153
291154`*.so `\
292155`   Shared object library`\
293156`*.sh`\
294157`   Shell script`\
295158`*.deb`\
296159`   Debian Package`\
297160`*.rpm`\
298161`   Red Hat Package Manager`
299162
300163### Mac (Darwin)
301164
302165`*.app`\
303166`   `[[Application Bundle|Application bundle]]` (a structured directory)`\
304167`*.dmg`\
305168`   Disk Image File `\
306169`*.dylib `\
307170`   `[[macOS Dynamic Libraries|Dynamic shared library]]\
308171`*.framework`\
309172`   Framework (set of interfaces or subframeworks)`\
310173`*.icns`\
311174`   Icon resource file containing one or more images used for an application icon `\
312175`*.plist`\
313176`   `[[macOS property list files|Property list file]]` (storage for serialised objects)`
314177
315178### Windows
316179
317180`*.bat`\
318181`   Batch file. It's a text file that contains a sequence of commands for a computer operating system.`\
319182`*.dll `\
320183`  dynamic-link library`\
321184`*.exe`\
322185`   Directly executable program`
323186
324187## See also
325188
326189[[Alphabetical list of file extensions]]
327190
328191---
329192*From the Free Pascal wiki, page "File extensions", as it stood on 2023-12-08 after a change by N7800, 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](/wiki-contact).*
330193Category: File Handling
331194Category: Lazarus

Back to history