delphiresourcesrcversioninfo

How to compile Delphi RES file from commandline


I never worked with Delphi before, so maybe the question looks a simple minded, But I need to change FileVersion in RES resource file parameter from command line...


Solution

  • Here can find the Borland resource compiler:

    %ProgramFiles%\Borland\Delphi7\Bin\brcc32.exe

    EDIT: As mghie mentioned you could create a RC file like this one:

    VS_VERSION_INFO VERSIONINFO
    FILEVERSION 1, 0, 0, 100
    PRODUCTVERSION 1, 0, 0, 1
     FILEFLAGSMASK 0x3fL
    #ifdef _DEBUG
     FILEFLAGS 0x9L
    #else
     FILEFLAGS 0x8L
    #endif
     FILEOS 0x4L
     FILETYPE 0x1L
     FILESUBTYPE 0x0L
    BEGIN
        BLOCK "StringFileInfo"
        BEGIN
            BLOCK "040904b0"
            BEGIN
                VALUE "Comments", "Modified by BZCToOn's"
                VALUE "CompanyName", "Syntheretix"
                VALUE "FileDescription", "rcversion MFC Application"
                VALUE "FileVersion", "1, 0, 0, 100"
                VALUE "InternalName", "rcversion"
                VALUE "LegalCopyright", "Copyleft (C) Bzc ToOn'S 2002"
                VALUE "OriginalFilename", "rcversion.EXE"
                VALUE "PrivateBuild", "RCVERSION-20030212_100"
                VALUE "ProductName", "rcversion Application"
                VALUE "ProductVersion", "1, 0, 0, 1"
            END
        END
        BLOCK "VarFileInfo"
        BEGIN
            VALUE "Translation", 0x409, 1200
        END
    END
    

    (copied from http://www.codeproject.com/KB/applications/cb2rcversion.aspx)

    And compile it using BRCC32. Before you have to disable version information in project settings.

    EDIT: Further information ...

    http://msdn.microsoft.com/en-us/library/aa380599.aspx

    http://msdn.microsoft.com/en-us/library/aa381058.aspx