Project

Profile

Help

How to connect?
Download (46.8 KB) Statistics
| Branch: | Tag: | Revision:

he / latest9.2 / build / build-n.xml @ a76701a1

1
<?xml version="1.0" encoding="UTF-8"?>
2

    
3
<project basedir="." default="all" name="Saxon for the .NET platform"
4
         xmlns:dn="antlib:org.apache.ant.dotnet">
5
    
6
    <!-- Build file for Saxon on .NET. This build file is designed to be imported from build.xml -->
7
    
8
        <import file="build-constants.xml"/>      
9
                    
10
    <!-- directories holding C# source code -->
11
    <!-- <property name="vss-n.dir" value="${root}/Documents and Settings/Mike/Documents/Visual Studio 2008/Projects/Saxon.Net"/>-->
12

    
13
               
14
    <!-- directory holding .NET API documentation -->
15
    <property name="dotnetdoc.dir" value="${root}/MyJava/build/dotnetdoc"/>
16
                        
17
    <!-- location of the C# compiler -->
18
    <property name="csharp.compiler" value="C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\csc.exe"/>   
19
                    
20
    
21
    <!-- following locations are for IKVMC code used to build the .NET product -->
22
    
23
    <property name="development-ikvm.dir" value="${root}/MyDotNet"/>
24
    <property name="ikvm.dir" value="${development-ikvm.dir}/ikvm-0.42.0.3"/>
25
    <property name="generated.stubs.dir" value="${development-ikvm.dir}/stubs"/>
26
    
27
    <!-- Key file used for signing the Saxonica-built .NET product. User builds should use a different key file -->
28
    <property name="saxondotnet.snk" value="${development-ikvm.dir}/make/saxondotnet.snk"/>
29
    
30
    <!-- set to 'debug' for testing, 'live' for final build -->
31
    <!--<property name="dot.net.debug" value="live"/>--> 
32
    
33
    <!-- The other important thing to enable debugging is that the .pdb file is available in the same directory
34
         as the .dll. -->
35
    
36
    <!-- Precondition for .NET compilation: IKVM is installed.
37
         * Download from www.ikvm.net
38
         * Unzip into ${development-ikvm.dir}
39
         * Register in the GAC (access the Microsoft .NET Framework Configuration item in the 
40
                                Windows Control Panel, and add the assemblies to the Assembly Cache. 
41
                                At a minimum, install the IKVM.OpenJDK.ClassLibrary.dll and IKVM.Runtime.dll)
42
         * Generate stubs in ${generated.stubs.dir} 
43
           for System.Xml.dll, System.Security.dll, and IKVM.OpenJDK.ClassLibrary.dll
44
    -->       
45
    
46
    <!-- following locations are relative to the build file -->
47
        
48
    <property name="temp-src-nj.dir" value="${temp.dir}/n/jsource"/>
49
    <property name="temp-src-nc.dir" value="${temp.dir}/n/csource"/>
50
    <property name="classes-n.dir" value="${temp.dir}/n/classes"/> 
51
    <property name="jar-n.dir" value="${temp.dir}/n/jar"/> 
52
    <property name="dll-n.dir" value="${temp.dir}/n/dll"/>  
53

    
54
                <!-- following locations are relative to the destination directory -->
55
                
56
    <property name="build-hen.dir" value="${product.dir}/hen"/> 
57
    <property name="build-pen.dir" value="${product.dir}/pen"/>  
58
    <property name="build-een.dir" value="${product.dir}/een"/>
59
     
60
   
61
    <!-- development source -->
62
        
63
    <path id="classpath-n">
64
        <fileset dir="${lib.dir}">
65
            <include name="*.jar"/>
66
        </fileset>
67
        <fileset dir="${ikvm.dir}">
68
                 <include name="classpath/mscorlib.jar"/>
69
                 <include name="classpath/System.jar"/>
70
                 <include name="classpath/IKVM.Runtime.jar"/>
71
        </fileset>
72
        <fileset dir="${generated.stubs.dir}">
73
             <include name="CIL.jar"/>         
74
                 <include name="System.Xml.jar"/>
75
                 <include name="System.Security.jar"/>
76
        </fileset>         
77
    </path>
78
       
79
    
80
    <target name="prepare-libs-n" description="Prepare required libraries for .NET, specifically Xerces">
81
        <taskdef name="ikvmc" classname="net.ikvm.ant.IkvmcTask" classpath="e:\javalib\ant-ikvmc.0.4.jar"/>
82
        <mkdir dir="${dll-n.dir}"/>
83
        <copy todir="${dll-n.dir}">
84
          <fileset dir="${ikvm.dir}/bin">
85
            <include name="IKVM.OpenJDK.*.dll"/>
86
            <include name="IKVM.Runtime.dll"/>            
87
          </fileset>
88
          <!--<fileset dir="${ikvm.dir}/openjdk/extras">
89
            <include name="charsets.dll"/>
90
          </fileset>-->
91
        </copy>
92
        <!--<copy file="${saxondotnet.snk}" todir="${basedir}"/>-->
93
        <mkdir dir="${basedir}/libs/xerces"/>
94
        <unjar src="${basedir}/libs/xercesimpl.jar" dest="${basedir}/libs/xerces"/>
95
        <unjar src="${basedir}/libs/resolver.jar" dest="${basedir}/libs/xerces"/>
96
        <jar basedir="${basedir}/libs/xerces" compress="${build.compress}" jarfile="${basedir}/libs/xerces.jar">
97
            <include name="**/*.class"/>
98
            <include name="**/*.properties"/>
99
            <exclude name="org.w3c.dom.html.HTMLDOMImplementation.class"/>
100
            <exclude name="META-INF/MANIFEST.MF"/>
101
        </jar> 
102
        <!--<ikvmc home="${ikvm.dir}"
103
               assembly="xerces" target="library" keyfile="${saxondotnet.snk}" version="${version}"
104
               debug="false" srcpath="e:/Javalib/xerces-2_9_0/src"
105
               out="${basedir}/${dll-n.dir}/xercesImpl.dll"
106
               verbose="true">
107
          <fileset dir="${basedir}/libs">
108
            <include name="xerces.jar"/>
109
          </fileset>
110
          <reference path="mscorlib.dll"/>
111
          <reference path="${dll-n.dir}/IKVM.OpenJDK.Core.dll"/>
112
          <reference path="${dll-n.dir}/IKVM.OpenJDK.Charsets.dll"/>
113
          <reference path="${dll-n.dir}/IKVM.OpenJDK.Text.dll"/>
114
          <reference path="${dll-n.dir}/IKVM.OpenJDK.Util.dll"/>
115
          <reference path="${dll-n.dir}/IKVM.OpenJDK.XML.API.dll"/>
116
        </ikvmc>-->
117
    </target>    
118
        
119
    <target name="create-edition-properties-n" description="Create the edition.properties files for the three editions of Saxon on Java">
120
        <mkdir dir="${classes-n.dir}"/>
121
        <mkdir dir="${classes-n.dir}/he"/>
122
        <mkdir dir="${classes-n.dir}/pe"/>
123
        <mkdir dir="${classes-n.dir}/ee"/>
124
        <echo file="${classes-n.dir}/he/edition.properties"
125
>config=net.sf.saxon.Configuration
126
platform=net.sf.saxon.dotnet.DotNetPlatform
127
</echo>
128
        <echo file="${classes-n.dir}/pe/edition.properties"
129
>config=com.saxonica.config.ProfessionalConfiguration
130
platform=com.saxonica.config.DotNetPlatformPE
131
</echo>
132
        <echo file="${classes-n.dir}/ee/edition.properties"
133
>config=com.saxonica.config.EnterpriseConfiguration
134
platform=com.saxonica.config.DotNetPlatformPE
135
</echo>   
136
    </target>
137
    
138
    <target name="prepare-n" depends="prepare-libs-n, create-edition-properties-n"/>
139
    
140
    
141
    <target name="copysource-development-n" description="Copy source files for Saxon on .NET from development directory">
142
        <copy todir="${temp-src-nj.dir}">
143
          <fileset dir="${source-hej.dir}">
144
            <include name="net/sf/saxon/**/*.java"/>
145
            <exclude name="**/ant/**"/>
146
            <exclude name="**/dom/**"/>
147
            <exclude name="**/dom4j/**"/>
148
            <exclude name="**/java/**"/>
149
            <exclude name="**/jdom/**"/>
150
            <exclude name="**/s9api/**"/>
151
            <exclude name="**/sql/**"/>
152
            <exclude name="**/xom/**"/>
153
            <exclude name="**/xpath/**"/>
154
            <exclude name="**/xqj/**"/>
155
          </fileset>
156
          <fileset dir="${source-eej.dir}">
157
                    <include name="com/saxonica/config/*.java"/>
158
                    <include name="com/saxonica/extfn/*.java"/>
159
            <include name="com/saxonica/extra/*.java"/>
160
            <include name="com/saxonica/fsa/*.java"/>
161
            <include name="com/saxonica/hof/*.java"/>
162
            <include name="com/saxonica/ptree/*.java"/>
163
            <include name="com/saxonica/pull/*.java"/>
164
            <include name="com/saxonica/query11/*.java"/>
165
            <include name="com/saxonica/schema/*.java"/>
166
            <include name="com/saxonica/sdoc/*.java"/>
167
            <include name="com/saxonica/stream/**/*.java"/>
168
            <include name="com/saxonica/style/*.java"/>
169
            <include name="com/saxonica/update/*.java"/>
170
            <include name="com/saxonica/validate/*.java"/>
171
            <include name="com/saxonica/xsltextn/*.java"/>
172
            <include name="com/saxonica/Validate.java"/>            
173
          </fileset>          
174
        </copy>
175
        <copy todir="${temp-src-nc.dir}/api">
176
          <fileset dir="${source-api-n.dir}">
177
            <include name="Saxon.Api/*.cs"/>
178
            <!--<include name="Saxon.Api/Properties/AssemblyInfo.cs"/>-->
179
          </fileset>
180
        </copy>
181
        <mkdir dir="${temp-src-nc.dir}/api/Saxon.Api/Properties"/>
182
        <echo file="${temp-src-nc.dir}/api/Saxon.Api/Properties/AssemblyInfo.cs">
183
                  using System.Reflection;
184
          using System.Runtime.CompilerServices;
185
          using System.Runtime.InteropServices;
186
          [assembly: AssemblyTitle("Saxon.Api")]
187
          [assembly: AssemblyDescription("")]
188
          [assembly: AssemblyConfiguration("")]
189
          [assembly: AssemblyCompany("Saxonica")]
190
          [assembly: AssemblyProduct("Saxon.Api")]
191
          [assembly: AssemblyCopyright("Copyright © Saxonica 2010")]
192
          [assembly: AssemblyTrademark("")]
193
          [assembly: AssemblyCulture("")]
194
          [assembly: ComVisible(false)]
195
          [assembly: Guid("8cf9aad8-da5f-47f0-9251-1fbcbdcfe477")]
196
          [assembly: AssemblyVersion("${version}")]
197
          [assembly: AssemblyFileVersion("${version}")]
198
        </echo>
199
        <!-- Commented out code used when source in Visual Studio        
200
        <copy todir="${temp-src-nc.dir}/cmd">
201
          <fileset dir="${source-cmd-n.dir}/Transform">
202
            <include name="*.cs"/>
203
          </fileset>
204
          <fileset dir="${source-cmd-n.dir}/Query">
205
            <include name="*.cs"/>
206
          </fileset>
207
          <fileset dir="${source-cmd-n.dir}/Validate">
208
            <include name="*.cs"/>
209
          </fileset>
210
        </copy>
211
        -->
212
        <copy todir="${temp-src-nc.dir}/cmd">
213
          <fileset dir="${source-cmd-n.dir}">
214
            <include name="Transform.cs"/>
215
            <include name="Query.cs"/>
216
            <include name="Validate.cs"/>
217
          </fileset>
218
        </copy>
219
        <!-- Commented out code used when source in Visual Studio   
220
        <copy todir="${temp-src-nc.dir}/samples">
221
          <fileset dir="${source-samples-n.dir}/Examples">
222
            <include name="*.cs"/>
223
          </fileset>
224
          <fileset dir="${source-samples-n.dir}/SampleExtensions">
225
            <include name="*.cs"/>
226
          </fileset>
227
          <fileset dir="${source-samples-n.dir}/TestRunner">
228
            <include name="*.cs"/>
229
          </fileset>
230
        </copy>
231
        -->
232
        <copy todir="${temp-src-nc.dir}/samples">
233
          <fileset dir="${source-samples-n.dir}">
234
            <include name="Examples.cs"/>
235
            <include name="SampleExtensions.cs"/>
236
            <include name="TestRunner.cs"/>
237
          </fileset>
238
        </copy>
239
    </target>    
240
                      
241
    <target name="compile-n" description="Compile Saxon Java classes for the .NET product" 
242
            depends="copysource-development-n">
243
        <mkdir dir="${classes-n.dir}"/>
244
        <mkdir dir="${classes-n.dir}/he"/>
245
        <mkdir dir="${classes-n.dir}/pe"/>
246
        <mkdir dir="${classes-n.dir}/ee"/>
247
        <echo message="Compile with debug = ${build.debug}, debuglevel = ${build.debuglevel}"/>
248
        <javac debug="${build.debug}" debuglevel="${build.debuglevel}" 
249
            deprecation="${build.deprecation}" destdir="${classes-n.dir}"
250
            optimize="${build.optimize}" srcdir="${temp-src-nj.dir}" source="${build.compiler.source}"
251
            target="${build.compiler.target}">
252

    
253
            <include name="net/**"/>
254
            <include name="com/saxonica/**"/>
255
            <exclude name="**/s9api/**"/>
256
            <exclude name="**/EnterpriseXPathFactory.java"/>
257
            <exclude name="**/ProfessionalXPathFactory.java"/>
258
            <exclude name="**/EnterpriseTransformerFactory.java"/>
259
            <exclude name="**/ProfessionalTransformerFactory.java"/>
260
            <exclude name="**/JavaPlatform.java"/>
261
            <exclude name="**/JavaPlatformPE.java"/>
262
            <exclude name="**/JavaLocalizerFactory.java"/>
263
            <classpath>
264
                <path refid="classpath-n"/>
265
            </classpath>
266
        </javac>
267
    </target>
268
    
269
    <target name="jar-hen" description="Create Saxon-HE jar files for .NET" depends="compile-n">
270
        <mkdir dir="${jar-n.dir}"/>
271
        <jar basedir="${classes-n.dir}" compress="${build.compress}" jarfile="${jar-n.dir}/saxon9he.jar">
272
            <include name="net/**/*.class"/>
273
            <exclude name="net/sf/saxon/ant/*.class"/>
274
            <exclude name="net/sf/saxon/option/**/*.class"/>
275
        </jar>
276
        <jar basedir="${classes-n.dir}/he" compress="${build.compress}" jarfile="${jar-n.dir}/saxon9he.jar" update="true">
277
            <include name="edition.properties"/>
278
        </jar> 
279
    </target> 
280
    
281
    <target name="jar-pen" description="Create Saxon-PE jar files for .NET" depends="compile-n">
282
        <mkdir dir="${jar-n.dir}"/>
283
        <jar basedir="${classes-n.dir}" compress="${build.compress}" jarfile="${jar-n.dir}/saxon9pe.jar">
284
            <include name="net/**/*.class"/>
285
            <exclude name="net/sf/saxon/ant/*.class"/>
286
            <exclude name="**/sql/**/*.class"/>
287
            <include name="com/saxonica/**/*.class"/>
288
            <exclude name="com/saxonica/codegen/**/*.class"/>
289
            <exclude name="com/saxonica/deploy/**/*.class"/>
290
            <exclude name="com/saxonica/fsa/**/*.class"/>
291
            <exclude name="com/saxonica/jaxp/**/**/*.class"/>
292
            <exclude name="com/saxonica/schema/**/*.class"/>
293
            <exclude name="com/saxonica/sdoc/**/*.class"/>
294
            <exclude name="com/saxonica/stream/**/*.class"/>
295
            <exclude name="com/saxonica/update/**/*.class"/>
296
            <exclude name="com/saxonica/validate/**/*.class"/>
297
            <exclude name="com/saxonica/Validate.class"/>
298
            <exclude name="com/saxonica/CompileQuery.class"/>
299
            <exclude name="com/saxonica/CompileStylesheet.class"/>
300
            <exclude name="com/saxonica/CompileStylesheet$TracingObjectOutputStream.class"/>
301
            <exclude name="com/saxonica/config/EnterpriseConfiguration.class"/>
302
            <exclude name="com/saxonica/config/EnterpriseConfiguration$SurrogateSchema.class"/>
303
            <exclude name="com/saxonica/config/ProfessionalTransformerFactory.class"/>
304
            <exclude name="com/saxonica/config/ProfessionalXPathFactory.class"/>
305
            <exclude name="com/saxonica/config/EnterpriseTransformerFactory.class"/>
306
            <exclude name="com/saxonica/config/EnterpriseXPathFactory.class"/>
307
            <exclude name="com/saxonica/extra/StaticQueryContextEE.class"/>
308
            <exclude name="com/saxonica/extra/OptimizerEE.class"/>
309
            <exclude name="com/saxonica/extra/GeneralComparisonEE.class"/>         
310
        </jar>
311
        <jar basedir="${classes-n.dir}/pe" compress="${build.compress}" jarfile="${jar-n.dir}/saxon9pe.jar" update="true">
312
            <include name="edition.properties"/>
313
        </jar>
314
    </target>     
315
    
316
    <target name="jar-een" description="Create Saxon-EE jar files for .NET" depends="compile-n">
317
        <mkdir dir="${jar-n.dir}"/>
318
        <jar basedir="${classes-n.dir}" compress="${build.compress}" jarfile="${jar-n.dir}/saxon9ee.jar">
319
            <include name="net/**/*.class"/>
320
            <include name="com/saxonica/**/*.class"/>
321
            <exclude name="com/saxonica/CompileQuery.class"/>
322
            <exclude name="com/saxonica/CompileStylesheet.class"/>
323
            <exclude name="com/saxonica/config/EnterpriseTransformerFactory.class"/>
324
            <exclude name="com/saxonica/config/EnterpriseXPathFactory.class"/>
325
        </jar>
326
        <jar basedir="${classes-n.dir}/ee" compress="${build.compress}" jarfile="${jar-n.dir}/saxon9ee.jar" update="true">
327
            <include name="edition.properties"/>
328
        </jar>
329
    </target>
330
    
331
    <target name="dll-n" description="Create DLLs for .NET" depends="jar-hen, jar-pen, jar-een">
332
        <taskdef name="ikvmc" classname="net.ikvm.ant.IkvmcTask" classpath="e:\javalib\ant-ikvmc.0.4.jar"/>
333
        <mkdir dir="${dll-n.dir}"/>
334
        <copy todir="${jar-n.dir}">
335
          <fileset dir="${basedir}/libs">
336
            <include name="xerces.jar"/>
337
          </fileset>
338
        </copy>
339
         
340
        <!--
341
            Invoke IKVMC to cross-compile the JAR files into DLLs
342
        -->
343
        
344
        <ikvmc home="${ikvm.dir}"
345
               assembly="saxon9he" target="library" keyfile="${saxondotnet.snk}" version="${version}"
346
               debug="false" srcpath="c:/MyJava/saxon8.x"
347
               out="${basedir}/${dll-n.dir}/saxon9he.dll"
348
               verbose="true">
349
          <fileset dir="${basedir}/${jar-n.dir}">
350
            <include name="saxon9he.jar"/>
351
            <include name="xerces.jar"/>
352
          </fileset>
353
          <reference path="mscorlib.dll"/>
354
          <reference path="System.Xml"/>
355
          <reference path="System"/>
356
          <reference path="${dll-n.dir}/IKVM.OpenJDK.Core.dll"/>
357
          <reference path="${dll-n.dir}/IKVM.OpenJDK.Charsets.dll"/>
358
          <reference path="${dll-n.dir}/IKVM.OpenJDK.Text.dll"/>
359
          <reference path="${dll-n.dir}/IKVM.OpenJDK.Util.dll"/>
360
          <reference path="${dll-n.dir}/IKVM.OpenJDK.XML.API.dll"/>
361
          <!--<reference path="${dll-n.dir}/xercesImpl.dll"/>-->
362
          <!--<reference path="${dll-n.dir}/IKVM.OpenJDK.XMLparse.dll"/>-->
363
        </ikvmc>
364
        <ikvmc home="${ikvm.dir}"
365
               assembly="saxon9pe" 
366
               target="library" 
367
               keyfile="${saxondotnet.snk}" 
368
               version="${version}"
369
               debug="false" srcpath="c:/MyJava/saxon8.x"
370
               out="${basedir}/${dll-n.dir}/saxon9pe.dll"
371
               verbose="true">
372
          <fileset dir="${basedir}/${jar-n.dir}">
373
            <include name="saxon9pe.jar"/>
374
            <include name="xerces.jar"/>
375
          </fileset>
376
          <reference path="mscorlib.dll"/>
377
          <reference path="System.Xml"/>
378
          <reference path="System"/>
379
          <reference path="${dll-n.dir}/IKVM.OpenJDK.Core.dll"/>
380
          <reference path="${dll-n.dir}/IKVM.OpenJDK.Charsets.dll"/>
381
          <reference path="${dll-n.dir}/IKVM.OpenJDK.Security.dll"/>
382
          <reference path="${dll-n.dir}/IKVM.OpenJDK.Text.dll"/>
383
          <reference path="${dll-n.dir}/IKVM.OpenJDK.Util.dll"/>
384
          <reference path="${dll-n.dir}/IKVM.OpenJDK.XML.API.dll"/>
385
          <!--<reference path="${dll-n.dir}/xercesImpl.dll"/>-->
386
          <!--<reference path="${dll-n.dir}/IKVM.OpenJDK.XMLparse.dll"/>-->
387
          <reference path="System.Security"/>
388
        </ikvmc>
389
        <ikvmc home="${ikvm.dir}"
390
               assembly="saxon9ee" 
391
               target="library" 
392
               keyfile="${saxondotnet.snk}" 
393
               version="${version}"
394
               debug="false" srcpath="c:/MyJava/saxon8.x"
395
               out="${basedir}/${dll-n.dir}/saxon9ee.dll"
396
               verbose="true">
397
          <fileset dir="${basedir}/${jar-n.dir}">
398
            <include name="saxon9ee.jar"/>
399
            <include name="xerces.jar"/>
400
          </fileset>
401
          <reference path="mscorlib.dll"/>
402
          <reference path="System.Xml"/>
403
          <reference path="System"/>
404
          <reference path="${dll-n.dir}/IKVM.OpenJDK.Core.dll"/>
405
          <reference path="${dll-n.dir}/IKVM.OpenJDK.Charsets.dll"/>
406
          <reference path="${dll-n.dir}/IKVM.OpenJDK.Security.dll"/>
407
          <reference path="${dll-n.dir}/IKVM.OpenJDK.Text.dll"/>
408
          <reference path="${dll-n.dir}/IKVM.OpenJDK.Util.dll"/>
409
          <reference path="${dll-n.dir}/IKVM.OpenJDK.XML.API.dll"/>
410
          <!--<reference path="${dll-n.dir}/xercesImpl.dll"/>-->
411
          <!--<reference path="${dll-n.dir}/IKVM.OpenJDK.XMLparse.dll"/>-->
412
          <reference path="System.Security"/>
413
        </ikvmc>
414
        
415
        <!-- Create a version of the DLL for debugging. Debugging in Visual Studio
416
             requires a version of the assembly that has no strong name. Currently
417
             we build this only for Enterprise Edition. The debugging version of the
418
             DLL plays no further part in the build, and is not included in the
419
             released product, but it can be used by linking it as a reference
420
             from the relevant client in Visual Studio, for example Transform.exe -->
421
        
422
        <ikvmc home="${ikvm.dir}"
423
               assembly="saxon9ee-debug" 
424
               target="library" 
425
               debug="true" srcpath="c:/MyJava/saxon8.x"
426
               out="${basedir}/${dll-n.dir}/saxon9ee-debug.dll"
427
               verbose="true">
428
          <fileset dir="${basedir}/${jar-n.dir}">
429
            <include name="saxon9ee.jar"/>
430
            <include name="xerces.jar"/>
431
          </fileset>
432
          <reference path="mscorlib.dll"/>
433
          <reference path="System.Xml"/>
434
          <reference path="System"/>
435
          <reference path="${dll-n.dir}/IKVM.OpenJDK.Core.dll"/>
436
          <reference path="${dll-n.dir}/IKVM.OpenJDK.Charsets.dll"/>
437
          <reference path="${dll-n.dir}/IKVM.OpenJDK.Security.dll"/>
438
          <reference path="${dll-n.dir}/IKVM.OpenJDK.Text.dll"/>
439
          <reference path="${dll-n.dir}/IKVM.OpenJDK.Util.dll"/>
440
          <reference path="${dll-n.dir}/IKVM.OpenJDK.XML.API.dll"/>
441
          <reference path="System.Security"/>
442
        </ikvmc>
443
        
444
        <!--           
445
        <exec dir="." executable="ikvmc.cmd" >
446
          <arg line="${dot.net.debug}"/>   <!- -set to 'debug' for testing, 'live' for final build - ->
447
          <arg line="${basedir}/${jar-n.dir}"/>
448
          <arg line="${basedir}/${dll-n.dir}"/>
449
          <arg line="${version}"/>
450
        </exec>-->
451
        
452
        <!-- NB Remember to add the dll's to the GAC - it doesn't work if you don't -->
453
        
454
    </target>
455
    
456
    <target name="csharp-hen" description="Compile C# source for .NET commands and API library (HE)"
457
            xmlns:dn="antlib:org.apache.ant.dotnet" depends="dll-n"
458
        > <!---->
459
        
460
        <taskdef 
461
            uri="antlib:org.apache.ant.dotnet">
462
            <classpath>
463
              <pathelement location="e:/javalib/ant-dotnet-1.0/ant-dotnet-1.0.jar"/>
464
            </classpath>
465
        </taskdef>
466

    
467
                <mkdir dir="${dll-n.dir}/he"/>
468
                
469
                <copy todir="${dll-n.dir}/he">
470
            <fileset dir="${dll-n.dir}">
471
                   <include name="IKVM.OpenJDK.Core.dll"/>
472
                   <include name="IKVM.OpenJDK.Charsets.dll"/>
473
                   <include name="IKVM.OpenJDK.Text.dll"/>
474
                   <include name="IKVM.OpenJDK.Util.dll"/>
475
                   <include name="IKVM.OpenJDK.XML.API.dll"/>
476
                   <include name="xercesImpl.dll"/>
477
              <include name="IKVM.Runtime.dll"/>
478
              <!--<include name="IKVM.OpenJDK.Charsets.dll"/>-->
479
              <include name="saxon9he.dll"/>
480
            </fileset>
481
        </copy>
482
                
483
                <!-- API library DLL -->
484
                
485
                <dn:csc targetType="library" outputFile="${basedir}/${dll-n.dir}/he/saxon9he-api.dll"
486
                     docFile="${dotnetdoc.dir}/apidoc.xml"
487
                     extraOptions="-keyfile:${saxondotnet.snk}"
488
                     executable="${csharp.compiler}">
489
                     <src dir="${basedir}/${temp-src-nc.dir}/api/Saxon.Api" includes="*.cs Properties/AssemblyInfo.cs"/>
490
                     <reference dir="${basedir}/${dll-n.dir}/he">
491
                        <!--<include name="charsets.dll"/>-->
492
                        <include name="IKVM.OpenJDK.Core.dll"/>
493
                     <include name="IKVM.OpenJDK.Charsets.dll"/>
494
                     <include name="IKVM.OpenJDK.Text.dll"/>
495
                     <include name="IKVM.OpenJDK.Util.dll"/>
496
                     <include name="IKVM.OpenJDK.XML.API.dll"/>
497
                     <include name="xercesImpl.dll"/>
498
                        <include name="IKVM.Runtime.dll"/>
499
                        <include name="saxon9he.dll"/>
500
                     </reference>
501
                </dn:csc>
502
                
503
                <!-- Transform, Query, Validate commands -->
504
                
505
                <echo file="${basedir}/${temp-src-nc.dir}/cmd/AssemblyInfo.cs">
506
                  using System.Reflection;
507
          using System.Runtime.CompilerServices;
508
          using System.Runtime.InteropServices;
509
          [assembly: AssemblyCompany("Saxonica")]
510
          [assembly: AssemblyProduct("Saxon.HE")]
511
          [assembly: AssemblyCopyright("Copyright © Saxonica 2010")]
512
          [assembly: AssemblyVersion("${version}")]
513
          [assembly: AssemblyFileVersion("${version}")]
514
        </echo>
515
                
516
                <dn:csc targetType="exe" 
517
                     win32icon="c:\MyDotNet\icons\gyfu.ico"
518
                     outputFile="${basedir}/${dll-n.dir}/he/Transform.exe"
519
                     extraOptions="-keyfile:${saxondotnet.snk}"
520
                     executable="${csharp.compiler}">
521
                     <src dir="${basedir}/${temp-src-nc.dir}/cmd" includes="Transform.cs AssemblyInfo.cs"/>
522
                     <reference dir="${basedir}/${dll-n.dir}/he">
523
                        <include name="IKVM.OpenJDK.Core.dll"/>
524
                     <include name="IKVM.OpenJDK.Charsets.dll"/>
525
                     <include name="IKVM.OpenJDK.Text.dll"/>
526
                     <include name="IKVM.OpenJDK.Util.dll"/>
527
                     <include name="IKVM.OpenJDK.XML.API.dll"/>
528
                     <include name="xercesImpl.dll"/>
529
                        <include name="IKVM.Runtime.dll"/>
530
                        <!--<include name="charsets.dll"/>-->
531
                        <include name="saxon9he.dll"/>
532
                     </reference>
533
                </dn:csc>
534
                
535
                <dn:csc targetType="exe" win32icon="c:\MyDotNet\icons\gyfu.ico"
536
                     outputFile="${basedir}/${dll-n.dir}/he/Query.exe"
537
                     extraOptions="-keyfile:${saxondotnet.snk}"
538
                     executable="${csharp.compiler}">
539
                     <src dir="${basedir}/${temp-src-nc.dir}/cmd" includes="Query.cs AssemblyInfo.cs"/>
540
                     <reference dir="${basedir}/${dll-n.dir}/he">
541
                        <include name="IKVM.OpenJDK.Core.dll"/>
542
                     <include name="IKVM.OpenJDK.Charsets.dll"/>
543
                     <include name="IKVM.OpenJDK.Text.dll"/>
544
                     <include name="IKVM.OpenJDK.Util.dll"/>
545
                     <include name="IKVM.OpenJDK.XML.API.dll"/>
546
                     <include name="xercesImpl.dll"/>
547
                        <include name="IKVM.Runtime.dll"/>
548
                        <!--<include name="charsets.dll"/>-->
549
                        <include name="saxon9he.dll"/>
550
                     </reference>
551
                </dn:csc>
552
                
553
    </target>
554
    
555
    <target name="csharp-pen" description="Compile C# source for .NET commands and API library (PE)"
556
            xmlns:dn="antlib:org.apache.ant.dotnet" depends="dll-n"
557
        > <!---->
558
        
559
        <taskdef 
560
            uri="antlib:org.apache.ant.dotnet">
561
            <classpath>
562
              <pathelement location="e:/javalib/ant-dotnet-1.0/ant-dotnet-1.0.jar"/>
563
            </classpath>
564
          </taskdef>
565

    
566
                <mkdir dir="${dll-n.dir}/pe"/>
567
                
568
                <copy todir="${dll-n.dir}/pe">
569
            <fileset dir="${dll-n.dir}">
570
                   <include name="IKVM.OpenJDK.Core.dll"/>
571
                   <include name="IKVM.OpenJDK.Charsets.dll"/>
572
                   <include name="IKVM.OpenJDK.Security.dll"/>
573
                   <include name="IKVM.OpenJDK.Text.dll"/>
574
                   <include name="IKVM.OpenJDK.Util.dll"/>
575
                   <include name="IKVM.OpenJDK.XML.API.dll"/>
576
                   <include name="xercesImpl.dll"/>
577
              <include name="IKVM.Runtime.dll"/>
578
              <!--<include name="charsets.dll"/>-->
579
              <include name="saxon9pe.dll"/>
580
            </fileset>
581
        </copy>
582
                
583
                <!-- API library DLL -->
584
                
585
                <dn:csc targetType="library" outputFile="${basedir}/${dll-n.dir}/pe/saxon9pe-api.dll"
586
                     docFile="${dotnetdoc.dir}/apidoc.xml"
587
                     extraOptions="-keyfile:${saxondotnet.snk}"
588
                     executable="${csharp.compiler}">
589
                     <src dir="${basedir}/${temp-src-nc.dir}/api/Saxon.Api" includes="*.cs Properties/AssemblyInfo.cs"/>
590
                     <reference dir="${basedir}/${dll-n.dir}/pe">
591
                        <!--<include name="charsets.dll"/>-->
592
                        <include name="IKVM.OpenJDK.Core.dll"/>
593
                     <include name="IKVM.OpenJDK.Charsets.dll"/>
594
                     <include name="IKVM.OpenJDK.Security.dll"/>
595
                     <include name="IKVM.OpenJDK.Text.dll"/>
596
                     <include name="IKVM.OpenJDK.Util.dll"/>
597
                     <include name="IKVM.OpenJDK.XML.API.dll"/>
598
                     <include name="IKVM.Runtime.dll"/>
599
                        <include name="saxon9pe.dll"/>
600
                     </reference>
601
                </dn:csc>
602
                
603
                <!-- Transform, Query, Validate commands -->
604

    
605
                <echo file="${basedir}/${temp-src-nc.dir}/cmd/AssemblyInfo.cs">
606
                  using System.Reflection;
607
          using System.Runtime.CompilerServices;
608
          using System.Runtime.InteropServices;
609
          [assembly: AssemblyCompany("Saxonica")]
610
          [assembly: AssemblyProduct("Saxon.PE")]
611
          [assembly: AssemblyCopyright("Copyright © Saxonica 2010")]
612
          [assembly: AssemblyVersion("${version}")]
613
          [assembly: AssemblyFileVersion("${version}")]
614
        </echo>
615
                
616
                <dn:csc targetType="exe" win32icon="c:\MyDotNet\icons\gyfu.ico"
617
                     outputFile="${basedir}/${dll-n.dir}/pe/Transform.exe"
618
                     extraOptions="-keyfile:${saxondotnet.snk}"
619
                     executable="${csharp.compiler}">
620
                     <src dir="${basedir}/${temp-src-nc.dir}/cmd" includes="Transform.cs AssemblyInfo.cs"/>
621
                     <reference dir="${basedir}/${dll-n.dir}/pe">
622
                        <include name="IKVM.OpenJDK.Core.dll"/>
623
                     <include name="IKVM.OpenJDK.Charsets.dll"/>
624
                     <include name="IKVM.OpenJDK.Security.dll"/>
625
                     <include name="IKVM.OpenJDK.Text.dll"/>
626
                     <include name="IKVM.OpenJDK.Util.dll"/>
627
                     <include name="IKVM.OpenJDK.XML.API.dll"/>
628
                        <include name="IKVM.Runtime.dll"/>
629
                        <!--<include name="charsets.dll"/>-->
630
                        <include name="saxon9pe.dll"/>
631
                     </reference>
632
                </dn:csc>
633
                
634
                <dn:csc targetType="exe" win32icon="c:\MyDotNet\icons\gyfu.ico"
635
                     outputFile="${basedir}/${dll-n.dir}/pe/Query.exe"
636
                     extraOptions="-keyfile:${saxondotnet.snk}"
637
                     executable="${csharp.compiler}">
638
                     <src dir="${basedir}/${temp-src-nc.dir}/cmd" includes="Query.cs AssemblyInfo.cs"/>
639
                     <reference dir="${basedir}/${dll-n.dir}/pe">
640
                        <include name="IKVM.OpenJDK.Core.dll"/>
641
                     <include name="IKVM.OpenJDK.Charsets.dll"/>
642
                     <include name="IKVM.OpenJDK.Security.dll"/>
643
                     <include name="IKVM.OpenJDK.Text.dll"/>
644
                     <include name="IKVM.OpenJDK.Util.dll"/>
645
                     <include name="IKVM.OpenJDK.XML.API.dll"/>
646
                        <include name="IKVM.Runtime.dll"/>
647
                        <!--<include name="charsets.dll"/>-->
648
                        <include name="saxon9pe.dll"/>
649
                     </reference>
650
                </dn:csc>
651
                
652
    </target>    
653
    
654
    <target name="csharp-een" description="Compile C# source for .NET commands and API library (EE)"
655
            xmlns:dn="antlib:org.apache.ant.dotnet" depends="dll-n"
656
        > <!---->
657
        
658
        <taskdef 
659
            uri="antlib:org.apache.ant.dotnet">
660
            <classpath>
661
              <pathelement location="e:/javalib/ant-dotnet-1.0/ant-dotnet-1.0.jar"/>
662
            </classpath>
663
          </taskdef>
664

    
665
                <mkdir dir="${dll-n.dir}/ee"/>
666
                
667
                <copy todir="${dll-n.dir}/ee">
668
            <fileset dir="${dll-n.dir}">
669
                   <include name="IKVM.OpenJDK.Core.dll"/>
670
                   <include name="IKVM.OpenJDK.Charsets.dll"/>
671
                   <include name="IKVM.OpenJDK.Security.dll"/>
672
                   <include name="IKVM.OpenJDK.Text.dll"/>
673
                   <include name="IKVM.OpenJDK.Util.dll"/>
674
                   <include name="IKVM.OpenJDK.XML.API.dll"/>
675
              <include name="IKVM.Runtime.dll"/>
676
              <include name="saxon9ee.dll"/>
677
              <include name="saxon9ee-debug.dll"/>
678
            </fileset>
679
        </copy>
680
                
681
                <!-- API library DLL -->
682
                
683
                <!-- Note, this is not built for debugging in Visual Studio. Such a version
684
                     is best built within VS itself -->
685
                
686
                <dn:csc targetType="library" outputFile="${basedir}/${dll-n.dir}/ee/saxon9ee-api.dll"
687
                     docFile="${dotnetdoc.dir}/apidoc.xml"
688
                     extraOptions="-keyfile:${saxondotnet.snk}"
689
                     executable="${csharp.compiler}">
690
                     <src dir="${basedir}/${temp-src-nc.dir}/api/Saxon.Api" includes="*.cs Properties/AssemblyInfo.cs"/>
691
                     <reference dir="${basedir}/${dll-n.dir}/ee">
692
                        <!--<include name="charsets.dll"/>-->
693
                        <include name="IKVM.OpenJDK.Core.dll"/>
694
                     <include name="IKVM.OpenJDK.Charsets.dll"/>
695
                     <include name="IKVM.OpenJDK.Security.dll"/>
696
                     <include name="IKVM.OpenJDK.Text.dll"/>
697
                     <include name="IKVM.OpenJDK.Util.dll"/>
698
                     <include name="IKVM.OpenJDK.XML.API.dll"/>
699
                        <include name="IKVM.Runtime.dll"/>
700
                        <include name="saxon9ee.dll"/>
701
                     </reference>
702
                </dn:csc>
703
                
704
                <!-- Transform, Query, Validate commands -->
705
                
706
                <echo file="${basedir}/${temp-src-nc.dir}/cmd/AssemblyInfo.cs">
707
                  using System.Reflection;
708
          using System.Runtime.CompilerServices;
709
          using System.Runtime.InteropServices;
710
          [assembly: AssemblyCompany("Saxonica")]
711
          [assembly: AssemblyProduct("Saxon.EE")]
712
          [assembly: AssemblyCopyright("Copyright © Saxonica 2010")]
713
          [assembly: AssemblyVersion("${version}")]
714
          [assembly: AssemblyFileVersion("${version}")]
715
        </echo>                
716
                
717
                <dn:csc targetType="exe" win32icon="c:\MyDotNet\icons\gyfu.ico"
718
                     outputFile="${basedir}/${dll-n.dir}/ee/Transform.exe"
719
                     extraOptions="-keyfile:${saxondotnet.snk}"
720
                     executable="${csharp.compiler}">
721
                     <src dir="${basedir}/${temp-src-nc.dir}/cmd" includes="Transform.cs AssemblyInfo.cs"/>
722
                     <reference dir="${basedir}/${dll-n.dir}/ee">
723
                        <include name="IKVM.OpenJDK.Core.dll"/>
724
                     <include name="IKVM.OpenJDK.Charsets.dll"/>
725
                     <include name="IKVM.OpenJDK.Security.dll"/>
726
                     <include name="IKVM.OpenJDK.Text.dll"/>
727
                     <include name="IKVM.OpenJDK.Util.dll"/>
728
                     <include name="IKVM.OpenJDK.XML.API.dll"/>
729
                        <include name="IKVM.Runtime.dll"/>
730
                        <!--<include name="charsets.dll"/>-->
731
                        <include name="saxon9ee.dll"/>
732
                     </reference>
733
                </dn:csc>
734
                
735
                <dn:csc targetType="exe" win32icon="c:\MyDotNet\icons\gyfu.ico"
736
                     outputFile="${basedir}/${dll-n.dir}/ee/Query.exe"
737
                     extraOptions="-keyfile:${saxondotnet.snk}"
738
                     executable="${csharp.compiler}">
739
                     <src dir="${basedir}/${temp-src-nc.dir}/cmd" includes="Query.cs AssemblyInfo.cs"/>
740
                     <reference dir="${basedir}/${dll-n.dir}/ee">
741
                        <include name="IKVM.OpenJDK.Core.dll"/>
742
                     <include name="IKVM.OpenJDK.Charsets.dll"/>
743
                     <include name="IKVM.OpenJDK.Security.dll"/>
744
                     <include name="IKVM.OpenJDK.Text.dll"/>
745
                     <include name="IKVM.OpenJDK.Util.dll"/>
746
                     <include name="IKVM.OpenJDK.XML.API.dll"/>
747
                        <include name="IKVM.Runtime.dll"/>
748
                        <!--<include name="charsets.dll"/>-->
749
                        <include name="saxon9ee.dll"/>
750
                     </reference>
751
                </dn:csc>
752
                
753
                <dn:csc targetType="exe" win32icon="c:\MyDotNet\icons\gyfu.ico"
754
                     outputFile="${basedir}/${dll-n.dir}/ee/Validate.exe"
755
                     extraOptions="-keyfile:${saxondotnet.snk}"
756
                     executable="${csharp.compiler}">
757
                     <src dir="${basedir}/${temp-src-nc.dir}/cmd" includes="Validate.cs AssemblyInfo.cs"/>
758
                     <reference dir="${basedir}/${dll-n.dir}/ee">
759
                        <include name="IKVM.OpenJDK.Core.dll"/>
760
                     <include name="IKVM.OpenJDK.Charsets.dll"/>
761
                     <include name="IKVM.OpenJDK.Security.dll"/>
762
                     <include name="IKVM.OpenJDK.Text.dll"/>
763
                     <include name="IKVM.OpenJDK.Util.dll"/>
764
                     <include name="IKVM.OpenJDK.XML.API.dll"/>
765
                        <include name="IKVM.Runtime.dll"/>
766
                        <include name="saxon9ee.dll"/>
767
                     </reference>
768
                </dn:csc>
769
    </target>    
770
    
771
    <target name="compile-samples-n" description="Compile C# source for .NET commands and API library (HE)"
772
            xmlns:dn="antlib:org.apache.ant.dotnet" depends="csharp-hen, csharp-pen, csharp-een, samples-common"
773
        >
774

    
775
       <taskdef 
776
            uri="antlib:org.apache.ant.dotnet">
777
            <classpath>
778
              <pathelement location="e:/javalib/ant-dotnet-1.0/ant-dotnet-1.0.jar"/>
779
            </classpath>
780
          </taskdef>
781

    
782
                <mkdir dir="${dll-n.dir}/samples"/>
783
                <mkdir dir="${dll-n.dir}/tests"/>
784
                
785
                <!-- Sample applications and test drivers -->
786
                
787
                <dn:csc targetType="exe"
788
                     outputFile="${basedir}/${dll-n.dir}/samples/Examples.exe"
789
                     win32icon="c:\MyDotNet\icons\csharp.ico"
790
                     debug="true"
791
                     executable="${csharp.compiler}">
792
                     <src dir="${basedir}/${temp-src-nc.dir}/samples" includes="Examples.cs"/>
793
                     <reference dir="${basedir}/${dll-n.dir}/ee">
794
                        <include name="IKVM.OpenJDK.*.dll"/>
795
                        <include name="saxon9ee-api.dll"/>
796
                     </reference>
797
                </dn:csc>
798
                
799
                <dn:csc targetType="library"
800
                     outputFile="${basedir}/${dll-n.dir}/samples/SampleExtensions.dll"
801
                     debug="true"
802
                     executable="${csharp.compiler}">
803
                     <src dir="${basedir}/${temp-src-nc.dir}/samples" includes="SampleExtensions.cs"/>
804
                     <reference dir="${basedir}/${dll-n.dir}/ee">
805
                        <include name="IKVM.OpenJDK.*.dll"/>
806
                        <include name="saxon9ee.dll"/>
807
                        <include name="saxon9ee-api.dll"/>
808
                     </reference>
809
                </dn:csc>
810
                
811
                <dn:csc targetType="winexe"
812
                     outputFile="${basedir}/${dll-n.dir}/samples/TestRunner.exe"
813
                     win32icon="c:\MyDotNet\icons\csharp.ico"
814
                     debug="true"
815
                     executable="${csharp.compiler}">
816
                     <src dir="${basedir}/${temp-src-nc.dir}/samples">
817
                       <include name="TestRunnerForm.cs"/>
818
                       <include name="TestRunnerForm.Designer.cs"/>
819
                       <include name="TestRunnerProgram.cs"/>
820
                       <include name="XsltTestSuiteDriver.cs"/>
821
                       <include name="XQueryTestSuiteDriver.cs"/>
822
                       <include name="SchemaTestSuiteDriver.cs"/>
823
                       <include name="IFeedbackListener.cs"/>
824
                       <include name="FileComparer.cs"/>
825
                     </src>
826
                     <reference dir="${basedir}/${dll-n.dir}/ee">
827
                        <include name="IKVM.OpenJDK.*.dll"/>
828
                        <include name="saxon9ee-api.dll"/>
829
                     </reference>
830
                </dn:csc>                                
831
                
832
                                      
833
                <!--                
834
            <exec dir="." executable="csharp-compile.cmd" >
835
          <arg line="${basedir}/${temp-src-nc.dir}"/>
836
          <arg line="${basedir}/${dll-n.dir}"/>
837
          <arg line="${version}"/>
838
        </exec> -->               
839
    </target>
840
    
841
    <target name="product-hen" description="Assemble product.directory for Saxon-HE on .NET"
842
                                                                                           depends="csharp-hen">
843
      <mkdir dir="${build-hen.dir}/bin"/>                                                                                     
844
      <copy todir="${build-hen.dir}/bin">
845
        <fileset dir="${dll-n.dir}/he">
846
               <include name="IKVM.OpenJDK.*.dll"/>
847
          <include name="IKVM.Runtime.dll"/>
848
          <include name="saxon9he.dll"/>
849
          <include name="saxon9he-api.dll"/>
850
          <include name="Query.exe"/>
851
          <include name="Transform.exe"/>
852
        </fileset>
853
      </copy>
854
                        <echo file="${build-hen.dir}/bin/install-gac.cmd">
855
                            set NET="%PROGRAMFILES%\Microsoft SDKs\Windows\v6.0A\bin"
856
                                rem -- alternative location: set NET="%PROGRAMFILES%\Microsoft.NET\SDK\v2.0\Bin"
857
                                %NET%\gacutil /if IKVM.Runtime.dll
858
                                %NET%\gacutil /if IKVM.OpenJDK.Core.dll
859
                                %NET%\gacutil /if IKVM.OpenJDK.Charsets.dll
860
                                %NET%\gacutil /if IKVM.OpenJDK.Util.dll
861
                                %NET%\gacutil /if IKVM.OpenJDK.Text.dll
862
                                %NET%\gacutil /if IKVM.OpenJDK.XML.API.dll
863
                                %NET%\gacutil /if saxon9he.dll 
864
                                %NET%\gacutil /if saxon9he-api.dll                
865
      </echo> 
866
    </target>
867
    
868
    <target name="product-pen" description="Assemble product.directory for Saxon-PE on .NET"
869
                                                                                           depends="csharp-pen">
870
      <mkdir dir="${build-pen.dir}/bin"/>                                                                                     
871
      <copy todir="${build-pen.dir}/bin">
872
        <fileset dir="${dll-n.dir}/pe">
873
               <include name="IKVM.OpenJDK.*.dll"/>
874
          <include name="IKVM.Runtime.dll"/>
875
          <include name="saxon9pe.dll"/>
876
          <include name="saxon9pe-api.dll"/>
877
          <include name="Query.exe"/>
878
          <include name="Transform.exe"/>
879
        </fileset>
880
      </copy>
881
                        <echo file="${build-pen.dir}/bin/install-gac.cmd">
882
                            set NET="%PROGRAMFILES%\Microsoft SDKs\Windows\v6.0A\bin"
883
                                rem -- alternative location: set NET="%PROGRAMFILES%\Microsoft.NET\SDK\v2.0\Bin"
884
                                %NET%\gacutil /if IKVM.Runtime.dll
885
                                %NET%\gacutil /if IKVM.OpenJDK.Core.dll
886
                                %NET%\gacutil /if IKVM.OpenJDK.Charsets.dll
887
                                %NET%\gacutil /if IKVM.OpenJDK.Security.dll
888
                                %NET%\gacutil /if IKVM.OpenJDK.Util.dll
889
                                %NET%\gacutil /if IKVM.OpenJDK.Text.dll
890
                                %NET%\gacutil /if IKVM.OpenJDK.XML.API.dll
891
                                %NET%\gacutil /if saxon9pe.dll 
892
                                %NET%\gacutil /if saxon9pe-api.dll                
893
      </echo> 
894
    </target>
895
    
896
    <target name="product-een" description="Assemble product.directory for Saxon-SA on .NET"
897
                                                                                           depends="csharp-een">
898
      <copy todir="${build-een.dir}/bin">
899
        <fileset dir="${dll-n.dir}/ee">
900
               <include name="IKVM.OpenJDK.*.dll"/>
901
          <include name="IKVM.Runtime.dll"/>
902
          <include name="saxon9ee.dll"/>
903
          <include name="saxon9ee-api.dll"/>
904
          <include name="Query.exe"/>
905
          <include name="Transform.exe"/>
906
          <include name="Validate.exe"/>
907
        </fileset> 
908
      </copy> 
909
      <echo file="${build-een.dir}/bin/install-gac.cmd">
910
                                set NET="%PROGRAMFILES%\Microsoft SDKs\Windows\v6.0A\bin"
911
                                rem -- alternative location: set NET="%PROGRAMFILES%\Microsoft.NET\SDK\v2.0\Bin"
912
                                %NET%\gacutil /if IKVM.Runtime.dll
913
                                %NET%\gacutil /if IKVM.OpenJDK.Core.dll
914
                                %NET%\gacutil /if IKVM.OpenJDK.Charsets.dll
915
                                %NET%\gacutil /if IKVM.OpenJDK.Security.dll
916
                                %NET%\gacutil /if IKVM.OpenJDK.Util.dll
917
                                %NET%\gacutil /if IKVM.OpenJDK.Text.dll
918
                                %NET%\gacutil /if IKVM.OpenJDK.XML.API.dll
919
                                %NET%\gacutil /if saxon9ee.dll 
920
                                %NET%\gacutil /if saxon9ee-api.dll              
921
      </echo>             
922
    </target>
923
    
924
    <target name="product-n" description="Assemble product.directories for Saxon on .NET"
925
                                                                                           depends="product-hen, product-pen, product-een">
926
                                                                                           
927
       <!-- Following steps are for diagnostics only, they can be omitted if Powershell is not available -->
928
                                                                                           
929
       <exec executable="c:/windows/system32/WindowsPowerShell/v1.0/powershell.exe">
930
                  <arg line="tools/list-dependencies.ps1"/>
931
                  <arg line="${build-hen.dir}/bin"/>
932
           </exec>
933
           
934
           <exec executable="c:/windows/system32/WindowsPowerShell/v1.0/powershell.exe">
935
                  <arg line="tools/list-dependencies.ps1"/>
936
                  <arg line="${build-pen.dir}/bin"/>
937
           </exec>
938
           
939
           <exec executable="c:/windows/system32/WindowsPowerShell/v1.0/powershell.exe">
940
                  <arg line="tools/list-dependencies.ps1"/>
941
                  <arg line="${build-een.dir}/bin"/>
942
           </exec>
943
           
944
        </target>                                                                                          
945
       
946
    <target name="samples-n" description="Assemble release samples for .NET"
947
                  depends="csharp-hen, compile-samples-n">
948
      <mkdir dir="${build-resources.dir}/samples/cs"/>
949
      <copy todir="${build-resources.dir}/samples/cs"> 
950
        <fileset dir="${temp-src-nc.dir}/samples">
951
          <include name="*.cs"/>
952
        </fileset>
953
      </copy>
954
      <mkdir dir="${build-resources.dir}/samples/cs/bin"/>
955
      <copy todir="${build-resources.dir}/samples/cs/bin"> 
956
        <fileset dir="${dll-n.dir}/samples">
957
          <include name="*.exe"/>
958
          <include name="*.dll"/>
959
          <include name="*.pdb"/>
960
        </fileset>
961
      </copy>
962
      <copy todir="${build-resources.dir}/samples/cs/bin"> 
963
        <fileset dir="${dll-n.dir}/tests">
964
          <include name="*.exe"/>
965
          <include name="*.dll"/>
966
          <include name="*.pdb"/>
967
        </fileset>
968
      </copy>      
969
    </target>
970
    
971
    <target name="dotnetdoc-dependset">
972
      <dependset>
973
        <srcfilelist dir="${dotnetdoc.dir}" files="*.xsl"/> 
974
        <srcfilelist dir="${temp-src-nc.dir}/api/Saxon.Api" files="*.cs"/>
975
        <targetfileset dir="${dotnetdoc.dir}" includes="names.xml"/>
976
      </dependset>
977
    </target>               
978
                     
979
    <target name="product-dotnetdoc" description="Create .NET API documentation"
980
        depends="copysource-development-n, csharp-hen, dotnetdoc-dependset">
981
    <!-- Omit for maintenance builds    
982
      <taskdef name="saxon-xslt" 
983
                                 classname="net.sf.saxon.ant.AntTransform" 
984
                                 classpath="e:\saxon-build\9.1.0.7\saj\saxon9sa.jar;e:\saxon-build\9.1.0.7\bj\saxon9-ant.jar;c:\saxon-licenses"/>
985

986
      <saxon-xslt       in="${dotnetdoc.dir}/parsecs.xsl"
987
                                    style="${dotnetdoc.dir}/parsecs.xsl"
988
                                    initialTemplate="main"
989
                                    out="${dotnetdoc.dir}/names.xml"/>
990
          <saxon-xslt in="${dotnetdoc.dir}/names.xml" 
991
                                    style="${dotnetdoc.dir}/merge.xsl"
992
                                    initialTemplate="main"
993
                                    out="${dotnetdoc.dir}/merged.xml"/>
994
      <saxon-xslt in="${dotnetdoc.dir}/merged.xml" 
995
                                    style="${dotnetdoc.dir}/tohtml.xsl"
996
                                    out="${dotnetdoc.dir}/out/index.html"/>                                        
997
      
998
      <mkdir dir="${build-resources.dir}/doc/dotnetdoc"/>
999
      <copy todir="${build-resources.dir}/doc/dotnetdoc">
1000
        <fileset dir="${dotnetdoc.dir}/out/html"/>
1001
      </copy>
1002
      <copy file="${dotnetdoc.dir}/out/index.html"
1003
              tofile="${build-resources.dir}/doc/dotnetdoc/index.html"
1004
              overwrite="true"/>
1005
      <copy file="${userdoc.dir}/fixed/javadoc/stylesheet.css"
1006
              tofile="${build-resources.dir}/doc/dotnetdoc/stylesheet.css"
1007
              overwrite="true"/>
1008
    -->
1009
    </target>  
1010
    
1011
    
1012
    <target name="release-userdoc-n" description="Generate User Documentation">
1013
      <copy todir="${product.dir}/hen">
1014
        <fileset dir="${userdoc.dir}/welcome">
1015
          <include name="doc/**"/>
1016
          <include name="notices/**"/>
1017
        </fileset>
1018
      </copy>
1019
      <copy todir="${product.dir}/pen">
1020
        <fileset dir="${userdoc.dir}/welcome">
1021
          <include name="doc/**"/>
1022
          <include name="notices/**"/>
1023
        </fileset>
1024
      </copy>
1025
      <copy todir="${product.dir}/een">
1026
        <fileset dir="${userdoc.dir}/welcome">
1027
          <include name="doc/**"/>
1028
          <include name="notices/**"/>
1029
        </fileset>
1030
      </copy>       
1031
                     
1032
    </target>
1033
                  
1034
    <target name="n" depends="product-n, samples-n"
1035
                    description="Generate Saxon for the .NET platform"/>    
1036
      
1037
    <target name="release-n" description="Create .ZIP files for release"
1038
        >  <!-- depends="build, resources"-->
1039
      <mkdir dir="${issue.dir}"/> 
1040
       <zip zipfile="${issue.dir}/saxonhe${versionh}n.zip">
1041
        <fileset dir="${product.dir}/hen"/>
1042
      </zip>                
1043
      <zip zipfile="${issue.dir}/saxonpe${versionh}n.zip">
1044
        <fileset dir="${product.dir}/pen"/>
1045
      </zip>                    
1046
      <zip zipfile="${issue.dir}/saxonee${versionh}n.zip">
1047
        <fileset dir="${product.dir}/een"/>
1048
      </zip>
1049
    </target>
1050
    
1051

    
1052
      
1053
       
1054
    
1055
</project>
(3-3/6)