IT SOLUTIONS
Your full service technology partner! 
-Collapse +Expand
Delphi
Search Delphi Group:

Advanced
-Collapse +Expand Delphi To/From
To/FromCODEGuides
-Collapse +Expand Delphi Store
PRESTWOODSTORE

Prestwood eMagazine

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

   ► KBProgrammingDelphi for W...     Print This   
Go To Random Article
  From the November 2009 Issue of Prestwood eMag
 
Delphi for Win32:
Setting project options for better maintainability
 
Posted 8 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.

KB100378



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.

Comments

1 Comments.
Share a thought or comment...

Anonymous
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 33 months ago
 
Write a Comment...
Full Editor
Sign in...

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


Anonymous Post:

Enter your name and security key.

Your Name:
Today's security key = P207A
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.

 KB Article #100378 Counter
4876
Since 4/2/2008
-
  Load Time=less than 1 second.
 
Print This

KB Post Options:
You do NOT have KB edit
rights to this post.
-
 
Have a question? Need our services? Contact us now.
--Mike Prestwood

Call: 916-726-5675

email: info@prestwood.com


-
 
Connect With Us...
PrestwoodBoards
Join Us!
Facebook
Like our page!!!
Twitter
Follow us!
LinkedIn
Join Group
YouTube
View channel.
Go ahead!   Use Us! Call: 916-726-5675 


©1995-2014 Prestwood IT Solutions.   [Security & Privacy]   Made in the U.S.A..   No H1-B.   No offshoring.