When you only have a few components, the Delphi library paths are usually not combined to a length too long for command line compiling. However, I use a large number of third party components and libraries that put me past this limit without intervention.
Here’s some of my strategies.
- Create a folder on the root of the C drive called COMPS or _C and install your components inside of that directory.
- When installing components into that directory, shorten the paths. So for example, instead of C:\COMPS\TMS SOFTWARE\TMS VCL UI Pack I would do C:\COMPS\TMS\VUI
- Use directory junctions for the catalog repositories.
mklink /j "C:\CatLoc" "C:\Users\Delphi\Documents\Embarcadero\Studio\21.0\CatalogRepository"
mklink /j "C:\CatLoc" "C:\Users\Delphi\Documents\Embarcadero\Studio\21.0\CatalogRepository"
mklink /j "C:\CatAll" "C:\Users\Public\Public Documents\Embarcadero\Studio\21.0\CatalogRepository"
Replace $(BDSCatalogRepository) in the library paths with C:\CATLOC\