Suppose we have 2 groups of projects - ProjectGroupA.bpg and ProjectGroupB.bpg . Each group consists of EXE and bpl module projects.

Each group includes the same Project1.bpl , Project2.bpl , Project3.bpl projects and various projects appA.exe , Project5.bpl and appB.exe , Project6.bpl , something like this: ProjectGroupA.bpg (projects exeA-1- 2-3-5) and ProjectGroupB.bpg (projects exeB-1-2-3-6).

In common projects (1,2,3) there are minor differences for work as part of application A or B, such as those that are well resolved by conditional compilation directives (including some lines in bpl, for example).

Question - How to set compilation directives at the project group level, so that when building a project group A, DEFINE_PROJECT_A directive was applied to all modules, and when building a project group B, DEFINE_PROJECT_B directive was applied to all modules?

  • I'm afraid that this can be done only through the "custom" build of all the projects of the group using MSBuild ... The project group has nothing "individualizing". Oh, and here also D7 ... it seems even msbuild won't work there ... - kami
  • @kami I still look in the direction of adding ver.bpl to each group along different paths (type A \ ver.bpl and B \ ver.bpl and a unit in their composition with a const PROJECT_ = 1 constant of type const PROJECT_ = 1 ), then in all projects you can specify the use of this module and the unit (the name will match) and the directive {$IF PROJECT_ = 1} which should work in Delphi 7. - Kromster

0