<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">use R::Dcf;
use R::Utils;

my $DllName = $ARGV[0];
my $pkgname = $DllName;
my $pkgversion = "unknown";

if(-r "../DESCRIPTION"){
    $description = new R::Dcf("../DESCRIPTION");
} elsif(-r "../../DESCRIPTION"){
    $description = new R::Dcf("../../DESCRIPTION");
}
if($description-&gt;{"Version"}) {
    $pkgversion = $description-&gt;{"Version"};
}
if(-r "../DESCRIPTION"){
    $description = new R::Dcf("../DESCRIPTION");
} elsif(-r "../DESCRIPTION.in"){
    $description = new R::Dcf("../DESCRIPTION");
}
if($description-&gt;{"Package"}) {
    $pkgname = $description-&gt;{"Package"};
}


print &lt;&lt;ENDF;
#include &lt;windows.h&gt;
#include "Rversion.h"

VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,1,0,0
PRODUCTVERSION 3,0,0,0
FILEFLAGSMASK 0x3L
FILEOS VOS__WINDOWS32
FILETYPE VFT_APP
BEGIN
    BLOCK "StringFileInfo"
    BEGIN
        BLOCK "040904E4"
        BEGIN
ENDF
print "            VALUE \"FileDescription\", \"DLL for R package `$pkgname'\\0\"\n";
print "            VALUE \"FileVersion\", \"$pkgversion\\0\"\n";
print &lt;&lt;ENDF;
            VALUE "Compiled under R Version", R_MAJOR "." R_MINOR " (" R_YEAR "-" R_MONTH "-" R_DAY ")\\0"
            VALUE "Project info", "http://www.r-project.org\\0"
        END
    END
    BLOCK "VarFileInfo"
    BEGIN
        VALUE "Translation", 0x409, 1252
    END
END
ENDF
</pre></body></html>