Delphi项目的构成(Files That Make Up a Delphi Project)
你是否对默认的Delphi项目所包含的文件都认识呢?
下面让我来一起看看吧。
Step1、打开Delphi7,选择【File | New | Application】,创建一个默认Delphi应用程序;
Step2、选择【File | Save All】,将我们的默认Delphi程序保存到一个独立的文件夹(例如C:\FirstTest)中;
Step3、按【F9】运行我们的程序,然后退出;
Step4、接下来打开Windows资源管理器,打开刚才保存的文件夹 (例如C:\FirstTest)看看,如下图:
Note
扩展名以(~)开始的文件是备份文件,根据项目中源文件的个数和设置的项目选项(Options…),Delphi可以产生好几个备份文件。
此时文件夹中包含了8个文件,这8个文件就是组成默认Delphi应用程序所必须的:
文件名 | 类型 | 英文 | 作用 | 描述 |
Project1.cfg | 项目配置文件 | Project configuration file | Stores project configuration settings. It has the same name as the project file, but with the extension .cfg. | 项目配置文件,这个文件起码包含为当前项目设置的编译器和链接器。 |
Project1.dof | 项目选项文件 | Project options file | Contains the current settings for project options, such as compiler and linker settings, directories, conditional directives, and command-line parameters. Set these options using the Project Options dialog box (Project|Options), they are saved in text form for easy maintenance, version control, and sharing. | 项目选项文件,这个文件包含设置在Project Option对话框中的项目选项。 |
Project1.dpr | 项目文件 | Delphi Project | The project file contains references to all the forms and units used by the project. | 项目源文件。 |
Project1.exe | 应用程序 | Executable File | You can run it under win32 | Win32应用程序。 |
Project1.res | 资源文件 | Resource File | Contains the version info resource (if required) and the application抯 main icon. This file may also contain other resources used within the application but these are preserved as is. Do not delete this file if your application contains any references to it. | 编译过的二进制资源文件。 |
Unit1.dcu | 窗体编译文件 | Delphi compiled unit | The first time you build an application or a dynamically linkable library, the compiler produces a compiled unit (.dcu on Windows) file for each new unit used in your project | 编译过的二进制对象文件,当编译器编译Object Pascal单元时,编译器会产生这些文件。 |
Unit1.dfm | 窗体文件 | Delphi Form | Form files (extension .dfm ) describe each component in your form, including the values of all persistent properties. | 它用来描述窗体和所有窗体组件,每个窗体都有自己的dfm文件。 |
Unit1.pas | 窗体单元文件 | Delphi Source File | Each form in a project also has an associated unit. The unit contains the source code for any event handlers attached to the events of the form or the components it contains. A unit associated with a form is sometimes called a form unit. | 每个单元都有一个源文件。 |
上面的作用中的英文是直接查询Delphi7的帮助文件查到的,希望大家有比较好的翻译。
posted on 2011-12-12 11:52 pchmonster 阅读(3084) 评论(4) 编辑 收藏 举报