CnPack Forum


 
Subject: Uses cleaner can't handle Delphi variables (like $(PLATFORM))
LeChuck
新警察
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.

Thanks,
Markus


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

Top
Passion (LiuXiao)
管理员
Rank: 9Rank: 9Rank: 9


UID 359
Digest Posts 19
Credits 6812
Posts 3579
点点分 6812
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.
Top
 




All times are GMT++8, the time now is 2024-10-4 09:58

    本论坛支付平台由支付宝提供
携手打造安全诚信的交易社区 Powered by Discuz! 5.0.0  © 2001-2006 Comsenz Inc.
Processed in 0.008869 second(s), 10 queries , Gzip enabled

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