BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to recognise a design-time only package...

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (IDE)
View previous topic :: View next topic  
Author Message
Graham Thompson
Guest





PostPosted: Fri Jul 08, 2005 2:06 pm    Post subject: How to recognise a design-time only package... Reply with quote



Hi all,

Hope this is the right newsgroup 8-)

I'm looking for a way to programatically recognise a package that has been
built as design-time only. I'm working with BCB5...

Any ideas? Thanks!

GT


Back to top
Remy Lebeau (TeamB)
Guest





PostPosted: Fri Jul 08, 2005 5:45 pm    Post subject: Re: How to recognise a design-time only package... Reply with quote




"Graham Thompson" <gct (AT) faGUESS-WHAT-TO-DO-WITH-THISsl (DOT) co.uk> wrote in
message news:42ce8873$1 (AT) newsgroups (DOT) borland.com...

Quote:
I'm looking for a way to programatically recognise a package
that has been built as design-time only. I'm working with BCB5...

Why do you need to do that?


Gambit



Back to top
Craig Farrell
Guest





PostPosted: Fri Jul 08, 2005 9:12 pm    Post subject: Re: How to recognise a design-time only package... Reply with quote



Hi,

Quote:

I'm looking for a way to programatically recognise a package that has been
built as design-time only. I'm working with BCB5...


You can do something like the following:


void SavePackageInfo(const AnsiString Name, TNameType NameType, Byte
myFlags, Pointer Flags)
{
//could save info like the following...
/* if(NameType == ntContainsUnit)
UnitList.Add(Name);
if(NameType == ntRequiresPackage)
PackList.Add(Name);*/
}

TestThePackage( char* packName )
{
int HPack, flags, i = 0;
HPack = LoadPackage(packName);
if( HPack )
{
GetPackageInfo(HPack, &HPack, flags, (TPackageInfoProc)SavePackageInfo);
UnloadPackage(HPack);
if( flags & pfDesignOnly )
cout << packName << " is design only" << endl;
if( flags & pfRunOnly )
cout << packName << " is run only" << endl;
}
else
{
cout << "cannot load package: " << packName << endl;
}
}

int main()
{
TestThePackage( "C:\windows\system32\vcl60.bpl" );
TestThePackage( "C:\program
files\borland\cbuilder6\bin\dclstd60.bpl");


Back to top
Graham Thompson
Guest





PostPosted: Mon Jul 11, 2005 7:17 am    Post subject: Re: How to recognise a design-time only package... Reply with quote

"Remy Lebeau (TeamB)" <no.spam (AT) no (DOT) spam.com> wrote

:
: "Graham Thompson" <gct (AT) faGUESS-WHAT-TO-DO-WITH-THISsl (DOT) co.uk> wrote in
: message news:42ce8873$1 (AT) newsgroups (DOT) borland.com...
:
: > I'm looking for a way to programatically recognise a package
: > that has been built as design-time only. I'm working with BCB5...
:
: Why do you need to do that?

I'm looking for a "simple" way to copy a series of packages to appropriate
network locations based on their type. We've always implemented a
run-time/design-time package split for our own packages that include (for
example) components, and implemented a naming scheme so we (or rather, batch
files Cool can spot which are which easily.

We're now in a position where we have quite a few third-party component
packages in the mix, though, so if I could put a simple console app together
that recognises design-time only packages, I can create a network structure
like .CustomerExecutables, .CustomerPackages, .CustomerPlugins,
..CustomerLanguageDLLs, .EngineerDesignTime etc. etc. etc. using simple
batch file scripts.


Back to top
Graham Thompson
Guest





PostPosted: Mon Jul 11, 2005 7:25 am    Post subject: Re: How to recognise a design-time only package... Reply with quote

Thanks Craig - that's exactly the kind of thing I was looking for. I checked
out GetPackageInfo but couldn't find a description of the Flags parameter.
Didn't even think to look in sysutils.pas/hpp ... doh!

"Craig Farrell" <cNO_SPAM.please.farrell (AT) insprise (DOT) com> wrote

: Hi,
:
: You can do something like the following:
:
: <snip>
:
: TestThePackage( char* packName )
: {
: int HPack, flags, i = 0;
: HPack = LoadPackage(packName);
: if( HPack )
: {
: GetPackageInfo(HPack, &HPack, flags,
(TPackageInfoProc)SavePackageInfo);
: UnloadPackage(HPack);
: if( flags & pfDesignOnly )
: cout << packName << " is design only" << endl;
: if( flags & pfRunOnly )
: cout << packName << " is run only" << endl;
: }
: else
: {
: cout << "cannot load package: " << packName << endl;
: }
: }

:

Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (IDE) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.