Project

Profile

Help

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

he / tags / 9.8.0.14 / build / build-n.xml @ 02f8308b

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
    <import file="documentation.xml"/>
10
    <import file="samples-common.xml"/>
11

    
12
        <!--<property file="ICU.properties"/>-->
13
    <target name="ICU"
14
        description="Generate the necessary modules from ICU to support PE/EE UCA collation and numbering.
15
    These will then eventually be added to the jars">
16
      <!--  <echo message="ICU.dir: ${ICU.dir}"/>
17
        <ant dir="${ICU.dir}" target="collator" inheritAll="false"/>
18
        <ant dir="${ICU.dir}" target="format" inheritAll="false"/>-->
19
    </target>
20
                    
21
    <!-- directories holding C# source code -->
22
    <!--<property name="vss-n.dir" value="${repo-os}/latest9.6/hen"/>-->
23
     <property name="vss-n.dir" value="${repo-os}/../Saxon.Net"/>
24

    
25
    <!-- directory holding C# source code as in Subversion -->
26
    <!--<property name="subversion-n.dir" value="${root}/saxon-svn2/latest9.0/bn/csource"/>-->        
27
                
28
    <!-- directories for .NET API documentation -->
29
    <property name="doctools-n.dir" value="MyDotNet/doctools"/>
30
    <property name="doctemp-n.dir" value="${temp.dir}"/>
31
    <property name="docout-n.dir" value="${build-resources.dir}/doc/dotnetdoc"/>
32
                        
33
    <!-- location of the C# compiler value=gmcs-->
34
  <condition  property="csharp.compiler" value="/Library/Frameworks/Mono.framework/Versions/4.2.3/bin/mcs">
35
        <or>
36
          <os family="unix"/>
37
          <os family="mac"/>
38
        </or>
39
      </condition>
40
<!--      <condition property="csharp.compiler" value="C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\csc.exe">
41
        <os family="windows"/>
42
      </condition>-->
43
    
44
  <condition property="csharp.compiler" value="C:\Windows\Microsoft.NET\Framework\v4.0.30319\csc.exe">
45
    <os family="windows"/>
46
  </condition>
47
    <!-- following locations are for IKVMC code used to build the .NET product -->
48
    
49
    <property name="development-ikvm.dir" value="MyDotNet"/>
50
    <property name="ikvm.dir" value="${development-ikvm.dir}/ikvm-7.2.4630.5"/>
51
    <property name="generated.stubs.dir" value="${development-ikvm.dir}/stubs"/>
52
    <property name="ikvm.strongname" value="Version=7.2.4630.5, Culture=neutral, PublicKeyToken=13235d27fcbfff58, ProcessorArchitecture=MSIL"/>
53
    <property name="saxon.strongname" value="Version=${version}, Culture=neutral, PublicKeyToken=e1fdd002d5083fe6, ProcessorArchitecture=MSIL"/>
54
  <property name="icon" value="${development-ikvm.dir}/icons/favicon.ico"/>
55
    
56
    <!-- Key file used for signing the Saxonica-built .NET product. User builds should use a different key file -->
57
    <property name="saxondotnet.snk" value="${development-ikvm.dir}/saxondotnet.snk"/>
58
    
59
    <!-- set to 'debug' for testing, 'live' for final build -->
60
    <!--<property name="dot.net.debug" value="live"/>--> 
61
    
62
    <!-- The other important thing to enable debugging is that the .pdb file is available in the same directory
63
         as the .dll. -->
64
    
65
    <!-- Precondition for .NET compilation: IKVM is installed.
66
         * Download from www.ikvm.net
67
         * Unzip into ${development-ikvm.dir}
68
         * Register in the GAC (access the Microsoft .NET Framework Configuration item in the 
69
                                Windows Control Panel, and add the assemblies to the Assembly Cache. 
70
                                At a minimum, install the IKVM.OpenJDK.ClassLibrary.dll and IKVM.Runtime.dll)
71
         * Generate stubs in ${generated.stubs.dir} 
72
           for System.Xml.dll, System.Security.dll, and IKVM.OpenJDK.ClassLibrary.dll
73
    -->       
74
    
75
    <!-- following locations are relative to the build file -->
76
        
77
    <property name="temp-src-nj.dir" value="${temp.dir}/n/jsource"/>
78
    <property name="temp-src-prep0-hen.dir" value="${temp.dir}/preprocessed0/hen/source"/>
79
    <property name="temp-src-prep0-een.dir" value="${temp.dir}/preprocessed0/een/source"/>
80
    <property name="temp-src-prep0-pen.dir" value="${temp.dir}/preprocessed0/pen/source"/>
81
    <property name="temp-src-prep-hen.dir" value="${temp.dir}/preprocessed/hen/source"/>
82
    <property name="temp-src-prep-een.dir" value="${temp.dir}/preprocessed/een/source"/>
83
    <property name="temp-src-prep-pen.dir" value="${temp.dir}/preprocessed/pen/source"/>
84
    <property name="temp-src-nc.dir" value="${temp.dir}/n/csource"/>
85
    <property name="classes-n.dir" value="${temp.dir}/n/classes"/> 
86
    <property name="jar-n.dir" value="${temp.dir}/n/jar"/> 
87
    <property name="dll-n.dir" value="${temp.dir}/n/dll"/>  
88

    
89
                <!-- following locations are relative to the destination directory -->
90
                
91
    <property name="build-hen.dir" value="${product.dir}/hen"/> 
92
    <property name="build-pen.dir" value="${product.dir}/pen"/>  
93
    <property name="build-een.dir" value="${product.dir}/een"/>
94
     
95
   
96
    <!-- development source -->
97
        
98
    <!--<property name="source-api-n.dir" value="${vss-n.dir}/csource/api"/>-->
99
    <property name="source-api-n.dir" value="${vss-n.dir}"/>
100
    <!--<property name="source-cmd-n.dir" value="${vss-n.dir}/csource/cmd"/>-->
101
    <property name="source-cmd-n.dir" value="${vss-n.dir}"/>
102
    <!--<property name="source-samples-n.dir" value="${vss-n.dir}/csource/samples"/>-->
103
    <property name="source-samples-n.dir" value="${vss-n.dir}"/>
104
    <taskdef resource="com/igormaznitsa/jcp/ant/tasks.properties" classpath="../lib/jcp-5.3.jar"/>
105
           
106
    <path id="classpath-n">
107
        <fileset dir="${lib.dir}">
108
            <include name="*.jar"/>
109
        </fileset>
110
        <fileset dir="${ikvm.dir}">
111
                 <include name="classpath/mscorlib.jar"/>
112
                 <include name="classpath/System.jar"/>
113
                 <include name="classpath/IKVM.Runtime.jar"/>
114
        </fileset>
115
        <fileset dir="${generated.stubs.dir}">
116
             <include name="CIL.jar"/>         
117
                 <include name="System.Xml.jar"/>
118
                 <include name="System.Security.jar"/>
119
        </fileset>         
120
    </path>
121
       
122
    
123
    <target name="prepare-libs-n" description="Prepare required libraries for .NET, specifically Xerces, TagSoup, and ASM">
124
        <taskdef name="ikvmc" classname="net.ikvm.ant.IkvmcTask" classpath="${lib.dir}\ant-ikvmc.0.5.jar"/>
125
        <mkdir dir="${dll-n.dir}"/>
126
        <copy todir="${dll-n.dir}">
127
          <fileset dir="${ikvm.dir}/bin">
128
            <include name="IKVM.OpenJDK.*.dll"/>
129
            <include name="IKVM.Runtime.dll"/>            
130
          </fileset>
131
          <!--<fileset dir="${ikvm.dir}/openjdk/extras">
132
            <include name="charsets.dll"/>
133
          </fileset>-->
134
        </copy>
135
        <copy file="${saxondotnet.snk}" todir="${basedir}/../make"/>
136
        <mkdir dir="${basedir}/../make/libs/xerces"/>
137
        <unjar src="${lib.dir}/xercesImpl.jar" dest="${basedir}/../make/libs/xerces"/>
138
        <unjar src="${lib.dir}/resolver.jar" dest="${basedir}/../make/libs/xerces"/>
139
        <jar basedir="${basedir}/../make/libs/xerces" compress="${build.compress}" jarfile="${lib.dir}/xerces.jar">
140
            <include name="**/*.class"/>
141
            <include name="**/*.properties"/>
142
            <exclude name="org.w3c.dom.html.HTMLDOMImplementation.class"/>
143
            <exclude name="META-INF/MANIFEST.MF"/>
144
        </jar>
145
    </target>    
146
        
147

    
148
    <!--<target name="expand-icu" unless="ICU-exists">
149
      <echo>Expanding ICU source...</echo>
150
      <untar src="${lib.dir}/icu4j-52_1.tar" dest="${ICU.dir}"/>
151
    </target> -->
152

    
153
    <target name="prepare-n" depends="prepare-libs-n">
154
          <!-- <available property="ICU-exists" file="${ICU.dir}" type="dir"/> -->
155
    </target>
156

    
157

    
158
    <target name="copysrc-hen">
159
        <mkdir dir="${temp-src-nj.dir}/hen"/>
160
        <copy todir="${temp-src-nj.dir}/hen">
161
          <fileset dir="${source-hej.dir}">
162
            <include name="net/sf/saxon/**/*.java"/>
163
            <exclude name="**/TransformerFactoryImpl.java"/>
164
            <exclude name="**/ant/**"/>
165
            <exclude name="**/dom/**"/>
166
            <exclude name="**/dom4j/**"/>
167
            <exclude name="**/java/**"/>
168
            <exclude name="**/testdriver/**"/>
169
            <exclude name="net/sf/saxon/testdriver/**/*.java"/>
170
            <exclude name="**/jaxp/**"/>
171
            <exclude name="**/jdom/**"/>
172
            <exclude name="**/jdom2/**"/>
173
            <exclude name="**/axiom/**"/>
174
            <!--<exclude name="**/s9api/**"/>-->
175
            <exclude name="**/s9api/DOMDestination.java"/>
176
            <exclude name="**/sql/**"/>
177
            <exclude name="**/xom/**"/>
178
            <exclude name="**/xpath/**"/>
179
            <exclude name="**/xqj/**"/>
180
            <exclude name="**/stax/**"/>
181
          </fileset>
182
        </copy>
183
    </target>
184

    
185
    <target name="copysrc-pen">
186
        <mkdir dir="${temp-src-nj.dir}/pen"/>
187
        <copy todir="${temp-src-nj.dir}/pen">
188
          <fileset dir="${source-hej.dir}">
189
            <include name="net/sf/saxon/**/*.java"/>
190
            <exclude name="**/TransformerFactoryImpl.java"/>
191
            <exclude name="**/testdriver/**"/>
192
            <exclude name="**/ant/**"/>
193
            <exclude name="**/dom/**"/>
194
            <exclude name="**/dom4j/**"/>
195
            <exclude name="**/java/**"/>
196
            <exclude name="**/jaxp/**"/>
197
            <exclude name="**/jdom/**"/>
198
            <exclude name="**/jdom2/**"/>
199
            <exclude name="**/axiom/**"/>
200
            <!--<exclude name="**/s9api/**"/>-->
201
            <exclude name="**/s9api/DOMDestination.java"/>
202
            <exclude name="**/sql/**"/>
203
            <exclude name="**/xom/**"/>
204
            <exclude name="**/xpath/**"/>
205
            <exclude name="**/xqj/**"/>
206
            <exclude name="**/stax/**"/>
207
          </fileset>
208
          <fileset dir="${source-eej.dir}">
209
            <include name="com/saxonica/**/*.java"/>
210
            <exclude name="com/saxonica/ee/**/*.java"/>
211
            <exclude name="com/saxonica/testdriver/**/*.java"/>
212
            <exclude name="net/sf/saxon/testdriver/**/*.java"/>
213
            <exclude name="com/saxonica/jaxp/*.java"/>
214
              <exclude name="com/saxonica/js/**"/>
215
            <exclude name="com/saxonica/config/ProfessionalXPathFactory.java" />
216
            <exclude name="com/saxonica/config/EnterpriseConfiguration.java" />
217
            <exclude name="com/saxonica/config/JavaPlatformPE.java" />
218
            <exclude name="com/saxonica/config/JavaPlatformEE.java" />
219
            <exclude name="com/saxonica/config/JavaPlatformC.java"/>
220
            <exclude name="com/saxonica/config/ee/**" />
221
            <exclude name="com/saxonica/stream/**" />
222
            <exclude name="com/saxonica/schema/**" />
223
            <exclude name="com/saxonica/bytecode/**" />
224
            <exclude name="com/saxonica/expr/ee/**" />
225
            <exclude name="com/saxonica/update/**/*.java"/>
226
            <exclude name="com/saxonica/validate/**/*.java"/>
227
            <exclude name="com/saxonica/expr/CastToUnion.java"/>
228
            <exclude name="com/saxonica/expr/CastableToUnion.java"/>
229
            <exclude name="com/saxonica/expr/CastableToUnion.java"/>
230
            <exclude name="com/saxonica/Validate.java"/>
231
            <exclude name="com/saxonica/config/ProfessionalTransformerFactory.java"/>
232
            <exclude name="com/saxonica/config/ProfessionalXPathFactory.java"/>
233
            <exclude name="com/saxonica/config/EnterpriseTransformerFactory.java"/>
234
              <exclude name="com/saxonica/config/StreamingTransformerFactory.java"/>
235
            <exclude name="com/saxonica/config/EnterpriseXPathFactory.java"/>
236
            <exclude name="com/saxonica/config/DynamicLoaderEE.java"/>
237
            <exclude name="com/saxonica/config/StandardSchemaResolver.java"/>
238
            <exclude name="**/xqj/**"/>
239
          </fileset>
240
        </copy>
241
    </target>
242

    
243
   <target name="copysrc-een">
244
        <mkdir dir="${temp-src-nj.dir}/een"/>
245
        <copy todir="${temp-src-nj.dir}/een">
246
          <fileset dir="${source-hej.dir}">
247
            <include name="net/sf/saxon/**/*.java"/>
248
            <exclude name="net/sf/saxon/TransformerFactoryImpl.java"/>
249
            <exclude name="**/ant/**"/>
250
            <exclude name="**/dom/**"/>
251
            <exclude name="**/dom4j/**"/>
252
            <exclude name="**/java/**"/>
253
            <exclude name="**/jaxp/**"/>
254
            <exclude name="**/jdom/**"/>
255
            <exclude name="**/jdom2/**"/>
256
            <exclude name="**/axiom/**"/>
257
           <!--<exclude name="**/s9api/**"/>-->
258
            <exclude name="**/s9api/DOMDestination.java"/>
259
            <exclude name="**/sql/**"/>
260
            <exclude name="**/xom/**"/>
261
            <exclude name="**/xpath/**"/>
262
            <exclude name="**/xqj/**"/>
263
            <exclude name="**/stax/**"/>
264
          </fileset>
265
          <fileset dir="${source-eej.dir}">
266
            <include name="com/saxonica/**/*.java"/>
267
            <exclude name="com/saxonica/testdriver/**/*.java"/>
268
            <exclude name="net/sf/saxon/testdriver/**/*.java"/>
269
            <exclude name="com/saxonica/ee/jaxp/*.java"/>
270
            <exclude name="com/saxonica/js/**"/>
271
            <exclude name="com/saxonica/ee/domino/**/*.java" />
272
            <exclude name="com/saxonica/config/JavaPlatformPE.java" />
273
            <exclude name="com/saxonica/config/JavaPlatformEE.java" />
274
            <exclude name="com/saxonica/config/JavaPlatformC.java"/>
275
            <exclude name="com/saxonica/config/ProfessionalXPathFactory.java" />
276
            <exclude name="com/saxonica/config/EnterpriseXPathFactory.java" />
277
            <exclude name="com/saxonica/config/ProfessionalTransformerFactory.java" />
278
            <exclude name="com/saxonica/config/EnterpriseTransformerFactory.java" />
279
              <exclude name="com/saxonica/config/StreamingTransformerFactory.java"/>
280
            <!--<exclude name="com/saxonica/config/pe/**" />
281
            <include name="com/saxonica/config/pe/StyleNodeFactoryPE" />
282
            <include name="com/saxonica/config/pe/ConfigurationReaderPE" />
283
            <include name="com/saxonica/config/pe/DynamicLoaderPE" />-->
284
            <exclude name="**/xqj/**"/>
285
          </fileset>
286
        </copy>
287
    </target>
288

    
289
    
290
    <target name="copysource-development-n" description="Copy source files for Saxon on .NET from development directory">
291
      <copy todir="${temp-src-nc.dir}/api/Saxon.Api/">
292
          <fileset dir="${source-api-n.dir}/Saxon.Api">
293
            <include name="*.cs"/>
294
            <!--<include name="Saxon.Api/Properties/AssemblyInfo.cs"/>-->
295
          </fileset>
296
        </copy>
297
        <mkdir dir="${temp-src-nc.dir}/api/Saxon.Api/Properties"/>
298
        <echo file="${temp-src-nc.dir}/api/Saxon.Api/Properties/AssemblyInfo.cs">
299
                  using System.Reflection;
300
          using System.Runtime.CompilerServices;
301
          using System.Runtime.InteropServices;
302
          [assembly: AssemblyTitle("Saxon.Api")]
303
          [assembly: AssemblyDescription("")]
304
          [assembly: AssemblyConfiguration("")]
305
          [assembly: AssemblyCompany("Saxonica")]
306
          [assembly: AssemblyProduct("Saxon.Api")]
307
          [assembly: AssemblyCopyright("Copyright © Saxonica 2017")]
308
          [assembly: AssemblyTrademark("")]
309
          [assembly: AssemblyCulture("")]
310
          [assembly: ComVisible(false)]
311
          [assembly: Guid("8cf9aad8-da5f-47f0-9251-1fbcbdcfe477")]
312
          [assembly: AssemblyVersion("${version}")]
313
          [assembly: AssemblyFileVersion("${version}")]
314
        </echo>
315

    
316
        <mkdir dir="${temp-src-nc.dir}/cmd"/>
317
        <copy todir="${temp-src-nc.dir}/cmd" flatten="true">
318
          <fileset dir="${source-cmd-n.dir}">
319
            <include name="**/Transform.cs"/>
320
            <include name="**/Query.cs"/>
321
            <include name="**/Validate.cs"/>
322
          </fileset>
323
        </copy>
324
        
325
      <mkdir dir="${temp-src-nc.dir}/samples"/>
326
        <copy todir="${temp-src-nc.dir}/samples">
327
          <fileset dir="${source-samples-n.dir}">
328
            <include name="**/*.cs"/>
329
          </fileset>
330
        </copy>
331
    </target>
332

    
333
    <target name="preprocess-hen" depends="copysrc-hen">
334
        <preprocess
335
            source="${temp-src-nj.dir}/hen"
336
            destination="${temp-src-prep0-hen.dir}"
337
            verbose="false">
338
        <global name="DOTNET" value="true"/>
339
        <global name="SAXONC" value="false"/>
340
        <global name="EE" value="false"/>
341
        <global name="PE" value="false"/>
342
       </preprocess>
343
       <echo>Done preprocessing for HEN.</echo>
344
 
345
       <copy todir="${temp-src-prep-hen.dir}">
346
           <fileset dir="${temp-src-prep0-hen.dir}"/>
347
           <filterchain>
348
              <linecontains negate="true">
349
                 <contains value="import com.saxonica"/>
350
              </linecontains>
351
              <linecontains negate="true">
352
                 <contains value="net.sf.saxon.xpath.JAXPXPathStaticContext"/>
353
              </linecontains>
354
           </filterchain>
355
       </copy>
356
       <echo>Import filtering for HEN complete.</echo>
357
    </target>
358

    
359

    
360

    
361
    <target name="preprocess-pen" depends="copysrc-pen">
362
        <preprocess
363
            source="${temp-src-nj.dir}/pen"
364
            destination="${temp-src-prep0-pen.dir}"
365
            verbose="false">
366
        <global name="DOTNET" value="true"/>
367
        <global name="PE" value="true"/>
368
        <global name="SAXONC" value="false"/>
369
        <global name="HOF" value="true"/>
370
        <global name="EE" value="false"/>
371
       </preprocess>
372
       <echo>Done preprocessing for PEN.</echo>
373
       <copy todir="${temp-src-prep-pen.dir}">
374
           <fileset dir="${temp-src-prep0-pen.dir}"/>
375
           <filterchain>
376
              <linecontains negate="true">
377
                 <contains value="import com.saxonica.ee"/>
378
              </linecontains>
379
              <linecontains negate="true">
380
                 <contains value="import com.saxonica.config.ee"/>
381
              </linecontains>
382
              <linecontains negate="true">
383
                 <contains value="net.sf.saxon.xpath.JAXPXPathStaticContext"/>
384
              </linecontains>
385
           </filterchain>
386
       </copy>
387

    
388
       <echo>Import filtering for PEN complete.</echo>
389
    </target>
390

    
391

    
392

    
393
    <target name="preprocess-een" depends="copysrc-een">
394
        <preprocess
395
                    source="${temp-src-nj.dir}/een"
396
                    destination="${temp-src-prep0-een.dir}"
397
                    verbose="false">
398
            <global name="DOTNET" value="true"/>
399
            <global name="EE" value="true"/>
400
            <global name="SAXONC" value="false"/>
401
            <global name="PE" value="false"/>
402
            <global name="STREAM" value="true"/>
403
            <global name="HOF" value="true"/>
404
            <global name="BYTECODE" value="true"/>
405
            <global name="SCHEMA" value="true"/>
406
       </preprocess>
407
       <echo>Done preprocessing for EEN.</echo>
408
       <copy todir="${temp-src-prep-een.dir}">
409
           <fileset dir="${temp-src-prep0-een.dir}"/>
410
           <filterchain>
411
              <linecontains negate="true">
412
                 <contains value="net.sf.saxon.xpath.JAXPXPathStaticContext"/>
413
              </linecontains>
414
              <linecontains negate="true">
415
                 <contains value="import com.saxonica.ee.jaxp.SchemaFactoryImpl"/>
416
              </linecontains>
417
           </filterchain>
418
       </copy>
419
         <echo>Import filtering for EEN complete.</echo>
420
    </target>
421
                      
422
    <target name="compile-hen" description="Compile Saxon Java classes for the .NET product"
423
            depends="copysource-development-n, preprocess-hen">
424
        <mkdir dir="${classes-n.dir}"/>
425
        <mkdir dir="${classes-n.dir}/he"/>
426
        <echo message="Compile with debug = ${build.debug}, debuglevel = ${build.debuglevel}"/>
427
        <javac debug="${build.debug}" debuglevel="${build.debuglevel}" 
428
            deprecation="${build.deprecation}" destdir="${classes-n.dir}"
429
            optimize="${build.optimize}" srcdir="${temp-src-prep-hen.dir}" source="${build.compiler.source}"
430
            target="${build.compiler.target}"
431
            includeantruntime="false">
432
            <include name="net/**"/>
433
            <classpath>
434
                <path refid="classpath-n"/>
435
            </classpath>
436
        </javac>
437
    </target>
438

    
439
    <target name="compile-pen" description="Compile Saxon Java classes for the .NET product"
440
            depends="copysource-development-n, preprocess-pen">
441
        <mkdir dir="${classes-n.dir}"/>
442
        <mkdir dir="${classes-n.dir}/pe"/>
443
        <echo message="Compile with debug = ${build.debug}, debuglevel = ${build.debuglevel}"/>
444
        <javac debug="${build.debug}" debuglevel="${build.debuglevel}"
445
            deprecation="${build.deprecation}" destdir="${classes-n.dir}"
446
            optimize="${build.optimize}" srcdir="${temp-src-prep-pen.dir}" source="${build.compiler.source}"
447
            target="${build.compiler.target}"
448
            includeAntRuntime="false">
449
            <include name="net/**"/>
450
            <include name="com/saxonica/**"/>
451
            <classpath>
452
                <path refid="classpath-n"/>
453
            </classpath>
454
        </javac>
455
    </target>
456

    
457
    <target name="compile-een" description="Compile Saxon Java classes for the .NET product"
458
            depends="copysource-development-n, preprocess-een">
459
        <mkdir dir="${classes-n.dir}"/>
460
        <mkdir dir="${classes-n.dir}/ee"/>
461
        <echo message="Compile with debug = ${build.debug}, debuglevel = ${build.debuglevel}"/>
462
        <javac debug="${build.debug}" debuglevel="${build.debuglevel}"
463
            deprecation="${build.deprecation}" destdir="${classes-n.dir}"
464
            optimize="${build.optimize}" srcdir="${temp-src-prep-een.dir}" source="${build.compiler.source}"
465
            target="${build.compiler.target}"
466
            includeantruntime="false">
467
            <include name="net/**"/>
468
            <include name="com/saxonica/**"/>
469
            <exclude name="com/saxonica/testdriver/**" />
470
            <exclude name="net/sf/saxon/testdriver/**"/>
471
            <classpath>
472
                <path refid="classpath-n"/>
473
            </classpath>
474
        </javac>
475
    </target>
476
    
477
    <target name="jar-hen" description="Create Saxon-HE jar files for .NET" depends="compile-hen">
478
        <mkdir dir="${jar-n.dir}"/>
479
        <jar basedir="${classes-n.dir}" compress="${build.compress}" jarfile="${jar-n.dir}/saxon9he.jar">
480
            <include name="net/**/*.class"/>
481
            <exclude name="net/sf/saxon/option/**/*.class"/>
482
        </jar>
483
        <jar basedir="${development-data.dir}" compress="${build.compress}" jarfile="${jar-n.dir}/saxon9he.jar" update="true">
484
            <include name="**"/>
485
        </jar>
486
        <jar basedir="${classes-n.dir}/he" compress="${build.compress}" jarfile="${jar-n.dir}/saxon9he.jar" update="true" />
487

    
488
    </target> 
489
    
490
    <target name="jar-pen" description="Create Saxon-PE jar files for .NET" depends="compile-pen">
491
        <mkdir dir="${jar-n.dir}"/>
492
        <jar basedir="${classes-n.dir}" compress="${build.compress}" jarfile="${jar-n.dir}/saxon9pe.jar">
493
            <include name="net/**/*.class"/>
494
            <exclude name="net/sf/saxon/ant/*.class"/>
495
            <exclude name="**/sql/**/*.class"/>
496
            <include name="com/saxonica/**/*.class"/>
497
            <exclude name="com/saxonica/bytecode/**/*.class"/>
498
            <exclude name="com/saxonica/jaxp/**/**/*.class"/>
499
            <exclude name="com/saxonica/schema/**/*.class"/>
500
            <exclude name="com/saxonica/stream/**/*.class"/>
501
            <exclude name="com/saxonica/testdriver/**/*.class"/>
502
            <exclude name="net/sf/saxon/testdriver/**/*.class"/>
503
            <exclude name="com/saxonica/update/**/*.class"/>
504
            <exclude name="com/saxonica/validate/**/*.class"/>
505
            <exclude name="com/saxonica/expr/CastToUnion.class"/>
506
            <exclude name="com/saxonica/expr/CastableToUnion.class"/>
507
            <exclude name="com/saxonica/expr/CastableToList.class"/>
508
            <exclude name="com/saxonica/Validate.class"/>
509
            <exclude name="com/saxonica/config/EnterpriseConfiguration.class"/>
510
            <exclude name="com/saxonica/config/EnterpriseConfiguration$SurrogateSchema.class"/>
511
            <exclude name="com/saxonica/config/EnterpriseConfiguration$1.class"/>
512
            <exclude name="com/saxonica/config/ProfessionalTransformerFactory.class"/>
513
            <exclude name="com/saxonica/config/ProfessionalXPathFactory.class"/>
514
            <exclude name="com/saxonica/config/EnterpriseTransformerFactory.class"/>
515
            <exclude name="com/saxonica/config/StreamingTransformerFactory.class"/>
516
            <exclude name="com/saxonica/config/EnterpriseXPathFactory.class"/>
517
            <exclude name="com/saxonica/config/DynamicLoaderEE.class"/>
518
            <exclude name="com/saxonica/config/StandardSchemaResolver.class"/>
519
            <exclude name="com/saxonica/expr/ee/*.class"/>   
520
        </jar>
521
        <jar basedir="${development-data.dir}" compress="${build.compress}" jarfile="${jar-n.dir}/saxon9pe.jar" update="true">
522
            <include name="**"/>
523
        </jar>
524
        <jar basedir="${classes-n.dir}/pe" compress="${build.compress}" jarfile="${jar-n.dir}/saxon9pe.jar" update="true" />
525

    
526
          <!-- Include the ICU classes which have been built separately, either in the main JAR or in a subsidiary -->
527
        <!--<jar  basedir="${icu4j.classes.dir}"
528
            compress="${build.compress}" jarfile="${jar-n.dir}/saxon9pe.jar" update="true">
529
            <include name="**"/>
530
        </jar>-->
531
        <!--<jar if:true="${ICU.separate.JARS}" basedir="${icu4j.classes.dir}" compress="${build.compress}"
532
            jarfile="${product.dir}/pej/saxon9-icu.jar">
533
            <include name="**"/>
534
        </jar>   -->
535

    
536
    </target>     
537
    
538
    <target name="jar-een" description="Create Saxon-EE jar files for .NET" depends="compile-een">
539
        <mkdir dir="${jar-n.dir}"/>
540
        <jar basedir="${classes-n.dir}" compress="${build.compress}" jarfile="${jar-n.dir}/saxon9ee.jar">
541
            <include name="net/**/*.class"/>
542
            <include name="com/saxonica/**/*.class"/>
543
            <include name="org/objectweb/**/*.class"/>
544
            <exclude name="com/saxonica/config/EnterpriseTransformerFactory.class"/>
545
            <exclude name="com/saxonica/config/EnterpriseXPathFactory.class"/>
546
        </jar>
547
         <jar basedir="${development-data.dir}" compress="${build.compress}" jarfile="${jar-n.dir}/saxon9ee.jar" update="true">
548
            <include name="**"/>
549
        </jar>
550
        <jar basedir="${classes-n.dir}/ee" compress="${build.compress}" jarfile="${jar-n.dir}/saxon9ee.jar" update="true" />
551

    
552

    
553
                <!-- Include the ICU classes which have been built separately, unless they are in a separate JAR -->
554
        <!--<jar  basedir="${icu4j.classes.dir}" compress="${build.compress}"
555
            jarfile="${jar-n.dir}/saxon9ee.jar" update="true">
556
            <include name="**"/>
557
        </jar>-->
558

    
559
    </target>
560
    
561
    <!--<target name="dll-n-prepare" description="Create DLLs for .NET" depends="jar-hen, jar-pen, jar-een">     -->
562
         <target name="dll-n-prepare" description="Create DLLs for .NET" depends="jar-een">
563
        <taskdef name="ikvmc" classname="net.ikvm.ant.IkvmcTask" classpath="${lib.dir}/ant-ikvmc.0.4.1.jar"/>
564
        <mkdir dir="${dll-n.dir}"/>
565
        <copy todir="${jar-n.dir}">
566
          <fileset dir="${lib.dir}">
567
            <include name="tagsoup-1.2.1.jar"/>
568
            <include name="mail.jar"/>
569
            <include name="asm-${asm.version}.jar"/>
570
            <include name="asm-analysis-${asm.version}.jar"/>
571
            <include name="asm-commons-${asm.version}.jar"/>
572
            <include name="asm-tree-${asm.version}.jar"/>
573
            <include name="asm-util-${asm.version}.jar"/>
574
            <include name="icu4j-59_1.jar"/>
575
          </fileset>
576
        </copy>
577

    
578
        <!--
579
            Invoke IKVMC to cross-compile the JAR files into DLLs
580
        -->
581
      <!--<property name="os.dir" value="${ikvm.dir}/bin/runMono.bat"  />
582
      <property name="osDebug.dir" value="${ikvm.dir}/bin/runMonoDebug.bat"  /> -->
583

    
584
      <condition  property="os.dir" value="${ikvm.dir}/bin/runMono.bat">
585
        <or>
586
          <os family="unix"/>
587
          <os family="mac"/>
588
        </or>
589
      </condition>
590
      <condition property="os.dir" value="${ikvm.dir}/bin/ikvmc.exe">
591
        <os family="windows"/>
592
      </condition>
593
      
594
      <condition  property="osDebug.dir" value="${ikvm.dir}/bin/runMonoDebug.bat">
595
        <or>
596
          <os family="unix"/>
597
          <os family="mac"/>
598
        </or>
599
      </condition>
600
      <condition property="osDebug.dir" value="${ikvm.dir}/bin/ikvmc.exe">
601
        <os family="windows"/>
602
      </condition>
603
      
604
      <echo>
605
        osDir = ${os.dir}
606
        osDebugDir = ${osDebug.dir}
607
      </echo>
608
      
609
    </target>
610
    
611
    <target name="dll-hen" description="Create DLLs for .NET" depends="jar-hen, dll-n-prepare">
612
        <taskdef name="ikvmc" classname="net.ikvm.ant.IkvmcTask" classpath="${lib.dir}/ant-ikvmc.0.4.1.jar"/>
613
    
614
        <mkdir dir="${dll-n.dir}/he"/>
615
      
616
                <copy todir="${dll-n.dir}/he">
617
            <fileset dir="${dll-n.dir}">
618
                   <include name="IKVM.OpenJDK.Core.dll"/>
619
                   <include name="IKVM.OpenJDK.Charsets.dll"/>
620
                   <include name="IKVM.OpenJDK.Text.dll"/>
621
                   <include name="IKVM.OpenJDK.Util.dll"/>
622
                   <include name="IKVM.OpenJDK.XML.API.dll"/>
623
                   <include name="xercesImpl.dll"/>
624
              <include name="IKVM.Runtime.dll"/>
625
            </fileset>
626
        </copy>
627

    
628
        <!--  replace the attribute IKVMC with the following attribute home="${ikvm.dir}" -->
629
 
630
        <ikvmc IKVMC="${os.dir}"
631
               assembly="saxon9he" target="library" keyfile="${saxondotnet.snk}" version="${version}"
632
               debug="false"
633
               srcpath="${temp-src-prep-hen.dir}"
634
               out="${basedir}/${dll-n.dir}/he/saxon9he.dll"
635
               verbose="true">
636
          <fileset dir="${basedir}/${jar-n.dir}">
637
            <include name="saxon9he.jar"/>
638
          </fileset>
639
          <fileset dir="${lib.dir}">
640
              <include name="xerces.jar"/>
641
          </fileset>
642
          <reference path="mscorlib.dll"/>
643
          <reference path="System.Xml.dll"/>
644
          <reference path="System.dll"/>
645
          <reference path="${dll-n.dir}/he/IKVM.OpenJDK.Core.dll"/>
646
          <reference path="${dll-n.dir}/he/IKVM.OpenJDK.Charsets.dll"/>
647
          <reference path="${dll-n.dir}/he/IKVM.OpenJDK.Text.dll"/>
648
          <reference path="${dll-n.dir}/he/IKVM.OpenJDK.Util.dll"/>
649
          <reference path="${dll-n.dir}/he/IKVM.OpenJDK.XML.API.dll"/>
650
       </ikvmc>
651
      
652
    </target>
653
    
654
    <target name="dll-pen" description="Create DLLs for .NET" depends="jar-pen, dll-n-prepare">
655
        <taskdef name="ikvmc" classname="net.ikvm.ant.IkvmcTask" classpath="${lib.dir}/ant-ikvmc.0.4.1.jar"/>      
656

    
657
        <mkdir dir="${dll-n.dir}/pe"/>      
658
            <copy todir="${dll-n.dir}/pe">
659
            <fileset dir="${dll-n.dir}">
660
                   <include name="IKVM.OpenJDK.Core.dll"/>
661
                   <include name="IKVM.OpenJDK.Charsets.dll"/>
662
                   <include name="IKVM.OpenJDK.Security.dll"/>
663
                   <include name="IKVM.OpenJDK.Text.dll"/>
664
                   <include name="IKVM.OpenJDK.Util.dll"/>
665
                   <include name="IKVM.OpenJDK.XML.API.dll"/>
666
                   <include name="xercesImpl.dll"/>
667
              <include name="IKVM.Runtime.dll"/>
668
            </fileset>
669
        </copy>
670
        
671
      <ikvmc IKVMC="${os.dir}"
672
               assembly="saxon9pe" 
673
               target="library" 
674
               keyfile="${saxondotnet.snk}" 
675
               version="${version}"
676
               debug="false" 
677
               srcpath="${temp-src-prep-pen.dir}"
678
               out="${basedir}/${dll-n.dir}/pe/saxon9pe.dll"
679
               verbose="true">
680
          <fileset dir="${basedir}/${jar-n.dir}">
681
            <include name="saxon9pe.jar"/>
682
          </fileset>
683
          <fileset dir="${lib.dir}">
684
              <include name="xerces.jar"/>
685
              <include name="tagsoup-1.2.1.jar"/>
686
              <include name="mail.jar"/>
687
              <include name="icu4j-59_1.jar"/>
688
          </fileset>
689
          <reference path="mscorlib.dll"/>
690
          <reference path="System.Xml.dll"/>
691
          <reference path="System.dll"/>
692
          <reference path="${dll-n.dir}/pe/IKVM.OpenJDK.Core.dll"/>
693
          <reference path="${dll-n.dir}/pe/IKVM.OpenJDK.Charsets.dll"/>
694
          <reference path="${dll-n.dir}/pe/IKVM.OpenJDK.Security.dll"/>
695
          <reference path="${dll-n.dir}/pe/IKVM.OpenJDK.Text.dll"/>
696
          <reference path="${dll-n.dir}/pe/IKVM.OpenJDK.Util.dll"/>
697
          <reference path="${dll-n.dir}/pe/IKVM.OpenJDK.XML.API.dll"/>
698
          <reference path="System.Security.dll"/>
699
      </ikvmc>
700

    
701
    </target>
702
      
703
    <target name="dll-een" description="Create DLLs for .NET" depends="jar-een, dll-n-prepare">
704
        <taskdef name="ikvmc" classname="net.ikvm.ant.IkvmcTask" classpath="${lib.dir}/ant-ikvmc.0.4.1.jar"/>      
705

    
706
        <mkdir dir="${dll-n.dir}/ee"/>
707
      
708
                <copy todir="${dll-n.dir}/ee">
709
            <fileset dir="${ikvm.dir}/bin">
710
                   <include name="IKVM.OpenJDK.Core.dll"/>
711
                   <include name="IKVM.OpenJDK.Charsets.dll"/>
712
                   <include name="IKVM.OpenJDK.Security.dll"/>
713
                   <include name="IKVM.OpenJDK.Text.dll"/>
714
                   <include name="IKVM.OpenJDK.Util.dll"/>
715
                   <include name="IKVM.OpenJDK.XML.API.dll"/>
716
                   <include name="xercesImpl.dll"/>
717
              <include name="IKVM.Runtime.dll"/>
718
            </fileset>
719
        </copy>
720
        
721
        <ikvmc IKVMC="${os.dir}"
722
               assembly="saxon9ee" 
723
               target="library" 
724
               keyfile="${saxondotnet.snk}" 
725
               version="${version}"
726
               debug="false"
727
               srcpath="${temp-src-prep-een.dir}"
728
               out="${basedir}/${dll-n.dir}/ee/saxon9ee.dll"
729
               verbose="true">
730
          <fileset dir="${basedir}/${jar-n.dir}">
731
            <include name="saxon9ee.jar"/>
732
          </fileset>
733
          <fileset dir="${lib.dir}">
734
              <include name="xerces.jar"/>
735
            <include name="tagsoup-1.2.1.jar"/>
736
            <include name="mail.jar"/>
737
            <include name="asm-${asm.version}.jar"/>
738
            <include name="asm-analysis-${asm.version}.jar"/>
739
            <include name="asm-commons-${asm.version}.jar"/>
740
            <include name="asm-tree-${asm.version}.jar"/>
741
            <include name="asm-util-${asm.version}.jar"/>
742
              <include name="icu4j-59_1.jar"/>
743
          </fileset>
744
          <reference path="mscorlib.dll"/>
745
          <reference path="System.dll"/>
746
          <reference path="System.Security.dll"/>
747
          <reference path="System.Xml.dll"/>
748
          <reference path="${dll-n.dir}/ee/IKVM.OpenJDK.Core.dll"/>
749
          <reference path="${dll-n.dir}/ee/IKVM.OpenJDK.Charsets.dll"/>
750
          <reference path="${dll-n.dir}/ee/IKVM.OpenJDK.Security.dll"/>
751
          <reference path="${dll-n.dir}/ee/IKVM.OpenJDK.Text.dll"/>
752
          <reference path="${dll-n.dir}/ee/IKVM.OpenJDK.Util.dll"/>
753
          <reference path="${dll-n.dir}/ee/IKVM.OpenJDK.XML.API.dll"/>
754
          
755
        </ikvmc>
756
        
757
        <!-- Create a version of the DLL for debugging. Debugging in Visual Studio
758
             requires a version of the assembly that has no strong name. Currently
759
             we build this only for Enterprise Edition. The debugging version of the
760
             DLL plays no further part in the build, and is not included in the
761
             released product, but it can be used by linking it as a reference
762
             from the relevant client in Visual Studio, for example Transform.exe -->
763
        
764
        <echo>[saxon9ee-debug.dll]</echo>
765
        <ikvmc IKVMC="${osDebug.dir}"
766
               assembly="saxon9ee" 
767
               target="library"
768
               keyfile="${saxondotnet.snk}"
769
               version="${version}"
770
               debug="false"
771
               srcpath="${temp-src-prep-een.dir}"
772
               out="${basedir}/${dll-n.dir}/ee/saxon9ee-debug.dll"
773
               verbose="true">
774
          <fileset dir="${basedir}/${jar-n.dir}">
775
            <include name="saxon9ee.jar"/>
776
          </fileset>
777
          <fileset dir="${lib.dir}">
778
              <include name="xerces.jar"/>
779
              <include name="tagsoup-1.2.1.jar"/>
780
            <include name="mail.jar"/>
781
            <include name="asm-${asm.version}.jar"/>
782
            <include name="asm-analysis-${asm.version}.jar"/>
783
            <include name="asm-commons-${asm.version}.jar"/>
784
            <include name="asm-tree-${asm.version}.jar"/>
785
            <include name="asm-util-${asm.version}.jar"/>
786
              <include name="icu4j-59_1.jar" />
787
          </fileset>
788
          <reference path="mscorlib.dll"/>
789
          <reference path="System.Xml.dll"/>
790
          <reference path="System.dll"/>
791
          <reference path="${dll-n.dir}/ee/IKVM.OpenJDK.Core.dll"/>
792
          <reference path="${dll-n.dir}/ee/IKVM.OpenJDK.Charsets.dll"/>
793
          <reference path="${dll-n.dir}/ee/IKVM.OpenJDK.Security.dll"/>
794
          <reference path="${dll-n.dir}/ee/IKVM.OpenJDK.Text.dll"/>
795
          <reference path="${dll-n.dir}/ee/IKVM.OpenJDK.Util.dll"/>
796
          <reference path="${dll-n.dir}/ee/IKVM.OpenJDK.XML.API.dll"/>
797
          <reference path="System.Security.dll"/>
798
        </ikvmc>
799

    
800
        <!-- NB Remember to add the dll's to the GAC - it doesn't work if you don't -->
801
        
802
    </target>
803
    
804
    <target name="dll-n" depends="dll-hen, dll-pen, dll-een"/>
805
    
806
    <target name="csharp-hen" description="Compile C# source for .NET commands and API library (HE)"
807
            xmlns:dn="antlib:org.apache.ant.dotnet" depends="dll-hen"
808
        > 
809
        
810
        <taskdef 
811
            uri="antlib:org.apache.ant.dotnet">
812
            <classpath>
813
              <pathelement location="${lib.dir}/ant-dotnet-1.1.jar"/>
814
            </classpath>
815
        </taskdef>
816

    
817

    
818
                
819
                <!-- API library DLL -->
820
                
821
                <dn:csc targetType="library" outputFile="${basedir}/${dll-n.dir}/he/saxon9he-api.dll"
822
                     extraOptions="-keyfile:${saxondotnet.snk}"
823
                     executable="${csharp.compiler}">
824
                     <src dir="${basedir}/${temp-src-nc.dir}/api/Saxon.Api" includes="*.cs Properties/AssemblyInfo.cs"/>
825
                     <reference dir="${basedir}/${dll-n.dir}/he">
826
                        <!--<include name="charsets.dll"/>-->
827
                        <include name="IKVM.OpenJDK.Core.dll"/>
828
                     <include name="IKVM.OpenJDK.Charsets.dll"/>
829
                     <include name="IKVM.OpenJDK.Text.dll"/>
830
                     <include name="IKVM.OpenJDK.Util.dll"/>
831
                     <include name="IKVM.OpenJDK.XML.API.dll"/>
832
                     <include name="xercesImpl.dll"/>
833
                        <include name="IKVM.Runtime.dll"/>
834
                        <include name="saxon9he.dll"/>
835
                     </reference>
836
                </dn:csc>
837
                
838
                <!-- Transform, Query, Validate commands -->
839
                
840
                <echo file="${basedir}/${temp-src-nc.dir}/cmd/AssemblyInfo.cs">
841
                  using System.Reflection;
842
          using System.Runtime.CompilerServices;
843
          using System.Runtime.InteropServices;
844
          [assembly: AssemblyCompany("Saxonica")]
845
          [assembly: AssemblyProduct("Saxon.HE")]
846
          [assembly: AssemblyCopyright("Copyright © Saxonica 2017")]
847
          [assembly: AssemblyVersion("${version}")]
848
          [assembly: AssemblyFileVersion("${version}")]
849
        </echo>
850
                
851
                <dn:csc targetType="exe" 
852
                     win32icon="${icon}"
853
                     outputFile="${basedir}/${dll-n.dir}/he/Transform.exe"
854
                     extraOptions="-keyfile:${saxondotnet.snk}"
855
                     executable="${csharp.compiler}" >
856
                    <src dir="${basedir}/${temp-src-nc.dir}/cmd" includes="Transform.cs AssemblyInfo.cs"/>
857
                     <reference dir="${basedir}/${dll-n.dir}/he">
858
                        <include name="IKVM.OpenJDK.Core.dll"/>
859
                     <include name="IKVM.OpenJDK.Charsets.dll"/>
860
                     <include name="IKVM.OpenJDK.Text.dll"/>
861
                     <include name="IKVM.OpenJDK.Util.dll"/>
862
                     <include name="IKVM.OpenJDK.XML.API.dll"/>
863
                     <include name="xercesImpl.dll"/>
864
                        <include name="IKVM.Runtime.dll"/>
865
                        <!--<include name="charsets.dll"/>-->
866
                        <include name="saxon9he.dll"/>
867
                     </reference>
868
                </dn:csc>
869
                
870
                <dn:csc targetType="exe" win32icon="${icon}"
871
                     outputFile="${basedir}/${dll-n.dir}/he/Query.exe"
872
                     extraOptions="-keyfile:${saxondotnet.snk}"
873
                     executable="${csharp.compiler}">
874
                     <src dir="${basedir}/${temp-src-nc.dir}/cmd" includes="Query.cs AssemblyInfo.cs"/>
875
                     <reference dir="${basedir}/${dll-n.dir}/he">
876
                        <include name="IKVM.OpenJDK.Core.dll"/>
877
                     <include name="IKVM.OpenJDK.Charsets.dll"/>
878
                     <include name="IKVM.OpenJDK.Text.dll"/>
879
                     <include name="IKVM.OpenJDK.Util.dll"/>
880
                     <include name="IKVM.OpenJDK.XML.API.dll"/>
881
                     <include name="xercesImpl.dll"/>
882
                        <include name="IKVM.Runtime.dll"/>
883
                        <!--<include name="charsets.dll"/>-->
884
                        <include name="saxon9he.dll"/>
885
                     </reference>
886
                </dn:csc>
887
                
888
    </target>
889
    
890
    <target name="csharp-pen" description="Compile C# source for .NET commands and API library (PE)"
891
            xmlns:dn="antlib:org.apache.ant.dotnet" depends="dll-pen"
892
        > <!---->
893
        
894
        <taskdef 
895
            uri="antlib:org.apache.ant.dotnet">
896
            <classpath>
897
              <pathelement location="${lib.dir}/ant-dotnet-1.1.jar"/>
898
            </classpath>
899
          </taskdef>
900

    
901
                <mkdir dir="${dll-n.dir}/pe"/>
902
                
903

    
904
                
905
                <!-- API library DLL -->
906
                
907
                <dn:csc targetType="library" outputFile="${basedir}/${dll-n.dir}/pe/saxon9pe-api.dll"
908
                     extraOptions="-keyfile:${saxondotnet.snk}"
909
                     executable="${csharp.compiler}">
910
                     <src dir="${basedir}/${temp-src-nc.dir}/api/Saxon.Api" includes="*.cs Properties/AssemblyInfo.cs"/>
911
                     <reference dir="${basedir}/${dll-n.dir}/pe">
912
                        <!--<include name="charsets.dll"/>-->
913
                        <include name="IKVM.OpenJDK.Core.dll"/>
914
                     <include name="IKVM.OpenJDK.Charsets.dll"/>
915
                     <include name="IKVM.OpenJDK.Security.dll"/>
916
                     <include name="IKVM.OpenJDK.Text.dll"/>
917
                     <include name="IKVM.OpenJDK.Util.dll"/>
918
                     <include name="IKVM.OpenJDK.XML.API.dll"/>
919
                     <include name="IKVM.Runtime.dll"/>
920
                        <include name="saxon9pe.dll"/>
921
                     </reference>
922
                </dn:csc>
923
                
924
                <!-- Transform, Query, Validate commands -->
925
                
926
                <echo file="${basedir}/${temp-src-nc.dir}/cmd/AssemblyInfo.cs">
927
                  using System.Reflection;
928
          using System.Runtime.CompilerServices;
929
          using System.Runtime.InteropServices;
930
          [assembly: AssemblyCompany("Saxonica")]
931
          [assembly: AssemblyProduct("Saxon.PE")]
932
          [assembly: AssemblyCopyright("Copyright © Saxonica 2017")]
933
          [assembly: AssemblyVersion("${version}")]
934
          [assembly: AssemblyFileVersion("${version}")]
935
        </echo>
936
                
937
                <dn:csc targetType="exe" win32icon="${icon}"
938
                     outputFile="${basedir}/${dll-n.dir}/pe/Transform.exe"
939
                     extraOptions="-keyfile:${saxondotnet.snk}"
940
                     executable="${csharp.compiler}">
941
                     <src dir="${basedir}/${temp-src-nc.dir}/cmd" includes="Transform.cs AssemblyInfo.cs"/>
942
                     <reference dir="${basedir}/${dll-n.dir}/pe">
943
                        <include name="IKVM.OpenJDK.Core.dll"/>
944
                     <include name="IKVM.OpenJDK.Charsets.dll"/>
945
                     <include name="IKVM.OpenJDK.Security.dll"/>
946
                     <include name="IKVM.OpenJDK.Text.dll"/>
947
                     <include name="IKVM.OpenJDK.Util.dll"/>
948
                     <include name="IKVM.OpenJDK.XML.API.dll"/>
949
                        <include name="IKVM.Runtime.dll"/>
950
                        <!--<include name="charsets.dll"/>-->
951
                        <include name="saxon9pe.dll"/>
952
                     </reference>
953
                </dn:csc>
954
                
955
                <dn:csc targetType="exe" win32icon="${icon}"
956
                     outputFile="${basedir}/${dll-n.dir}/pe/Query.exe"
957
                     extraOptions="-keyfile:${saxondotnet.snk}"
958
                     executable="${csharp.compiler}">
959
                     <src dir="${basedir}/${temp-src-nc.dir}/cmd" includes="Query.cs AssemblyInfo.cs"/>
960
                     <reference dir="${basedir}/${dll-n.dir}/pe">
961
                        <include name="IKVM.OpenJDK.Core.dll"/>
962
                     <include name="IKVM.OpenJDK.Charsets.dll"/>
963
                     <include name="IKVM.OpenJDK.Security.dll"/>
964
                     <include name="IKVM.OpenJDK.Text.dll"/>
965
                     <include name="IKVM.OpenJDK.Util.dll"/>
966
                     <include name="IKVM.OpenJDK.XML.API.dll"/>
967
                        <include name="IKVM.Runtime.dll"/>
968
                        <!--<include name="charsets.dll"/>-->
969
                        <include name="saxon9pe.dll"/>
970
                     </reference>
971
                </dn:csc>
972

    
973
        <!--        <dn:csc targetType="exe" win32icon="${icon}"
974
                     outputFile="${basedir}/${dll-n.dir}/pe/StylesheetPackager.exe"
975
                     extraOptions="-keyfile:${saxondotnet.snk}"
976
                     executable="${csharp.compiler}">
977
                     <src dir="${basedir}/${temp-src-nc.dir}/cmd" includes="StylesheetPackager.cs AssemblyInfo.cs"/>
978
                     <reference dir="${basedir}/${dll-n.dir}/pe">
979
                        <include name="IKVM.OpenJDK.Core.dll"/>
980
                     <include name="IKVM.OpenJDK.Charsets.dll"/>
981
                     <include name="IKVM.OpenJDK.Security.dll"/>
982
                     <include name="IKVM.OpenJDK.Text.dll"/>
983
                     <include name="IKVM.OpenJDK.Util.dll"/>
984
                     <include name="IKVM.OpenJDK.XML.API.dll"/>
985
                        <include name="IKVM.Runtime.dll"/>
986
                   
987
                        <include name="saxon9pe.dll"/>
988
                     </reference>
989
                </dn:csc> -->
990

    
991
                
992
    </target>    
993
    
994
    <target name="csharp-een" description="Compile C# source for .NET commands and API library (EE)"
995
            xmlns:dn="antlib:org.apache.ant.dotnet" depends="dll-een"
996
        > <!---->
997
        
998
        <taskdef 
999
            uri="antlib:org.apache.ant.dotnet">
1000
            <classpath>
1001
              <pathelement location="${lib.dir}/ant-dotnet-1.1.jar"/>
1002
            </classpath>
1003
          </taskdef>
1004

    
1005
                <mkdir dir="${dll-n.dir}/ee"/>
1006
                
1007
                <copy todir="${dll-n.dir}/ee">
1008
            <fileset dir="${dll-n.dir}">
1009
                   <include name="IKVM.OpenJDK.Core.dll"/>
1010
                   <include name="IKVM.OpenJDK.Charsets.dll"/>
1011
                   <include name="IKVM.OpenJDK.Security.dll"/>
1012
                   <include name="IKVM.OpenJDK.Text.dll"/>
1013
                   <include name="IKVM.OpenJDK.Util.dll"/>
1014
                   <include name="IKVM.OpenJDK.XML.API.dll"/>
1015
              <include name="IKVM.Runtime.dll"/>
1016
              <include name="saxon9ee.dll"/>
1017
              <include name="saxon9ee-debug.dll"/>
1018
            </fileset>
1019
        </copy>
1020
                
1021
                <!-- API library DLL -->
1022
                
1023
                <!-- Note, this is not built for debugging in Visual Studio. Such a version
1024
                     is best built within VS itself -->
1025
                
1026
                <dn:csc targetType="library" outputFile="${basedir}/${dll-n.dir}/ee/saxon9ee-api.dll"
1027
                     docFile="${doctemp-n.dir}/apidoc.xml"
1028
                     extraOptions="-keyfile:${saxondotnet.snk}"
1029
                     executable="${csharp.compiler}">
1030
                     <src dir="${basedir}/${temp-src-nc.dir}/api/Saxon.Api" includes="*.cs Properties/AssemblyInfo.cs"/>
1031
                     <reference dir="${basedir}/${dll-n.dir}/ee">
1032
                        <!--<include name="charsets.dll"/>-->
1033
                        <include name="IKVM.OpenJDK.Core.dll"/>
1034
                     <include name="IKVM.OpenJDK.Charsets.dll"/>
1035
                     <include name="IKVM.OpenJDK.Security.dll"/>
1036
                     <include name="IKVM.OpenJDK.Text.dll"/>
1037
                     <include name="IKVM.OpenJDK.Util.dll"/>
1038
                     <include name="IKVM.OpenJDK.XML.API.dll"/>
1039
                        <include name="IKVM.Runtime.dll"/>
1040
                        <include name="saxon9ee.dll"/>
1041
                     </reference>
1042
                </dn:csc>
1043
                
1044
                <!-- Transform, Query, Validate commands -->
1045
                
1046
                <echo file="${basedir}/${temp-src-nc.dir}/cmd/AssemblyInfo.cs">
1047
                  using System.Reflection;
1048
          using System.Runtime.CompilerServices;
1049
          using System.Runtime.InteropServices;
1050
          [assembly: AssemblyCompany("Saxonica")]
1051
          [assembly: AssemblyProduct("Saxon.EE")]
1052
          [assembly: AssemblyCopyright("Copyright © Saxonica 2017")]
1053
          [assembly: AssemblyVersion("${version}")]
1054
          [assembly: AssemblyFileVersion("${version}")]
1055
        </echo>                
1056
                
1057
                <dn:csc targetType="exe" win32icon="${icon}"
1058
                     outputFile="${basedir}/${dll-n.dir}/ee/Transform.exe"
1059
                     extraOptions="-keyfile:${saxondotnet.snk}"
1060
                     executable="${csharp.compiler}">
1061
                     <src dir="${basedir}/${temp-src-nc.dir}/cmd" includes="Transform.cs AssemblyInfo.cs"/>
1062
                     <reference dir="${basedir}/${dll-n.dir}/ee">
1063
                        <include name="IKVM.OpenJDK.Core.dll"/>
1064
                     <include name="IKVM.OpenJDK.Charsets.dll"/>
1065
                     <include name="IKVM.OpenJDK.Security.dll"/>
1066
                     <include name="IKVM.OpenJDK.Text.dll"/>
1067
                     <include name="IKVM.OpenJDK.Util.dll"/>
1068
                     <include name="IKVM.OpenJDK.XML.API.dll"/>
1069
                        <include name="IKVM.Runtime.dll"/>
1070
                        <!--<include name="charsets.dll"/>-->
1071
                        <include name="saxon9ee.dll"/>
1072
                     </reference>
1073
                </dn:csc>
1074
                
1075
                <dn:csc targetType="exe" win32icon="${icon}"
1076
                     outputFile="${basedir}/${dll-n.dir}/ee/Query.exe"
1077
                     extraOptions="-keyfile:${saxondotnet.snk}"
1078
                     executable="${csharp.compiler}">
1079
                     <src dir="${basedir}/${temp-src-nc.dir}/cmd" includes="Query.cs AssemblyInfo.cs"/>
1080
                     <reference dir="${basedir}/${dll-n.dir}/ee">
1081
                        <include name="IKVM.OpenJDK.Core.dll"/>
1082
                     <include name="IKVM.OpenJDK.Charsets.dll"/>
1083
                     <include name="IKVM.OpenJDK.Security.dll"/>
1084
                     <include name="IKVM.OpenJDK.Text.dll"/>
1085
                     <include name="IKVM.OpenJDK.Util.dll"/>
1086
                     <include name="IKVM.OpenJDK.XML.API.dll"/>
1087
                        <include name="IKVM.Runtime.dll"/>
1088
                        <!--<include name="charsets.dll"/>-->
1089
                        <include name="saxon9ee.dll"/>
1090
                     </reference>
1091
                </dn:csc>
1092
                
1093
                <dn:csc targetType="exe" win32icon="${icon}"
1094
                     outputFile="${basedir}/${dll-n.dir}/ee/Validate.exe"
1095
                     extraOptions="-keyfile:${saxondotnet.snk}"
1096
                     executable="${csharp.compiler}">
1097
                     <src dir="${basedir}/${temp-src-nc.dir}/cmd" includes="Validate.cs AssemblyInfo.cs"/>
1098
                     <reference dir="${basedir}/${dll-n.dir}/ee">
1099
                        <include name="IKVM.OpenJDK.Core.dll"/>
1100
                     <include name="IKVM.OpenJDK.Charsets.dll"/>
1101
                     <include name="IKVM.OpenJDK.Security.dll"/>
1102
                     <include name="IKVM.OpenJDK.Text.dll"/>
1103
                     <include name="IKVM.OpenJDK.Util.dll"/>
1104
                     <include name="IKVM.OpenJDK.XML.API.dll"/>
1105
                        <include name="IKVM.Runtime.dll"/>
1106
                        <include name="saxon9ee.dll"/>
1107
                     </reference>
1108
                </dn:csc>
1109

    
1110
                <!--n:csc targetType="exe" win32icon="${icon}"
1111
                     outputFile="${basedir}/${dll-n.dir}/ee/StylesheetPackager.exe"
1112
                     extraOptions="-keyfile:${saxondotnet.snk}"
1113
                     executable="${csharp.compiler}">
1114
                     <src dir="${basedir}/${temp-src-nc.dir}/cmd" includes="StylesheetPackager.cs AssemblyInfo.cs"/>
1115
                     <reference dir="${basedir}/${dll-n.dir}/ee">
1116
                        <include name="IKVM.OpenJDK.Core.dll"/>
1117
                     <include name="IKVM.OpenJDK.Charsets.dll"/>
1118
                     <include name="IKVM.OpenJDK.Security.dll"/>
1119
                     <include name="IKVM.OpenJDK.Text.dll"/>
1120
                     <include name="IKVM.OpenJDK.Util.dll"/>
1121
                     <include name="IKVM.OpenJDK.XML.API.dll"/>
1122
                        <include name="IKVM.Runtime.dll"/>
1123
                        <include name="saxon9ee.dll"/>
1124
                     </reference>
1125
                </dn:csc>-->
1126
    </target> 
1127
  
1128
    
1129
   <target name="compile-samples-n" description="Compile C# source for .NET commands and API library (HE)"
1130
      xmlns:dn="antlib:org.apache.ant.dotnet" depends="csharp-hen, csharp-pen, csharp-een, samples-common"
1131
      >
1132

    
1133
       <taskdef 
1134
            uri="antlib:org.apache.ant.dotnet">
1135
            <classpath>
1136
              <pathelement location="${lib.dir}/ant-dotnet-1.1.jar"/>
1137
            </classpath>
1138
          </taskdef>
1139

    
1140
                <mkdir dir="${dll-n.dir}/samples"/>
1141
                <mkdir dir="${dll-n.dir}/tests"/>
1142
                
1143
                <!-- Sample applications and test drivers -->
1144
                
1145
                <dn:csc targetType="exe"
1146
                     outputFile="${basedir}/${dll-n.dir}/samples/ExamplesHE.exe"
1147
                     win32icon="${icon}"
1148
                     debug="true"
1149
                     executable="${csharp.compiler}">
1150
                     <src dir="${basedir}/${temp-src-nc.dir}/samples/ExamplesHE" includes="ExamplesHE.cs"/>
1151
                     <reference dir="${basedir}/${dll-n.dir}/he">
1152
                        <include name="IKVM.OpenJDK.*.dll"/>
1153
                        <include name="saxon9he-api.dll"/>
1154
                     </reference>
1155
                </dn:csc>
1156
                
1157
                <dn:csc targetType="exe"
1158
                     outputFile="${basedir}/${dll-n.dir}/samples/ExamplesPE.exe"
1159
                     win32icon="${icon}"
1160
                     debug="true"
1161
                     executable="${csharp.compiler}">
1162
                     <src dir="${basedir}/${temp-src-nc.dir}/samples/ExamplesPE" includes="ExamplesPE.cs SampleExtensions.cs"/>
1163
                     <reference dir="${basedir}/${dll-n.dir}/pe">
1164
                        <include name="IKVM.OpenJDK.*.dll"/>
1165
                        <include name="saxon9pe-api.dll"/>
1166
                        <include name="saxon9pe.dll"/>
1167
                     </reference>
1168
                </dn:csc>
1169
                
1170
                <dn:csc targetType="exe"
1171
                     outputFile="${basedir}/${dll-n.dir}/samples/ExamplesEE.exe"
1172
                     win32icon="${icon}"
1173
                     debug="true"
1174
                     executable="${csharp.compiler}">
1175
                     <src dir="${basedir}/${temp-src-nc.dir}/samples/ExamplesEE" includes="ExamplesEE.cs SampleExtensions.cs"/>
1176
                     <reference dir="${basedir}/${dll-n.dir}/ee">
1177
                        <include name="IKVM.OpenJDK.*.dll"/>
1178
                        <include name="saxon9ee-api.dll"/>
1179
                        <include name="saxon9ee.dll"/>
1180
                     </reference>
1181
                </dn:csc>
1182
       
1183
       <dn:csc targetType="exe"
1184
           outputFile="${basedir}/${dll-n.dir}/samples/XPathExample.exe"
1185
           win32icon="${icon}"
1186
           debug="true"
1187
           executable="${csharp.compiler}">
1188
           <src dir="${basedir}/${temp-src-nc.dir}/samples/XPathExample" includes="XPathExample.cs"/>
1189
           <reference dir="${basedir}/${dll-n.dir}/he">
1190
               <include name="IKVM.OpenJDK.*.dll"/>
1191
               <include name="saxon9he-api.dll"/>
1192
           </reference>
1193
       </dn:csc>
1194
                        
1195
                <dn:csc targetType="winexe"
1196
                     outputFile="${basedir}/${dll-n.dir}/samples/TestRunner.exe"
1197
                     win32icon="${icon}"
1198
                     debug="true"
1199
                     executable="${csharp.compiler}">
1200
                     <src dir="${vss-n.dir}/TestRunner9.8">
1201
                       <include name="*.cs"/>
1202
                     </src>
1203
                     <reference dir="${basedir}/${dll-n.dir}/ee">
1204
                        <include name="IKVM.OpenJDK.*.dll"/>
1205
                        <include name="saxon9ee-api.dll"/>
1206
                <include name="saxon9ee.dll"/>
1207
                     </reference>
1208
                </dn:csc>                                
1209
                
1210
                                      
1211

    
1212
    </target>
1213
    
1214
    <target name="product-hen" description="Assemble product.directory for Saxon-HE on .NET"
1215
                                                                                           depends="csharp-hen">
1216
      <mkdir dir="${build-hen.dir}/bin"/>                                                                                     
1217
      <copy todir="${build-hen.dir}/bin">
1218
        <fileset dir="${dll-n.dir}/he">
1219
               <include name="IKVM.OpenJDK.*.dll"/>
1220
          <include name="IKVM.Runtime.dll"/>
1221
          <include name="saxon9he.dll"/>
1222
          <include name="saxon9he-api.dll"/>
1223
          <include name="Query.exe"/>
1224
          <include name="Transform.exe"/>
1225
        </fileset>
1226
      </copy>
1227
      
1228
      
1229
      <copy file="${doctemp-n.dir}/apidoc.xml"
1230
        tofile="${build-hen.dir}/bin/saxon9he-api.xml"
1231
        overwrite="true"/>
1232

    
1233
    </target>
1234
    
1235
    <target name="product-pen" description="Assemble product.directory for Saxon-PE on .NET"
1236
                                                                                           depends="csharp-pen">
1237
      <mkdir dir="${build-pen.dir}/bin"/>                                                                                     
1238
      <copy todir="${build-pen.dir}/bin">
1239
        <fileset dir="${dll-n.dir}/pe">
1240
               <include name="IKVM.OpenJDK.*.dll"/>
1241
          <include name="IKVM.Runtime.dll"/>
1242
          <include name="saxon9pe.dll"/>
1243
          <include name="saxon9pe-api.dll"/>
1244
          <include name="Query.exe"/>
1245
          <include name="Transform.exe"/>
1246
          <!--<include name="StylesheetPackager.exe"/> -->
1247
        </fileset>
1248
      </copy>
1249
      
1250
      <copy file="${doctemp-n.dir}/apidoc.xml"
1251
        tofile="${build-pen.dir}/bin/saxon9pe-api.xml"
1252
        overwrite="true"/>
1253

    
1254
    </target>
1255
    
1256
    <target name="product-een" description="Assemble product.directory for Saxon-EE on .NET"
1257
                                                                                           depends="csharp-een">
1258
      <copy todir="${build-een.dir}/bin">
1259
        <fileset dir="${dll-n.dir}/ee">
1260
               <include name="IKVM.OpenJDK.*.dll"/>
1261
          <include name="IKVM.Runtime.dll"/>
1262
          <include name="saxon9ee.dll"/>
1263
          <include name="saxon9ee-api.dll"/>
1264
          <include name="Query.exe"/>
1265
          <include name="Transform.exe"/>
1266
          <include name="Validate.exe"/>
1267
          <!-- <include name="StylesheetPackager.exe"/> -->
1268
        </fileset> 
1269
      </copy> 
1270
      
1271
      <copy file="${doctemp-n.dir}/apidoc.xml"
1272
        tofile="${build-een.dir}/bin/saxon9ee-api.xml"
1273
        overwrite="true"/>
1274

    
1275
    </target>
1276
    
1277
    <target name="product-n" description="Assemble product.directories for Saxon on .NET"
1278
                                                                                           depends="product-hen, product-pen, product-een">
1279
                                                                                           
1280
       <!-- Following steps are for diagnostics only, they can be omitted if Powershell is not available -->
1281
       
1282
       <!-- Warning: this script has been known to pick up old DLLs from the GAC, and report on these
1283
            in preference to the DLLs in the target directory. If in doubt, copy the DLLs to the GAC and
1284
            then re-run. -->
1285
                                                                                           
1286
       <exec executable="c:/windows/system32/WindowsPowerShell/v1.0/powershell.exe">
1287
                  <arg line="MyDotNet/list-dependencies.ps1"/>
1288
                  <arg line="${build-hen.dir}/bin"/>
1289
           </exec>
1290
           
1291
           <exec executable="c:/windows/system32/WindowsPowerShell/v1.0/powershell.exe">
1292
                  <arg line="MyDotNet/list-dependencies.ps1"/>
1293
                  <arg line="${build-pen.dir}/bin"/>
1294
           </exec>
1295
           
1296
           <exec executable="c:/windows/system32/WindowsPowerShell/v1.0/powershell.exe">
1297
                  <arg line="MyDotNet/list-dependencies.ps1"/>
1298
                  <arg line="${build-een.dir}/bin"/>
1299
           </exec>
1300
           
1301
        </target>                                                                                          
1302
       
1303
    <target name="samples-n" description="Assemble release samples for .NET"
1304
                  depends="csharp-hen, compile-samples-n">
1305

    
1306
      <mkdir dir="${build-resources.dir}/samples/cs"/>
1307
      <copy todir="${build-resources.dir}/samples/cs"> 
1308
        <fileset dir="${temp-src-nc.dir}/samples">
1309
          <include name="*.cs"/>
1310
        </fileset>
1311
      </copy>
1312
      <mkdir dir="${build-resources.dir}/samples/cs/bin"/>
1313
      <copy todir="${build-resources.dir}/samples/cs/bin"> 
1314
        <fileset dir="${dll-n.dir}/samples">
1315
          <include name="*.exe"/>
1316
          <include name="*.dll"/>
1317
          <include name="*.pdb"/>
1318
        </fileset>
1319
      </copy>
1320
      <copy todir="${build-resources.dir}/samples/cs/bin"> 
1321
        <fileset dir="${dll-n.dir}/tests">
1322
          <include name="*.exe"/>
1323
          <include name="*.dll"/>
1324
          <include name="*.pdb"/>
1325
        </fileset>
1326
      </copy>
1327
        <copy todir="${samples.dir}/cs">
1328
            <fileset dir="${build-resources.dir}/samples/cs"/>
1329
        </copy>
1330
    </target>  
1331
    
1332
    
1333
    <target name="dotnetdoc-dependset">
1334
      <dependset>
1335
        <srcfilelist dir="${doctools-n.dir}" files="*.xsl"/> 
1336
        <srcfilelist dir="${temp-src-nc.dir}/api/Saxon.Api" files="*.cs"/>
1337
        <srcfilelist dir="${doctemp-n.dir}" files="*apidoc.xml"/>
1338
        <targetfileset dir="${doctemp-n.dir}" includes="names.xml"/>
1339
      </dependset>
1340
    </target>               
1341
                     
1342
    <!--<target name="product-dotnetdoc" description="Create .NET API documentation"
1343
        depends="copysource-development-n, csharp-hen, dotnetdoc-dependset" >-->
1344
  <target name="product-dotnetdoc" description="Create .NET API documentation" depends="csharp-een, dotnetdoc-dependset"
1345
    >
1346
        <mkdir dir="${docout-n.dir}"/>
1347
        
1348
        <xslt  in="${doctools-n.dir}/parsecs.xsl"
1349
                        style="${doctools-n.dir}/parsecs.xsl"
1350
                        out="${doctemp-n.dir}/names.xml">
1351
          <classpath refid="saxon.class.path"/>
1352
          <!--<param name="inputdir" expression="file:///${vss-n.dir}/csource/api/Saxon.Api"/>-->
1353
            <param name="inputdir" expression="${repository.uri}/build98/${temp-src-nc.dir}/api/Saxon.Api"/>
1354
                        <factory name="com.saxonica.config.EnterpriseTransformerFactory">
1355
                            <attribute name="http://saxon.sf.net/feature/initialTemplate" value="main"/>
1356
                        </factory>
1357
            </xslt>
1358
            <xslt  in="${doctemp-n.dir}/names.xml"
1359
                        style="${doctools-n.dir}/merge.xsl"
1360
                        out="${doctemp-n.dir}/merged.xml">
1361
              <classpath refid="saxon.class.path"/>
1362
                        <param name="names-file" expression="${baseurl}/${doctemp-n.dir}/names.xml"/>
1363
                        <param name="api-doc-file" expression="${baseurl}/${doctemp-n.dir}/apidoc.xml"/>
1364
                        <factory name="com.saxonica.config.EnterpriseTransformerFactory">
1365
                            <attribute name="http://saxon.sf.net/feature/initialTemplate" value="main"/>
1366
                        </factory>
1367
            </xslt>
1368
            <xslt in="${doctemp-n.dir}/merged.xml"
1369
                        style="${doctools-n.dir}/tohtml.xsl"
1370
                        out="${docout-n.dir}/index.html">
1371
              <classpath refid="saxon.class.path"/>
1372
                        <factory name="com.saxonica.config.EnterpriseTransformerFactory"/>
1373
            </xslt>
1374
              <xslt in="${doctemp-n.dir}/merged.xml"
1375
                        style="${doctools-n.dir}/convert-to-jel-package.xsl"
1376
                        out="${doctemp-n.dir}/dotnetdoc-xml/packages/Saxon.Api.xml">
1377
              <classpath refid="saxon.class.path"/>
1378
                        <factory name="com.saxonica.config.EnterpriseTransformerFactory"/>
1379
              </xslt>
1380
      
1381
      <copy todir="${viewer_app.dir}/dotnetdoc-xml" overwrite="true">
1382
          <fileset dir="${doctemp-n.dir}/dotnetdoc-xml">
1383
              <include name="*.*"/>
1384
              <include name="packages/*.*"/>
1385
          </fileset>
1386
      </copy>
1387
                                         
1388
      
1389
      <copy file="${doctools-n.dir}/stylesheet.css"
1390
              tofile="${build-resources.dir}/doc/dotnetdoc/stylesheet.css"
1391
              overwrite="true"/>
1392

    
1393
      <!--<copy file="${doctemp-n.dir}/apidoc.xml"
1394
              tofile="${build-resources.dir}/doc/dotnetdoc/apidoc.xml"
1395
              overwrite="true"/>-->
1396
    </target>  
1397
    
1398
    
1399
    <target name="release-userdoc-n" description="Add documentation info for releases">
1400
      <copy todir="${product.dir}/hen">
1401
        <fileset dir="${userdoc.dir}/saxon9/welcome">
1402
          <include name="doc/**"/>
1403
          <include name="notices/**"/>
1404
          <exclude name="notices/APACHE-TAGSOUP.txt"/>
1405
        </fileset>
1406
      </copy>
1407
      <copy todir="${product.dir}/pen">
1408
        <fileset dir="${userdoc.dir}/saxon9/welcome">
1409
          <include name="doc/**"/>
1410
          <include name="notices/**"/>
1411
        </fileset>
1412
      </copy>
1413
      <copy todir="${product.dir}/een">
1414
        <fileset dir="${userdoc.dir}/saxon9/welcome">
1415
          <include name="doc/**"/>
1416
          <include name="notices/**"/>
1417
        </fileset>
1418
      </copy>       
1419
                     
1420
    </target>
1421
                  
1422
    <target name="n" depends="product-n"
1423
                    description="Generate Saxon for the .NET platform"/>
1424
                    <!--, samples-n --> 
1425
                    
1426
    <target name="installer-hen" description="Create installer for Saxon-HE on .NET" depends="n">
1427
       <mkdir dir="${temp.dir}/n/installer"/> 
1428
       
1429
      <echo file="${temp.dir}/n/installer/he.iss">
1430
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING .ISS SCRIPT FILES!
1431
; Documentation is at http://www.jrsoftware.org/ishelp/
1432

    
1433
[Setup]
1434
AppName=Saxon-HE ${version}
1435
AppVerName=Saxon-HE ${version}
1436
AppPublisher=Saxonica
1437
AppVersion=${version}
1438
DefaultDirName=c:\Program Files\Saxonica\SaxonHE${major.version}N
1439
DefaultGroupName=Saxon-HE ${version}
1440
PrivilegesRequired=none
1441
Compression=lzma
1442
SolidCompression=yes
1443
SourceDir=..\..\..\${build-hen.dir}\bin
1444
OutputDir=${basedir}\${issue.dir}
1445
OutputBaseFilename=SaxonHE${versionh}N-setup
1446
AppCopyright=Copyright (c) 2017 Saxonica
1447

    
1448
[Files]
1449
; GAC Files
1450

    
1451
Source: "IKVM.Runtime.dll"; DestDir: "{app}\bin"; Flags: gacinstall; StrongAssemblyName: "IKVM.Runtime, ${ikvm.strongname}"
1452
Source: "IKVM.OpenJDK.Core.dll"; DestDir: "{app}\bin"; Flags: gacinstall; StrongAssemblyName: "IKVM.OpenJDK.Core, ${ikvm.strongname}"
1453
Source: "IKVM.OpenJDK.Charsets.dll"; DestDir: "{app}\bin"; Flags: gacinstall; StrongAssemblyName: "IKVM.OpenJDK.Charsets, ${ikvm.strongname}"
1454
Source: "IKVM.OpenJDK.Util.dll"; DestDir: "{app}\bin" ; Flags: gacinstall; StrongAssemblyName: "IKVM.OpenJDK.Util, ${ikvm.strongname}"
1455
Source: "IKVM.OpenJDK.Text.dll"; DestDir: "{app}\bin"; Flags: gacinstall; StrongAssemblyName: "IKVM.OpenJDK.Text, ${ikvm.strongname}"
1456
Source: "IKVM.OpenJDK.XML.API.dll"; DestDir: "{app}\bin"; Flags: gacinstall ; StrongAssemblyName: "IKVM.OpenJDK.XML.API, ${ikvm.strongname}"
1457
Source: "saxon9he.dll"; DestDir: "{app}\bin"; Flags: gacinstall; StrongAssemblyName: "saxon9he, ${saxon.strongname}"
1458
Source: "saxon9he-api.dll"; DestDir: "{app}\bin"; Flags: gacinstall; StrongAssemblyName: "saxon9he-api, ${saxon.strongname}"
1459
Source: "saxon9he-api.xml"; DestDir: "{app}\bin"
1460
Source: "..\notices\APACHE-RESOLVER.txt" ; DestDir: "{app}\notices"
1461
Source: "..\notices\APACHE-XERCES.txt" ; DestDir: "{app}\notices"
1462
Source: "..\notices\CERN.txt" ; DestDir: "{app}\notices"
1463
Source: "..\notices\FRIJTERS.txt" ; DestDir: "{app}\notices"
1464
Source: "..\notices\GPL+CLASSPATH.txt" ; DestDir: "{app}\notices"
1465
Source: "..\notices\JAMESCLARK.txt" ; DestDir: "{app}\notices"
1466
Source: "..\notices\LICENSE.txt" ; DestDir: "{app}\notices"
1467
Source: "..\notices\THAI.txt" ; DestDir: "{app}\notices"
1468
Source: "..\notices\UNICODE.txt" ; DestDir: "{app}\notices"
1469

    
1470
; Program Files
1471
Source: "Query.exe"; DestDir: "{app}\bin"
1472
Source: "Transform.exe"; DestDir: "{app}\bin"
1473

    
1474
[Registry]
1475
Root: HKCU; Subkey: "Software\Saxonica"; Flags: uninsdeletekeyifempty
1476
Root: HKCU; Subkey: "Software\Saxonica\SaxonHE-N"; Flags: uninsdeletekey
1477
Root: HKCU; Subkey: "Software\Saxonica\SaxonHE-N\Settings"; ValueType: string; ValueName: "InstallPath"; ValueData: "{app}";
1478
Root: HKLM; Subkey: "Software\Saxonica"; Flags: uninsdeletekeyifempty
1479
Root: HKLM; Subkey: "Software\Saxonica\SaxonHE-N"; Flags: uninsdeletekey
1480
Root: HKLM; Subkey: "Software\Saxonica\SaxonHE-N\Settings"; ValueType: string; ValueName: "InstallPath"; ValueData: "{app}";
1481
Root: HKCU; Subkey: "Environment"; ValueType: expandsz; ValueName: "Path"; ValueData: "{olddata};{app}\bin"
1482

    
1483
[UninstallDelete]
1484
Type: dirifempty; Name: "{app}";         
1485
               
1486
      </echo>
1487
      <exec executable="./Inno Setup 5/Compil32.exe">
1488
        <arg line="/cc"/>
1489
        <arg line="${temp.dir}/n/installer/he.iss"/>
1490
      </exec>
1491
    </target>   
1492
    
1493
    <target name="installer-pen" description="Create installer for Saxon-PE on .NET" depends="n">
1494
       <mkdir dir="${temp.dir}/n/installer"/> 
1495
       
1496
      <echo file="${temp.dir}/n/installer/pe.iss">
1497
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING .ISS SCRIPT FILES!
1498
; Documentation is at http://www.jrsoftware.org/ishelp/
1499

    
1500
[Setup]
1501
AppName=Saxon-PE ${version}
1502
AppVerName=Saxon-PE ${version}
1503
AppPublisher=Saxonica
1504
AppVersion=${version}
1505
DefaultDirName=c:\Program Files\Saxonica\SaxonPE${major.version}N
1506
DefaultGroupName=Saxon-PE ${version}
1507
PrivilegesRequired=none
1508
Compression=lzma
1509
SolidCompression=yes
1510
SourceDir=..\..\..\${build-pen.dir}\bin
1511
OutputDir=${basedir}\${issue.dir}
1512
OutputBaseFilename=SaxonPE${versionh}N-setup
1513
AppCopyright=Copyright (c) 2017 Saxonica
1514

    
1515
[Files]
1516
; GAC Files
1517

    
1518
Source: "IKVM.Runtime.dll"; DestDir: "{app}\bin"; Flags: gacinstall; StrongAssemblyName: "IKVM.Runtime, ${ikvm.strongname}"
1519
Source: "IKVM.OpenJDK.Core.dll"; DestDir: "{app}\bin"; Flags: gacinstall; StrongAssemblyName: "IKVM.OpenJDK.Core, ${ikvm.strongname}"
1520
Source: "IKVM.OpenJDK.Charsets.dll"; DestDir: "{app}\bin"; Flags: gacinstall; StrongAssemblyName: "IKVM.OpenJDK.Charsets, ${ikvm.strongname}"
1521
Source: "IKVM.OpenJDK.Security.dll"; DestDir: "{app}\bin"; Flags: gacinstall; StrongAssemblyName: "IKVM.OpenJDK.Security, ${ikvm.strongname}"
1522
Source: "IKVM.OpenJDK.Util.dll"; DestDir: "{app}\bin" ; Flags: gacinstall; StrongAssemblyName: "IKVM.OpenJDK.Util, ${ikvm.strongname}"
1523
Source: "IKVM.OpenJDK.Text.dll"; DestDir: "{app}\bin"; Flags: gacinstall; StrongAssemblyName: "IKVM.OpenJDK.Text, ${ikvm.strongname}"
1524
Source: "IKVM.OpenJDK.XML.API.dll"; DestDir: "{app}\bin"; Flags: gacinstall ; StrongAssemblyName: "IKVM.OpenJDK.XML.API, ${ikvm.strongname}"
1525
Source: "saxon9pe.dll"; DestDir: "{app}\bin"; Flags: gacinstall; StrongAssemblyName: "saxon9pe, ${saxon.strongname}"
1526
Source: "saxon9pe-api.dll"; DestDir: "{app}\bin"; Flags: gacinstall; StrongAssemblyName: "saxon9pe-api, ${saxon.strongname}"
1527
Source: "saxon9pe-api.xml"; DestDir: "{app}\bin"
1528
Source: "..\notices\APACHE-RESOLVER.txt" ; DestDir: "{app}\notices"
1529
Source: "..\notices\APACHE-XERCES.txt" ; DestDir: "{app}\notices"
1530
Source: "..\notices\CERN.txt" ; DestDir: "{app}\notices"
1531
Source: "..\notices\FRIJTERS.txt" ; DestDir: "{app}\notices"
1532
Source: "..\notices\GPL+CLASSPATH.txt" ; DestDir: "{app}\notices"
1533
Source: "..\notices\JAMESCLARK.txt" ; DestDir: "{app}\notices"
1534
Source: "..\notices\LICENSE.txt" ; DestDir: "{app}\notices"
1535
Source: "..\notices\THAI.txt" ; DestDir: "{app}\notices"
1536
Source: "..\notices\UNICODE.txt" ; DestDir: "{app}\notices"
1537

    
1538

    
1539
; Program Files
1540
Source: "Query.exe"; DestDir: "{app}\bin"
1541
Source: "Transform.exe"; DestDir: "{app}\bin"
1542

    
1543
[Registry]
1544
Root: HKCU; Subkey: "Software\Saxonica"; Flags: uninsdeletekeyifempty
1545
Root: HKCU; Subkey: "Software\Saxonica\SaxonPE-N"; Flags: uninsdeletekey
1546
Root: HKCU; Subkey: "Software\Saxonica\SaxonPE-N\Settings"; ValueType: string; ValueName: "InstallPath"; ValueData: "{app}";
1547
Root: HKLM; Subkey: "Software\Saxonica"; Flags: uninsdeletekeyifempty
1548
Root: HKLM; Subkey: "Software\Saxonica\SaxonPE-N"; Flags: uninsdeletekey
1549
Root: HKLM; Subkey: "Software\Saxonica\SaxonPE-N\Settings"; ValueType: string; ValueName: "InstallPath"; ValueData: "{app}";
1550
Root: HKCU; Subkey: "Environment"; ValueType: expandsz; ValueName: "Path"; ValueData: "{olddata};{app}\bin"
1551

    
1552
[UninstallDelete]
1553
Type: dirifempty; Name: "{app}";         
1554
                
1555
      </echo>
1556
      <exec executable="./Inno Setup 5/Compil32.exe">
1557
        <arg line="/cc"/>
1558
        <arg line="${temp.dir}/n/installer/pe.iss"/>
1559
      </exec>
1560
    </target>       
1561
    
1562
    <target name="installer-een" description="Create installer for Saxon-EE on .NET" depends="n">
1563
       <mkdir dir="${temp.dir}/n/installer"/> 
1564
       
1565
      <echo file="${temp.dir}/n/installer/ee.iss">
1566
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING .ISS SCRIPT FILES!
1567
; Documentation is at http://www.jrsoftware.org/ishelp/
1568

    
1569
[Setup]
1570
AppName=Saxon-EE ${version}
1571
AppVerName=Saxon-EE ${version}
1572
AppPublisher=Saxonica
1573
AppVersion=${version}
1574
DefaultDirName=c:\Program Files\Saxonica\SaxonEE${major.version}N
1575
DefaultGroupName=Saxon-PE ${version}
1576
PrivilegesRequired=none
1577
Compression=lzma
1578
SolidCompression=yes
1579
SourceDir=..\..\..\${build-een.dir}\bin
1580
OutputDir=${basedir}\${issue.dir}
1581
OutputBaseFilename=SaxonEE${versionh}N-setup
1582
AppCopyright=Copyright (c) 2017 Saxonica
1583

    
1584
[Files]
1585
; GAC Files
1586

    
1587
Source: "IKVM.Runtime.dll"; DestDir: "{app}\bin"; Flags: gacinstall; StrongAssemblyName: "IKVM.Runtime, ${ikvm.strongname}"
1588
Source: "IKVM.OpenJDK.Core.dll"; DestDir: "{app}\bin"; Flags: gacinstall; StrongAssemblyName: "IKVM.OpenJDK.Core, ${ikvm.strongname}"
1589
Source: "IKVM.OpenJDK.Charsets.dll"; DestDir: "{app}\bin"; Flags: gacinstall; StrongAssemblyName: "IKVM.OpenJDK.Charsets, ${ikvm.strongname}"
1590
Source: "IKVM.OpenJDK.Security.dll"; DestDir: "{app}\bin"; Flags: gacinstall; StrongAssemblyName: "IKVM.OpenJDK.Security, ${ikvm.strongname}"
1591
Source: "IKVM.OpenJDK.Util.dll"; DestDir: "{app}\bin" ; Flags: gacinstall; StrongAssemblyName: "IKVM.OpenJDK.Util, ${ikvm.strongname}"
1592
Source: "IKVM.OpenJDK.Text.dll"; DestDir: "{app}\bin"; Flags: gacinstall; StrongAssemblyName: "IKVM.OpenJDK.Text, ${ikvm.strongname}"
1593
Source: "IKVM.OpenJDK.XML.API.dll"; DestDir: "{app}\bin"; Flags: gacinstall ; StrongAssemblyName: "IKVM.OpenJDK.XML.API, ${ikvm.strongname}"
1594
Source: "saxon9ee.dll"; DestDir: "{app}\bin"; Flags: gacinstall; StrongAssemblyName: "saxon9ee, ${saxon.strongname}"
1595
Source: "saxon9ee-api.dll"; DestDir: "{app}\bin"; Flags: gacinstall; StrongAssemblyName: "saxon9ee-api, ${saxon.strongname}"
1596
Source: "saxon9ee-api.xml"; DestDir: "{app}\bin"
1597
Source: "..\notices\APACHE-RESOLVER.txt" ; DestDir: "{app}\notices"
1598
Source: "..\notices\APACHE-XERCES.txt" ; DestDir: "{app}\notices"
1599
Source: "..\notices\ASM.txt" ; DestDir: "{app}\notices"
1600
Source: "..\notices\CERN.txt" ; DestDir: "{app}\notices"
1601
Source: "..\notices\FRIJTERS.txt" ; DestDir: "{app}\notices"
1602
Source: "..\notices\GPL+CLASSPATH.txt" ; DestDir: "{app}\notices"
1603
Source: "..\notices\JAMESCLARK.txt" ; DestDir: "{app}\notices"
1604
Source: "..\notices\LICENSE.txt" ; DestDir: "{app}\notices"
1605
Source: "..\notices\THAI.txt" ; DestDir: "{app}\notices"
1606
Source: "..\notices\UNICODE.txt" ; DestDir: "{app}\notices"
1607

    
1608
; Program Files
1609
Source: "Query.exe"; DestDir: "{app}\bin"
1610
Source: "Transform.exe"; DestDir: "{app}\bin"
1611
Source: "Validate.exe"; DestDir: "{app}\bin"
1612

    
1613
[Registry]
1614
Root: HKCU; Subkey: "Software\Saxonica"; Flags: uninsdeletekeyifempty
1615
Root: HKCU; Subkey: "Software\Saxonica\SaxonEE-N"; Flags: uninsdeletekey
1616
Root: HKCU; Subkey: "Software\Saxonica\SaxonEE-N\Settings"; ValueType: string; ValueName: "InstallPath"; ValueData: "{app}";
1617
Root: HKLM; Subkey: "Software\Saxonica"; Flags: uninsdeletekeyifempty
1618
Root: HKLM; Subkey: "Software\Saxonica\SaxonEE-N"; Flags: uninsdeletekey
1619
Root: HKLM; Subkey: "Software\Saxonica\SaxonEE-N\Settings"; ValueType: string; ValueName: "InstallPath"; ValueData: "{app}";
1620
Root: HKCU; Subkey: "Environment"; ValueType: expandsz; ValueName: "Path"; ValueData: "{olddata};{app}\bin"
1621

    
1622
[UninstallDelete]
1623
Type: dirifempty; Name: "{app}";          
1624
                
1625
      </echo>
1626
      <exec executable="./Inno Setup 5/Compil32.exe">
1627
        <arg line="/cc"/>
1628
        <arg line="${temp.dir}/n/installer/ee.iss"/>
1629
      </exec>
1630
    </target> 
1631
    
1632
    <target name="release-n"
1633
        depends="copy-notices, installer-hen, installer-pen, installer-een"/>
1634
           
1635

    
1636
    
1637

    
1638
      
1639
       
1640
    
1641
</project>
(3-3/5)