Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

I can't include a version number in this old Delphi project I inherited. How do I fix it?

I have an old Delphi codebase I have to maintain, lots of DLLs, some older than others. In some of these DLLs there is no version information in the Project Options dialog. The controls for adding a version are greyed out and I can't even add a version number by manually editing the .DOF file. How can I include a version number in these projects?

like image 686
John Ferguson Avatar asked Sep 25 '08 06:09

John Ferguson


1 Answers

Check if the default .RES file exists in the project source location. Delphi includes the version number of the project in a .res file with the same name as the .dpr file. If the .RES file does not exist, the simplest way to recreate it is to add the {$R *.RES} compiler directive to the .DPR file, immediately after the uses clause.

library foolib;    

uses
    foo in 'foo.pas',
    baz in 'baz.pas';

{$R *.RES}

exports
    foofunc name 'foofunc';

end;

As soon as you add the {$R *.RES} compiler directive Delphi will tell you it has recreated the foolib.res resource file.

like image 112
John Ferguson Avatar answered Sep 17 '22 13:09

John Ferguson