File extensions: what changed
Revision 0 to 1. Removed lines have a minus sign; added lines have a plus sign.
Title: File extensions
| Old | New | Line | |
|---|---|---|---|
| 1 | + | Here 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). | |
| 2 | + | ||
| 3 | + | ## Lazarus | |
| 4 | + | ||
| 5 | + | ### Project files | |
| 6 | + | ||
| 7 | + | <table> | |
| 8 | + | <thead> | |
| 9 | + | <tr> | |
| 10 | + | <th>extension</th> | |
| 11 | + | <th>description</th> | |
| 12 | + | <th>help</th> | |
| 13 | + | <th>format</th> | |
| 14 | + | </tr> | |
| 15 | + | </thead> | |
| 16 | + | <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 /> | |
| 98 | + | (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> | |
| 150 | + | </tbody> | |
| 151 | + | </table> | |
| 152 | + | ||
| 153 | + | ### Subversion or Git | |
| 154 | + | ||
| 155 | + | These files would normally be stored in a repository as an adequate description of a project: | |
| 156 | + | ||
| 157 | + | `*.lpi`\ | |
| 158 | + | `*.lpr`\ | |
| 159 | + | `*.lfm`\ | |
| 160 | + | `*.pas`\ | |
| 161 | + | `*.pp` | |
| 162 | + | ||
| 163 | + | These 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: | |
| 164 | + | ||
| 165 | + | `*.inc`\ | |
| 166 | + | `*.res`\ | |
| 167 | + | `*.lrs`\ | |
| 168 | + | `*.rc`\ | |
| 169 | + | `*.ico` | |
| 170 | + | ||
| 171 | + | These files are regenerated by the IDE or by a build so do not need to be stored: | |
| 172 | + | ||
| 173 | + | `*.ppu`\ | |
| 174 | + | `*.o`\ | |
| 175 | + | `*.a`\ | |
| 176 | + | `*.lps`\ | |
| 177 | + | `*.or`\ | |
| 178 | + | `*.rst`\ | |
| 179 | + | `*.compiled` | |
| 180 | + | ||
| 181 | + | Note that *.lrj files are generated for every form while tracking i18n, loss of these files can cause missing translations. | |
| 182 | + | ||
| 183 | + | There is an example .gitignore file at [3](https://github.com/github/gitignore/blob/master/Global/Lazarus.gitignore). | |
| 184 | + | ||
| 185 | + | ## [[Delphi]] | |
| 186 | + | ||
| 187 | + | ### Project files | |
| 188 | + | ||
| 189 | + | `*.dfm`\ | |
| 190 | + | ` Delphi form module`\ | |
| 191 | + | `*.dof`\ | |
| 192 | + | ` Delphi project options file`\ | |
| 193 | + | `*.dsk`\ | |
| 194 | + | ` Desktop configuration` | |
| 195 | + | ||
| 196 | + | ### Converting Delphi projects | |
| 197 | + | ||
| 198 | + | Lazarus can convert at least some Delphi project files into its own format. | |
| 199 | + | ||
| 200 | + | ## Application | |
| 201 | + | ||
| 202 | + | ### General | |
| 203 | + | ||
| 204 | + | `*.txt`\ | |
| 205 | + | ` Text file`\ | |
| 206 | + | `*.po`\ | |
| 207 | + | ` Gettext Portable Object`\ | |
| 208 | + | `*.bak`\ | |
| 209 | + | ` Backup`\ | |
| 210 | + | `*.cfg`\ | |
| 211 | + | ` Config file`\ | |
| 212 | + | `*.chm`\ | |
| 213 | + | ` Compiled Help File - contains html. See also package `[[chm]]\ | |
| 214 | + | `*.csv`\ | |
| 215 | + | ` Comma Separated Values text file format `\ | |
| 216 | + | `*.exe`\ | |
| 217 | + | ` Directly executable program`\ | |
| 218 | + | `*.hlp`\ | |
| 219 | + | ` Help file`\ | |
| 220 | + | `*.ini`\ | |
| 221 | + | ` Initialization file`\ | |
| 222 | + | `*.odt`\ | |
| 223 | + | ` OpenDocument text document`\ | |
| 224 | + | `*.pdf`\ | |
| 225 | + | ` Portable Document Format`\ | |
| 226 | + | `*.ps`\ | |
| 227 | + | ` PostScript `\ | |
| 228 | + | `*.rtf`\ | |
| 229 | + | ` Rich Text Format text file` | |
| 230 | + | ||
| 231 | + | ### Image | |
| 232 | + | ||
| 233 | + | `*.png`\ | |
| 234 | + | ` Portable network graphic`\ | |
| 235 | + | `*.bmp`\ | |
| 236 | + | ` bitmap `\ | |
| 237 | + | `*.ico`\ | |
| 238 | + | ` icon `\ | |
| 239 | + | `*.xpm`\ | |
| 240 | + | ` pixmap `\ | |
| 241 | + | `*.ppm`\ | |
| 242 | + | ` portable pixmap `\ | |
| 243 | + | `*.pgm`\ | |
| 244 | + | ` portable graymap `\ | |
| 245 | + | `*.pbm`\ | |
| 246 | + | ` portable bitmap `\ | |
| 247 | + | `*.jpg`\ | |
| 248 | + | ` compressed image format standardised by the Joint Photographic Experts Group (JPEG)` | |
| 249 | + | ||
| 250 | + | ### XML | |
| 251 | + | ||
| 252 | + | `*.xml`\ | |
| 253 | + | `*.dtd`\ | |
| 254 | + | `*.xsd`\ | |
| 255 | + | `*.xsl` | |
| 256 | + | ||
| 257 | + | ### Web | |
| 258 | + | ||
| 259 | + | `*.html`\ | |
| 260 | + | ` Hypertext Markup Language`\ | |
| 261 | + | `*.css`\ | |
| 262 | + | ` Cascading style sheet` | |
| 263 | + | ||
| 264 | + | ### Archive | |
| 265 | + | ||
| 266 | + | `*.tar`\ | |
| 267 | + | ` tape archive`\ | |
| 268 | + | `*.zip`\ | |
| 269 | + | ` a single file containing one or more compressed files` | |
| 270 | + | ||
| 271 | + | ### Database | |
| 272 | + | ||
| 273 | + | `*.dbf`\ | |
| 274 | + | ` Database file`\ | |
| 275 | + | `*.mdx`\ | |
| 276 | + | ` Multiple index file` | |
| 277 | + | ||
| 278 | + | ### [[FPSpreadsheet|Spreadsheet]] | |
| 279 | + | ||
| 280 | + | `*.ods`\ | |
| 281 | + | ` OpenOffice.org Calc spreadsheet File Format`\ | |
| 282 | + | `*.xls `\ | |
| 283 | + | ` Microsoft Excel File Format`\ | |
| 284 | + | `*.xlsx `\ | |
| 285 | + | ` Microsoft Office Open XML Excel File Format ` | |
| 286 | + | ||
| 287 | + | ## Operating system | |
| 288 | + | ||
| 289 | + | ### Linux and Unix (excluding Darwin) | |
| 290 | + | ||
| 291 | + | `*.so `\ | |
| 292 | + | ` Shared object library`\ | |
| 293 | + | `*.sh`\ | |
| 294 | + | ` Shell script`\ | |
| 295 | + | `*.deb`\ | |
| 296 | + | ` Debian Package`\ | |
| 297 | + | `*.rpm`\ | |
| 298 | + | ` Red Hat Package Manager` | |
| 299 | + | ||
| 300 | + | ### Mac (Darwin) | |
| 301 | + | ||
| 302 | + | `*.app`\ | |
| 303 | + | ` `[[Application Bundle|Application bundle]]` (a structured directory)`\ | |
| 304 | + | `*.dmg`\ | |
| 305 | + | ` Disk Image File `\ | |
| 306 | + | `*.dylib `\ | |
| 307 | + | ` `[[macOS Dynamic Libraries|Dynamic shared library]]\ | |
| 308 | + | `*.framework`\ | |
| 309 | + | ` Framework (set of interfaces or subframeworks)`\ | |
| 310 | + | `*.icns`\ | |
| 311 | + | ` Icon resource file containing one or more images used for an application icon `\ | |
| 312 | + | `*.plist`\ | |
| 313 | + | ` `[[macOS property list files|Property list file]]` (storage for serialised objects)` | |
| 314 | + | ||
| 315 | + | ### Windows | |
| 316 | + | ||
| 317 | + | `*.bat`\ | |
| 318 | + | ` Batch file. It's a text file that contains a sequence of commands for a computer operating system.`\ | |
| 319 | + | `*.dll `\ | |
| 320 | + | ` dynamic-link library`\ | |
| 321 | + | `*.exe`\ | |
| 322 | + | ` Directly executable program` | |
| 323 | + | ||
| 324 | + | ## See also | |
| 325 | + | ||
| 326 | + | [[Alphabetical list of file extensions]] | |
| 327 | + | ||
| 328 | + | --- | |
| 329 | + | *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).* | |
| 330 | + | Category: File Handling | |
| 331 | + | Category: Lazarus |
