Build using DCC32.exe in delphi
Asked Answered
O

3

6

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

Oystercatcher answered 20/8, 2012 at 14:40 Comment(0)
F
10

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"} 
Finger answered 20/8, 2012 at 14:59 Comment(2)
see here for an example of the RC syntax for a VERSIONINFO section: msdn.microsoft.com/en-us/library/windows/desktop/…Saluki
0. Read the existing .res file to obtain the current build number.Webfoot
W
4

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.

Webfoot answered 20/8, 2012 at 14:49 Comment(3)
:( :( thanks for answer. Any hint to do the auto increment will be appriciated. I am using project.rc where i am mentioning the version info. I change version info manually to that .rc file then it will take effect after building through cmd. Now that means I have to auto increment changes in that .rc file. Am I correct or any other place i have to change?Oystercatcher
There is this: sourceforge.net/p/dzprepbuild/home/Home but as you are using Delphi 5.0 not sure how much help it could be.Giusto
Yes that's right. Update .rc, compile to .res, all as part of your build script. Not sure if you can use your own scripted version alongside the IDE facility. Personally I don't find IDE facility customizable enough for my needs so never use it.Webfoot
A
1

That's what I wrote dzPrepBuild for.

Arlinda answered 21/8, 2012 at 7:7 Comment(5)
hi @dummzeuch, thanks for the program. But when I ran it, it came up with error: dzPrepBuild version 1.3.0.353 built 2011-02-27 Exception: File does not exist. (ENoVersionInfo). Any idea? Thanks sam.Gillett
@Gillett see sourceforge.net/p/dzlib/code/HEAD/tree/buildtools/trunk/… for the latest version that definitely works.Arlinda
Thanks for the response, but it still fails with error: dzPrepBuild version 1.3.1.506 built 2013-03-04 Error: File does not exist. (ENoVersionInfo). I use: prepbuild --ReadDof=ProjectName --IncBuild --exec=prep.cmd. The dof file does exist in the project folder.Gillett
Are these the exact error messages? They should normally contain the full filename.Arlinda
Yes, that's exactly what it says. Hummm. Thanks anywayGillett

© 2022 - 2024 — McMap. All rights reserved.