Delphi中的文件扩展名

时间:2023-02-16 23:08:39

Filename Extensions in Delphi

http://delphi.about.com/od/beginners/a/aa032800a.htm

Try building a small test project ... whoa ... a typical Delphi application consists of many different file types.

Delphi employs a number of files for its configuration, some global to the Delphi environment, some project specific. Various tools in the Delphi IDE store data in files of other types.

The following list describes the files and their filename extensions that Delphi creates for a typical stand-alone application, plus a dozen more.

 
 

Also, get to know what Delphi generated files should be stored in a source control system.

Delphi Project Specific

.PAS - Delphi Source File 
PAS should be stored in Source Control 版本控制
In Delphi, PAS files are always the source code to either a unit or a form. Unit source files contain most of the code in an application. The unit contains the source code for any event handlers attached to the events of the form or the components it contains. We may edit .pas files using Delphi's code editor. Do not delete .pas files.

.DCU - Delphi Compiled Unit 个人认为 如果用到的单元 本来就只有DCU,应该 版本控制
A compiled unit (.pas) file. By default the compiled version of each unit is stored in a separate binary-format file with the same name as the unit file, but with the extension .DCU (Delphi compiled unit). For example unit1.dcu contains the code and data declared in the unit1.pas file. When you rebuild a project, individual units are not recompiled unless their source (.PAS) files have changed since the last compilation, or their .DCU files cannot be found. Safely delete .dcu file because Delphi recreates it when you compile the application.

 

.DFM - Delphi Form
DFM should be stored in Source Control 版本控制
These files are always paired with .pas files. Dfm file contains the details (properties) of the objects contained in a form. It can be view as text by right clicking on the form and selecting view as text from the pop-up menu. Delphi copies information in .dfm files into the finished .exe code file. Caution should be used in altering this file as changes to it could prevent the IDE from being able to load the form. Form files can be saved in either binary or text format. The Environment Options dialog lets you indicate which format you want to use for newly created forms. Do not delete .dfm files.

.DPR - Delphi Project
DPR should be stored in Source Control 版本控制
The .dpr file is the central file to a delphi project (one .dpr file per a project), actually a Pascal source file. It serves as the primary entry point for the executable. The dpr contains the references to the other files in the project and links forms with their associated units. Although we can modify the .dpr file , we should not modify it manually. Do not delete .dpr files.

.RES - Windows Resource File 个人认为应该 版本控制
A Windows resource file, generated automatically by Delphi and required by the compilation process. This binary-format file contains the version info resource (if required) and the application’s main icon. File may also contain other resources used within the application but these are preserved as is.

.EXE - Application Executable 个人认为 版本控制
The first time we build an application or a standard dynamic-link library, the compiler produces a .DCU file for each new unit used in your project; all the .DCU files in your project are then linked to create a single .EXE (executable) or .DLL file. This binary-format file is the only one (in most cases) you have to distribute to your users. Safely delete your projects .exe file because Delphi recreates it when you compile the application.

.~?? - Delphi Backup Files
Files with names ending in .~?? (e.g. unit2.~pa) are backup copies of modified and saved files. Safely delete those files at any time, however you might want to keep the for recovering damaged programming.

.DLL - Application Extension
Code for dynamic link library. A dynamic-link library (DLL) is a collection of routines that can be called by applications and by other DLLs. Like units, DLLs contain sharable code or resources. But a DLL is a separately compiled executable that is linked at runtime to the programs that use it. Do not delete .dll file unless you wrote it. Go see Dll's and Delphifor more info on programming with DLL's with Delphi.

.DPK - Delphi Package
DPK should be stored in Source Control 版本控制
This file contains the source code for a package, which are most often collection of multiple units. Package source files are similar to project files, but they are used to construct special dynamic-link libraries called packages. Do not delete .dpk files.

.DCP
This binary image file consists of the actual compiled package. Symbol information and additional header information required by the IDE are all contained within the .dcp file. The IDE must have access to this file in order to build a project. Do not delete .dcp files.

.BPL or .DPL
This is the actual design-time or run-time package. This file is a Windows DLL with Delphi-specific features integrated into it. This file is essential for deployment of an application that uses a package. In version 4 and above this is 'Borland package library' in version 3 it's 'Delphi package library'. See BPL vs. DLL for more info on programming with packages.

The following list describes the files and their filename extensions that Delphi IDE creates for a typical stand-alone application

IDE Specific
.BPG, .BDSGROUP - Borland Project Group (Borland Developer Studio Project Group)
BPG should be stored in Source Control 版本控制
Create project groups to handle related projects at once. For example, you can create a project group that contains multiple executable files such as a .DLL and an .EXE.

  

.DCR
DCR should be stored in Source Control 版本控制
Delphi component resource files contain a component's icon as it appears on the VCL palette. We may use .dcr files when construction our own custom components. Do not delete .dpr files.

.DOF
DOF should be stored in Source Control 版本控制
This text file contains the current settings for project options, such as compiler and linker settings, directories, conditional directives, and command-line parameters. The only reason to delete .dof file is to revert to standard options for a project.

.DSK
This text file stores information about the state of your project, such as which windows are open and what position they are in. This allows you to restore your project’s workspace whenever you reopen the Delphi project.

.DRO
This text file contains information about the object repository. Each entry in this file contains specific information about each available item in the object repository.

.DMT
This proprietary binary file contains the shipped and user-defined menu templates information.

 

.TLB
The file is a proprietary binary type library file. This file provides a way for identifying what types of objects and interfaces are available on an ActiveX server. Like a unit or a header file the .TLB serves as a repository for necessary symbol information for an application.

.DEM
This text file contains some standard country-specific formats for a TMaskEdit component.

The list of the file extensions you see when Developing with Delphi continues ....

.CAB
This is the file format that Delphi offers its users for web deployment. The cabinet format is an efficient way to package multiple files.

.DB
Files with this extension are standard Paradox files.

.DBF
Files with this extension are standard dBASE files.

.GDB
Files with this extension are standard Interbase files.

.DBI
This text file contains initialization information for the Database Explorer.

 

Caution
Never delete files with names ending in .dfm, .dpr, or .pas, unless you want to throw away your project. These files contain the application's properties and source code. When backing up an application, these are the critical files to save.

Delphi中的文件扩展名的更多相关文章

  1. PHP中获取文件扩展名的N种方法

    PHP中获取文件扩展名的N种方法 从网上收罗的,基本上就以下这几种方式: 第1种方法:function get_extension($file){substr(strrchr($file, '.'), ...

  2. PHP中获取文件扩展名

    function get_extension($file) { return substr(strrchr($file, '.'), 1) ; } function get_extension($fi ...

  3. Delphi开发中各种文件扩展名代表什么文件

    暂时就遇到了以下这几种,以后遇到再进行补充 .DPR Delphi Project文件,打开这个文件,就会打开所有的编程的代码文件.包含了Pascal代码 .PAS Pascal文件,Pascal单元 ...

  4. windowsServer-------- 系统中调出文件扩展名

    Windows Server是微软发布的一系列服务器操作系统的品牌名. 各个品牌的发布日期 Windows Server 2003 (2003年4月) Windows Server 2003 R2(2 ...

  5. 三、Linux系统中的文件类型和文件扩展名

    .sock文件也是一类特殊的文件,这类文件通常用在网络之间进行数据连接,如:我们可以启动一个程序来监听客户端的要求,客户端可以通过套接字来进行通信: linux中的文件类型 文件类型介绍 Linux系 ...

  6. SharePoint 2013中的默认爬网文件扩展名和分析文件类型

    摘要:了解默认情况下 SharePoint 2013 爬网的文件扩展名及其解析的文件类型,可以借此了解搜索可以爬的文件和支持的功能. 如果“管理文件类型”页上的列表包含文件扩展名,爬网组件将仅爬网文件 ...

  7. Linux中一些约定俗成的文件扩展名

    注:Linux中的所有内容均以文件的形式保存,但不依靠扩展名区分文件类型(根据权限区分),约定俗成的文件扩展名是为了方便管理员对文件进行区分 压缩包:“*.gz”.“*.bz2”.“*.tar.bz2 ...

  8. ASP.net的文件扩展名

    尽管ASP.NET中采用的是事件响应模式,使程序开发人员和最终用户感觉与WinForm程序非常接近,但是它毕竟还是Web应用程序.而Web应用程序的特点,就是基于浏览器与服务器的请求与响应的执行方式. ...

  9. 谷歌浏览器中安装.crx扩展名的离线Chrome插件

    一.本地拖放安装 1.下载扩展程序/脚本程序至本地计算机: 2.将其直接拖拽到浏览器的“扩展程序”(chrome://chrome/extensions/)页面. 二.解决“只能通过Chrome网上应 ...

随机推荐

  1. 3D立体照片墙

    代码如下:   <!DOCTYPE html> <html> <head lang="en"> <meta charset="U ...

  2. Ubuntu14&period;04下MySQL的安装

    1.输入 sudo apt-get install mysql-server 2.继续执行后,需要设定MySQL密码. 3.再次输入密码. 4.之后就安装成功了,输入mysql -u root -p进 ...

  3. servlet注解&commat;PostConstruct与&commat;PreDestroy

    从Java EE 5规范开始,Servlet中增加了两个影响Servlet生命周期的注解(Annotion):@PostConstruct和@PreDestroy.这两个注解被用来修饰一个非静态的vo ...

  4. java&period;lang&period;UnsupportedClassVersionError&colon; TwoSum &colon; Unsupported major&period;minor version 52&period;0

    编译的版本比运行的版本高. 两台电脑,一个装的是jdk1.7,另一个是1.8,在1.8上运行之后,上传到github然后1.7的拉下来,再运行出现了上述错误. 解决方式:设置如下

  5. LeetCode-Group Anagrams

    Given an array of strings, group anagrams together. For example, given: ["eat", "tea& ...

  6. LeetCode&colon;Word Break(DP)

    题目地址:http://oj.leetcode.com/problems/word-break/ 简单的动态规划问题,采用自顶向下的备忘录方法,代码如下: class Solution { publi ...

  7. c&plus;&plus;0x新特性实例&lpar;比较常用的&rpar;

    //array #include <array> void Foo() { array<> a; generate(a.begin(),a.end(),rand); sort( ...

  8. ios开发——实用技术篇Swift篇&amp&semi;播放MP3

    播放MP3 // MARK: - 播放MP3 /*----- mp3 ------*/ //定时器- func updateTime() { //获取音频播放器播放的进度,单位秒 var cuTime ...

  9. 暴力求解——最大乘积 Maximum Product&comma;UVa 11059

    最大乘积 Maximum Product 题目链接:http://acm.hust.edu.cn/vjudge/contest/view.action?cid=84562#problem/B 解题思路 ...

  10. 《连载 &vert; 物联网框架ServerSuperIO教程》- 16&period;OPC Server的使用步骤。附:3&period;3 发布与版本更新说明。

    1.C#跨平台物联网通讯框架ServerSuperIO(SSIO)介绍 <连载 | 物联网框架ServerSuperIO教程>1.4种通讯模式机制. <连载 | 物联网框架Serve ...