How to do a command line build using Delphi 7?
Asked Answered
C

3

6

I am trying to build a delphi project from the command line compiler

Example: C:\dcc32 -B C:\BD\Delphi7\work\MyProject.dpr

Aside from the the standard evironment pathing:

$(DELPHI)\Bin; $(DELPHI)\Lib; $(DELPHI)\Imports; $(DELPHI)\Projects\Bpl; $(DELPHI)\Rave5\Lib;

there is nearly 50 other paths to other libraries, components, etc...

How do i package this all up and point to these to use in the commanline parameters to make my build?

When i run the example above

C:\dcc32 -B C:\BD\Delphi7\work\MyProject.dpr

i get a FATAL: File not found : 'file name here'

thanks

Charil answered 18/11, 2010 at 16:45 Comment(0)
S
7

Under Delphi 7 you need to edit you dcc32.cfg file (in you Delphi bin folder). You need to copy the library path from the IDE and put in the dcc32.cfg file. You have to add it 4 times for the different command line parameters, eg:

-u=path
-i=path
-r=path
-o=path

There are 4, I believe. I haven't done this in a few years so I hope that the info is correct. Certainly, the command line compiler does not use the same place to store the paths as the IDE does.

Shortsighted answered 18/11, 2010 at 17:14 Comment(4)
I edited the cfg file as you suggested above. Do i then call it the same way?Charil
I figured it out. Thank you so much!Charil
The correct answer is as Steve says" Add the 4 path lines above to the config file and then i just call it as such: C:\dcc32 -B C:\BD\Delphi7\work\MyProject.dprCharil
Those cfg options are filled identically from the project "search path". In the IDE, copy the environment 'lib path' to the project "search path" to get the IDE to write the cfg file that way.Dee
D
0

I don't think dcc32.exe is stored under C:\, if it is you're installation of Delphi is really out of order, or you have moved only the dcc32.exe file.

It's advised to use the dcc32.exe from the directory where the Delphi install has stored it. The Delphi directory depends strongly on the Delphi version, but for Delphi versions op to 7, this looked something like this:

C:\Program Files\Borland\Delphi7\bin\dcc32.exe
Display answered 18/11, 2010 at 17:2 Comment(1)
My installation path is not the default path. It is the path i described aboveCharil
P
-1

For later versions of Delphi, this should be changed to:

"C:\Program Files (x86)\Embarcadero\RAD Studio\8.0\bin\DCC32.exe" -h

Parole answered 17/10, 2011 at 14:58 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.