Project

Profile

Help

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

he / latest9.2 / build / build-n.xml @ 5c432fa8

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

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

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

    
550
                <mkdir dir="${dll-n.dir}/pe"/>
551
                
552
                <copy todir="${dll-n.dir}/pe">
553
            <fileset dir="${dll-n.dir}">
554
                   <include name="IKVM.OpenJDK.Core.dll"/>
555
                   <include name="IKVM.OpenJDK.Charsets.dll"/>
556
                   <include name="IKVM.OpenJDK.Security.dll"/>
557
                   <include name="IKVM.OpenJDK.Text.dll"/>
558
                   <include name="IKVM.OpenJDK.Util.dll"/>
559
                   <include name="IKVM.OpenJDK.XML.API.dll"/>
560
                   <include name="xercesImpl.dll"/>
561
              <include name="IKVM.Runtime.dll"/>
562
              <!--<include name="charsets.dll"/>-->
563
              <include name="saxon9pe.dll"/>
564
            </fileset>
565
        </copy>
566
                
567
                <!-- API library DLL -->
568
                
569
                <dn:csc targetType="library" outputFile="${basedir}/${dll-n.dir}/pe/saxon9pe-api.dll"
570
                     docFile="${dotnetdoc.dir}/apidoc.xml"
571
                     extraOptions="-keyfile:${saxondotnet.snk}"
572
                     executable="${csharp.compiler}">
573
                     <src dir="${basedir}/${temp-src-nc.dir}/api/Saxon.Api" includes="*.cs Properties/AssemblyInfo.cs"/>
574
                     <reference dir="${basedir}/${dll-n.dir}/pe">
575
                        <!--<include name="charsets.dll"/>-->
576
                        <include name="IKVM.OpenJDK.Core.dll"/>
577
                     <include name="IKVM.OpenJDK.Charsets.dll"/>
578
                     <include name="IKVM.OpenJDK.Security.dll"/>
579
                     <include name="IKVM.OpenJDK.Text.dll"/>
580
                     <include name="IKVM.OpenJDK.Util.dll"/>
581
                     <include name="IKVM.OpenJDK.XML.API.dll"/>
582
                     <include name="IKVM.Runtime.dll"/>
583
                        <include name="saxon9pe.dll"/>
584
                     </reference>
585
                </dn:csc>
586
                
587
                <!-- Transform, Query, Validate commands -->
588

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

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

    
759
       <taskdef 
760
            uri="antlib:org.apache.ant.dotnet">
761
            <classpath>
762
              <pathelement location="e:/javalib/ant-dotnet-1.0/ant-dotnet-1.0.jar"/>
763
            </classpath>
764
          </taskdef>
765

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

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

    
1036
      
1037
       
1038
    
1039
</project>
(3-3/6)