Board logo

Subject: Uses cleaner can't handle Delphi variables (like $(PLATFORM)) [Print This Page]

Author: LeChuck    Time: 2014-6-12 23:59     Subject: 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) / Download count 673
http://bbs.cnpack.org/attachment.php?aid=972


Author: Passion    Time: 2015-9-6 16:57

Sorry for very late reply for I just see this topic.


In fact. Uses cleaner supports Directory names with Env Vars and will replace them to actually value when building. But MSBUILDPROJECTNAME not supported.

Now we add MSBUILDPROJECTNAME support. It will integrate to our latest nightly build version 764.

Thanks for your suggestion.




Welcome to CnPack Forum (http://bbs.cnpack.org/) Powered by Discuz! 5.0.0