File extensions: what changed
Revision 3 to 4. Removed lines have a minus sign; added lines have a plus sign.
| Old | New | Line | |
|---|---|---|---|
| 1 | 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 | 2 | ||
| 3 | 3 | ## Lazarus | |
| 4 | 4 | ||
| 5 | 5 | ### Project files | |
| 6 | 6 | ||
| 7 | - | ||
| 8 | - | ||
| 9 | - | ||
| 10 | - | ||
| 11 | - | ||
| 12 | - | ||
| 13 | - | ||
| 14 | - | ||
| 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 | | |
| 15 | 31 | ||
| 16 | 32 | ### Subversion or Git | |
| 17 | 33 | ||
| 18 | 34 | These files would normally be stored in a repository as an adequate description of a project: | |
| 19 | 35 | ||
| 20 | 36 | ```text | |
| 21 | 37 | *.lpi | |
| 22 | 38 | *.lpr | |
| 23 | 39 | *.lfm | |
| 24 | 40 | *.pas | |
| 25 | 41 | *.pp | |
| 26 | 42 | ``` | |
| 27 | 43 | ||
| 28 | 44 | 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: | |
| 29 | 45 | ||
| 30 | 46 | ```text | |
| 31 | 47 | *.inc | |
| 32 | 48 | *.res | |
| 33 | 49 | *.lrs | |
| 34 | 50 | *.rc | |
| 35 | 51 | *.ico | |
| 36 | 52 | ``` | |
| 37 | 53 | ||
| 38 | 54 | These files are regenerated by the IDE or by a build so do not need to be stored: | |
| 39 | 55 | ||
| 40 | 56 | ```text | |
| 41 | 57 | *.ppu | |
| 42 | 58 | *.o | |
| 43 | 59 | *.a | |
| 44 | 60 | *.lps | |
| 45 | 61 | *.or | |
| 46 | 62 | *.rst | |
| 47 | 63 | *.compiled | |
| 48 | 64 | ``` | |
| 49 | 65 | ||
| 50 | 66 | Note that *.lrj files are generated for every form while tracking i18n, loss of these files can cause missing translations. | |
| 51 | 67 | ||
| 52 | 68 | There is an example .gitignore file at [3](https://github.com/github/gitignore/blob/master/Global/Lazarus.gitignore). | |
| 53 | 69 | ||
| 54 | 70 | ## [[Delphi]] | |
| 55 | 71 | ||
| 56 | 72 | ### Project files | |
| 57 | 73 | ||
| 58 | 74 | ```text | |
| 59 | 75 | *.dfm | |
| 60 | 76 | Delphi form module | |
| 61 | 77 | *.dof | |
| 62 | 78 | Delphi project options file | |
| 63 | 79 | *.dsk | |
| 64 | 80 | Desktop configuration | |
| 65 | 81 | ``` | |
| 66 | 82 | ||
| 67 | 83 | ### Converting Delphi projects | |
| 68 | 84 | ||
| 69 | 85 | Lazarus can convert at least some Delphi project files into its own format. | |
| 70 | 86 | ||
| 71 | 87 | ## Application | |
| 72 | 88 | ||
| 73 | 89 | ### General | |
| 74 | 90 | ||
| 75 | 91 | ``` pascal | |
| 76 | 92 | *.txt | |
| 77 | 93 | Text file | |
| 78 | 94 | *.po | |
| 79 | 95 | Gettext Portable Object | |
| 80 | 96 | *.bak | |
| 81 | 97 | Backup | |
| 82 | 98 | *.cfg | |
| 83 | 99 | Config file | |
| 84 | 100 | *.chm | |
| 85 | 101 | Compiled Help File - contains html. See also package chm | |
| 86 | 102 | *.csv | |
| 87 | 103 | Comma Separated Values text file format | |
| 88 | 104 | *.exe | |
| 89 | 105 | Directly executable program | |
| 90 | 106 | *.hlp | |
| 91 | 107 | Help file | |
| 92 | 108 | *.ini | |
| 93 | 109 | Initialization file | |
| 94 | 110 | *.odt | |
| 95 | 111 | OpenDocument text document | |
| 96 | 112 | ||
| 97 | 113 | Portable Document Format | |
| 98 | 114 | *.ps | |
| 99 | 115 | PostScript | |
| 100 | 116 | *.rtf | |
| 101 | 117 | Rich Text Format text file | |
| 102 | 118 | ``` | |
| 103 | 119 | ||
| 104 | 120 | ### Image | |
| 105 | 121 | ||
| 106 | 122 | ```text | |
| 107 | 123 | *.png | |
| 108 | 124 | Portable network graphic | |
| 109 | 125 | *.bmp | |
| 110 | 126 | bitmap | |
| 111 | 127 | *.ico | |
| 112 | 128 | icon | |
| 113 | 129 | *.xpm | |
| 114 | 130 | pixmap | |
| 115 | 131 | *.ppm | |
| 116 | 132 | portable pixmap | |
| 117 | 133 | *.pgm | |
| 118 | 134 | portable graymap | |
| 119 | 135 | *.pbm | |
| 120 | 136 | portable bitmap | |
| 121 | 137 | *.jpg | |
| 122 | 138 | compressed image format standardised by the Joint Photographic Experts Group (JPEG) | |
| 123 | 139 | ``` | |
| 124 | 140 | ||
| 125 | 141 | ### XML | |
| 126 | 142 | ||
| 127 | 143 | ```text | |
| 128 | 144 | *.xml | |
| 129 | 145 | *.dtd | |
| 130 | 146 | *.xsd | |
| 131 | 147 | *.xsl | |
| 132 | 148 | ``` | |
| 133 | 149 | ||
| 134 | 150 | ### Web | |
| 135 | 151 | ||
| 136 | 152 | ```text | |
| 137 | 153 | *.html | |
| 138 | 154 | Hypertext Markup Language | |
| 139 | 155 | *.css | |
| 140 | 156 | Cascading style sheet | |
| 141 | 157 | ``` | |
| 142 | 158 | ||
| 143 | 159 | ### Archive | |
| 144 | 160 | ||
| 145 | 161 | ```text | |
| 146 | 162 | *.tar | |
| 147 | 163 | tape archive | |
| 148 | 164 | *.zip | |
| 149 | 165 | a single file containing one or more compressed files | |
| 150 | 166 | ``` | |
| 151 | 167 | ||
| 152 | 168 | ### Database | |
| 153 | 169 | ||
| 154 | 170 | ```text | |
| 155 | 171 | *.dbf | |
| 156 | 172 | Database file | |
| 157 | 173 | *.mdx | |
| 158 | 174 | Multiple index file | |
| 159 | 175 | ``` | |
| 160 | 176 | ||
| 161 | 177 | ### [[FPSpreadsheet|Spreadsheet]] | |
| 162 | 178 | ||
| 163 | 179 | ```text | |
| 164 | 180 | *.ods | |
| 165 | 181 | OpenOffice.org Calc spreadsheet File Format | |
| 166 | 182 | *.xls | |
| 167 | 183 | Microsoft Excel File Format | |
| 168 | 184 | *.xlsx | |
| 169 | 185 | Microsoft Office Open XML Excel File Format | |
| 170 | 186 | ``` | |
| 171 | 187 | ||
| 172 | 188 | ## Operating system | |
| 173 | 189 | ||
| 174 | 190 | ### Linux and Unix (excluding Darwin) | |
| 175 | 191 | ||
| 176 | 192 | ``` pascal | |
| 177 | 193 | *.so | |
| 178 | 194 | Shared object library | |
| 179 | 195 | *.sh | |
| 180 | 196 | Shell script | |
| 181 | 197 | *.deb | |
| 182 | 198 | Debian Package | |
| 183 | 199 | *.rpm | |
| 184 | 200 | Red Hat Package Manager | |
| 185 | 201 | ``` | |
| 186 | 202 | ||
| 187 | 203 | ### Mac (Darwin) | |
| 188 | 204 | ||
| 189 | 205 | ```text | |
| 190 | 206 | *.app | |
| 191 | 207 | Application bundle (a structured directory) | |
| 192 | 208 | *.dmg | |
| 193 | 209 | Disk Image File | |
| 194 | 210 | *.dylib | |
| 195 | 211 | Dynamic shared library | |
| 196 | 212 | *.framework | |
| 197 | 213 | Framework (set of interfaces or subframeworks) | |
| 198 | 214 | *.icns | |
| 199 | 215 | Icon resource file containing one or more images used for an application icon | |
| 200 | 216 | *.plist | |
| 201 | 217 | Property list file (storage for serialised objects) | |
| 202 | 218 | ``` | |
| 203 | 219 | ||
| 204 | 220 | ### Windows | |
| 205 | 221 | ||
| 206 | 222 | ``` pascal | |
| 207 | 223 | *.bat | |
| 208 | 224 | Batch file. It's a text file that contains a sequence of commands for a computer operating system. | |
| 209 | 225 | *.dll | |
| 210 | 226 | dynamic-link library | |
| 211 | 227 | *.exe | |
| 212 | 228 | Directly executable program | |
| 213 | 229 | ``` | |
| 214 | 230 | ||
| 215 | 231 | ## See also | |
| 216 | 232 | ||
| 217 | 233 | [[Alphabetical list of file extensions]] | |
| 218 | 234 | ||
| 219 | 235 | --- | |
| 220 | 236 | *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).* | |
| 221 | 237 | Category: File Handling | |
| 222 | 238 | Category: Lazarus |
