зеркало из https://github.com/mono/ikvm-fork.git
126 строки
6.5 KiB
XML
126 строки
6.5 KiB
XML
<?xml version="1.0"?>
|
|
<project name="ClassLibrary" default="all">
|
|
<property name="pathsep" value=":" />
|
|
<property overwrite="false" name="signoption" value="" />
|
|
<property name="Classpath.dir" value="${project::get-base-directory()}/../../classpath-0.95" />
|
|
<property name="OpenJDK.dir" value="${project::get-base-directory()}/../../openjdk6-b16" />
|
|
<if test="${platform::is-win32()}">
|
|
<property name="pathsep" value=";" />
|
|
</if>
|
|
|
|
<target name="all" depends="classes vfs core">
|
|
</target>
|
|
|
|
<target name="classes">
|
|
<delete>
|
|
<fileset basedir="${Classpath.dir}">
|
|
<include name="**.class"/>
|
|
</fileset>
|
|
</delete>
|
|
<delete>
|
|
<fileset basedir="../classpath">
|
|
<include name="**.class"/>
|
|
</fileset>
|
|
</delete>
|
|
<delete>
|
|
<fileset basedir="${OpenJDK.dir}">
|
|
<include name="jdk/src/share/classes/**.class"/>
|
|
<include name="jdk/src/solaris/classes/**.class"/>
|
|
<include name="jdk/src/windows/classes/**.class"/>
|
|
<include name="build/linux-amd64/gensrc/**.class"/>
|
|
<include name="build/linux-amd64/impsrc/**.class"/>
|
|
</fileset>
|
|
</delete>
|
|
<delete>
|
|
<fileset basedir=".">
|
|
<include name="**.class"/>
|
|
</fileset>
|
|
</delete>
|
|
<property name="IKVM.Runtime" value="IKVM.Runtime" />
|
|
<if test="${signoption != ''}">
|
|
<loadfile file="../tools/pubkey.txt" property="publickey" />
|
|
<property name="IKVM.Runtime" value="IKVM.Runtime, PublicKey=${publickey}" />
|
|
</if>
|
|
<copy file="AssemblyInfo.java.in" tofile="AssemblyInfo.java" outputencoding="ascii" overwrite="true">
|
|
<filterchain>
|
|
<replacetokens>
|
|
<token key="RUNTIME" value="${IKVM.Runtime}" />
|
|
</replacetokens>
|
|
</filterchain>
|
|
</copy>
|
|
<copy file="Configuration.java.in" tofile="Configuration.java" outputencoding="ascii" overwrite="true">
|
|
<filterchain>
|
|
<replacetokens>
|
|
<token key="AWTASSEMBLY" value="${string::replace(assemblyname::get-full-name(assemblyname::get-assembly-name(path::combine(project::get-base-directory(), '../bin/IKVM.Runtime.dll'))), 'IKVM.Runtime', 'IKVM.AWT.WinForms')}" />
|
|
</replacetokens>
|
|
</filterchain>
|
|
</copy>
|
|
<exec program="javac" commandline="-J-Xmx1536M -g -nowarn -bootclasspath ../classpath/mscorlib.jar${pathsep}../classpath/System.jar${pathsep}../classpath/System.Core.jar${pathsep}../classpath/System.Data.jar${pathsep}../classpath/System.Drawing.jar${pathsep}../classpath/IKVM.Runtime.jar @allsources.lst" useruntimeengine="false" />
|
|
</target>
|
|
|
|
<target name="vfs">
|
|
<!-- This file is generated here, but it is added as a resource to IKVM.Runtime.dll, because Ref.Emit on .NET 1.1 doesn't support adding a raw resource. -->
|
|
<zip zipfile="vfs.zip">
|
|
<fileset basedir="${OpenJDK.dir}/build/linux-amd64/j2re-image">
|
|
<include name="lib/cmm/*" />
|
|
<include name="lib/zi/**/*" />
|
|
<include name="lib/currency.data" />
|
|
<include name="lib/logging.properties" />
|
|
<include name="lib/security/java.policy" />
|
|
<include name="lib/security/java.security" />
|
|
<include name="lib/security/local_policy.jar" />
|
|
<include name="lib/security/US_export_policy.jar" />
|
|
</fileset>
|
|
<fileset basedir="${OpenJDK.dir}/jdk/src/windows">
|
|
<include name="lib/flavormap.properties" />
|
|
<include name="lib/content-types.properties" />
|
|
</fileset>
|
|
</zip>
|
|
</target>
|
|
|
|
<target name="core">
|
|
<property name="VERSION" value="${assemblyname::get-version(assemblyname::get-assembly-name(path::combine(project::get-base-directory(), '../bin/IKVM.Runtime.dll')))}" />
|
|
<exec program="${project::get-base-directory()}/../bin/ikvmc.exe" useruntimeengine="true">
|
|
<arg value="-version:${VERSION}" />
|
|
<arg value="${signoption}" />
|
|
<arg value="-compressresources" />
|
|
<arg value="-opt:fields" />
|
|
<arg value="-strictfinalfieldsemantics" />
|
|
<arg value="-removeassertions" />
|
|
<arg value="-target:library" />
|
|
<arg value="-sharedclassloader" />
|
|
<arg value="-r:mscorlib" />
|
|
<arg value="-r:IKVM.Runtime" />
|
|
<!-- Instead of using -r:System.Core we add System.Core.jar (in response.txt)
|
|
(containing only System.Runtime.CompilerServices.ExtensionAttribute).
|
|
This allows compilation to succeed (though with warnings) when System.Core.dll is not available.
|
|
It also prevents accidentally taking additional dependencies on System.Core.dll.
|
|
-->
|
|
<arg value="-r:${framework::get-assembly-directory(framework::get-target-framework())}/System.dll" />
|
|
<!-- we already know that the JNI assembly is not available, so suppress the warning -->
|
|
<arg value="-nowarn:110" />
|
|
<arg value="@response.txt" />
|
|
</exec>
|
|
<if test="${platform::is-win32()}">
|
|
<copy file="../bin/IKVM.Runtime.dll" tofile="IKVM.Runtime.dll" />
|
|
<exec program="peverify" commandline="-nologo IKVM.OpenJDK.Charsets.dll" />
|
|
<exec program="peverify" commandline="-nologo IKVM.OpenJDK.Corba.dll" />
|
|
<exec program="peverify" commandline="-nologo IKVM.OpenJDK.Core.dll" />
|
|
<exec program="peverify" commandline="-nologo IKVM.OpenJDK.Jdbc.dll" />
|
|
<exec program="peverify" commandline="-nologo IKVM.OpenJDK.Management.dll" />
|
|
<exec program="peverify" commandline="-nologo IKVM.OpenJDK.Misc.dll" />
|
|
<exec program="peverify" commandline="-nologo IKVM.OpenJDK.Security.dll" />
|
|
<exec program="peverify" commandline="-nologo IKVM.OpenJDK.SwingAWT.dll" />
|
|
<exec program="peverify" commandline="-nologo IKVM.OpenJDK.Text.dll" />
|
|
<exec program="peverify" commandline="-nologo IKVM.OpenJDK.Util.dll" />
|
|
<exec program="peverify" commandline="-nologo IKVM.OpenJDK.XML.dll" />
|
|
</if>
|
|
<copy todir="../bin">
|
|
<fileset basedir=".">
|
|
<include name="IKVM.OpenJDK.*.dll" />
|
|
</fileset>
|
|
</copy>
|
|
</target>
|
|
|
|
</project>
|