Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 236
S2201 Avatar asked Jun 14 '09 14:06

S2201


People also ask

What is. RES file in Delphi?

Local. Remarks. The $R directive specifies the name of a resource file to be included in an application or library. The named file must be a Windows resource file and the default extension for filenames is . res.

How do I create a resource file in Delphi?

Create the resource file script.Open a simple text editor, e.g. Notepad and enter the files you want to include in your application. Every line consist of a resource name, a resource type and the resource. In the example below support is the resource name, HTML is the resource type and "support. html" is the resource.


1 Answers

Just going to add to ulrichb's answer...

Hint: Create an .RC file and use the {$R} directive to include it to your project.

{$R 'Splash.res' 'Splash.rc'}

Above directive is what I use to include an image for a splash screen. It will automatically compile the .RC file. As an option, you can just include the .RC to your Delphi project, in which case the above line will be added to your project file (*.DPR) and it will also automatically compile. (And you can use Delphi to edit the .RC file.)

Do be careful that you don't give the resource file the same name as your project file. This becomes too confusing for Delphi.

like image 60
Wim ten Brink Avatar answered Oct 02 '22 01:10

Wim ten Brink