forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

missing version tab of an executable or dll file
Goto page 1, 2  Next
 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
4feuersalamander



Joined: 25 Jan 2012
Posts: 16

PostPosted: Wed Jan 25, 2012 8:05 pm    Post subject: missing version tab of an executable or dll file Reply with quote

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.
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7924
Location: Salford, UK

PostPosted: Wed Jan 25, 2012 8:18 pm    Post subject: Reply with quote

Are you creating a .NET executable, a Win32 console application or a Win32 Windows application?
Back to top
View user's profile Send private message AIM Address
4feuersalamander



Joined: 25 Jan 2012
Posts: 16

PostPosted: Wed Jan 25, 2012 8:24 pm    Post subject: Reply with quote

I am creating a Win32 DLL
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7924
Location: Salford, UK

PostPosted: Thu Jan 26, 2012 10:00 am    Post subject: Reply with quote

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

Code:
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
Back to top
View user's profile Send private message AIM Address
4feuersalamander



Joined: 25 Jan 2012
Posts: 16

PostPosted: Thu Jan 26, 2012 3:52 pm    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message
4feuersalamander



Joined: 25 Jan 2012
Posts: 16

PostPosted: Thu Jan 26, 2012 6:40 pm    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7924
Location: Salford, UK

PostPosted: Thu Jan 26, 2012 6:58 pm    Post subject: Reply with quote

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

Code:
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
Back to top
View user's profile Send private message AIM Address
4feuersalamander



Joined: 25 Jan 2012
Posts: 16

PostPosted: Fri Jan 27, 2012 9:49 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7924
Location: Salford, UK

PostPosted: Fri Jan 27, 2012 10:14 am    Post subject: Reply with quote

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.

Code:
[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")]
Back to top
View user's profile Send private message AIM Address
4feuersalamander



Joined: 25 Jan 2012
Posts: 16

PostPosted: Fri Jan 27, 2012 3:50 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7924
Location: Salford, UK

PostPosted: Fri Jan 27, 2012 5:32 pm    Post subject: Reply with quote

Try saving your file as UNICODE (I would guess UTF - 8).
Back to top
View user's profile Send private message AIM Address
Emanuele



Joined: 21 Oct 2009
Posts: 77
Location: Bologna (Italy)

PostPosted: Tue Jan 31, 2012 9:53 pm    Post subject: Reply with quote

Dear Paul,

I am trying to add the cs assembly to a NET exe project in VS. You said
Quote:
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?
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7924
Location: Salford, UK

PostPosted: Wed Feb 01, 2012 7:32 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message AIM Address
4feuersalamander



Joined: 25 Jan 2012
Posts: 16

PostPosted: Thu Feb 02, 2012 12:48 pm    Post subject: Reply with quote

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-Cool 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
Back to top
View user's profile Send private message
Emanuele



Joined: 21 Oct 2009
Posts: 77
Location: Bologna (Italy)

PostPosted: Thu Feb 02, 2012 5:21 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support All times are GMT + 1 Hour
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group