Reputation: 727
Note: I have no experience in Delphi programming.
My problem:
-I would like to put an old Delphi project of a collegue into a git repo.
-I read that DCU files are compiler generated and even found a .gitignore template actually ignoring these files.
-After putting everything together and cloning the repo, the Delphi compiler complains about missing DCU files in the fresh clone.
-When I add the DCU files to git, everything compiles fine.
-The DCU files (at least most of them) get modified during the build process.
-Obviously, the DCU files mess up the git history and make diff's hard to read, but a project that doesn't compile is unacceptable.
What is going wrong here? Are there errors in the code when the DCU files are required for compiling? Is it correct that the compiler is asking for the files during build process? Any help is highly appreciated.
Upvotes: 0
Views: 839
Reputation: 727
The issue was indeed that 3rd party libraries were inside the actual source like mentioned by Turrican and Rudy Velthuis. Compiling the project showed us which dcu files came from 3rd party and afterwards we had to decide for each dependency what to do with it (we got rid of some, some had to stay, because there was no way to get the source sadly). The comments by Rudy Velthuis helped a lot here.
Upvotes: 1
Reputation: 1967
Delphi programs are made by linking the DCU's you need together. The pas-files will be compiled to dcu files.
If for a program you don't have all the pas-files but you do have the DCU files then it can still compile.
So I would try the following: try compiling your project by removing all the modified DCU files.
This way you can find out which DCU-files you have source code for and which you don't.
Upvotes: 1