Running Delphi 2007 (and probably other versions as well, I'm guessing), if I right-click on a project in the Project Manager (either EXE of BPL in this case), there is a "Clean" command above Compile and Build. What exactly does it do?
Cleaning an Android project simply deletes the build directory. It removes the . class files that are generated when you compile your project and then recompiles again.
There are several ways to compile a project. If you run it (by pressing F9 or clicking on the toolbar icon), Delphi will compile it first. When Delphi compiles a project, it compiles only the files that have changed. If you select Compile | Build All, instead, every file is compiled, even if it has not changed.
By using run-time packages, this can shrink the executable to about 20 Kb. Simply select the Project | Options menu command, move to the Packages page, and select the check box Build with runtime packages: Packages are dynamic link libraries containing Delphi components (the Visual Components Library).
To "clean" a build means to delete all intermediate and output files generated by the compiler. Some compilers or IDEs also have a "clean & build" or "rebuild all" option which essentially performs a clean, followed by a build.
When you rebuild an existing project, compilers generally only rebuild files it determines are changed or new. This is, of course, to save time by not completely recompiling the entire project each time. However, sometimes this has problems; you will find your program getting strange errors or not working right. This increases with the number of dependencies within your project - they may not be rebuilt properly. In this case, you will find that cleaning the output and re-building from scratch will solve the problem.
It is also generally recommended to do a clean before building any release versions for the same reason.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With