Uses cleaner can't handle Delphi variables (like $(PLATFORM))
Hello CnPack team,
first of all, I love the "Uses cleaner", because it helps me clean up a lot of old units. It worked great. But a few weeks ago we switched from using a fixed directory for the DCUs (used by all projects) to a more dynamic approach. Now we specify "$(PROJECT_HOME)\bin\dcu\$(PLATFORM)\$(CONFIG)\$(MSBUILDPROJECTNAME)" as the DCU output folder (Project Options -> Delphi Compiler -> unit output directory).
A lot of units are used by several projects, but contain conditionals. So we had to "build all" when switching between projects just to be safe. With the new approach we keep the DCUs per project, config (debug/release) and target platform (win32/win64) which works pretty well.
$(PROJECT_HOME) is a global environment variable and the root working directory for all of our projects.
Uses Cleaner apparently can't process the Delphi internal variables like $(PLATFORM), $(CONFIG) and $(MSBUILDPROJECTNAME), because I get an error message "Processing <Unitname> Failed" (see attached image).
When I just use $(PROJECT_HOME) in the output path it still works, so it seems that only these Delphi defined variables are a problem.
Thanks,
Markus
Image Attachment:
[UsesCleaner Proecssing Failed]
UsesCleanerError.png (2014-6-12 23:59, 6.31 K)
|