I.T. Discussion Community!
-Collapse +Expand
Search Delphi Group:

-Collapse +Expand Delphi To/From
-Collapse +Expand Delphi Store

Prestwood eMagazine

July Edition
Subscribe now! It's Free!
Enter your email:

   ► KBProgrammingDelphi for W...   Print This     
  From the November 2009 Issue of Prestwood eMag
Delphi for Win32:
Setting project options for better maintainability
Posted 14 years ago on 5/23/2006
Take Away: Some tips for every Delphi project to keep things "clean", "neat", and well maintainable down the road.


There are a few important steps I try to take with every Delphi project I work on, to try to improve the maintainability of the code.

First, I always choose a good name for the project directory. I place my project and source into a "source" subdirectory beneath that, and I create bin\ and obj\ directories to hold the output and intermediate files.

Use the Project | Options menu to set your output and intermediate file directories:

Click menu Project | Options
Choose Directories / Conditionals in left-hand pane
Set the output directory to bin
Set the Unit output directory to obj
(Use explorer to create both directories "by hand" before trying to first compile the application)

The second thing I'll always try to do, is once the project is well underway, at least halfway through the process, I will relocate the files into another subdirectory (through copying), creating the bin and obj directories for it. I then rename the old directory temporarily with a leading underscore (so the compiler can't "find" it). Then I load up the project in the new subdir, and attempt a build. If it works, then I haven't put any undue directory and relative path dependencies into the project.

If I DO get errors, I recover the original directory name, make changes there, and then repeat the above process until the project WILL compile without problems.

These steps save a WORLD of work down the road, I've found.


Share a thought or comment...
Comment 1 of 1

After five years your note sound correct. Nevertheless if you take a look to Delphi XE Project Options you will see what are today the difficulties to fill up correctly Project Options. Frankly I find it as become almost a mess ! Cheers

Manlio Laschena
Posted 9 years ago
Write a Comment...
Sign in...

If you are a member, Sign In. Or, you can Create a Free account now.

Anonymous Post (text-only, no HTML):

Enter your name and security key.

Your Name:
Security key = P173A1
Enter key:
KB Post Contributed By Joshua Delahunty:
I am a software engineer with many years professional experience, using everything from 6809 assembly language to C, C++, Delphi, Paradox for Windows, and Borland JBuilder.
Visit Profile

 KB Article #100378 Counter
Since 4/2/2008

Follow PrestwoodBoards on: 

©1995-2020 PrestwoodBoards  [Security & Privacy]
Professional IT Services: Coding | Websites | Computer Tech