The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,860 other subscribers

Delphi, resource files and includes – some links

Posted by jpluimers on 2017/02/23

Some links that were useful getting back into using Delphi with resource scripts and include files:

Maybe I should have considered this alternative:

–jeroen

PS: a first go on a resource file structure for Version Information is below.


// Assemble the VersionInfo resource from the previously information included/provided by the .RC file for the project.
#ifndef PRIVATEBUILD
VER_PRIVATEBUILD VS_FF_RELEASE
VER_PRIVATEBUILD VS_FF_PRIVATEBUILD
#ifndef PRERELEASE
VER_PRERELEASE VS_FF_RELEASE
VER_PRERELEASE VS_FF_PRERELEASE
#ifndef DEBUG
VER_DEBUG VS_FF_RELEASE
VER_DEBUG VS_FF_DEBUG
VS_VERSION_INFO VERSIONINFO
FILEVERSION VER_FILEVERSION
PRODUCTVERSION VER_PRODUCTVERSION
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
FILEFLAGS (VER_PRIVATEBUILD|VER_PRERELEASE|VER_DEBUG)
FILEOS VOS__WINDOWS32
FILETYPE VFT_APP // or VFT_DLL
FILESUBTYPE VFT_UNKNOWN
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "080904B0"
BEGIN
// VALUE "Comments", "\0\0"
VALUE "CompanyName", VER_COMPANYNAME_STR
VALUE "FileDescription", VER_FILEDESCRIPTION_STR
VALUE "FileVersion", VER_FILEVERSION_STR
VALUE "InternalName", VER_INTERNALNAME_STR
VALUE "LegalCopyright", VER_LEGALCOPYRIGHT_STR
// LegalTrademarks Trademarks and registered trademarks that apply to the file. This should include the full text of all notices, legal symbols, trademark numbers, and so on. This string is optional.
VALUE "LegalTrademarks1", VER_LEGALTRADEMARKS1_STR
VALUE "LegalTrademarks2", VER_LEGALTRADEMARKS2_STR
VALUE "OriginalFilename", VER_ORIGINALFILENAME_STR
#ifdef PRIVATEBUILD
// VALUE "PrivateBuild" "\0\0"
VALUE "ProductName", VER_PRODUCTNAME_STR
VALUE "ProductVersion", VER_PRODUCTVERSION_STR
// VALUE "SpecialBuild" "\0\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x809,1200
END
END


// Copyrights used by the verious Suite projects
VER_SUITECOPYRIGHT_STR "Copyright \251 2001-2017 Copyrightholder\0\0"
VER_SUITETESTSCOPYRIGHT_STR "Copyright \251 2016-2017 Copyrightholder\0\0"


// Name information used by all Suite projects
VER_SUITECOMPANYNAME_STR "Suite company name\0\0"
VER_SUITEPRODUCTNAME_STR "Suite product name\0\0"


// Resources for SuiteTestsProject
"SuiteCopyrightsForResources.inc"
"SuiteNamesForResources.inc"
"SuiteVersionNumberForResources.inc"
"VsVersionForResources.inc"
VER_COMPANYNAME_STR VER_SUITECOMPANYNAME_STR
VER_FILEDESCRIPTION_STR "Suite Unit Tests\0\0" ///////////////////// modify for each suite part
VER_FILEVERSION VER_SUITEVERSION
VER_FILEVERSION_STR VER_SUITEVERSION_STR
VER_INTERNALNAME_STR "SuiteTestsProject\0\0" //////////////////// modify for each suite part
VER_LEGALCOPYRIGHT_STR VER_SUITETESTSCOPYRIGHT_STR
VER_LEGALTRADEMARKS1_STR "\0\0"
VER_LEGALTRADEMARKS2_STR "\0\0"
VER_ORIGINALFILENAME_STR "SuiteTestsProject.exe\0\0" //////////////// modify for each suite part
VER_PRODUCTNAME_STR VER_SUITEPRODUCTNAME_STR
VER_PRODUCTVERSION VER_SUITEVERSION
VER_PRODUCTVERSION_STR VER_SUITEVERSION_STR
"SuiteAssembleVersionInfoResource.inc"


// Version information used by all Suite projects
VER_SUITEVERSION 1,2,3,45
VER_SUITEVERSION_STR "1.2.3.45\0\0"


// comments https://msdn.microsoft.com/en-us/library/windows/desktop/aa380896.aspx
// 1200 -> 0x04B0 (Unicode)
// 0x0809 -> 1057 (U.K. English)
// 0x0409 -> 1033 (U.S. English)
// 1252 -> 0x04E4 (Codepage 1252 – Multilingual)
// VS_VERSION_INFO resource https://msdn.microsoft.com/en-us/library/windows/desktop/aa381058.aspx
// StringFileInfo block https://msdn.microsoft.com/en-us/library/windows/desktop/aa381049.aspx
// VarFileInfo block https://msdn.microsoft.com/en-us/library/windows/desktop/aa381057.aspx
///* —– VS_VERSION.dwFileFlags —– */
VS_FF_RELEASE 0x00000000L
VS_FF_DEBUG 0x00000001L
VS_FF_PRERELEASE 0x00000002L
VS_FF_PATCHED 0x00000004L
VS_FF_PRIVATEBUILD 0x00000008L
VS_FF_INFOINFERRED 0x00000010L
VS_FF_SPECIALBUILD 0x00000020L
VS_FFI_FILEFLAGSMASK 0x0000003FL
///* —– VS_VERSION.dwFileOS —– */
VOS_UNKNOWN 0x00000000L
VOS_DOS 0x00010000L
VOS_OS216 0x00020000L
VOS_OS232 0x00030000L
VOS_NT 0x00040000L
VOS_WINCE 0x00050000L
VOS__BASE 0x00000000L
VOS__WINDOWS16 0x00000001L
VOS__PM16 0x00000002L
VOS__PM32 0x00000003L
VOS__WINDOWS32 0x00000004L
VOS_DOS_WINDOWS16 0x00010001L
VOS_DOS_WINDOWS32 0x00010004L
VOS_OS216_PM16 0x00020002L
VOS_OS232_PM32 0x00030003L
VOS_NT_WINDOWS32 0x00040004L
///* —– VS_VERSION.dwFileType —– */
VFT_UNKNOWN 0x00000000L
VFT_APP 0x00000001L
VFT_DLL 0x00000002L
VFT_DRV 0x00000003L
VFT_FONT 0x00000004L
VFT_VXD 0x00000005L
VFT_STATIC_LIB 0x00000007L

[Archive.isVS_VERSION_INFO VERSIONINFO FILEVERSION 1,1,4,0 PRODUCTVERSION 1,1,4,0 FILEFLAGSM – PasteHistory

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.