Silverfrost Forums

Welcome to our forums

missing version tab of an executable or dll file

25 Jan 2012 7:05 #9490

Hi, I'm missing to include a version tab (with a description of the file, fileversion, productversion, comment, copyright, filename etc) in the files build by the linker. Indeed I can add the item resource script, but this file will be placed in the foulder source files instead of the foulder resource files, and I see no possibility to add and to edit a version resource to this resource file as it is possible in IVF.

25 Jan 2012 7:18 #9491

Are you creating a .NET executable, a Win32 console application or a Win32 Windows application?

25 Jan 2012 7:24 #9493

I am creating a Win32 DLL

26 Jan 2012 9:00 #9498

The Silverfrost resource compiler SRC is designed to compile resource scripts (.rc files) containing a VERSIONINFO section. SRC will create a .obj from your .rc that can be linked in the usual way using SLINK.

All of this will be done for you in a Plato project when you add your .rc file as a source file to the project.

Here is some VERSIONINFO data that might give you a start

VS_VERSION_INFO VERSIONINFO
 FILEVERSION 4,5,0,0
 PRODUCTVERSION 4,5,0,0
 FILEFLAGSMASK 0x3fL
 FILEFLAGS 0x0L
 FILEOS 0x4L
 FILETYPE 0x1L
 FILESUBTYPE 0x0L
BEGIN
    BLOCK 'StringFileInfo'
    BEGIN
        BLOCK '040904e4'
        BEGIN
            VALUE 'CompanyName', 'Silverfrost Ltd'
            VALUE 'FileDescription', 'Plato IDE'
            VALUE 'FileVersion', '4.5.0.0'
            VALUE 'InternalName', 'Plato.exe'
            VALUE 'LegalCopyright', '(c) Silverfrost Ltd.  All rights reserved.'
            VALUE 'OriginalFilename', 'Plato.exe'
            VALUE 'ProductName', 'Plato'
            VALUE 'ProductVersion', '4.5.0.0'
        END
    END
    BLOCK 'VarFileInfo'
    BEGIN
        VALUE 'Translation', 0x409, 1252
    END
END
26 Jan 2012 2:52 #9505

Many thanks for your response, but to clarify the procedure: I have to change the numbers given in the second and third line of your example and all the values between the Begin and End statement? After the Begin statement the Block value should be numbered '040904e4' in any case?

The same procedure helds true for building a .NET DLL as well?

26 Jan 2012 5:40 #9508

If I tried to compile the file test1.rc in Plato 4.5, I got the following response:

Compiling file: test1.rc [Silverfrost SRC/WIN32 Ver 3.65 Copyright (c) Silverfrost Ltd 2011] 0002 FILEVERSION 1,0,0,1 *** The VERSIONINFO resource must be numbered by the version number (i.e. 1), not named WARNING - The compiler only knows about version 1 of VERSIONINFO 1 ERRORS [<TEST1SRC/WIN32 Ver 3.65] *** Compilation failed Compilation failed.

How should I number the VERSIONINFO resource, as changing the number of FILEVERSION or the name of the resource file do not change the response?

Are the values 'Comments' and 'PrivateBuild' not possible?

26 Jan 2012 5:58 #9510

To start off with just replace my VS_VERSION_INFO by the number 1. Leave everything else as shown in the first instance.

1 VERSIONINFO
 FILEVERSION 4,4,8,0
 PRODUCTVERSION 4,4,8,0
 FILEFLAGSMASK 0x3fL
 FILEFLAGS 0x0L
 FILEOS 0x4L
 FILETYPE 0x1L
 FILESUBTYPE 0x0L
BEGIN
    BLOCK 'StringFileInfo'
    BEGIN
        BLOCK '040904e4'
        BEGIN
            VALUE 'CompanyName', 'Your stuff'
            VALUE 'FileDescription', 'Your stuff'
            VALUE 'FileVersion', '?.?.?.?'
            VALUE 'InternalName', 'your.dll'
            VALUE 'LegalCopyright', '(c) Your company.  All rights reserved.'
            VALUE 'OriginalFilename', 'your.dll'
            VALUE 'ProductName', 'Your name'
            VALUE 'ProductVersion', '?.?.?.?'
        END
    END
    BLOCK 'VarFileInfo'
    BEGIN
        VALUE 'Translation', 0x409, 1252
    END
END
27 Jan 2012 8:49 #9516

Many thanks, this nearly works, if pasting your code in my test1.rc, I can now build a Win32 DLL with a version tab, but there seems some mixing of the variables: if you choose the version tab, you will get for example: Dateiversion 4.4.8.0 Beschreibung: Your stuff.FileVersion Copyright: c) Your company. All rights reserved.

Versionsinformationen: Dateiversion ?.?.?.? Firma Your stuff<FileDescription Interner Name your.dllr'LegalCopyright

and so on.

It doesn't work for buidling a .NET DLL, as you will get the error message: SRC is WIN32 only when run from Plato 3.

27 Jan 2012 9:14 #9520

I assume that you will be able to change the data to get what you want. For example the 4.4.8.0 is in my sample and needs to be set to your value.

For .NET you will need the current release of FTN95 etc.. Then you can create an AssemblyInfo.cs file as below. This file name can then be included on the DBK_LINK command line.

[assembly: AssemblyTitle('Salford.VisualClearWin')]
[assembly: AssemblyDescription('Visual ClearWin Library')]
[assembly: AssemblyConfiguration('')]
[assembly: AssemblyCompany('Salford Software Ltd')]
[assembly: AssemblyProduct('')]
[assembly: AssemblyCopyright('Copyright 2004 Salford Software')]
[assembly: AssemblyTrademark('')]
[assembly: AssemblyCulture('')]		
[assembly: AssemblyVersion('1.1.1')]
27 Jan 2012 2:50 #9523

Hi, many thanks for the code regarding a .NET DLL.

But regarding the versioninfo of a Win32 DLL there remain little problems. If you use the following definitions BEGIN VALUE 'CompanyName','companyname' VALUE 'FileDescription', 'filedescription' VALUE 'FileVersion', 'fileversion' VALUE 'InternalName', 'internalname.dll' VALUE 'LegalCopyright', '(c) Your company. All rights reserved.' VALUE 'OriginalFilename', 'originalname.dll' VALUE 'ProductName', 'productname' VALUE 'ProductVersion', 'productversion' END then you will get the following values for the elements of the versioninformation:

internal name: internalname.dllr'LegalCopyright originalfilename: originalname.dll6 ProductName productversion: productversionD

all the other elements look right, if in both instances you use the same value for the fileversion

27 Jan 2012 4:32 #9524

Try saving your file as UNICODE (I would guess UTF - 8).

31 Jan 2012 8:53 #9546

Dear Paul,

I am trying to add the cs assembly to a NET exe project in VS. You said

This file name can then be included on the DBK_LINK command line . Can I do this by the 'Extra linker options' line in the project properties? Which is the proper syntax?

1 Feb 2012 6:32 #9549

I would expect it to work by just giving the file name. You may need to provide the full path or the relative path in which case there may be problems if your path name contains spaces.

2 Feb 2012 11:48 #9569

Hi, I have tried to include your given AssemblyInfo.cs in the build of a .NET DLL by the dbk_link command 'dbk_link4 if97.dll if97.dbk AssemblyInfo.cs' with no effect. regarding the versioninfo of a Win32-DLL: saving my if97.rc by choosing Unicode or Unicode(UTF-8) in the advanced save options didn't changed anything. For me it looks more as conflicting address spaces, as for example choosing the three-letter value 'int' for InternalName will work, whereas choosing the four-letter value 'inte' may produce inteRLegalCopyright

2 Feb 2012 4:21 #9573

Dear Paul,

I tried to build the executable adding an absolute path to the extra linker options. The exe is built but I cannot see any of the properties I set in the cs file. This is the output build-log line, concerning the linking:

Linking...

Command line for link: dbk_link2.exe /VS7 /NO_BANNER 'C:\Users\Nullaritorna\Documents\Visual Studio 2008\Projects\FortranApplication3\FortranApplication3\AssemblyInfo.cs' /REF: ....

Am I forgetting something? Thanks for the help.

13 Feb 2012 11:12 #9602

You will need to use the latest release of DBK_LINKx but I guess you must have done this since the linker does not complain.

I am not sure if you will necessarily get the properties directly. It may be necessary to look at the resulting assembly using ildasm.exe.

16 Feb 2012 7:31 #9624

Hi, For the Net build I have copied the dbk- and cs- files into the FTN95 directory, included the Net framework v2.0 and v4.0 path to the system environment variables and tried dbk_link2 and dbk_link4 of version 6.20, but no versioninfo happens.

16 Feb 2012 9:21 #9626

I inspected the compiled exe with the VS disassembler, but there is no trace of the info settings.

17 Feb 2012 9:34 #9631

Have you looked at the resulting assembly using ildasm?

23 Feb 2012 8:33 #9676

Yes, I meant ildasm...

Please login to reply.