CnPack Forum

Subject: Uses cleaner can't handle Delphi variables (like $(PLATFORM))
Rank: 1

UID 68142
Digest Posts 0
Credits 5
Posts 1
点点分 5
Reading Access 10
Registered 2014-5-28
Status Offline
Post at 2014-6-12 23:59  Profile | Blog | P.M. 
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.


Image Attachment: [UsesCleaner Proecssing Failed] UsesCleanerError.png (2014-6-12 23:59, 6.31 K)

Passion (LiuXiao)
Rank: 9Rank: 9Rank: 9

UID 359
Digest Posts 19
Credits 6720
Posts 3538
点点分 6720
Reading Access 102
Registered 2004-3-28
Status Offline
Post at 2015-9-6 16:57  Profile | Blog | P.M. 
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.

All times are GMT++8, the time now is 2023-9-27 17:03

携手打造安全诚信的交易社区 Powered by Discuz! 5.0.0  © 2001-2006 Comsenz Inc.
Processed in 0.007016 second(s), 9 queries , Gzip enabled

Clear Cookies - Contact Us - CnPack Website - Archiver - WAP