Add version info resource to JVM.DLL. Modified version of patch #3472413.

This commit is contained in:
jfrijters 2012-01-17 14:43:11 +00:00
Родитель 1c00b65c88
Коммит 8aaf296536
3 изменённых файлов: 47 добавлений и 3 удалений

Просмотреть файл

@ -15,4 +15,9 @@
<property name="peverify" value="${path::combine(framework::get-sdk-directory('net-2.0'), 'peverify.exe')}" />
</if>
</if>
<!-- find rc.exe -->
<if test="${(not property::exists('rc')) and framework::sdk-exists(framework::get-target-framework()) and file::exists(path::combine(framework::get-sdk-directory(framework::get-target-framework()), 'rc.exe'))}">
<property name="rc" value="${path::combine(framework::get-sdk-directory(framework::get-target-framework()), 'rc.exe')}" />
</if>
</project>

Просмотреть файл

@ -1,12 +1,23 @@
<?xml version="1.0"?>
<project name="JVM" default="JVM">
<include buildfile="../ikvm.include" />
<target name="JVM" if="${property::exists('ilasm') and (not string::starts-with(framework::get-target-framework(), 'mono'))}">
<target name="version">
<property name="VERSION" value="${assemblyname::get-version(assemblyname::get-assembly-name(path::combine(project::get-base-directory(), '../bin/IKVM.Runtime.dll')))}" />
<copy file="jvm.rc.in" tofile="jvm.rc" outputencoding="ascii" overwrite="true">
<filterchain>
<replacetokens>
<token key="VERSIONLIST" value="${string::replace(property::get-value('VERSION'), '.', ',')}" />
<token key="VERSION" value="${VERSION}" />
</replacetokens>
</filterchain>
</copy>
</target>
<target name="JVM" depends="version" if="${property::exists('ilasm') and (not string::starts-with(framework::get-target-framework(), 'mono'))}">
<property overwrite="false" name="ilasm_signoption" value="" />
<exec program="${rc}" commandline="jvm.rc" />
<exec program="../tools/asmref.exe" useruntimeengine="true" commandline="mscorlib ../bin/IKVM.Runtime.JNI.dll" output="jvm_h.il" />
<echo message=".assembly JVM { .ver ${string::replace(property::get-value('VERSION'), '.', ':')} }" file="jvm_h.il" append="true" />
<exec program="${ilasm}" commandline=" /dll ${ilasm_signoption} /out:../bin-x86/JVM.DLL jvm_h.il jvm32.il JVM.il" />
<exec program="${ilasm}" commandline="/pe64 /x64 /dll ${ilasm_signoption} /out:../bin-x64/JVM.DLL jvm_h.il jvm64.il JVM.il" />
<exec program="${ilasm}" commandline=" /dll ${ilasm_signoption} /out:../bin-x86/JVM.DLL /RESOURCE:jvm.res jvm_h.il jvm32.il JVM.il" />
<exec program="${ilasm}" commandline="/pe64 /x64 /dll ${ilasm_signoption} /out:../bin-x64/JVM.DLL /RESOURCE:jvm.res jvm_h.il jvm64.il JVM.il" />
</target>
</project>

28
jvm/jvm.rc.in Normal file
Просмотреть файл

@ -0,0 +1,28 @@
1 VERSIONINFO
FILEVERSION @VERSIONLIST@
PRODUCTVERSION @VERSIONLIST@
FILEFLAGSMASK 0x3fL
FILEFLAGS 0x0L
FILEOS 0x4L
FILETYPE 0x2L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "000004b0"
BEGIN
VALUE "CompanyName", "Jeroen Frijters"
VALUE "FileDescription", "IKVM.NET JVM for .NET"
VALUE "FileVersion", "@VERSION@"
VALUE "InternalName", "jvm"
VALUE "LegalCopyright", "Copyright (C) 2002-2011 Jeroen Frijters"
VALUE "OriginalFilename", "jvm.dll"
VALUE "ProductName", "IKVM.NET"
VALUE "ProductVersion", "@VERSION@"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x0, 1200
END
END