Board index » cppbuilder » Compiling packages from command-line

Compiling packages from command-line


2004-01-05 08:39:49 PM
cppbuilder10
Hi,
I am trying to create a batch file for compiling the packages (bpk's) for
Borland C++ Builder 5 and 6. I wonder if this is possible using the
bcc32.exe.
What i need to do is to compile the bpk from command prompt using some
Borland C++Builder command-line utility. I should also be able to give the
search path and output libraries, etc.
Does anyone know how I can achieve this?
Thanks in advance.
 
 

Re:Compiling packages from command-line

"Sam" < XXXX@XXXXX.COM >wrote in message
Quote
What i need to do is to compile the bpk from command prompt
using some Borland C++Builder command-line utility. I should
also be able to give the search path and output libraries, etc.
If you run bcc32.exe with the /? parameter, you will see all of the
command-line options that are available for it.
Gambit
 

Re:Compiling packages from command-line

Hi,
I did run bcc32 /? and found a whole lot of command-line options, But
couldn't find the one required for building/compiling packages.
"Remy Lebeau (TeamB)" < XXXX@XXXXX.COM >wrote in message
Quote

"Sam" < XXXX@XXXXX.COM >wrote in message
news: XXXX@XXXXX.COM ...

>What i need to do is to compile the bpk from command prompt
>using some Borland C++Builder command-line utility. I should
>also be able to give the search path and output libraries, etc.

If you run bcc32.exe with the /? parameter, you will see all of the
command-line options that are available for it.


Gambit


 

{smallsort}

Re:Compiling packages from command-line

"Sam" < XXXX@XXXXX.COM >wrote in message
Quote
I did run bcc32 /? and found a whole lot of command-line
options, But couldn't find the one required for building/compiling
packages.
As far as I know, you should be able to just specify the .BPK file for the
package's project. A BPR/BPK file is partly a makefile in its own right,
and last time I checked, BCC32 could process those files.
Gambit
 

Re:Compiling packages from command-line

Hi,
I did try giving the .BPK file as an argument to the BCC32, and it gave all
kinds of errors abt invalid characters in the file. I guess its unable to
read the .BPK file. I suppose there should be some kind of directive which
will tell BCC32 that the input file is a .BPK file. I am not able to find
any such option in the help.
"Remy Lebeau (TeamB)" < XXXX@XXXXX.COM >wrote in message
Quote

"Sam" < XXXX@XXXXX.COM >wrote in message
news: XXXX@XXXXX.COM ...

>I did run bcc32 /? and found a whole lot of command-line
>options, But couldn't find the one required for building/compiling
>packages.

As far as I know, you should be able to just specify the .BPK file for the
package's project. A BPR/BPK file is partly a makefile in its own right,
and last time I checked, BCC32 could process those files.


Gambit


 

Re:Compiling packages from command-line

Sam, I have some test code that does this. I'll post it tomorrow (i.e,
I need to find it first).
Sam wrote:
Quote
>>I did run bcc32 /? and found a whole lot of command-line
>>options, But couldn't find the one required for building/compiling
>>packages.
--
Robert Ehteshamzadeh (C++ QA)
 

Re:Compiling packages from command-line

Thanks Robert
"Robert Ehteshamzadeh" < XXXX@XXXXX.COM >wrote in message
Quote
Sam, I have some test code that does this. I'll post it tomorrow (i.e,
I need to find it first).

Sam wrote:

>>>I did run bcc32 /? and found a whole lot of command-line
>>>options, But couldn't find the one required for building/compiling
>>>packages.

--
Robert Ehteshamzadeh (C++ QA)

 

Re:Compiling packages from command-line

just have a look at what we do in the JVCL, especially in MakeBCB.bat
You can it from our CVS server on sourceforge. The link is:
cvs.sourceforge.net/viewcvs.py/*checkout*/jvcl/dev/JVCL3/packages/MakeBCB.bat?content-type=text%2Fplain&rev=1.9
but that may be a little too complex to handle as we start from a BPG
file. So here is what you need to do for each package (extracted from
the makefile generated from the bpg file):
JvCoreC6R.bpl: bcb6\JvCoreC6R.bpk
cd packages
$(ROOT)\bin\bpr2mak -t..\BCB.bmk $**
$(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak
cd ..
the key is to convert the borland project (.bpk or .bpr) to a make file
and then build this file using make.
The -t option in the call to bpr2mak is to force using our own template,
but if you don't specify it, it uses the default one which should be
enough in most cases.
bpr2mak comes with BCB and $(ROOT) is the place where BCB is installed.
Hope this helps
Cheers
Olivier Sannier
JVCL Developer
BCB Coordinator
 

Re:Compiling packages from command-line

Hi Olivier,
Excellent tip. Thanks a lot.
"OBones" < XXXX@XXXXX.COM >wrote in message
Quote
just have a look at what we do in the JVCL, especially in MakeBCB.bat
You can it from our CVS server on sourceforge. The link is:


cvs.sourceforge.net/viewcvs.py/*checkout*/jvcl/dev/JVCL3/packages/Mak
eBCB.bat?content-type=text%2Fplain&rev=1.9
Quote

but that may be a little too complex to handle as we start from a BPG
file. So here is what you need to do for each package (extracted from
the makefile generated from the bpg file):

JvCoreC6R.bpl: bcb6\JvCoreC6R.bpk
cd packages
$(ROOT)\bin\bpr2mak -t..\BCB.bmk $**
$(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak
cd ..

the key is to convert the borland project (.bpk or .bpr) to a make file
and then build this file using make.
The -t option in the call to bpr2mak is to force using our own template,
but if you don't specify it, it uses the default one which should be
enough in most cases.
bpr2mak comes with BCB and $(ROOT) is the place where BCB is installed.

Hope this helps

Cheers

Olivier Sannier
JVCL Developer
BCB Coordinator




 

Re:Compiling packages from command-line

A quick look at an exported makefile shows the parameters for bcc32 and
ilink32:
bcc32 -Od -H=d:\c6\bin\..\lib\vcl60.csm -Hc -Vx -Ve -X- -r- -a8 -b- -k
-y -v -vi- -c -tWM -w-par
-Id:\c6\bin\..\Projects;d:\c6\bin\..\include;d:\c6\bin\..\include\vcl
-D_DEBUG;_RTLDLL;NO_STRICT;USEPACKAGES -n.\ .\
Package1.cpp
ilink32 -D"" -aa -Tpp -x -Gn -Gl -Gi -v
-Ld:\c6\bin\..\Projects;d:\c6\bin\..\lib\obj;d:\c6\bin\..\lib +
c0pkg32.obj rtl.bpi Memmgr.Lib sysinit.obj Package1.obj, +
Package1.bpl,, +
import32.lib cp32mti.lib, +
, +
Package1.res