🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.delphi.commandlinetools
Article #313

Re: Delphi Command-Line Compiler

#313
From: Jens Berke
Date: Mon, 08 Nov 2004 13:47
60 lines
2834 bytes
stphang wrote:
>   I am using Delphi 5, and wish to know that if there is any way to include
> the version information into the compiled .Exe file while compiling using
> the DCC32.Exe command-line.
What I do is having a textfile (RC-file) compiled by brcc32 and then use 
the resulting RES-file with dcc32.

Here's an example of a RC-file.:

1 VERSIONINFO
FILEVERSION 1,2,3,4
PRODUCTVERSION 1,2,3,4
FILEFLAGSMASK 0x3FL
FILEFLAGS 0x02L
FILEOS 0x40004L
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
     BLOCK "StringFileInfo"
     BEGIN
          BLOCK "040704E4"
          BEGIN
               VALUE "CompanyName", "Company XY\0"
               VALUE "FileDescription", "BLABLABLA\0"
               VALUE "FileVersion", "1.2.3.4\0"
               VALUE "LegalCopyright", "(c) 2004 BLABLA\0"
               VALUE "ProductName", "BLABLABLA\0"
               VALUE "ProductVersion", "1.2\0"
          END
     END
     BLOCK "VarFileInfo"
     BEGIN
          VALUE "Translation", 0x0407, 1252
     END
END

If your package is called "MyPackage.dpk", save the RC-file as 
"MyPackage.rc"

Now compile the RC-file, like this:

d:\progs\borland\Delphi5\bin\brcc32.exe -r 
d:\components\MyPackage\MyPackage.rc 
-fod:\components\MyPackage\MyPackage.res

Now you have a RES-file. In order to get the res-file compiled into a 
package, make sure you have the line {$R *.RES} in you DPK-file. 
Compiling the DPk-file with dcc32 will now use the RES-file automatically.

If you don't want to use an RC-file, just open the package in the IDE, 
enter you version information in the options of the project, save, and 
you'll then have a res-file with the version information in it.

HTH
Jens


-- 
____________________________________________________________
  email (delete all digits, please): info@11.jensberke.11.de
Technical Details
Message-ID: <418f78dc@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!newshosting.com!nx01.iad01.newshosting.com!news-peer0-test!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <418f6e94@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: ff8f1,ac33da12bfd535c1
X-Google-Attributes: gidff8f1,public
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Mon, 08 Nov 2004 14:47:07 +0100
From: Jens Berke <noreply@jensberke.de>
User-Agent: Mozilla Thunderbird 0.9 (Windows/20041103)
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: borland.public.delphi.commandlinetools
Subject: Re: Delphi Command-Line Compiler
References: <418f6e94@newsgroups.borland.com>
In-Reply-To: <418f6e94@newsgroups.borland.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 80.134.93.14
Message-ID: <418f78dc@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1099921628 80.134.93.14 (8 Nov 2004 05:47:08 -0700)
Lines: 60
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!newshosting.com!nx01.iad01.newshosting.com!news-peer0-test!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail