2
votes

I am using Embarcadero Delphi XE2 and I've got a project that I want to compile from command line. I managed to do it with dcc32 on a .dpr, but I had to set some settings.

From what I think, the file .dproj has all the necessary paths and stuff so I wouldn't need to set those variables, so my question is:

Is it possible to compile a delphi command line project from a .dproj file?

Greetings.

1

1 Answers

7
votes

Yes. It's actually very simple.

Use the Windows Start button to launch Embarcadero RAD Studio XE2->RAD Studio Command Prompt, which sets up the proper environmental variables and search path entries. Then switch to your project folder and simply type MSBuild and hit Enter, which will execute the compiler with the current project file.

If you have more than one .dproj file in the folder, just add it's name after MSBuild, as in MSBuild MyMainProj.dproj.