How to include additional information into version info file? lazarus / 3-General ---------------------------------------------------------------------- vfclists · 2010-03-24 13:37 After managing to get the version info code in http://melander.dk/articles/versioninfo/ I'd like to know if its possible to get additional strings into the version file. I tried adding additional strings to the StringFileInfo block in the application's .rc file but it always get's overwritten by the compile process. If it wasn't overwritten would the custom strings added be present in the compiled program? Is the format of that file a standard Microsoft format, or customized for Free Pascal? ---------------------------------------------------------------------- eny · 2010-03-24 15:01 Isn't it possible to create your own resource file and include it in the program? (Brief explanation in the wiki.) ---------------------------------------------------------------------- vfclists · 2010-03-24 15:09 I am not quite sure if it is the right one. I am looking to add some more strings to the .rc file as that is the one associated with version information. Are the contents of the .rc file combined with another file that I can edit? Quote from: eny on March 24, 2010, 04:01:21 pmIsn't it possible to create your own resource file and include it in the program? (Brief explanation in the wiki.) ---------------------------------------------------------------------- eny · 2010-03-24 15:58 A workaround that (to my big surprise) seems to work: 1. Enable version information in your project; 2. Check the contents of the generated project rc file and copy that to a different file    and name that file for example 'myversioninfo.rc' 3. Disable version information in your project. 4. Include your custom resourcefile in the application's main sourcefile 5. Build the project with the newly created resourcefile. I've tested it with this in my custom resource file (note the 3rd line that says ENY EXtra info): Code: [Select]1 VERSIONINFO FILEVERSION 1,2,2,4 PRODUCTVERSION 1,2,2,4 {  BLOCK "StringFileInfo"  {   BLOCK "040904E4"   {    VALUE "Comments", "Extra comments\000"    VALUE "CompanyName", "Extra company\000"    VALUE "ENY Extra Info", "Lazarus Info Demo\000"    VALUE "FileDescription", "Description\000"    VALUE "FileVersion", "1.2.2.4\000"    VALUE "InternalName", "Extra internal names\000"    VALUE "LegalCopyright", "COpyright\000"    VALUE "LegalTrademarks", "Extra legal trademarks\000"    VALUE "OriginalFilename", "Extra Original filename\000"    VALUE "ProductName", "Extra product name\000"    VALUE "ProductVersion", "1.2.2.4\000"   }  }  BLOCK "VarFileInfo"  {   VALUE "Translation", 0x0409, 0x04E4  } } ---------------------------------------------------------------------- vfclists · 2010-03-24 18:22 I tried your approach and it worked. Very nifty. A few more replies like this and I will be a Lazarus uber guru Quote from: eny on March 24, 2010, 04:58:18 pmA workaround that (to my big surprise) seems to work: 1. Enable version information in your project; 2. Check the contents of the generated project rc file and copy that to a different file    and name that file for example 'myversioninfo.rc' 3. Disable version information in your project. 4. Include your custom resourcefile in the application's main sourcefile 5. Build the project with the newly created resourcefile. I've tested it with this in my custom resource file (note the 3rd line that says ENY EXtra info): Code: [Select]1 VERSIONINFO FILEVERSION 1,2,2,4 PRODUCTVERSION 1,2,2,4 {  BLOCK "StringFileInfo"  {   BLOCK "040904E4"   {    VALUE "Comments", "Extra comments\000"    VALUE "CompanyName", "Extra company\000"    VALUE "ENY Extra Info", "Lazarus Info Demo\000"    VALUE "FileDescription", "Description\000"    VALUE "FileVersion", "1.2.2.4\000"     .....   }  }  BLOCK "VarFileInfo"  {   VALUE "Translation", 0x0409, 0x04E4  } } ---------------------------------------------------------------------- vfclists · 2010-03-30 03:13 I have posted the source for the finished code on my blog, hopefully it will be of some use to others, if there are no bugs lurking in it . http://devblog.brahmancreations.com/content/free-pascal- win32-versioninfopas. ---------------------------------------------------------------------- DonaldShimoda · 2010-06-06 20:54 Quote from: vfclists on March 30, 2010, 05:13:11 amI have posted the source for the finished code on my blog, hopefully it will be of some use to others, if there are no bugs lurking in it . http://devblog.brahmancreations.com/content/free-pascal- win32-versioninfopas. I need some like this working on linux. I know i know linux files dont hold version info, and this is the reason for i still need it.