Difference between revisions of "File extensions"

From Free Pascal wiki
m (Mac: Adjusted heading)
 
(16 intermediate revisions by 7 users not shown)
Line 3: Line 3:
 
Some [[File extension|file extensions]]
 
Some [[File extension|file extensions]]
  
 +
== Lazarus ==
 +
=== Project files ===
 +
{| class="wikitable sortable"
 +
! extension || description
 +
|-
 +
| .lpi  || Lazarus Project Information file (stored in XML; contains project-specific settings)
 +
|-
 +
| .lpr  || Lazarus Program file; contains Pascal source of main program
 +
|-
 +
| .lfm  || Lazarus Form file; contains configuration information for all objects on a form (stored in a Lazarus-specific format; the actions are described by Pascal source code in a corresponding .pas file)
 +
|-
 +
| .pas  || Unit with Pascal code (typically for a form stored in a corresponding .lfm file)
 +
|-
 +
| .pp || Pascal code
 +
|-
 +
| .lrs  ||  Lazarus Resource file (this is a generated file; not to be confused with a Windows resource file).
 +
|-
 +
| .ppu  ||  Compiled unit, symbols part.
 +
|-
 +
| .o  || (1) Compiled unit, code part.<br />  (2) Compiled code from other compilers (e.g. gcc)
 +
|-
 +
| .or || object resource, automatically generated from {$R} directive.
 +
|-
 +
| .a  ||  (1) Compiled unit, code part for smartlinking (on some platforms)<br /> (2) Compiled code from other compilers (e.g. gcc) linked into a static library
 +
|-
 +
| .lpk  || Lazarus package information file. (stored in XML; contains package-specific settings)
 +
|-
 +
| .inc || Include file
 +
|-
 +
| .lps || Lazarus Project Session file. See [[IDE Window: Project Options#Save session information in|Project Options  Save session information in]]
 +
|-
 +
| .lrt || Lazarus Resourcestring table created when saving a .lfm file and i18n is enabled. It contains the TTranslateString properties of the .lfm.
 +
|-
 +
| .rst || Resourcestring table created by the compiler for every unit with a resourcestring section.
 +
|-
 +
| .rsj || Resourcestring table in JSON format created by FPC 2.7.1 for units with resourcestring section.
 +
|-
 +
| .compiled || compilation session for a project
 +
|-
 +
| .ico || program icon
 +
|-
 +
| .gitignore || list of files/directories to be ignored when using [[git]]
 +
|-
 +
| .rc || [[resource file]]
 +
|-
 +
| .res || compiled [[resource file]]
 +
|}
  
== Lazarus ==
+
=== Subversion or Git ===
 +
These files would normally be stored in a repository as an adequate description of a project:
  
  *.lpi  
+
  *.lpi
    Lazarus Project Information file (stored in XML; contains project-specific settings)
+
  *.lpr
  *.lpr  
+
  *.lfm
    Lazarus Program file; contains Pascal source of main program
+
  *.pas
  *.lfm  
 
    Lazarus Form file; contains configuration information for all objects on a form
 
    (stored in a Lazarus-specific format; the actions are described by Pascal source code in a corresponding *.pas file)
 
  *.pas  
 
    Unit with Pascal code (typically for a form stored in a corresponding *.lfm file)
 
 
  *.pp
 
  *.pp
    Pascal code
+
 
*.lrs
+
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:
    Lazarus Resource file (this is a generated file; not to be confused with a Windows resource file).  
+
 
*.ppu
 
    Compiled unit, symbols part.
 
*.o
 
    (1) Compiled unit, code part.
 
    (2) Compiled code from other compilers (e.g. gcc)
 
*.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
 
*.lpk
 
    Lazarus package information file. (stored in XML; contains package-specific settings)
 
 
  *.inc
 
  *.inc
    Include file
+
*.res
 +
*.lrs
 +
*.rc
 +
*.ico
 +
 
 +
These files are regenerated by the IDE or by a build so do not need to be stored:
 +
 
 +
*.ppu
 +
*.o
 +
*.a
 
  *.lps
 
  *.lps
    Lazarus Project Session file. See [[IDE Window: Project Options#Save session information in|Project Options -> Save session information in]]
+
*.or
 +
*.rst
 +
*.compiled
  
== General ==
+
Note that *.lrj files are generated for every form while tracking i18n, loss of these files can cause missing translations.
  
 +
There is an example .gitignore file at [https://github.com/github/gitignore/blob/master/Global/Lazarus.gitignore].
 +
 +
== [[Delphi]] ==
 +
=== Project files ===
 +
*.dfm
 +
    Delphi form module
 +
*.dof
 +
    Delphi project options file
 +
*.dsk
 +
    Desktop configuration
 +
 +
=== Converting Delphi projects ===
 +
Lazarus can convert at least some Delphi project files into its own format.
 +
 +
== Application ==
 +
=== General ===
 
  *.txt
 
  *.txt
 
     Text file
 
     Text file
Line 63: Line 123:
 
     Rich Text Format text file
 
     Rich Text Format text file
  
== Image ==
+
=== Image ===
 
 
 
  *.png
 
  *.png
 
     Portable network graphic
 
     Portable network graphic
Line 80: Line 139:
 
     portable bitmap  
 
     portable bitmap  
 
  *.jpg
 
  *.jpg
 +
    compressed image format standardised by the Joint Photographic Experts Group (JPEG)
  
 
+
=== XML ===
 
 
== XML ==
 
 
 
 
  *.xml
 
  *.xml
 
  *.dtd
 
  *.dtd
Line 90: Line 147:
 
  *.xsl
 
  *.xsl
  
== Web ==
+
=== Web ===
 
 
 
  *.html
 
  *.html
 
     Hypertext Markup Language
 
     Hypertext Markup Language
Line 97: Line 153:
 
     Cascading style sheet
 
     Cascading style sheet
  
== Archive ==
+
=== Archive ===
 
 
 
  *.tar
 
  *.tar
 
     tape archive
 
     tape archive
 
  *.zip
 
  *.zip
 +
    a single file containing one or more compressed files
  
== Database ==
+
=== Database ===
 
 
 
  *.dbf
 
  *.dbf
 
     Database file
 
     Database file
Line 110: Line 165:
 
     Multiple index file
 
     Multiple index file
  
== [[FPSpreadsheet|Spreadsheet]] ==
+
=== [[FPSpreadsheet|Spreadsheet]] ===
 
 
 
  *.ods
 
  *.ods
 
     OpenOffice.org Calc spreadsheet File Format
 
     OpenOffice.org Calc spreadsheet File Format
Line 119: Line 173:
 
     Microsoft Office Open XML Excel File Format  
 
     Microsoft Office Open XML Excel File Format  
  
 
+
== Operating system ==
== [[Delphi]] ==
+
=== Linux and Unix (excluding Darwin) ===
 
 
*.dfm
 
    Delphi form module
 
*.dof
 
    Delphi project options file
 
*.dsk
 
    Desktop configuration
 
 
 
== Linux and Unix ==
 
 
 
 
  *.so  
 
  *.so  
 
     Shared object library
 
     Shared object library
Line 138: Line 182:
 
     Debian Package
 
     Debian Package
 
  *.rpm
 
  *.rpm
     RPM Package Manager  
+
     Red Hat Package Manager
  
==  Mac ==
+
===  Mac (Darwin) ===
  
 
  *.app
 
  *.app
     Application bundle
+
     [[Application Bundle|Application bundle]] (a structured directory)
 
  *.dmg
 
  *.dmg
 
     Disk Image File  
 
     Disk Image File  
 
  *.dylib  
 
  *.dylib  
     Dynamic shared library
+
     [[macOS Dynamic Libraries|Dynamic shared library]]
 
+
*.framework
== Windows ==
+
    Framework (set of interfaces or subframeworks)
 +
*.icns
 +
    Icon resource file containing one or more images used for an application icon
 +
*.plist
 +
    [[macOS property list files|Property list file]] (storage for serialised objects)
  
 +
=== Windows ===
 
  *.bat
 
  *.bat
 
     Batch file. It's a text file that contains a sequence of commands for a computer operating system.
 
     Batch file. It's a text file that contains a sequence of commands for a computer operating system.
Line 159: Line 208:
  
 
== See also ==
 
== See also ==
 +
 
[[Alphabetical list of file extensions]]
 
[[Alphabetical list of file extensions]]
  
 +
[[Category:Lazarus]]
 
[[Category:File Handling]]
 
[[Category:File Handling]]

Latest revision as of 00:49, 10 January 2021

File extensions

Some file extensions

Lazarus

Project files

extension description
.lpi Lazarus Project Information file (stored in XML; contains project-specific settings)
.lpr Lazarus Program file; contains Pascal source of main program
.lfm Lazarus Form file; contains configuration information for all objects on a form (stored in a Lazarus-specific format; the actions are described by Pascal source code in a corresponding .pas file)
.pas Unit with Pascal code (typically for a form stored in a corresponding .lfm file)
.pp Pascal code
.lrs Lazarus Resource file (this is a generated file; not to be confused with a Windows resource file).
.ppu Compiled unit, symbols part.
.o (1) Compiled unit, code part.
(2) Compiled code from other compilers (e.g. gcc)
.or object resource, automatically generated from {$R} directive.
.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
.lpk Lazarus package information file. (stored in XML; contains package-specific settings)
.inc Include file
.lps Lazarus Project Session file. See Project Options Save session information in
.lrt Lazarus Resourcestring table created when saving a .lfm file and i18n is enabled. It contains the TTranslateString properties of the .lfm.
.rst Resourcestring table created by the compiler for every unit with a resourcestring section.
.rsj Resourcestring table in JSON format created by FPC 2.7.1 for units with resourcestring section.
.compiled compilation session for a project
.ico program icon
.gitignore list of files/directories to be ignored when using git
.rc resource file
.res compiled resource file

Subversion or Git

These files would normally be stored in a repository as an adequate description of a project:

*.lpi
*.lpr
*.lfm
*.pas
*.pp

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:

*.inc
*.res
*.lrs
*.rc
*.ico

These files are regenerated by the IDE or by a build so do not need to be stored:

*.ppu
*.o
*.a
*.lps
*.or
*.rst
*.compiled

Note that *.lrj files are generated for every form while tracking i18n, loss of these files can cause missing translations.

There is an example .gitignore file at [1].

Delphi

Project files

*.dfm
   Delphi form module
*.dof
   Delphi project options file
*.dsk
   Desktop configuration

Converting Delphi projects

Lazarus can convert at least some Delphi project files into its own format.

Application

General

*.txt
   Text file
*.po
   Gettext Portable Object
*.bak
   Backup
*.cfg
   Config file
*.chm
   Compiled Help File - contains html. See also package chm
*.csv
   Comma Separated Values text file format 
*.exe
   Directly executable program
*.hlp
   Help file
*.ini
   Initialization file
*.odt
   OpenDocument text document
*.pdf
   Portable Document Format
*.ps
   PostScript 
*.rtf
   Rich Text Format text file

Image

*.png
   Portable network graphic
*.bmp
   bitmap 
*.ico
   icon 
*.xpm
   pixmap 
*.ppm
   portable pixmap 
*.pgm
   portable graymap 
*.pbm
   portable bitmap 
*.jpg
   compressed image format standardised by the Joint Photographic Experts Group (JPEG)

XML

*.xml
*.dtd
*.xsd
*.xsl

Web

*.html
   Hypertext Markup Language
*.css
   Cascading style sheet

Archive

*.tar
   tape archive
*.zip
   a single file containing one or more compressed files

Database

*.dbf
   Database file
*.mdx
   Multiple index file

Spreadsheet

*.ods
   OpenOffice.org Calc spreadsheet File Format
*.xls  
   Microsoft Excel File Format
*.xlsx  
   Microsoft Office Open XML Excel File Format 

Operating system

Linux and Unix (excluding Darwin)

*.so 
   Shared object library
*.sh
   Shell script
*.deb
   Debian Package
*.rpm
   Red Hat Package Manager

Mac (Darwin)

*.app
   Application bundle (a structured directory)
*.dmg
   Disk Image File 
*.dylib 
   Dynamic shared library
*.framework
   Framework (set of interfaces or subframeworks)
*.icns
   Icon resource file containing one or more images used for an application icon 
*.plist
   Property list file (storage for serialised objects)

Windows

*.bat
   Batch file. It's a text file that contains a sequence of commands for a computer operating system.
*.dll 
  dynamic-link library
*.exe
   Directly executable program

See also

Alphabetical list of file extensions