PDA

View Full Version : Packages and custom extensions



masonwheeler
16-08-2008, 02:40 PM
I'm using the JVCL component TJvPluginManager to build a plugin system with packages. The component has an Extension property that allows me to specify a custom extension for the plugins it reads, which I like. I want my plugins to be "TEP" files, not BPL files. Unfortunately, Delphi doesn't seem to like that.

I can't find any option in the Project Options dialog box that will make it generate "myplugin.tep" instead of "myplugin.bpl". If I add the line {$E TEP} into the DPK it works, but only until I restart Delphi or make any changes in the Project Options box. When that occurs, Delphi goes through and silently
removes my $E directive. This can make debugging very frustrating.

Does anyone know how to make Delphi generate my package with the correct extension? This is driving me up the wall.

Mason

ize
11-03-2009, 01:07 AM
I know this is an old topic but thought i'd reply as no-one else had. I'm fairly new to the whole programming/delphi thing so not sure if this solves/helps your problem:

a) What about using conditional defines for "debug" and "release" so when you build your package, it uses the desired extension. I'm not sure if the IDE will still silently replaces the line if it's inside the condition, i haven't tested it.

b) use a post-build batch file that just renames/copies the bpl to the filename you want. I don't know which IDE you're using, but i think it's in Project > Options somewhere.

Laters,
Ize

masonwheeler
11-03-2009, 03:00 PM
Yeah, I eventually solved it using suggestion B. Thanks, though. :)