View previous topic :: View next topic |
Author |
Message |
4feuersalamander
Joined: 25 Jan 2012 Posts: 16
|
Posted: Wed Jan 25, 2012 8:05 pm Post subject: missing version tab of an executable or dll file |
|
|
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 |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7924 Location: Salford, UK
|
Posted: Wed Jan 25, 2012 8:18 pm Post subject: |
|
|
Are you creating a .NET executable, a Win32 console application or a Win32 Windows application? |
|
Back to top |
|
|
4feuersalamander
Joined: 25 Jan 2012 Posts: 16
|
Posted: Wed Jan 25, 2012 8:24 pm Post subject: |
|
|
I am creating a Win32 DLL |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7924 Location: Salford, UK
|
Posted: Thu Jan 26, 2012 10:00 am Post subject: |
|
|
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 |
|
|
4feuersalamander
Joined: 25 Jan 2012 Posts: 16
|
Posted: Thu Jan 26, 2012 3:52 pm Post subject: |
|
|
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 |
|
|
4feuersalamander
Joined: 25 Jan 2012 Posts: 16
|
Posted: Thu Jan 26, 2012 6:40 pm Post subject: |
|
|
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 |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7924 Location: Salford, UK
|
Posted: Thu Jan 26, 2012 6:58 pm Post subject: |
|
|
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 |
|
|
4feuersalamander
Joined: 25 Jan 2012 Posts: 16
|
Posted: Fri Jan 27, 2012 9:49 am Post subject: |
|
|
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 |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7924 Location: Salford, UK
|
Posted: Fri Jan 27, 2012 10:14 am Post subject: |
|
|
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 |
|
|
4feuersalamander
Joined: 25 Jan 2012 Posts: 16
|
Posted: Fri Jan 27, 2012 3:50 pm Post subject: |
|
|
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.dll6ProductName
productversion: productversionD
all the other elements look right, if in both instances you use the same value for the fileversion |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7924 Location: Salford, UK
|
Posted: Fri Jan 27, 2012 5:32 pm Post subject: |
|
|
Try saving your file as UNICODE (I would guess UTF - 8). |
|
Back to top |
|
|
Emanuele
Joined: 21 Oct 2009 Posts: 77 Location: Bologna (Italy)
|
Posted: Tue Jan 31, 2012 9:53 pm Post subject: |
|
|
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 |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7924 Location: Salford, UK
|
Posted: Wed Feb 01, 2012 7:32 am Post subject: |
|
|
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 |
|
|
4feuersalamander
Joined: 25 Jan 2012 Posts: 16
|
Posted: Thu Feb 02, 2012 12:48 pm Post subject: |
|
|
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- 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 |
|
|
Emanuele
Joined: 21 Oct 2009 Posts: 77 Location: Bologna (Italy)
|
Posted: Thu Feb 02, 2012 5:21 pm Post subject: |
|
|
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 |
|
|
|