DELPHI Project Structure folder organization

Source: Internet
Author: User

Delphi Project Structure Folder Organization

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

I ' ve been developing in Delphi for the Past + 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 II 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 is placed into a separate folder. Third party tools (units) should has their own folders. If I have BPLs or DLLs they also should has their own folder. Resources should be also separated.

  Delphi Project Structure Folder organisation-best practice?

Since with Delphi can has more than one project in a project Group-and each project can has its own set of options Where to store various project related files and since I am using the source Control-here ' s what is the best practice I n Delphi Project layout is:

And I'm using the source code control system.

   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 a example layout for Delphi project groups. Also Note: 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 so might want to add more folders :)

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

Those folders marked * should be saved to the source control system.

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

Some more complex projects might need more complex directory layout-but The one above have 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 delp Hi project in a project group.

For example:

    • Build Configuration-displays The current named build Configuration. There is the 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 Project Structure folder organization

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.