We compile the program with Delphi, ready to release products, always want to release personalized information with the product to mark the source of the product and developers, like the Windows program, so that we look at the properties of the product he is Microsoft's products, these in Delphi how to achieve it? Let me show you how to add version information to the Exe,dll file.
First, add version information to the EXE file.
This I think everyone will add, Delphi has provided us with the relevant options. Practice: Open your project, select Menu Project-->options ...--->version info select "Include version infomation in Project", then you can add specific version information , compile your project, look at the generated EXE file properties, and discover that you have your own version information.
Second, add version information to the DLL file.
How do I add version information to my DLL file? If you follow the above method, you will find that in the "Include version infomation in project" You can not choose, we really have no way? The answer is to use the resource file, Microsoft has already prepared for us. Here is a concrete example.
First create a file suffix of. RC (take ver.rc for example), open with Notepad and copy the following:
Vs_version_info versioninfo//version information structure
FileVersion 1,0,0,1//As the name implies file version, which is displayed on the property page version |
ProductVersion 1,0,0,1//As the name implies product version | Here is the main version information
Fileflagsmask 0X3FL//Set as 0X3FL here! |
#ifdef _DEBUG
FileFlags 0x1l//vs_ff_debug including debug information
#else
FileFlags 0x0l//None
#endif
Fileos 0x4l//corresponding to the VOS__WINDOWS32 in Delphi, the program is Win32 program
FILETYPE 0x2l//file type, $ dll,$1 is exe
Filesubtype 0x0l//File subtype, generally set to 0
BEGIN
BLOCK "Stringfileinfo"//here to set the file other version information (more information)
BEGIN
BLOCK "080403a8"//language 080403a8 Simplified Chinese, 040904b0 English (United States)
BEGIN
VALUE "Comments", "My Dll Application Test"//Remarks
VALUE "CompanyName", "jjony"//Company Name
VALUE "FileDescription", "xxx.dll"//Product Description
VALUE "FileVersion", "1." 0.0. 1 "//File version
VALUE "InternalName", "" "//Internal name
VALUE "Legalcopyright", "Copyright (C) 2006.6"//Copyright information
VALUE "OriginalFilename", "xxx.dll"//source file name
VALUE "ProductName", "xxx.dll"//Product Name
VALUE "ProductVersion", "1." 0.0. 1 "//Product Version
END
END
BLOCK "Varfileinfo"
BEGIN
VALUE "Translation", 0x804, 0X03A8//Here is the key oh, decide what language
END//0x0804, 0x03a8 Simplified Chinese
END//0x0409, 0x04b0 English (United States)
You see what does not, is actually filled the Delphi in the Vs_versioninfo and vs_fixedfileinfo structure, but the language format is VC's just:)
Save the above as an. rc file (take ver.rc as an example). Copy Delphi7binbrcc32.exe to your program directory, then build Ver.bat, enter: Brcc32 ver.rc save. Double-click Run Ver.bat, Build Ver.res, and then add the resource {$R ver.res} in your DLL project to recompile the DLL, and you will see that the DLL has its own version information.
http://blog.csdn.net/zisongjia/article/details/68927919
Adding version information (EXE and DLL) to the Delphi program