Board index » cppbuilder » DETECTING CodeGuard is enabled or not

DETECTING CodeGuard is enabled or not


2004-01-29 09:29:12 PM
cppbuilder14
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....
 
 

Re:DETECTING CodeGuard is enabled or not

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 (Project\Export 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]
 

Re:DETECTING CodeGuard is enabled or not

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:\Borland\CBuilder5\Projects\HF_planning>
The said BPI file IS PRESENT in ..\Debug and in ..\Release!
What is going wrong/am I doing wrong here?
henk
Andrue Cope < XXXX@XXXXX.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 (Project\Export 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]
 

{smallsort}

Re:DETECTING CodeGuard is enabled or not

"henk" < XXXX@XXXXX.COM >wrote in message
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
 

Re:DETECTING CodeGuard is enabled or not

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]
 

Re:DETECTING CodeGuard is enabled or not

THANKS!
Indeed I found that the Include path's and Lib path's did not
have the $(BCB)\lib\debug resp \release entries....
so I created the if else endif as follows:
!if $d(DEBUG)
LIBPATH = ..\..\Bin;......$(BCB)\lib\debug
INCLUDEPATH = ..\..\Bin;.....$(BCB)\lib\debug
!else
LIBPATH = ..\..\Bin; $(BCB)\lib\release
INCLUDEPATH = ..\..\Bin; $(BCB)\lib\release
!endif
and now it works!!!
thanks again
henk