Sign in Join
Wiki copytemporary

File extensions: what changed

Revision 3 to 4. 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-<thead>
8-
9-</thead>
10-<tbody>
11-
12-(2) Compiled code from other compilers (e.g. gcc) linked into a static library</td>
13-
14-</tbody>
7+| extension | description | help | format |
8+|---|---|---|---|
9+| .lpg | Lazarus Project Group file | [[Project Groups]] | XML |
10+| .lpk | Lazarus Package file (contains package-specific settings) | [[Lazarus Packages]] | XML |
11+| .lpi | Lazarus Project Information file (contains project-specific settings) | | XML |
12+| .lps | Lazarus Project Session file | [[IDE Window: Project Options\|Project Options]] | XML |
13+| .lpr | Lazarus Program file, contains Pascal source of main program | | pascal |
14+| .lfm | 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. | | text |
15+| .pas | Unit with Pascal code. It may also contain the code of form (stored in the LFM-file of the same name). | | pascal |
16+| .pp | Pascal code | | pascal |
17+| .inc | 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. | [[$include]] | pascal |
18+| .compiled | Compilation session for a project | | XML |
19+| .ppu | Unit description file. Not to be confused with the compiled unit, which has the extension ".o" | [1](https://www.freepascal.org/docs-html/prog/progse65.html) | binary |
20+| .o | Compiled unit. Is the result of compilation by FPC (Free Pascal) or any other compiler (e.g. GCC for C++). | | binary |
21+| .or | Object resource, automatically generated from {$R} directive | | binary |
22+| .a | (1) Compiled unit, code part for smartlinking (on some platforms) · (2) Compiled code from other compilers (e.g. gcc) linked into a static library | | binary |
23+| .lrs | Lazarus Resource file (this is a generated file; not to be confused with a Windows resource file) | [[Lazarus Resources]] | text |
24+| .lrt | Lazarus Resource string Table created when saving a LFM-file and i18n is enabled. It contains the TTranslateString properties of the LFM-file. | | |
25+| .rst | Resource String Table created by the compiler for every unit with a "resourcestring" section | [[Getting translation strings right]] | text |
26+| .rsj | Resource String table in JSON format created by FPC 2.7.1 for units with "resourcestring" section | [[Using resourcestrings]], [2](https://www.freepascal.org/docs-html/prog/progse39.html) | JSON |
27+| .rc | Resource script | [[Lazarus Resources]] | text |
28+| .res | Compiled resource | [[Lazarus Resources]] | binary |
29+| .ico | Icon (typically for a program) | | ico |
30+| .gitignore | Ignore list of [[git]] | | text |
1531
1632### Subversion or Git
1733
1834These files would normally be stored in a repository as an adequate description of a project:
1935
2036```text
2137*.lpi
2238*.lpr
2339*.lfm
2440*.pas
2541*.pp
2642```
2743
2844These 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:
2945
3046```text
3147*.inc
3248*.res
3349*.lrs
3450*.rc
3551*.ico
3652```
3753
3854These files are regenerated by the IDE or by a build so do not need to be stored:
3955
4056```text
4157*.ppu
4258*.o
4359*.a
4460*.lps
4561*.or
4662*.rst
4763*.compiled
4864```
4965
5066Note that *.lrj files are generated for every form while tracking i18n, loss of these files can cause missing translations.
5167
5268There is an example .gitignore file at [3](https://github.com/github/gitignore/blob/master/Global/Lazarus.gitignore).
5369
5470## [[Delphi]]
5571
5672### Project files
5773
5874```text
5975*.dfm
6076 Delphi form module
6177*.dof
6278 Delphi project options file
6379*.dsk
6480 Desktop configuration
6581```
6682
6783### Converting Delphi projects
6884
6985Lazarus can convert at least some Delphi project files into its own format.
7086
7187## Application
7288
7389### General
7490
7591``` pascal
7692*.txt
7793 Text file
7894*.po
7995 Gettext Portable Object
8096*.bak
8197 Backup
8298*.cfg
8399 Config file
84100*.chm
85101 Compiled Help File - contains html. See also package chm
86102*.csv
87103 Comma Separated Values text file format
88104*.exe
89105 Directly executable program
90106*.hlp
91107 Help file
92108*.ini
93109 Initialization file
94110*.odt
95111 OpenDocument text document
96112*.pdf
97113 Portable Document Format
98114*.ps
99115 PostScript
100116*.rtf
101117 Rich Text Format text file
102118```
103119
104120### Image
105121
106122```text
107123*.png
108124 Portable network graphic
109125*.bmp
110126 bitmap
111127*.ico
112128 icon
113129*.xpm
114130 pixmap
115131*.ppm
116132 portable pixmap
117133*.pgm
118134 portable graymap
119135*.pbm
120136 portable bitmap
121137*.jpg
122138 compressed image format standardised by the Joint Photographic Experts Group (JPEG)
123139```
124140
125141### XML
126142
127143```text
128144*.xml
129145*.dtd
130146*.xsd
131147*.xsl
132148```
133149
134150### Web
135151
136152```text
137153*.html
138154 Hypertext Markup Language
139155*.css
140156 Cascading style sheet
141157```
142158
143159### Archive
144160
145161```text
146162*.tar
147163 tape archive
148164*.zip
149165 a single file containing one or more compressed files
150166```
151167
152168### Database
153169
154170```text
155171*.dbf
156172 Database file
157173*.mdx
158174 Multiple index file
159175```
160176
161177### [[FPSpreadsheet|Spreadsheet]]
162178
163179```text
164180*.ods
165181 OpenOffice.org Calc spreadsheet File Format
166182*.xls
167183 Microsoft Excel File Format
168184*.xlsx
169185 Microsoft Office Open XML Excel File Format
170186```
171187
172188## Operating system
173189
174190### Linux and Unix (excluding Darwin)
175191
176192``` pascal
177193*.so
178194 Shared object library
179195*.sh
180196 Shell script
181197*.deb
182198 Debian Package
183199*.rpm
184200 Red Hat Package Manager
185201```
186202
187203### Mac (Darwin)
188204
189205```text
190206*.app
191207 Application bundle (a structured directory)
192208*.dmg
193209 Disk Image File
194210*.dylib
195211 Dynamic shared library
196212*.framework
197213 Framework (set of interfaces or subframeworks)
198214*.icns
199215 Icon resource file containing one or more images used for an application icon
200216*.plist
201217 Property list file (storage for serialised objects)
202218```
203219
204220### Windows
205221
206222``` pascal
207223*.bat
208224 Batch file. It's a text file that contains a sequence of commands for a computer operating system.
209225*.dll
210226 dynamic-link library
211227*.exe
212228 Directly executable program
213229```
214230
215231## See also
216232
217233[[Alphabetical list of file extensions]]
218234
219235---
220236*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).*
221237Category: File Handling
222238Category: Lazarus

Back to history