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.
Delphi 项目 结构 文件夹 组织的更多相关文章
- Android 项目中文件夹的说明与作用(转)
(转自:http://blog.csdn.net/goodshot/article/details/11529731) Android 项目中文件夹的作用 1. src:存放所有的*.java源程序. ...
- 如何使用vs将现有的项目或者文件夹(尤其是多层目录的)添加到项目中
困扰我这么久的问题,哎,真心弱爆了! 1.将现有项目或文件夹拷贝到指定目录下 2.解决方案右上有个显示所有文件的按钮 然后选中所有要添加的文件,右击 选择包含到项目中即可
- iOS 项目的文件夹结构能看出你的开发经验
近期有师弟去面试iOS开发,他谈论到,面试官既然问他怎么分文件夹结构的,并且还详细问到每一个子文件夹的文件名称. 文件夹结构确实非常重要.面试官问他这些无疑是想窥探他的开发经验.清晰的文件夹结构,可让 ...
- log4j日志输出到web项目指定文件夹
感谢 eric2500 的这篇文章:http://www.cxyclub.cn/n/27860/ 摘要:尝试将log4j的文件日志输出到web工程制定目录,遇到了很多问题,最终在eric2500的指导 ...
- linux 下用renameTo方法修改java web项目中文件夹名称问题
经测试,在Linux环境中安装tomcat,然后启动其中的项目,在项目中使用java.io.File.renameTo(File dest)方法可行. 之前在本地运行代码可以修改,然后传到Linux服 ...
- js配置文件路径和项目目录文件夹位置的一致性
在js文件引入的时候注意配置文件的路径是否和项目目录中的文件夹位置一致,如果不一致, 浏览器会指出找不到文件404的情况
- Android 项目中文件夹作用(res文件夹详细介绍)
1. src:存放所有的*.Java源程序. 2. gen:为ADT插件自动生成的代码文件保存路径,里面的R.java将保存所有的资源ID. 3. assets:可以存放项目一些较大的资源文件,例如: ...
- 关于idea中新建web项目 webapp文件夹没有小蓝点 ,启动服务,访问不到解决方案
第一步: 选中项目按F4键,找到你的项目. 第二步: 选中项目下的web,如果没有web点击左上角的加号,找到web最下面,添加进去 第三步: 点开type下的节点,出来弹框, 第四步: 点击弹框的选 ...
- eclipse如何把多个项目放在文件夹下,用文件夹分开不同的项目
在Package Explorer顶部的右侧有有机表图标按钮,点击倒三角 Top Level Elements->Working Set.此时就会发现,很多项目会自动纳入一个文件夹,这个文件夹的 ...
随机推荐
- bootstrap的 附加导航Affix导航 (侧边窄条式 滚动监控式导航) 附加导航使用3.
affix: 意思是粘附, 附着, 沾上. 因此, 附加导航就是 bootstrap的 Affix.js组件. bootstrap的 附加导航, 不是说导航分成主导航, 或者什么 副导航的 而是指, ...
- luogu P2680 运输计划 65分做法
临近\(noip,AK\)不太现实,暴力才是王道,大佬无视 这里只介绍\(65\)分做法 ① \(m==1\) 的情况 很明显 就一条路径,当然要贪心选着一条路径路上的最大的边喽 傻逼分\(get 2 ...
- c#进阶之Delegate
委托是什么?答:委托是一种类型 等同与 一个class类,继承System.MulticastDelegate,但mult....gate是一个特殊类,不能够派生 委托的调用,如何去使用 1/委托 ...
- npm教程_脚手架原理以及bootstrap引入
格式:vue init <templateName> <ProjectName> 例子:vue init webpack vue02 运行上面的命令后,脚手架帮忙按照webpa ...
- Unity3D学习笔记(十一):布料和协程
延迟函数:动态资源加载:T:Resources.Load<T>(string path);Assets - Resources,Resources是一个资源管理的工具类,预制体放在Reso ...
- Spring中的用到的设计模式大全
spring中常用的设计模式达到九种,我们举例说明: 第一种:简单工厂 又叫做静态工厂方法(StaticFactory Method)模式,但不属于23种GOF设计模式之一. 简单工厂模式的实质是由一 ...
- c语言 快速排序
#include<stdio.h> #include<stdlib.h> #define BUF_SIZE 10 void display(int array[], int m ...
- Linux忘记root登录密码解决方法
有时候由于长时间米有登录linux系统,等需要用的时候突然忘记root密码,怎么办?下面简单介绍解决方法. redhat 和 centos 6.5 可以,7.0以上未测 在系统重启后,不停地按”e”键 ...
- C#代码安装、卸载、监控Windows服务
C#编写Windows服务之后都不可避免的需要安装,卸载等操作.而传统的方式就是通过DOS界面去编写命令,这样的操作方式无疑会增加软件实施人员的工作量,下面就介绍一种简单.高效.快速方便的方式.1.安 ...
- LeetCode--202--快乐数
问题描述: 编写一个算法来判断一个数是不是“快乐数”. 一个“快乐数”定义为:对于一个正整数,每一次将该数替换为它每个位置上的数字的平方和,然后重复这个过程直到这个数变为 1,也可能是无限循环但始终变 ...