Solved

Running the Delphi Command Line Compiler for a build

Posted on 2010-11-18
6
2,658 Views
Last Modified: 2012-05-10

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

0
Comment
Question by:Looking_4_Answers
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 22

Expert Comment

by:8080_Diver
ID: 34165629
Have you tried putting the command line in a batch file and preceding it with a command line stataement to add those paths to the %PATH% (i.e. the default path)?
0
 

Author Comment

by:Looking_4_Answers
ID: 34165688
No, but i've tried this from a batch file

C:\dcc32 -B -U <all the paths here> C:\BD\Delphi7\work\MyProject.dpr

AND

C:\dcc32 -B C:\BD\Delphi7\work\MyProject.dpr -U <all the paths here>

I even tried placing single quote around the paths ' '

Im open to triy your suggestion, can you tell me how to go about it

Im not real good with batch files, so even my example above may have been wrong

i just placed the line in a file and renamed it *.bat


0
 
LVL 22

Expert Comment

by:8080_Diver
ID: 34167024
First, go to a CMD line and, when you get that black box, type PATH and hit the <Enter> key.  This will show you the _current_ path.

1) Look at the character used to separate the various direcotry paths.  
     I think it is a semicolon but it may be a comma.  
     Which ever it is, remember it as "The Separator".  ;-)

2) Now, without closing the command window, open a new NotePad session.

3) On the notepad page, without ever hitting the <Enter> key, type the following line:
     PATH = %PATH%;

4) Now, type "The Separator" followed by one of the library paths.

5) Repeat Step 4) until you have added all of the library paths.

6) NOW hit <enter>.

7) add your commandline compile command.

8) Save this to a txt file but I would make it
     somewhere reasonable because you
     will need to execute it in a second from
     the command window you left open. ;-)

9) Open up a Windows Explorer session and change the Text File's file type to ".bat"

10) Now return to your command window and
     Change Directory to the root directory
     (CD \ <Enter> is you are already on
      the C: drive or C: <Enter> CD \<Enter>
     if you aren't) ;-)

11) Type the fully pathed file bname for the batch file you just created and hit <Enter> . . . it should execute the batch file.

12) Now type PATH <Enter> again and you should be back with the same (libraryless) path).


After the last
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Accepted Solution

by:
Looking_4_Answers earned 0 total points
ID: 34167885
actually, it is solved with the following (answered by some one on another forum)

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.

then call:

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

Expert Comment

by:8080_Diver
ID: 34168973
Sounds like a good solution . . . although the batch file should also work. ;-)
0
 

Author Closing Comment

by:Looking_4_Answers
ID: 34211369
actually, it is solved with the following (answered by some one on another forum)

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.

then call:

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

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question