How to stop Final Builder 8 from destroying the rc file using Delphi 10.2 Tokyo

360 views Asked by At

When I try to build some DPKs in IDE it compiles properly and generates a appropriate BPLs, but when I try to do it with the command line, using Delphi 10.2 Tokyo then I'm getting errors like:

... .rc(14) : error RC2132 : expected VALUE, BLOCK, or END keyword

I've found out that before compilation that RC file looks like:

1 VERSIONINFO
FILEVERSION 1,0,0,0
PRODUCTVERSION 1,0,0,0
FILEFLAGSMASK 0x3FL
FILEFLAGS 0x00L
FILEOS 0x40004L
FILETYPE 0x1L
FILESUBTYPE 0x00L
BEGIN
    BLOCK "StringFileInfo"
    BEGIN
         BLOCK "040904E4"
         BEGIN
              VALUE "FileVersion", "1.0.0.0\0"
              VALUE "ProductVersion", "1.0.0.0\0"
         END
    END
    BLOCK "VarFileInfo"
    BEGIN
         VALUE "Translation", 0x0409, 1252
    END
END

but after failed build try Delphi changes it into:

1 VERSIONINFO
FILEVERSION 1,0,0,0
PRODUCTVERSION 1,0,0,0
FILEFLAGSMASK 0x3FL
FILEFLAGS 0x00L
FILEOS 0x40004L
FILETYPE 0x1L
FILESUBTYPE 0x00L
BEGIN
    BLOCK "StringFileInfo"
    BEGIN
         BLOCK "040904E4"
         BEGIN

So for some reason Delphi tries to overwrite the RC file but stops in the middle and than is unable to parse it.

What can be the reason for this strange behaviour?

PS: This is a standard RC file generated by Delphi IDE while creating DPK project. I did not make any changes in it.

I've already tried to delete it and recreate with the IDE.

I'm unable to tell you which command is used to generate the BPL because I use FinalBuilder 8 to do that

2

There are 2 answers

5
Vincent Parrett On BEST ANSWER

This most likely a problem with the default version info variables that Tokyo sets - see Delphi Version Info Errors

2
Gilmor On

Thanks to @DavidHeffernan comment, I checked that once again and it turned out that the problem was with regenerating the resource file by Final Builder.

When I've unchecked "Version info" and "Regenerate resource" in the final builder action, everything works fine.

Right now I don't know what exactly is causing the problem in Final Builder, but disabling these options does the job for me

enter image description here