Note that there are some explanatory texts on larger screens.

plurals
  1. POPackage (BPL) Automatic Naming Suffix
    primarykey
    data
    text
    <p>I write a lot of components and libraries for Delphi, most of which require the use of BPL Packaging so that they may be installed into the IDE.</p> <p>This is simple enough and works well, right up until you want to maintain a single set of Package Project Files (in a single Project Group), but also want to compile and distribute those same packages for different Delphi versions.</p> <p>Up to now I've been creating a different Package Project for each version of Delphi, and explicitly defining a Delphi Version Identifier as a suffix (e.g. <strong>Kinect_XE.bpl</strong> and <strong>Kinect_XE2.bpl</strong>).</p> <p>I am aware that, in the <em>Project Options</em> for a Package Project, under <em>Description</em>, there are the fields <strong>LIB prefix</strong> and (more importantly for my needs) <strong>LIB suffix</strong>.</p> <p>I am further aware that if I place a value in <strong>LIB suffix</strong>, it'll be appended to the end of the compiled BPL's filename.</p> <p>My question, however, is first whether it is possible to have the IDE automatically populate the <strong>LIB suffix</strong> field with the <em>IDE/RTL Version</em> number, and if so... how?</p> <p>I'm fairly certain this is possible, as it would appear that <strong>vcl120.bpl</strong> (<em>and its counterparts for each respective version of Delphi</em>) can be Referenced (as requirements) of your own packages using just <strong>vcl</strong> rather than having to type the full <strong>vcl120</strong>. It is, in fact, this same behaviour I'm hoping to achieve... where my packages can intra-reference eachother (as neccessary) without having to provide version-specific references to accommodate the suffixes.</p> <p>Equally important is that resolving this will enable me to maintain a single set of Project Files in a single Project Group (with the obvious exception of XE2 where its Project Files don't necessarily behave very well with previous versions of Delphi due to the <em>Platforms</em> addition).</p> <p>I suspect that I may need to put a value like <strong>$(VER)</strong> (or something similar) in the <strong>LIB suffix</strong> field, but this appears not to work and I've scoured Google looking for the correct solution.</p> <p>Hope you can help!</p> <p><strong>UPDATE 1</strong></p> <p>I am now writing an IDE plugin to be used with (<em>in the very least</em>) Delphi 2007 to XE2, which gives DLL and BPL projects a new option called <strong>AutoSuffix</strong>. When toggled <em>On</em>, any IDE with the <em>AutoSuffix</em> plugin installed will immediately apply the correct IDE version suffix to the project.</p> <p>The <em>AutoSuffix</em> plugin will be made available (freely) for everyone within the next 24 hours, and this question updated accordingly.</p> <p><strong>UPDATE 2</strong></p> <p>Okay... Delphi 2007 is being a pain! I've made AutoSuffix work with 2009 to XE2, so far, but 2007 requires a little more time (patience appreciated).</p> <p><strong>UPDATE 3</strong></p> <p>It would appear as though Embarcadero have heard our collective cry for simplier package unification between versions.</p> <p>Mark is going to push this through to see if future versions of Delphi can accommodate a <strong>{$LIBSUFFIX AUTO}</strong> feature. I hope to hear back very soon whether this will be the case. If so, it certainly affects the way <em>AutoSuffix</em> will need to work on XE2 and older versions (as presently it doesn't provide the simple AUTO switch.. it has its own method).</p> <p>My hope now is that EMB will take this request seriously, provide it as an integral feature going forward, so that it becomes a simple case of using <em>AutoSuffix</em> on existing versions to unify the process accross all versions!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload