blob: 568bfa51843ed635b0ce22202064a623e434cbe3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
|
<?xml version="1.0"?>
<project name="ClassLibrary" default="all">
<property name="pathsep" value=":" />
<property overwrite="false" name="signoption" value="" />
<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 rmi vfs resources core">
</target>
<target name="version">
<property name="VERSION" value="${assemblyname::get-version(assemblyname::get-assembly-name(path::combine(project::get-base-directory(), '../bin/IKVM.Runtime.dll')))}" />
<property name="OPENJDK_VERSION" value="OpenJDK 6 b16" />
</target>
<target name="classes" depends="version">
<delete>
<fileset basedir="../classpath">
<include name="**.class"/>
</fileset>
</delete>
<delete>
<fileset basedir="${OpenJDK.dir}">
<include name="**.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="java/lang/PropertyConstants.java.in" tofile="java/lang/PropertyConstants.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')}" />
<token key="VERSION" value="${VERSION}" />
<token key="OPENJDK_VERSION" value="${OPENJDK_VERSION}" />
</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="rmi">
<property name="VMARGS" value="-J-client -J-Xmx896m -J-Xms128m -J-XX:PermSize=32m -J-XX:MaxPermSize=160m" />
<property name="CLASSPATH" value="${OpenJDK.dir}/jdk/src/share/classes/${pathsep}${OpenJDK.dir}/build/linux-amd64/impsrc/${pathsep}." />
<property name="OUTPUT" value="${OpenJDK.dir}/build/linux-amd64/classes/" />
<property name="ARGS" value="${VMARGS} -bootclasspath ${CLASSPATH} -d ${OUTPUT}" />
<exec program="rmic" commandline="${ARGS} -v1.1 sun.rmi.registry.RegistryImpl" />
<exec program="rmic" commandline="${ARGS} -v1.1 sun.rmi.transport.DGCImpl" />
<exec program="rmic" commandline="${ARGS} -v1.2 sun.rmi.server.Activation$ActivationSystemImpl" />
<exec program="rmic" commandline="${ARGS} -v1.2 java.rmi.activation.ActivationGroup" />
<exec program="rmic" commandline="${ARGS} -v1.2 com.sun.jndi.rmi.registry.ReferenceWrapper" />
<exec program="rmic" commandline="${ARGS} -v1.2 javax.management.remote.rmi.RMIConnectionImpl" />
<exec program="rmic" commandline="${ARGS} -v1.2 -iiop javax.management.remote.rmi.RMIConnectionImpl" />
<exec program="rmic" commandline="${ARGS} -v1.2 -iiop -standardPackage javax.management.remote.rmi.RMIConnectionImpl" />
<exec program="rmic" commandline="${ARGS} -v1.2 javax.management.remote.rmi.RMIServerImpl" />
<exec program="rmic" commandline="${ARGS} -v1.2 -iiop javax.management.remote.rmi.RMIServerImpl" />
<exec program="rmic" commandline="${ARGS} -v1.2 -iiop -standardPackage javax.management.remote.rmi.RMIServerImpl" />
<exec program="rmic" commandline="${ARGS} -iiop javax.management.remote.rmi.RMIConnection" />
<exec program="rmic" commandline="${ARGS} -iiop -standardPackage javax.management.remote.rmi.RMIConnection" />
<exec program="rmic" commandline="${ARGS} -iiop javax.management.remote.rmi.RMIServer" />
<exec program="rmic" commandline="${ARGS} -iiop -standardPackage javax.management.remote.rmi.RMIServer" />
</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="resources">
<!-- resources that are not in ../../openjdk6-b16/build/linux-amd64/j2re-image/lib/resources.jar -->
<zip zipfile="resources.zip">
<fileset basedir="${OpenJDK.dir}/jdk/src/share/classes">
<include name="com/sun/swing/internal/plaf/**/*" />
</fileset>
</zip>
</target>
<target name="core" depends="version">
<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.API.dll" />
<exec program="peverify" commandline="-nologo IKVM.OpenJDK.XML.Bind.dll" />
<exec program="peverify" commandline="-nologo IKVM.OpenJDK.XML.Crypto.dll" />
<exec program="peverify" commandline="-nologo IKVM.OpenJDK.XML.Parse.dll" />
<exec program="peverify" commandline="-nologo IKVM.OpenJDK.XML.RelaxNG.dll" />
<exec program="peverify" commandline="-nologo IKVM.OpenJDK.XML.Transform.dll" />
<exec program="peverify" commandline="-nologo IKVM.OpenJDK.XML.WebServices.dll" />
<exec program="peverify" commandline="-nologo IKVM.OpenJDK.XML.XPath.dll" />
</if>
<!-- make sure that we haven't accidentally introduced new dependencies -->
<exec program="${project::get-base-directory()}/../tools/depcheck.exe" commandline="response.txt dependencies.txt" useruntimeengine="true" />
<copy todir="../bin">
<fileset basedir=".">
<include name="IKVM.OpenJDK.*.dll" />
</fileset>
</copy>
<!-- update base addresses in response.txt for next build -->
<exec program="${project::get-base-directory()}/../tools/updbaseaddresses.exe" commandline="response.txt" useruntimeengine="true" />
</target>
</project>
|