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 

DETECTING CodeGuard is enabled or not

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





PostPosted: Thu Jan 29, 2004 1:29 pm    Post subject: DETECTING CodeGuard is enabled or not Reply with quote




Is it possible to PROGRAMMATICALLY detect whether CodeGuard
is enabled or not?

This is because I sometimes forget to manually switch CG off,
while preparing a "Release" version, which then results in
the executable being dependent upon the presence of CG
on the target machine....


Back to top
Andrue Cope
Guest





PostPosted: Thu Jan 29, 2004 2:59 pm    Post subject: Re: DETECTING CodeGuard is enabled or not Reply with quote



On 29 Jan 2004 06:29:12 -0700, henk wrote:

Quote:
This is because I sometimes forget to manually switch CG off,
while preparing a "Release" version

Why not export the make file (ProjectExport makefile) then create a batch
file to compile it? Then when you want to make a release you version you
run the batch file. Said batch file can also help create support files that
your installation might need.

Another advantage is that the command line compiler takes far less time to
compile than the IDE.

Make -B -frelease.mak
--
Andrue Cope
[Bicester UK]

Back to top
henk
Guest





PostPosted: Thu Jan 29, 2004 3:43 pm    Post subject: Re: DETECTING CodeGuard is enabled or not Reply with quote



THANKS for your reply.
Unexperienced with either Make or Batch things I somehow managed
to get something going:
Created a Make file out of the existing project.
Created a batch file and added the
Make _b -fHF_planning.mak
command to it.
run the batch file with the result:

Fatal: Unable to open VCL50.BPI
** error ** deleting HF_planning.exe

E:BorlandCBuilder5ProjectsHF_planning>

The said BPI file IS PRESENT in ..Debug and in ..Release!

What is going wrong/am I doing wrong here?

henk

Andrue Cope <no.spam (AT) spammy (DOT) com> wrote:
Quote:
On 29 Jan 2004 06:29:12 -0700, henk wrote:

This is because I sometimes forget to manually switch CG off,
while preparing a "Release" version

Why not export the make file (ProjectExport makefile) then create a batch
file to compile it? Then when you want to make a release you version you
run the batch file. Said batch file can also help create support files that
your installation might need.

Another advantage is that the command line compiler takes far less time to
compile than the IDE.

Make -B -frelease.mak
--
Andrue Cope
[Bicester UK]


Back to top
Dennis Jones
Guest





PostPosted: Thu Jan 29, 2004 4:15 pm    Post subject: Re: DETECTING CodeGuard is enabled or not Reply with quote


"henk" <henk.vannoort (AT) net (DOT) hcc.nl> wrote

Quote:

Is it possible to PROGRAMMATICALLY detect whether CodeGuard
is enabled or not?

This is because I sometimes forget to manually switch CG off,
while preparing a "Release" version, which then results in
the executable being dependent upon the presence of CG
on the target machine....


Yes, if __CODEGUARD__ is #defined, then at least one of the CodeGuard
options is selected.

- Dennis



Back to top
Andrue Cope
Guest





PostPosted: Thu Jan 29, 2004 5:17 pm    Post subject: Re: DETECTING CodeGuard is enabled or not Reply with quote

On 29 Jan 2004 08:43:26 -0700, henk wrote:

Quote:
What is going wrong/am I doing wrong here?

Good question. Perhaps there is a bug in the BCB5 Export makefile function.
This just takes your BPR (IDE project) and produces an equivalent makefile
- there is nothing further you should have to do other than call make.

BTW:I note a typo in your reply. You have "make _b" but it should of course
be "make -b".
--
Andrue Cope
[Bicester UK]

Back to top
henk
Guest





PostPosted: Thu Jan 29, 2004 5:20 pm    Post subject: Re: DETECTING CodeGuard is enabled or not Reply with quote


THANKS!

Indeed I found that the Include path's and Lib path's did not
have the $(BCB)libdebug resp release entries....

so I created the if else endif as follows:

!if $d(DEBUG)
LIBPATH = ....Bin;......$(BCB)libdebug
INCLUDEPATH = ....Bin;.....$(BCB)libdebug
!else
LIBPATH = ....Bin; $(BCB)librelease
INCLUDEPATH = ....Bin; $(BCB)librelease
!endif

and now it works!!!

thanks again
henk
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.