Memnarch / Delphinus

An alternative Packagemanager for the Delphi-IDE
Mozilla Public License 2.0
235 stars 64 forks source link

Ability to specify different projects for specific compiler versions #65

Closed rlebeau closed 5 years ago

rlebeau commented 6 years ago

I'm thinking of adding Indy to Delphinus, however Indy does not yet utilize the {$LIBSUFFIX} directive in its packages (that is coming in a future release), so it still has compiler-specific projects, each with different .dproj and .groupproj filenames for individual Delphi compiler versions (ie, Indy160.groupproj, Indy250.groupproj, etc).

I see how the Delphinus.Info.json file can specify a range of supported Delphi compiler versions for filtering purposes, but I see no way for the Delphinus.Install.json file to specify installation instructions for individual compiler versions. For instance, in the projects array, let each project optionally specify a supported compiler, eg:

"projects":
[
  ...,
  {
    "project": "Lib\\Indy160.Groupproj",
    "compiler": 16
  },
  ...
  {
    "project": "Lib\\Indy250.Groupproj",
    "compiler": 25
  }
],

If a project does not specify a compiler, assume it supports all compilers.

When Delphinus is building projects, have it ignore any project that has a compiler that does not match the host IDE/compiler.

In a future release, Indy's folder structure will change to organize projects into version-specific folders, so being able to specify a specific compiler per project would still likely be needed, eg:

"projects":
[
  ...,
  {
    "project": "Packages\\RADStudio_XE2\\Indy.Groupproj",
    "compiler": 16
  },
  ...
  {
    "project": "Packages\\RADStudio_10_2_Tokyo\\Indy.Groupproj",
    "compiler": 25
  }
]
Memnarch commented 6 years ago

Have to admit it's a bit hidden at the end of the page but:

Info: For all elements of search_pathes, browsing_pathes, source_folders, raw_folders, projects and experts, the properties compiler_min, compiler_max (to specify a range, see info.json) and compiler (to specify a specific version) are supported. These allow you to specify specific compilers for each element which results in skipping of an element if the compiler version does not fit.

rlebeau commented 5 years ago

Ah, yes, I didn't see that earlier. Thanks