Nalu
Nalu

Reputation: 1117

Build using DCC32.exe in delphi

Hello I am building my delphi project using the following command:

Command: dcc32.exe project.dpr d:\exe_folder

The above command works good and I am able to cerate the exe in output folder. But when I build same project through IDE then on each build the build number is incremented as there is option 'Auto Increament Build Number' which I have checked. But while doing it through command line the build number is not getting increasing. Any option to revise the build info/version info through the command line??

Thanks..

Upvotes: 6

Views: 5141

Answers (3)

dummzeuch
dummzeuch

Reputation: 11252

That's what I wrote dzPrepBuild for.

Upvotes: 1

DuXeN0N
DuXeN0N

Reputation: 1587

dcc32.exe can't increase build number directly. Version info (including build number) is used from *.res file which is updated every time by IDE. To bypass IDE you can write RC script with version info section, small app that will increase build number in this script. Then, you can create bat file with the following actions for building:

  1. Run your app to increase build number
  2. Compile RC script using brcc32.exe (in - RC script, out - RES file)
  3. Compile your application with dcc32.exe with new .res file

P.S. Don't forget to include RES file with version info to your project:

{$R "yourversioninfofile.res"} 

Upvotes: 10

David Heffernan
David Heffernan

Reputation: 613562

No, the auto increment of the build number is an IDE feature. You will likely need to script your own auto increment facility using an appropriate scripting language.

If you wanted to use your own command line auto increment alongside the IDE's equivalent, here's what you'd need to do:

  1. Get your script to read the .res file that is managed by the IDE.
  2. Increment the build number.
  3. Re-create the .res file.
  4. Build the project.

To make this work I think you'd need to reverse engineer what's in the IDE generated .res file. But that's pretty easy. Any decent resource editing tool will help you do that.

Upvotes: 4

Related Questions