Silverfrost Forums

Welcome to our forums

Defining file properties for FTN95 executables

12 Feb 2021 1:21 #27088

When using ftn95 and slink to create executables, the resulting *.exe files have only few file properties. Properties such as Version Product name Product version Copyright are missing. I there an option to define properties as actually the case for ftn95.exe? I looked for corresponding src options without success.

12 Feb 2021 4:20 #27090

FTN95 includes a resource that looks like that below and compiled using src (the .rc file also needs includes):

VS_VERSION_INFO VERSIONINFO
FILEVERSION     8,70,144,0
PRODUCTVERSION  8,70,144,0
FILEFLAGSMASK   0
FILEFLAGS       0
FILEOS          VOS_NT_WINDOWS32
FILETYPE        VFT_APP
FILESUBTYPE     0

BEGIN
    BLOCK 'StringFileInfo'
    BEGIN
        BLOCK '080904b0'
        BEGIN
            VALUE 'CompanyName', 'Silverfrost Ltd\0'
            VALUE 'FileDescription', 'Silverfrost Fortran 95 Compiler\0'
            VALUE 'FileVersion', '8.70.144.0\0'
            VALUE 'InternalName', 'FTN95\0'
            VALUE 'LegalCopyright', 'Copyright (C) Silverfrost 1993-2020\0'
            VALUE 'OriginalFilename', 'FTN95.exe\0'
            VALUE 'ProductName', 'Silverfrost FTN95 Compiler\0'
            VALUE 'ProductVersion', '8.70.144.0\0'
        END
    END
    BLOCK 'VarFileInfo'
    BEGIN
        VALUE 'Translation', 0x809, 1200
    END
END
2 Mar 2021 11:15 #27196

The fragment I posted is source code that is in a .RC file. The file is compiled using src and the results linked using slink.

This file has these includes:

#include <windows.h> #include <winver.h>

7 Mar 2021 10:04 #27224

John, I balso battled to get a .rc script compiled based on Robert's example code. Finally my colleague Moji could help with the following code:

1 VERSIONINFO

FILEVERSION 0,0,0,0

BEGIN
    BLOCK 'StringFileInfo'
    BEGIN
        BLOCK '040904e4'
        BEGIN
            VALUE 'CompanyName', 'Steinmüller Engineering\0'
            VALUE 'LegalCopyright', '(c) Steinmüller Engineering GmbH.\0'
            VALUE 'ProductName', 'SE Anwendung\0'
            VALUE 'ProductVersion', '32 bit\0'
        END
    END
    BLOCK 'VarFileInfo'
    BEGIN
        VALUE 'Translation', 0x407, 1252
    END
END

I can compile the file with [color=red:d26b78fc3e]src filename[/color:d26b78fc3e] for 32 bit applications respectively [color=red:d26b78fc3e]src /r filename[/color:d26b78fc3e] for 64 bit and get an obj file (extension .obj for 32 bit; extension .res for 64 bit) which can be loaded with slink respectively slink64 together with outher obj files. The executable will imply the desired file properties.

In general a instruction, manual and/or tutorial would be appreciated. For the time beeing we need to help each other on the basis of a 'try and error' approach.

Please login to reply.