Delphi 项目 结构 文件夹 组织

Delphi Project Structure Folder Organization

http://delphi.about.com/od/delphitips2008/qt/project_layout.htm

I‘ve been developing in Delphi for the past 10+ years (from Delphi 1). Every version brings some new features - new controls, new build options, new IDE features.

One question I always ask myself when starting a new Delphi program - a project with two or more applications - is how to best layout all the Delphi files one project is made of? Source code files (PAS) and DFM files (Delphi forms) should go into a source control system. Executable (EXE) should be placed into a separate folder. Third party tools (units) should have their own folders. If I have BPLs or DLLs they also should have their own folder. Resources should be also separated.

Delphi Project Structure Folder Organisation - Best Practice?

Since with Delphi you can have more than one project in a project group - and each project can have its own set of options where to store various project related files and since I am using source control - here‘s what my current best practice in Delphi project layout is:

并且,我正在使用 源代码控制系统。

Project Group Folder -Common //code used by all project in the group --DCU -----Debug -----Release --Source* -----Database -----GUI -----Other -Project 1 Folder ---Bin -----Debug -----Release ---DCU -----Debug -----Release ---Documentation* ---Help* ---GFX* ---Source* -----Database -----GUI -----Other ---Resources* -Project2 Folder ---Bin -----Debug -----Release ---DCU -----Debug -----Release ---Documentation* ---Help* ---GFX* ---Source* -----Database -----GUI -----Other ---Resources* -Setup* --Output

The above layout is an example layout for Delphi project groups. Also note that you might not need all the folders here (for example "\Source\Database" for database related source files; or "Resources" for any resources that get compiled into the final executable) - or that you might want to add more folders :)

Folders that are marked with a star (*) should be stored in a source control system.

那些标记*的文件夹应该保存到 源代码控制系统。

With the above structure you can easily decide what files (folders) should go into a source control system - by their extension.

Some more complex projects might need more complex directory layout - but the one above has proven the best for my Delphi work.

Delphi Project Options

The "Project Options" dialog box (CTRL+SHIFT+F11) lets you set your directory and conditional defines paths for every Delphi project in a project group.

For example:

  • Build Configuration - displays the current named build configuration. There are two default build configurations: Debug and Release.
  • Output directory - specifies where the compiler should put the executable file.
  • Unit output directory - specifies a directory to contain the .dcu (Win32) or .dcuil (.NET) files.
时间: 2024-12-21 06:42:33

Delphi 项目 结构 文件夹 组织的相关文章

Android 项目中文件夹的说明与作用(转)

(转自:http://blog.csdn.net/goodshot/article/details/11529731) Android 项目中文件夹的作用 1. src:存放所有的*.java源程序. 2. gen:为ADT插件自动生成的代码文件保存路径,里面的R.java将保存所有的资源ID. 3. assets:可以存放项目一些较大的资源文件,例如:图片.音乐.字体等. 4. res:可以存放项目中所有的资源文件,例如:图片(*.png.*.jpg).文本等. 5. res\drawable

iOS 项目的文件夹结构能看出你的开发经验

近期有师弟去面试iOS开发,他谈论到,面试官既然问他怎么分文件夹结构的,并且还详细问到每一个子文件夹的文件名称. 文件夹结构确实非常重要.面试官问他这些无疑是想窥探他的开发经验.清晰的文件夹结构,可让人一眼知道相应文件夹的职能.这也能体现开发人员的经验和架构能力. 眼下.我接触过的项目中,比較常规的两种结构: 1.主文件夹依照业务分类,内文件夹依照模块分类(主文件夹依照MVC架构分类.内部依据项目模块分类) 长处:能比較快定位相应的业务. 缺点:模块相关类太过分散.须要来回切换文件,不方便开发.

关于idea中新建web项目 webapp文件夹没有小蓝点 ,启动服务,访问不到解决方案

第一步: 选中项目按F4键,找到你的项目. 第二步: 选中项目下的web,如果没有web点击左上角的加号,找到web最下面,添加进去 第三步: 点开type下的节点,出来弹框, 第四步: 点击弹框的选择文件夹按钮,找到你的web 就OK啦!

将android项目assets文件夹下的文件复制到SD卡中

<pre name="code" class="html">package com.lapel.activity.html; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import android.content.Context; /** * * 将assets文件夹下的文件复制

转:delphi 删除指定文件夹下所有文件

function TFtpContentThd.DeleteDirectory(NowPath: string): Boolean; var search: TSearchRec; ret: integer; key: string; begin if NowPath[Length(NowPath)] <> '\' then NowPath := NowPath + '\'; key := NowPath + '*.*'; ret := findFirst(key, faanyfile, se

log4j日志输出到web项目指定文件夹

感谢 eric2500 的这篇文章:http://www.cxyclub.cn/n/27860/ 摘要:尝试将log4j的文件日志输出到web工程制定目录,遇到了很多问题,最终在eric2500的指导下搞定,下面是记录. 其原理在于log4j的配置文件支持服务器的vm的环境变量,如${oss.log4j.path},在log4j加载配置文件之前,先用 System.setProperty("","")设置好日志文件路径,这一操作通过一个初始的servlet来实现.

idea新建的项目,文件夹右键不能新建class

一般情况下,新建的mave项目,通常没有XXX\src\main\java这个目录,如果手动创建,则又不能右键build与java相关的,强行建立的话,也不会被idea所识别,更不会被虚拟机编译执行.这里我拿javaSe类型的项目最简单的举例,跟maven办法是一样的 解决办法 或者 原文地址:https://www.cnblogs.com/dshvv/p/9645956.html

myeclipse导入maven工程,明明没有错误,项目顶层文件夹却出现红叉的解决方法

使用菜单栏的window-->show view,打开problems窗口,可以从这里找到相应的errors和warnings. 查看errors到底是什么,根据错误提示解决问题.根据本人经验,一般而言,如果该工程在其他环境是ok的,仅需update工程配置即可,如下图:

LUA文件夹组织包

这时假设 package.path 的值是: /Users/dengjoe/lua/?.lua;./?.lua;/usr/local/share/lua/5.1/?.lua;/usr/local/share/lua/5.1/?/init.lua;/usr/local/lib/lua/5.1/?.lua;/usr/local/lib/lua/5.1/?/init.lua 那么调用 require("module") 时就会尝试打开以下文件目录去搜索目标. /Users/dengjoe/l