Jump to content
Excelsior Forums
Sign in to follow this  
victor_mamj

add version info into .dll and .exe properties

Recommended Posts

hello all, i am now using jet to compile my java code, it's cool and works well. but how can i get an .exe or .dll with a version info in its properties? just like in Visual C++, we can add version resource.

Share this post


Link to post
Share on other sites

Hello,

You can include this information into executables/DLLs using the resource script (.rc) file.

1. Create file version.rc, fill in required information.

1 VERSIONINFO
FILEVERSION 4,10,0,0
PRODUCTVERSION 4,10,0,0
FILEFLAGSMASK 0x3fL
FILEFLAGS 0x0L
// FILEOS 0x4 is Win32, 0x40004 is Win32 NT only
FILEOS 0x40004L
// FILETYPE should be 0x1 for .exe and 0x2 for .dll
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
    BLOCK "StringFileInfo"
    BEGIN
        BLOCK "040904e4"
        BEGIN
            VALUE "CompanyName", "Company\0"
            VALUE "FileDescription", "Description\0"
            VALUE "FileVersion", "1.00\0"
            VALUE "InternalName", "Internal Name\0"
            VALUE "LegalCopyright", "Copyright\0"
            VALUE "OriginalFilename", "APP.EXE\0"
            VALUE "ProductName", "Product\0"
            VALUE "ProductVersion", "1.00\0"
        END
    END
    BLOCK "VarFileInfo"
    BEGIN
        VALUE "Translation", 0x0, 1200
    END
END 

2. Compile version.rc. If you have Microsoft Visual C++ installed you can use the following command

    rc version.rc

The file "version.res" should be produced.

3. Open your JET project file (.prj) in any text editor and add the following line into the end of the project:

!module version.res

4. Recompile the project and the required information will be included into the executable/DLL.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×