I have to maintain old software written in Delphi. The source tree is a real mess. I'm trying to do 2 things: to make clean directory structure and to set up automated build process.
Right now i have produced following directory tree
\Project \build\output \dist\release \dist\debug \doc \env \res \src
\src
directory contains *.pas
and *.dfm
files and project.dpr
. Various resources (icons, images and fonts) are reside in \res
directory. \env
is used to create various environments for debugging purposes. IDE was setted up to build project.exe into this dir.
Build scripts are stored in build
folder. These scripts produce product distribution (with and without debug information in exe) in dist\release
and dist\debug
folders with help of dcc32.exe
. build\output
is used to save dcu files during build process inside IDE or inside build script.
There is a little flaw in my approach. I can not start with fresh computer, checkout code from my repo, start building script and receive ready to use disitribution of the project. I need to open IDE first, install required components (e.g. RXLib
and MemoEx
), set up library paths and so on. Only after that steps i can run my building scripts.
It was not a big problem until last week. I've modified 3rd party component in order to fix a bug (this component isn't maintained anymore :-(), so i have to add code of this component to the structure of my project. At this point if i will checkout from the repo I need to check if there were changes in code of 3rd party libs. If code of libs was changed I need to recompile components and reinstall them.
Questions
- Is there any way to reinstall components in Delphi 7 from command line? Is there any way to do it without hardcoding installation path of D7?
- How would you store code of third part components in project tree?
- Where should i place
bpl
anddcu
which will be produced during build of components. Should i place them atProject\build\output
? Or it will be better to place output to another location (do not override Delphi settings), but change Library path in project configuration?