Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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..

like image 463
Nalu Avatar asked Aug 20 '12 14:08

Nalu


2 Answers

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"} 
like image 67
DuXeN0N Avatar answered Sep 28 '22 07:09

DuXeN0N


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.

like image 38
David Heffernan Avatar answered Sep 28 '22 07:09

David Heffernan