Project

Profile

Help

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

he / tags / 9.7.0.1 / 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

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

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

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

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

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

    
156

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

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

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

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

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

    
351

    
352

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

    
380
       <echo>Import filtering for PEN complete.</echo>
381
    </target>
382

    
383

    
384

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

    
428
    <target name="compile-pen" description="Compile Saxon Java classes for the .NET product"
429
            depends="copysource-development-n, preprocess-pen, ICU">
430
        <mkdir dir="${classes-n.dir}"/>
431
        <mkdir dir="${classes-n.dir}/pe"/>
432
        <echo message="Compile with debug = ${build.debug}, debuglevel = ${build.debuglevel}"/>
433
        <javac debug="${build.debug}" debuglevel="${build.debuglevel}"
434
            deprecation="${build.deprecation}" destdir="${classes-n.dir}"
435
            optimize="${build.optimize}" srcdir="${temp-src-prep-pen.dir}" source="${build.compiler.source}"
436
            target="${build.compiler.target}"
437
            includeAntRuntime="false">
438
            <include name="net/**"/>
439
            <include name="com/saxonica/**"/>
440
            <classpath>
441
                <path refid="classpath-n"/>
442
            </classpath>
443
        </javac>
444
    </target>
445

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

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

    
514
          <!-- Include the ICU classes which have been built separately, either in the main JAR or in a subsidiary -->
515
        <jar  basedir="${icu4j.classes.dir}"
516
            compress="${build.compress}" jarfile="${jar-n.dir}/saxon9pe.jar" update="true">
517
            <include name="**"/>
518
        </jar>
519
        <!--<jar if:true="${ICU.separate.JARS}" basedir="${icu4j.classes.dir}" compress="${build.compress}"
520
            jarfile="${product.dir}/pej/saxon9-icu.jar">
521
            <include name="**"/>
522
        </jar>   -->
523

    
524
    </target>     
525
    
526
    <target name="jar-een" description="Create Saxon-EE jar files for .NET" depends="compile-een">
527
        <mkdir dir="${jar-n.dir}"/>
528
        <jar basedir="${classes-n.dir}" compress="${build.compress}" jarfile="${jar-n.dir}/saxon9ee.jar">
529
            <include name="net/**/*.class"/>
530
            <include name="com/saxonica/**/*.class"/>
531
            <include name="org/objectweb/**/*.class"/>
532
            <exclude name="com/saxonica/config/EnterpriseTransformerFactory.class"/>
533
            <exclude name="com/saxonica/config/EnterpriseXPathFactory.class"/>
534
        </jar>
535
         <jar basedir="${development-data.dir}" compress="${build.compress}" jarfile="${jar-n.dir}/saxon9ee.jar" update="true">
536
            <include name="**"/>
537
        </jar>
538
        <jar basedir="${classes-n.dir}/ee" compress="${build.compress}" jarfile="${jar-n.dir}/saxon9ee.jar" update="true" />
539

    
540

    
541
                <!-- Include the ICU classes which have been built separately, unless they are in a separate JAR -->
542
        <jar  basedir="${icu4j.classes.dir}" compress="${build.compress}"
543
            jarfile="${jar-n.dir}/saxon9ee.jar" update="true">
544
            <include name="**"/>
545
        </jar>
546

    
547
    </target>
548
    
549
    <!--<target name="dll-n-prepare" description="Create DLLs for .NET" depends="jar-hen, jar-pen, jar-een">     -->
550
         <target name="dll-n-prepare" description="Create DLLs for .NET" depends="jar-een">
551
        <taskdef name="ikvmc" classname="net.ikvm.ant.IkvmcTask" classpath="${lib.dir}/ant-ikvmc.0.4.1.jar"/>
552
        <mkdir dir="${dll-n.dir}"/>
553
        <copy todir="${jar-n.dir}">
554
          <fileset dir="${lib.dir}">
555
            <include name="tagsoup-1.2.jar"/>
556
            <include name="mail.jar"/>
557
            <include name="asm-${asm.version}.jar"/>
558
            <include name="asm-analysis-${asm.version}.jar"/>
559
            <include name="asm-commons-${asm.version}.jar"/>
560
            <include name="asm-tree-${asm.version}.jar"/>
561
            <include name="asm-util-${asm.version}.jar"/>
562
          </fileset>
563
        </copy>
564

    
565
        <!--
566
            Invoke IKVMC to cross-compile the JAR files into DLLs
567
        -->
568
      <!--<property name="os.dir" value="${ikvm.dir}/bin/runMono.bat"  />
569
      <property name="osDebug.dir" value="${ikvm.dir}/bin/runMonoDebug.bat"  /> -->
570

    
571
      <condition  property="os.dir" value="${ikvm.dir}/bin/runMono.bat">
572
        <or>
573
          <os family="unix"/>
574
          <os family="mac"/>
575
        </or>
576
      </condition>
577
      <condition property="os.dir" value="${ikvm.dir}/bin/ikvmc.exe">
578
        <os family="windows"/>
579
      </condition>
580
      
581
      <condition  property="osDebug.dir" value="${ikvm.dir}/bin/runMonoDebug.bat">
582
        <or>
583
          <os family="unix"/>
584
          <os family="mac"/>
585
        </or>
586
      </condition>
587
      <condition property="osDebug.dir" value="${ikvm.dir}/bin/ikvmc.exe">
588
        <os family="windows"/>
589
      </condition>
590
      
591
      <echo>
592
        osDir = ${os.dir}
593
        osDebugDir = ${osDebug.dir}
594
      </echo>
595
      
596
    </target>
597
    
598
    <target name="dll-hen" description="Create DLLs for .NET" depends="jar-hen, dll-n-prepare">
599
        <taskdef name="ikvmc" classname="net.ikvm.ant.IkvmcTask" classpath="${lib.dir}/ant-ikvmc.0.4.1.jar"/>
600
    
601
        <mkdir dir="${dll-n.dir}/he"/>
602
      
603
                <copy todir="${dll-n.dir}/he">
604
            <fileset dir="${dll-n.dir}">
605
                   <include name="IKVM.OpenJDK.Core.dll"/>
606
                   <include name="IKVM.OpenJDK.Charsets.dll"/>
607
                   <include name="IKVM.OpenJDK.Text.dll"/>
608
                   <include name="IKVM.OpenJDK.Util.dll"/>
609
                   <include name="IKVM.OpenJDK.XML.API.dll"/>
610
                   <include name="xercesImpl.dll"/>
611
              <include name="IKVM.Runtime.dll"/>
612
            </fileset>
613
        </copy>
614

    
615
        <!--  replace the attribute IKVMC with the following attribute home="${ikvm.dir}" -->
616
 
617
        <ikvmc IKVMC="${os.dir}"
618
               assembly="saxon9he" target="library" keyfile="${saxondotnet.snk}" version="${version}"
619
               debug="false"
620
               srcpath="${temp-src-prep-hen.dir}"
621
               out="${basedir}/${dll-n.dir}/he/saxon9he.dll"
622
               verbose="true">
623
          <fileset dir="${basedir}/${jar-n.dir}">
624
            <include name="saxon9he.jar"/>
625
          </fileset>
626
          <fileset dir="${lib.dir}">
627
              <include name="xerces.jar"/>
628
          </fileset>
629
          <reference path="mscorlib.dll"/>
630
          <reference path="System.Xml.dll"/>
631
          <reference path="System.dll"/>
632
          <reference path="${dll-n.dir}/he/IKVM.OpenJDK.Core.dll"/>
633
          <reference path="${dll-n.dir}/he/IKVM.OpenJDK.Charsets.dll"/>
634
          <reference path="${dll-n.dir}/he/IKVM.OpenJDK.Text.dll"/>
635
          <reference path="${dll-n.dir}/he/IKVM.OpenJDK.Util.dll"/>
636
          <reference path="${dll-n.dir}/he/IKVM.OpenJDK.XML.API.dll"/>
637
       </ikvmc>
638
      
639
    </target>
640
    
641
    <target name="dll-pen" description="Create DLLs for .NET" depends="jar-pen, dll-n-prepare">
642
        <taskdef name="ikvmc" classname="net.ikvm.ant.IkvmcTask" classpath="${lib.dir}/ant-ikvmc.0.4.1.jar"/>      
643

    
644
        <mkdir dir="${dll-n.dir}/pe"/>      
645
            <copy todir="${dll-n.dir}/pe">
646
            <fileset dir="${dll-n.dir}">
647
                   <include name="IKVM.OpenJDK.Core.dll"/>
648
                   <include name="IKVM.OpenJDK.Charsets.dll"/>
649
                   <include name="IKVM.OpenJDK.Security.dll"/>
650
                   <include name="IKVM.OpenJDK.Text.dll"/>
651
                   <include name="IKVM.OpenJDK.Util.dll"/>
652
                   <include name="IKVM.OpenJDK.XML.API.dll"/>
653
                   <include name="xercesImpl.dll"/>
654
              <include name="IKVM.Runtime.dll"/>
655
            </fileset>
656
        </copy>
657
        
658
      <ikvmc IKVMC="${os.dir}"
659
               assembly="saxon9pe" 
660
               target="library" 
661
               keyfile="${saxondotnet.snk}" 
662
               version="${version}"
663
               debug="false" 
664
               srcpath="${temp-src-prep-pen.dir}"
665
               out="${basedir}/${dll-n.dir}/pe/saxon9pe.dll"
666
               verbose="true">
667
          <fileset dir="${basedir}/${jar-n.dir}">
668
            <include name="saxon9pe.jar"/>
669
          </fileset>
670
          <fileset dir="${lib.dir}">
671
              <include name="xerces.jar"/>
672
              <include name="tagsoup-1.2.jar"/>
673
              <include name="mail.jar"/>
674
          </fileset>
675
          <reference path="mscorlib.dll"/>
676
          <reference path="System.Xml.dll"/>
677
          <reference path="System.dll"/>
678
          <reference path="${dll-n.dir}/pe/IKVM.OpenJDK.Core.dll"/>
679
          <reference path="${dll-n.dir}/pe/IKVM.OpenJDK.Charsets.dll"/>
680
          <reference path="${dll-n.dir}/pe/IKVM.OpenJDK.Security.dll"/>
681
          <reference path="${dll-n.dir}/pe/IKVM.OpenJDK.Text.dll"/>
682
          <reference path="${dll-n.dir}/pe/IKVM.OpenJDK.Util.dll"/>
683
          <reference path="${dll-n.dir}/pe/IKVM.OpenJDK.XML.API.dll"/>
684
          <reference path="System.Security.dll"/>
685
      </ikvmc>
686

    
687
    </target>
688
      
689
    <target name="dll-een" description="Create DLLs for .NET" depends="jar-een, dll-n-prepare">
690
        <taskdef name="ikvmc" classname="net.ikvm.ant.IkvmcTask" classpath="${lib.dir}/ant-ikvmc.0.4.1.jar"/>      
691

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

    
782
        <!-- NB Remember to add the dll's to the GAC - it doesn't work if you don't -->
783
        
784
    </target>
785
    
786
    <target name="dll-n" depends="dll-hen, dll-pen, dll-een"/>
787
    
788
    <target name="csharp-hen" description="Compile C# source for .NET commands and API library (HE)"
789
            xmlns:dn="antlib:org.apache.ant.dotnet" depends="dll-hen"
790
        > 
791
        
792
        <taskdef 
793
            uri="antlib:org.apache.ant.dotnet">
794
            <classpath>
795
              <pathelement location="${lib.dir}/ant-dotnet-1.1.jar"/>
796
            </classpath>
797
        </taskdef>
798

    
799

    
800
                
801
                <!-- API library DLL -->
802
                
803
                <dn:csc targetType="library" outputFile="${basedir}/${dll-n.dir}/he/saxon9he-api.dll"
804
                     extraOptions="-keyfile:${saxondotnet.snk}"
805
                     executable="${csharp.compiler}">
806
                     <src dir="${basedir}/${temp-src-nc.dir}/api/Saxon.Api" includes="*.cs Properties/AssemblyInfo.cs"/>
807
                     <reference dir="${basedir}/${dll-n.dir}/he">
808
                        <!--<include name="charsets.dll"/>-->
809
                        <include name="IKVM.OpenJDK.Core.dll"/>
810
                     <include name="IKVM.OpenJDK.Charsets.dll"/>
811
                     <include name="IKVM.OpenJDK.Text.dll"/>
812
                     <include name="IKVM.OpenJDK.Util.dll"/>
813
                     <include name="IKVM.OpenJDK.XML.API.dll"/>
814
                     <include name="xercesImpl.dll"/>
815
                        <include name="IKVM.Runtime.dll"/>
816
                        <include name="saxon9he.dll"/>
817
                     </reference>
818
                </dn:csc>
819
                
820
                <!-- Transform, Query, Validate commands -->
821
                
822
                <echo file="${basedir}/${temp-src-nc.dir}/cmd/AssemblyInfo.cs">
823
                  using System.Reflection;
824
          using System.Runtime.CompilerServices;
825
          using System.Runtime.InteropServices;
826
          [assembly: AssemblyCompany("Saxonica")]
827
          [assembly: AssemblyProduct("Saxon.HE")]
828
          [assembly: AssemblyCopyright("Copyright © Saxonica 2013")]
829
          [assembly: AssemblyVersion("${version}")]
830
          [assembly: AssemblyFileVersion("${version}")]
831
        </echo>
832
                
833
                <dn:csc targetType="exe" 
834
                     win32icon="${icon}"
835
                     outputFile="${basedir}/${dll-n.dir}/he/Transform.exe"
836
                     extraOptions="-keyfile:${saxondotnet.snk}"
837
                     executable="${csharp.compiler}" >
838
                    <src dir="${basedir}/${temp-src-nc.dir}/cmd" includes="Transform.cs AssemblyInfo.cs"/>
839
                     <reference dir="${basedir}/${dll-n.dir}/he">
840
                        <include name="IKVM.OpenJDK.Core.dll"/>
841
                     <include name="IKVM.OpenJDK.Charsets.dll"/>
842
                     <include name="IKVM.OpenJDK.Text.dll"/>
843
                     <include name="IKVM.OpenJDK.Util.dll"/>
844
                     <include name="IKVM.OpenJDK.XML.API.dll"/>
845
                     <include name="xercesImpl.dll"/>
846
                        <include name="IKVM.Runtime.dll"/>
847
                        <!--<include name="charsets.dll"/>-->
848
                        <include name="saxon9he.dll"/>
849
                     </reference>
850
                </dn:csc>
851
                
852
                <dn:csc targetType="exe" win32icon="${icon}"
853
                     outputFile="${basedir}/${dll-n.dir}/he/Query.exe"
854
                     extraOptions="-keyfile:${saxondotnet.snk}"
855
                     executable="${csharp.compiler}">
856
                     <src dir="${basedir}/${temp-src-nc.dir}/cmd" includes="Query.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
    </target>
871
    
872
    <target name="csharp-pen" description="Compile C# source for .NET commands and API library (PE)"
873
            xmlns:dn="antlib:org.apache.ant.dotnet" depends="dll-pen"
874
        > <!---->
875
        
876
        <taskdef 
877
            uri="antlib:org.apache.ant.dotnet">
878
            <classpath>
879
              <pathelement location="${lib.dir}/ant-dotnet-1.1.jar"/>
880
            </classpath>
881
          </taskdef>
882

    
883
                <mkdir dir="${dll-n.dir}/pe"/>
884
                
885

    
886
                
887
                <!-- API library DLL -->
888
                
889
                <dn:csc targetType="library" outputFile="${basedir}/${dll-n.dir}/pe/saxon9pe-api.dll"
890
                     extraOptions="-keyfile:${saxondotnet.snk}"
891
                     executable="${csharp.compiler}">
892
                     <src dir="${basedir}/${temp-src-nc.dir}/api/Saxon.Api" includes="*.cs Properties/AssemblyInfo.cs"/>
893
                     <reference dir="${basedir}/${dll-n.dir}/pe">
894
                        <!--<include name="charsets.dll"/>-->
895
                        <include name="IKVM.OpenJDK.Core.dll"/>
896
                     <include name="IKVM.OpenJDK.Charsets.dll"/>
897
                     <include name="IKVM.OpenJDK.Security.dll"/>
898
                     <include name="IKVM.OpenJDK.Text.dll"/>
899
                     <include name="IKVM.OpenJDK.Util.dll"/>
900
                     <include name="IKVM.OpenJDK.XML.API.dll"/>
901
                     <include name="IKVM.Runtime.dll"/>
902
                        <include name="saxon9pe.dll"/>
903
                     </reference>
904
                </dn:csc>
905
                
906
                <!-- Transform, Query, Validate, StylesheetPackager commands -->
907
                
908
                <echo file="${basedir}/${temp-src-nc.dir}/cmd/AssemblyInfo.cs">
909
                  using System.Reflection;
910
          using System.Runtime.CompilerServices;
911
          using System.Runtime.InteropServices;
912
          [assembly: AssemblyCompany("Saxonica")]
913
          [assembly: AssemblyProduct("Saxon.PE")]
914
          [assembly: AssemblyCopyright("Copyright © Saxonica 2013")]
915
          [assembly: AssemblyVersion("${version}")]
916
          [assembly: AssemblyFileVersion("${version}")]
917
        </echo>
918
                
919
                <dn:csc targetType="exe" win32icon="${icon}"
920
                     outputFile="${basedir}/${dll-n.dir}/pe/Transform.exe"
921
                     extraOptions="-keyfile:${saxondotnet.snk}"
922
                     executable="${csharp.compiler}">
923
                     <src dir="${basedir}/${temp-src-nc.dir}/cmd" includes="Transform.cs AssemblyInfo.cs"/>
924
                     <reference dir="${basedir}/${dll-n.dir}/pe">
925
                        <include name="IKVM.OpenJDK.Core.dll"/>
926
                     <include name="IKVM.OpenJDK.Charsets.dll"/>
927
                     <include name="IKVM.OpenJDK.Security.dll"/>
928
                     <include name="IKVM.OpenJDK.Text.dll"/>
929
                     <include name="IKVM.OpenJDK.Util.dll"/>
930
                     <include name="IKVM.OpenJDK.XML.API.dll"/>
931
                        <include name="IKVM.Runtime.dll"/>
932
                        <!--<include name="charsets.dll"/>-->
933
                        <include name="saxon9pe.dll"/>
934
                     </reference>
935
                </dn:csc>
936
                
937
                <dn:csc targetType="exe" win32icon="${icon}"
938
                     outputFile="${basedir}/${dll-n.dir}/pe/Query.exe"
939
                     extraOptions="-keyfile:${saxondotnet.snk}"
940
                     executable="${csharp.compiler}">
941
                     <src dir="${basedir}/${temp-src-nc.dir}/cmd" includes="Query.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/StylesheetPackager.exe"
957
                     extraOptions="-keyfile:${saxondotnet.snk}"
958
                     executable="${csharp.compiler}">
959
                     <src dir="${basedir}/${temp-src-nc.dir}/cmd" includes="StylesheetPackager.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
                
974
    </target>    
975
    
976
    <target name="csharp-een" description="Compile C# source for .NET commands and API library (EE)"
977
            xmlns:dn="antlib:org.apache.ant.dotnet" depends="dll-een"
978
        > <!---->
979
        
980
        <taskdef 
981
            uri="antlib:org.apache.ant.dotnet">
982
            <classpath>
983
              <pathelement location="${lib.dir}/ant-dotnet-1.1.jar"/>
984
            </classpath>
985
          </taskdef>
986

    
987
                <mkdir dir="${dll-n.dir}/ee"/>
988
                
989
                <copy todir="${dll-n.dir}/ee">
990
            <fileset dir="${dll-n.dir}">
991
                   <include name="IKVM.OpenJDK.Core.dll"/>
992
                   <include name="IKVM.OpenJDK.Charsets.dll"/>
993
                   <include name="IKVM.OpenJDK.Security.dll"/>
994
                   <include name="IKVM.OpenJDK.Text.dll"/>
995
                   <include name="IKVM.OpenJDK.Util.dll"/>
996
                   <include name="IKVM.OpenJDK.XML.API.dll"/>
997
              <include name="IKVM.Runtime.dll"/>
998
              <include name="saxon9ee.dll"/>
999
              <include name="saxon9ee-debug.dll"/>
1000
            </fileset>
1001
        </copy>
1002
                
1003
                <!-- API library DLL -->
1004
                
1005
                <!-- Note, this is not built for debugging in Visual Studio. Such a version
1006
                     is best built within VS itself -->
1007
                
1008
                <dn:csc targetType="library" outputFile="${basedir}/${dll-n.dir}/ee/saxon9ee-api.dll"
1009
                     docFile="${doctemp-n.dir}/apidoc.xml"
1010
                     extraOptions="-keyfile:${saxondotnet.snk}"
1011
                     executable="${csharp.compiler}">
1012
                     <src dir="${basedir}/${temp-src-nc.dir}/api/Saxon.Api" includes="*.cs Properties/AssemblyInfo.cs"/>
1013
                     <reference dir="${basedir}/${dll-n.dir}/ee">
1014
                        <!--<include name="charsets.dll"/>-->
1015
                        <include name="IKVM.OpenJDK.Core.dll"/>
1016
                     <include name="IKVM.OpenJDK.Charsets.dll"/>
1017
                     <include name="IKVM.OpenJDK.Security.dll"/>
1018
                     <include name="IKVM.OpenJDK.Text.dll"/>
1019
                     <include name="IKVM.OpenJDK.Util.dll"/>
1020
                     <include name="IKVM.OpenJDK.XML.API.dll"/>
1021
                        <include name="IKVM.Runtime.dll"/>
1022
                        <include name="saxon9ee.dll"/>
1023
                     </reference>
1024
                </dn:csc>
1025
                
1026
                <!-- Transform, Query, Validate, StylesheetPackager commands -->
1027
                
1028
                <echo file="${basedir}/${temp-src-nc.dir}/cmd/AssemblyInfo.cs">
1029
                  using System.Reflection;
1030
          using System.Runtime.CompilerServices;
1031
          using System.Runtime.InteropServices;
1032
          [assembly: AssemblyCompany("Saxonica")]
1033
          [assembly: AssemblyProduct("Saxon.EE")]
1034
          [assembly: AssemblyCopyright("Copyright © Saxonica 2013")]
1035
          [assembly: AssemblyVersion("${version}")]
1036
          [assembly: AssemblyFileVersion("${version}")]
1037
        </echo>                
1038
                
1039
                <dn:csc targetType="exe" win32icon="${icon}"
1040
                     outputFile="${basedir}/${dll-n.dir}/ee/Transform.exe"
1041
                     extraOptions="-keyfile:${saxondotnet.snk}"
1042
                     executable="${csharp.compiler}">
1043
                     <src dir="${basedir}/${temp-src-nc.dir}/cmd" includes="Transform.cs AssemblyInfo.cs"/>
1044
                     <reference dir="${basedir}/${dll-n.dir}/ee">
1045
                        <include name="IKVM.OpenJDK.Core.dll"/>
1046
                     <include name="IKVM.OpenJDK.Charsets.dll"/>
1047
                     <include name="IKVM.OpenJDK.Security.dll"/>
1048
                     <include name="IKVM.OpenJDK.Text.dll"/>
1049
                     <include name="IKVM.OpenJDK.Util.dll"/>
1050
                     <include name="IKVM.OpenJDK.XML.API.dll"/>
1051
                        <include name="IKVM.Runtime.dll"/>
1052
                        <!--<include name="charsets.dll"/>-->
1053
                        <include name="saxon9ee.dll"/>
1054
                     </reference>
1055
                </dn:csc>
1056
                
1057
                <dn:csc targetType="exe" win32icon="${icon}"
1058
                     outputFile="${basedir}/${dll-n.dir}/ee/Query.exe"
1059
                     extraOptions="-keyfile:${saxondotnet.snk}"
1060
                     executable="${csharp.compiler}">
1061
                     <src dir="${basedir}/${temp-src-nc.dir}/cmd" includes="Query.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/Validate.exe"
1077
                     extraOptions="-keyfile:${saxondotnet.snk}"
1078
                     executable="${csharp.compiler}">
1079
                     <src dir="${basedir}/${temp-src-nc.dir}/cmd" includes="Validate.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="saxon9ee.dll"/>
1089
                     </reference>
1090
                </dn:csc>
1091

    
1092
                <dn:csc targetType="exe" win32icon="${icon}"
1093
                     outputFile="${basedir}/${dll-n.dir}/ee/StylesheetPackager.exe"
1094
                     extraOptions="-keyfile:${saxondotnet.snk}"
1095
                     executable="${csharp.compiler}">
1096
                     <src dir="${basedir}/${temp-src-nc.dir}/cmd" includes="StylesheetPackager.cs AssemblyInfo.cs"/>
1097
                     <reference dir="${basedir}/${dll-n.dir}/ee">
1098
                        <include name="IKVM.OpenJDK.Core.dll"/>
1099
                     <include name="IKVM.OpenJDK.Charsets.dll"/>
1100
                     <include name="IKVM.OpenJDK.Security.dll"/>
1101
                     <include name="IKVM.OpenJDK.Text.dll"/>
1102
                     <include name="IKVM.OpenJDK.Util.dll"/>
1103
                     <include name="IKVM.OpenJDK.XML.API.dll"/>
1104
                        <include name="IKVM.Runtime.dll"/>
1105
                        <include name="saxon9ee.dll"/>
1106
                     </reference>
1107
                </dn:csc>
1108
    </target> 
1109
  
1110
    
1111
   <target name="compile-samples-n" description="Compile C# source for .NET commands and API library (HE)"
1112
      xmlns:dn="antlib:org.apache.ant.dotnet" depends="csharp-hen, csharp-pen, csharp-een, samples-common"
1113
      >
1114

    
1115
       <taskdef 
1116
            uri="antlib:org.apache.ant.dotnet">
1117
            <classpath>
1118
              <pathelement location="${lib.dir}/ant-dotnet-1.1.jar"/>
1119
            </classpath>
1120
          </taskdef>
1121

    
1122
                <mkdir dir="${dll-n.dir}/samples"/>
1123
                <mkdir dir="${dll-n.dir}/tests"/>
1124
                
1125
                <!-- Sample applications and test drivers -->
1126
                
1127
                <dn:csc targetType="exe"
1128
                     outputFile="${basedir}/${dll-n.dir}/samples/ExamplesHE.exe"
1129
                     win32icon="${icon}"
1130
                     debug="true"
1131
                     executable="${csharp.compiler}">
1132
                     <src dir="${basedir}/${temp-src-nc.dir}/samples" includes="ExamplesHE.cs"/>
1133
                     <reference dir="${basedir}/${dll-n.dir}/he">
1134
                        <include name="IKVM.OpenJDK.*.dll"/>
1135
                        <include name="saxon9he-api.dll"/>
1136
                     </reference>
1137
                </dn:csc>
1138
                
1139
                <dn:csc targetType="exe"
1140
                     outputFile="${basedir}/${dll-n.dir}/samples/ExamplesPE.exe"
1141
                     win32icon="${icon}"
1142
                     debug="true"
1143
                     executable="${csharp.compiler}">
1144
                     <src dir="${basedir}/${temp-src-nc.dir}/samples" includes="ExamplesPE.cs SampleExtensions.cs"/>
1145
                     <reference dir="${basedir}/${dll-n.dir}/pe">
1146
                        <include name="IKVM.OpenJDK.*.dll"/>
1147
                        <include name="saxon9pe-api.dll"/>
1148
                        <include name="saxon9pe.dll"/>
1149
                     </reference>
1150
                </dn:csc>
1151
                
1152
                <dn:csc targetType="exe"
1153
                     outputFile="${basedir}/${dll-n.dir}/samples/ExamplesEE.exe"
1154
                     win32icon="${icon}"
1155
                     debug="true"
1156
                     executable="${csharp.compiler}">
1157
                     <src dir="${basedir}/${temp-src-nc.dir}/samples" includes="ExamplesEE.cs SampleExtensions.cs"/>
1158
                     <reference dir="${basedir}/${dll-n.dir}/ee">
1159
                        <include name="IKVM.OpenJDK.*.dll"/>
1160
                        <include name="saxon9ee-api.dll"/>
1161
                        <include name="saxon9ee.dll"/>
1162
                     </reference>
1163
                </dn:csc>
1164
                        
1165
                <dn:csc targetType="winexe"
1166
                     outputFile="${basedir}/${dll-n.dir}/samples/TestRunner.exe"
1167
                     win32icon="${icon}"
1168
                     debug="true"
1169
                     executable="${csharp.compiler}">
1170
                     <src dir="${basedir}/${temp-src-nc.dir}/samples/TestRunner">
1171
                       <include name="*.cs"/>
1172
                     </src>
1173
                     <reference dir="${basedir}/${dll-n.dir}/ee">
1174
                        <include name="IKVM.OpenJDK.*.dll"/>
1175
                        <include name="saxon9ee-api.dll"/>
1176
                <include name="saxon9ee.dll"/>
1177
                     </reference>
1178
                </dn:csc>                                
1179
                
1180
                                      
1181

    
1182
    </target>
1183
    
1184
    <target name="product-hen" description="Assemble product.directory for Saxon-HE on .NET"
1185
                                                                                           depends="csharp-hen">
1186
      <mkdir dir="${build-hen.dir}/bin"/>                                                                                     
1187
      <copy todir="${build-hen.dir}/bin">
1188
        <fileset dir="${dll-n.dir}/he">
1189
               <include name="IKVM.OpenJDK.*.dll"/>
1190
          <include name="IKVM.Runtime.dll"/>
1191
          <include name="saxon9he.dll"/>
1192
          <include name="saxon9he-api.dll"/>
1193
          <include name="Query.exe"/>
1194
          <include name="Transform.exe"/>
1195
        </fileset>
1196
      </copy>
1197
      
1198
      
1199
      <copy file="${doctemp-n.dir}/apidoc.xml"
1200
        tofile="${build-hen.dir}/bin/saxon9he-api.xml"
1201
        overwrite="true"/>
1202

    
1203
    </target>
1204
    
1205
    <target name="product-pen" description="Assemble product.directory for Saxon-PE on .NET"
1206
                                                                                           depends="csharp-pen">
1207
      <mkdir dir="${build-pen.dir}/bin"/>                                                                                     
1208
      <copy todir="${build-pen.dir}/bin">
1209
        <fileset dir="${dll-n.dir}/pe">
1210
               <include name="IKVM.OpenJDK.*.dll"/>
1211
          <include name="IKVM.Runtime.dll"/>
1212
          <include name="saxon9pe.dll"/>
1213
          <include name="saxon9pe-api.dll"/>
1214
          <include name="Query.exe"/>
1215
          <include name="Transform.exe"/>
1216
          <include name="StylesheetPackager.exe"/>
1217
        </fileset>
1218
      </copy>
1219
      
1220
      <copy file="${doctemp-n.dir}/apidoc.xml"
1221
        tofile="${build-pen.dir}/bin/saxon9pe-api.xml"
1222
        overwrite="true"/>
1223

    
1224
    </target>
1225
    
1226
    <target name="product-een" description="Assemble product.directory for Saxon-EE on .NET"
1227
                                                                                           depends="csharp-een">
1228
      <copy todir="${build-een.dir}/bin">
1229
        <fileset dir="${dll-n.dir}/ee">
1230
               <include name="IKVM.OpenJDK.*.dll"/>
1231
          <include name="IKVM.Runtime.dll"/>
1232
          <include name="saxon9ee.dll"/>
1233
          <include name="saxon9ee-api.dll"/>
1234
          <include name="Query.exe"/>
1235
          <include name="Transform.exe"/>
1236
          <include name="Validate.exe"/>
1237
          <include name="StylesheetPackager.exe"/>
1238
        </fileset> 
1239
      </copy> 
1240
      
1241
      <copy file="${doctemp-n.dir}/apidoc.xml"
1242
        tofile="${build-een.dir}/bin/saxon9ee-api.xml"
1243
        overwrite="true"/>
1244

    
1245
    </target>
1246
    
1247
    <target name="product-n" description="Assemble product.directories for Saxon on .NET"
1248
                                                                                           depends="product-hen, product-pen, product-een">
1249
                                                                                           
1250
       <!-- Following steps are for diagnostics only, they can be omitted if Powershell is not available -->
1251
       
1252
       <!-- Warning: this script has been known to pick up old DLLs from the GAC, and report on these
1253
            in preference to the DLLs in the target directory. If in doubt, copy the DLLs to the GAC and
1254
            then re-run. -->
1255
                                                                                           
1256
       <exec executable="c:/windows/system32/WindowsPowerShell/v1.0/powershell.exe">
1257
                  <arg line="MyDotNet/list-dependencies.ps1"/>
1258
                  <arg line="${build-hen.dir}/bin"/>
1259
           </exec>
1260
           
1261
           <exec executable="c:/windows/system32/WindowsPowerShell/v1.0/powershell.exe">
1262
                  <arg line="MyDotNet/list-dependencies.ps1"/>
1263
                  <arg line="${build-pen.dir}/bin"/>
1264
           </exec>
1265
           
1266
           <exec executable="c:/windows/system32/WindowsPowerShell/v1.0/powershell.exe">
1267
                  <arg line="MyDotNet/list-dependencies.ps1"/>
1268
                  <arg line="${build-een.dir}/bin"/>
1269
           </exec>
1270
           
1271
        </target>                                                                                          
1272
       
1273
    <target name="samples-n" description="Assemble release samples for .NET"
1274
                  depends="csharp-hen, compile-samples-n">
1275

    
1276
      <mkdir dir="${build-resources.dir}/samples/cs"/>
1277
      <copy todir="${build-resources.dir}/samples/cs"> 
1278
        <fileset dir="${temp-src-nc.dir}/samples">
1279
          <include name="*.cs"/>
1280
        </fileset>
1281
      </copy>
1282
      <mkdir dir="${build-resources.dir}/samples/cs/bin"/>
1283
      <copy todir="${build-resources.dir}/samples/cs/bin"> 
1284
        <fileset dir="${dll-n.dir}/samples">
1285
          <include name="*.exe"/>
1286
          <include name="*.dll"/>
1287
          <include name="*.pdb"/>
1288
        </fileset>
1289
      </copy>
1290
      <copy todir="${build-resources.dir}/samples/cs/bin"> 
1291
        <fileset dir="${dll-n.dir}/tests">
1292
          <include name="*.exe"/>
1293
          <include name="*.dll"/>
1294
          <include name="*.pdb"/>
1295
        </fileset>
1296
      </copy> 
1297
    </target>  
1298
    
1299
    
1300
    <target name="dotnetdoc-dependset">
1301
      <dependset>
1302
        <srcfilelist dir="${doctools-n.dir}" files="*.xsl"/> 
1303
        <srcfilelist dir="${temp-src-nc.dir}/api/Saxon.Api" files="*.cs"/>
1304
        <srcfilelist dir="${doctemp-n.dir}" files="*apidoc.xml"/>
1305
        <targetfileset dir="${doctemp-n.dir}" includes="names.xml"/>
1306
      </dependset>
1307
    </target>               
1308
                     
1309
    <!--<target name="product-dotnetdoc" description="Create .NET API documentation"
1310
        depends="copysource-development-n, csharp-hen, dotnetdoc-dependset" >-->
1311
  <target name="product-dotnetdoc" description="Create .NET API documentation" depends="csharp-een, dotnetdoc-dependset"
1312
    >
1313
        <mkdir dir="${docout-n.dir}"/>
1314
        
1315
        <xslt  in="${doctools-n.dir}/parsecs.xsl"
1316
                        style="${doctools-n.dir}/parsecs.xsl"
1317
                        out="${doctemp-n.dir}/names.xml">
1318
          <classpath refid="saxon.class.path"/>
1319
          <param name="inputdir" expression="file:///${vss-n.dir}/csource/api/Saxon.Api"/>
1320
                        <factory name="com.saxonica.config.EnterpriseTransformerFactory">
1321
                            <attribute name="http://saxon.sf.net/feature/initialTemplate" value="main"/>
1322
                        </factory>
1323
            </xslt>
1324
            <xslt  in="${doctemp-n.dir}/names.xml"
1325
                        style="${doctools-n.dir}/merge.xsl"
1326
                        out="${doctemp-n.dir}/merged.xml">
1327
              <classpath refid="saxon.class.path"/>
1328
                        <param name="names-file" expression="${baseurl}/${doctemp-n.dir}/names.xml"/>
1329
                        <param name="api-doc-file" expression="${baseurl}/${doctemp-n.dir}/apidoc.xml"/>
1330
                        <factory name="com.saxonica.config.EnterpriseTransformerFactory">
1331
                            <attribute name="http://saxon.sf.net/feature/initialTemplate" value="main"/>
1332
                        </factory>
1333
            </xslt>
1334
            <xslt in="${doctemp-n.dir}/merged.xml"
1335
                        style="${doctools-n.dir}/tohtml.xsl"
1336
                        out="${docout-n.dir}/index.html">
1337
              <classpath refid="saxon.class.path"/>
1338
                        <factory name="com.saxonica.config.EnterpriseTransformerFactory"/>
1339
            </xslt>
1340
              <xslt in="${doctemp-n.dir}/merged.xml"
1341
                        style="${doctools-n.dir}/convert-to-jel-package.xsl"
1342
                        out="${docout-n.dir}/../dotnetdoc-xml/packages/Saxon.Api.xml">
1343
              <classpath refid="saxon.class.path"/>
1344
                        <factory name="com.saxonica.config.EnterpriseTransformerFactory"/>
1345
            </xslt>
1346
                                         
1347
      
1348
      <copy file="${doctools-n.dir}/stylesheet.css"
1349
              tofile="${build-resources.dir}/doc/dotnetdoc/stylesheet.css"
1350
              overwrite="true"/>
1351

    
1352
      <copy file="${doctemp-n.dir}/apidoc.xml"
1353
              tofile="${build-resources.dir}/doc/dotnetdoc/apidoc.xml"
1354
              overwrite="true"/>
1355
    </target>  
1356
    
1357
    
1358
    <target name="release-userdoc-n" description="Generate User Documentation">
1359
      <copy todir="${product.dir}/hen">
1360
        <fileset dir="${userdoc.dir}/saxon9/welcome">
1361
          <include name="doc/**"/>
1362
          <include name="notices/**"/>
1363
          <exclude name="notices/APACHE-TAGSOUP.txt"/>
1364
        </fileset>
1365
      </copy>
1366
      <copy todir="${product.dir}/pen">
1367
        <fileset dir="${userdoc.dir}/saxon9/welcome">
1368
          <include name="doc/**"/>
1369
          <include name="notices/**"/>
1370
        </fileset>
1371
      </copy>
1372
      <copy todir="${product.dir}/een">
1373
        <fileset dir="${userdoc.dir}/saxon9/welcome">
1374
          <include name="doc/**"/>
1375
          <include name="notices/**"/>
1376
        </fileset>
1377
      </copy>       
1378
                     
1379
    </target>
1380
                  
1381
    <target name="n" depends="product-n"
1382
                    description="Generate Saxon for the .NET platform"/>
1383
                    <!--, samples-n --> 
1384
                    
1385
    <target name="installer-hen" description="Create installer for Saxon-HE on .NET" depends="n">
1386
       <mkdir dir="${temp.dir}/n/installer"/> 
1387
       
1388
      <echo file="${temp.dir}/n/installer/he.iss">
1389
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING .ISS SCRIPT FILES!
1390
; Documentation is at http://www.jrsoftware.org/ishelp/
1391

    
1392
[Setup]
1393
AppName=Saxon-HE ${version}
1394
AppVerName=Saxon-HE ${version}
1395
AppPublisher=Saxonica
1396
AppVersion=${version}
1397
DefaultDirName=c:\Program Files\Saxonica\SaxonHE${major.version}N
1398
DefaultGroupName=Saxon-HE ${version}
1399
PrivilegesRequired=none
1400
Compression=lzma
1401
SolidCompression=yes
1402
SourceDir=..\..\..\${build-hen.dir}\bin
1403
OutputDir=${basedir}\${issue.dir}
1404
OutputBaseFilename=SaxonHE${versionh}N-setup
1405
AppCopyright=Copyright (c) 2010 Saxonica
1406

    
1407
[Files]
1408
; GAC Files
1409

    
1410
Source: "IKVM.Runtime.dll"; DestDir: "{app}\bin"; Flags: gacinstall; StrongAssemblyName: "IKVM.Runtime, ${ikvm.strongname}"
1411
Source: "IKVM.OpenJDK.Core.dll"; DestDir: "{app}\bin"; Flags: gacinstall; StrongAssemblyName: "IKVM.OpenJDK.Core, ${ikvm.strongname}"
1412
Source: "IKVM.OpenJDK.Charsets.dll"; DestDir: "{app}\bin"; Flags: gacinstall; StrongAssemblyName: "IKVM.OpenJDK.Charsets, ${ikvm.strongname}"
1413
Source: "IKVM.OpenJDK.Util.dll"; DestDir: "{app}\bin" ; Flags: gacinstall; StrongAssemblyName: "IKVM.OpenJDK.Util, ${ikvm.strongname}"
1414
Source: "IKVM.OpenJDK.Text.dll"; DestDir: "{app}\bin"; Flags: gacinstall; StrongAssemblyName: "IKVM.OpenJDK.Text, ${ikvm.strongname}"
1415
Source: "IKVM.OpenJDK.XML.API.dll"; DestDir: "{app}\bin"; Flags: gacinstall ; StrongAssemblyName: "IKVM.OpenJDK.XML.API, ${ikvm.strongname}"
1416
Source: "saxon9he.dll"; DestDir: "{app}\bin"; Flags: gacinstall; StrongAssemblyName: "saxon9he, ${saxon.strongname}"
1417
Source: "saxon9he-api.dll"; DestDir: "{app}\bin"; Flags: gacinstall; StrongAssemblyName: "saxon9he-api, ${saxon.strongname}"
1418
Source: "saxon9he-api.xml"; DestDir: "{app}\bin"
1419
Source: "..\notices\APACHE-RESOLVER.txt" ; DestDir: "{app}\notices"
1420
Source: "..\notices\APACHE-XERCES.txt" ; DestDir: "{app}\notices"
1421
Source: "..\notices\CERN.txt" ; DestDir: "{app}\notices"
1422
Source: "..\notices\FRIJTERS.txt" ; DestDir: "{app}\notices"
1423
Source: "..\notices\GPL+CLASSPATH.txt" ; DestDir: "{app}\notices"
1424
Source: "..\notices\JAMESCLARK.txt" ; DestDir: "{app}\notices"
1425
Source: "..\notices\LICENSE.txt" ; DestDir: "{app}\notices"
1426
Source: "..\notices\THAI.txt" ; DestDir: "{app}\notices"
1427
Source: "..\notices\UNICODE.txt" ; DestDir: "{app}\notices"
1428

    
1429
; Program Files
1430
Source: "Query.exe"; DestDir: "{app}\bin"
1431
Source: "Transform.exe"; DestDir: "{app}\bin"
1432

    
1433
[Registry]
1434
Root: HKCU; Subkey: "Software\Saxonica"; Flags: uninsdeletekeyifempty
1435
Root: HKCU; Subkey: "Software\Saxonica\SaxonHE-N"; Flags: uninsdeletekey
1436
Root: HKCU; Subkey: "Software\Saxonica\SaxonHE-N\Settings"; ValueType: string; ValueName: "InstallPath"; ValueData: "{app}";
1437
Root: HKLM; Subkey: "Software\Saxonica"; Flags: uninsdeletekeyifempty
1438
Root: HKLM; Subkey: "Software\Saxonica\SaxonHE-N"; Flags: uninsdeletekey
1439
Root: HKLM; Subkey: "Software\Saxonica\SaxonHE-N\Settings"; ValueType: string; ValueName: "InstallPath"; ValueData: "{app}";
1440
Root: HKCU; Subkey: "Environment"; ValueType: expandsz; ValueName: "Path"; ValueData: "{olddata};{app}\bin"
1441

    
1442
[UninstallDelete]
1443
Type: dirifempty; Name: "{app}";         
1444
               
1445
      </echo>
1446
      <exec executable="./Inno Setup 5/Compil32.exe">
1447
        <arg line="/cc"/>
1448
        <arg line="${temp.dir}/n/installer/he.iss"/>
1449
      </exec>
1450
    </target>   
1451
    
1452
    <target name="installer-pen" description="Create installer for Saxon-PE on .NET" depends="n">
1453
       <mkdir dir="${temp.dir}/n/installer"/> 
1454
       
1455
      <echo file="${temp.dir}/n/installer/pe.iss">
1456
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING .ISS SCRIPT FILES!
1457
; Documentation is at http://www.jrsoftware.org/ishelp/
1458

    
1459
[Setup]
1460
AppName=Saxon-PE ${version}
1461
AppVerName=Saxon-PE ${version}
1462
AppPublisher=Saxonica
1463
AppVersion=${version}
1464
DefaultDirName=c:\Program Files\Saxonica\SaxonPE${major.version}N
1465
DefaultGroupName=Saxon-PE ${version}
1466
PrivilegesRequired=none
1467
Compression=lzma
1468
SolidCompression=yes
1469
SourceDir=..\..\..\${build-pen.dir}\bin
1470
OutputDir=${basedir}\${issue.dir}
1471
OutputBaseFilename=SaxonPE${versionh}N-setup
1472
AppCopyright=Copyright (c) 2010 Saxonica
1473

    
1474
[Files]
1475
; GAC Files
1476

    
1477
Source: "IKVM.Runtime.dll"; DestDir: "{app}\bin"; Flags: gacinstall; StrongAssemblyName: "IKVM.Runtime, ${ikvm.strongname}"
1478
Source: "IKVM.OpenJDK.Core.dll"; DestDir: "{app}\bin"; Flags: gacinstall; StrongAssemblyName: "IKVM.OpenJDK.Core, ${ikvm.strongname}"
1479
Source: "IKVM.OpenJDK.Charsets.dll"; DestDir: "{app}\bin"; Flags: gacinstall; StrongAssemblyName: "IKVM.OpenJDK.Charsets, ${ikvm.strongname}"
1480
Source: "IKVM.OpenJDK.Security.dll"; DestDir: "{app}\bin"; Flags: gacinstall; StrongAssemblyName: "IKVM.OpenJDK.Security, ${ikvm.strongname}"
1481
Source: "IKVM.OpenJDK.Util.dll"; DestDir: "{app}\bin" ; Flags: gacinstall; StrongAssemblyName: "IKVM.OpenJDK.Util, ${ikvm.strongname}"
1482
Source: "IKVM.OpenJDK.Text.dll"; DestDir: "{app}\bin"; Flags: gacinstall; StrongAssemblyName: "IKVM.OpenJDK.Text, ${ikvm.strongname}"
1483
Source: "IKVM.OpenJDK.XML.API.dll"; DestDir: "{app}\bin"; Flags: gacinstall ; StrongAssemblyName: "IKVM.OpenJDK.XML.API, ${ikvm.strongname}"
1484
Source: "saxon9pe.dll"; DestDir: "{app}\bin"; Flags: gacinstall; StrongAssemblyName: "saxon9pe, ${saxon.strongname}"
1485
Source: "saxon9pe-api.dll"; DestDir: "{app}\bin"; Flags: gacinstall; StrongAssemblyName: "saxon9pe-api, ${saxon.strongname}"
1486
Source: "saxon9pe-api.xml"; DestDir: "{app}\bin"
1487
Source: "..\notices\APACHE-RESOLVER.txt" ; DestDir: "{app}\notices"
1488
Source: "..\notices\APACHE-XERCES.txt" ; DestDir: "{app}\notices"
1489
Source: "..\notices\CERN.txt" ; DestDir: "{app}\notices"
1490
Source: "..\notices\FRIJTERS.txt" ; DestDir: "{app}\notices"
1491
Source: "..\notices\GPL+CLASSPATH.txt" ; DestDir: "{app}\notices"
1492
Source: "..\notices\JAMESCLARK.txt" ; DestDir: "{app}\notices"
1493
Source: "..\notices\LICENSE.txt" ; DestDir: "{app}\notices"
1494
Source: "..\notices\THAI.txt" ; DestDir: "{app}\notices"
1495
Source: "..\notices\UNICODE.txt" ; DestDir: "{app}\notices"
1496

    
1497

    
1498
; Program Files
1499
Source: "Query.exe"; DestDir: "{app}\bin"
1500
Source: "Transform.exe"; DestDir: "{app}\bin"
1501
Source: "StylesheetPackager.exe"; DestDir: "{app}\bin"
1502

    
1503
[Registry]
1504
Root: HKCU; Subkey: "Software\Saxonica"; Flags: uninsdeletekeyifempty
1505
Root: HKCU; Subkey: "Software\Saxonica\SaxonPE-N"; Flags: uninsdeletekey
1506
Root: HKCU; Subkey: "Software\Saxonica\SaxonPE-N\Settings"; ValueType: string; ValueName: "InstallPath"; ValueData: "{app}";
1507
Root: HKLM; Subkey: "Software\Saxonica"; Flags: uninsdeletekeyifempty
1508
Root: HKLM; Subkey: "Software\Saxonica\SaxonPE-N"; Flags: uninsdeletekey
1509
Root: HKLM; Subkey: "Software\Saxonica\SaxonPE-N\Settings"; ValueType: string; ValueName: "InstallPath"; ValueData: "{app}";
1510
Root: HKCU; Subkey: "Environment"; ValueType: expandsz; ValueName: "Path"; ValueData: "{olddata};{app}\bin"
1511

    
1512
[UninstallDelete]
1513
Type: dirifempty; Name: "{app}";         
1514
                
1515
      </echo>
1516
      <exec executable="./Inno Setup 5/Compil32.exe">
1517
        <arg line="/cc"/>
1518
        <arg line="${temp.dir}/n/installer/pe.iss"/>
1519
      </exec>
1520
    </target>       
1521
    
1522
    <target name="installer-een" description="Create installer for Saxon-EE on .NET" depends="n">
1523
       <mkdir dir="${temp.dir}/n/installer"/> 
1524
       
1525
      <echo file="${temp.dir}/n/installer/ee.iss">
1526
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING .ISS SCRIPT FILES!
1527
; Documentation is at http://www.jrsoftware.org/ishelp/
1528

    
1529
[Setup]
1530
AppName=Saxon-EE ${version}
1531
AppVerName=Saxon-EE ${version}
1532
AppPublisher=Saxonica
1533
AppVersion=${version}
1534
DefaultDirName=c:\Program Files\Saxonica\SaxonEE${major.version}N
1535
DefaultGroupName=Saxon-PE ${version}
1536
PrivilegesRequired=none
1537
Compression=lzma
1538
SolidCompression=yes
1539
SourceDir=..\..\..\${build-een.dir}\bin
1540
OutputDir=${basedir}\${issue.dir}
1541
OutputBaseFilename=SaxonEE${versionh}N-setup
1542
AppCopyright=Copyright (c) 2010 Saxonica
1543

    
1544
[Files]
1545
; GAC Files
1546

    
1547
Source: "IKVM.Runtime.dll"; DestDir: "{app}\bin"; Flags: gacinstall; StrongAssemblyName: "IKVM.Runtime, ${ikvm.strongname}"
1548
Source: "IKVM.OpenJDK.Core.dll"; DestDir: "{app}\bin"; Flags: gacinstall; StrongAssemblyName: "IKVM.OpenJDK.Core, ${ikvm.strongname}"
1549
Source: "IKVM.OpenJDK.Charsets.dll"; DestDir: "{app}\bin"; Flags: gacinstall; StrongAssemblyName: "IKVM.OpenJDK.Charsets, ${ikvm.strongname}"
1550
Source: "IKVM.OpenJDK.Security.dll"; DestDir: "{app}\bin"; Flags: gacinstall; StrongAssemblyName: "IKVM.OpenJDK.Security, ${ikvm.strongname}"
1551
Source: "IKVM.OpenJDK.Util.dll"; DestDir: "{app}\bin" ; Flags: gacinstall; StrongAssemblyName: "IKVM.OpenJDK.Util, ${ikvm.strongname}"
1552
Source: "IKVM.OpenJDK.Text.dll"; DestDir: "{app}\bin"; Flags: gacinstall; StrongAssemblyName: "IKVM.OpenJDK.Text, ${ikvm.strongname}"
1553
Source: "IKVM.OpenJDK.XML.API.dll"; DestDir: "{app}\bin"; Flags: gacinstall ; StrongAssemblyName: "IKVM.OpenJDK.XML.API, ${ikvm.strongname}"
1554
Source: "saxon9ee.dll"; DestDir: "{app}\bin"; Flags: gacinstall; StrongAssemblyName: "saxon9ee, ${saxon.strongname}"
1555
Source: "saxon9ee-api.dll"; DestDir: "{app}\bin"; Flags: gacinstall; StrongAssemblyName: "saxon9ee-api, ${saxon.strongname}"
1556
Source: "saxon9ee-api.xml"; DestDir: "{app}\bin"
1557
Source: "..\notices\APACHE-RESOLVER.txt" ; DestDir: "{app}\notices"
1558
Source: "..\notices\APACHE-XERCES.txt" ; DestDir: "{app}\notices"
1559
Source: "..\notices\ASM.txt" ; DestDir: "{app}\notices"
1560
Source: "..\notices\CERN.txt" ; DestDir: "{app}\notices"
1561
Source: "..\notices\FRIJTERS.txt" ; DestDir: "{app}\notices"
1562
Source: "..\notices\GPL+CLASSPATH.txt" ; DestDir: "{app}\notices"
1563
Source: "..\notices\JAMESCLARK.txt" ; DestDir: "{app}\notices"
1564
Source: "..\notices\LICENSE.txt" ; DestDir: "{app}\notices"
1565
Source: "..\notices\THAI.txt" ; DestDir: "{app}\notices"
1566
Source: "..\notices\UNICODE.txt" ; DestDir: "{app}\notices"
1567

    
1568
; Program Files
1569
Source: "Query.exe"; DestDir: "{app}\bin"
1570
Source: "Transform.exe"; DestDir: "{app}\bin"
1571
Source: "Validate.exe"; DestDir: "{app}\bin"
1572
Source: "StylesheetPackager.exe"; DestDir: "{app}\bin"
1573

    
1574
[Registry]
1575
Root: HKCU; Subkey: "Software\Saxonica"; Flags: uninsdeletekeyifempty
1576
Root: HKCU; Subkey: "Software\Saxonica\SaxonEE-N"; Flags: uninsdeletekey
1577
Root: HKCU; Subkey: "Software\Saxonica\SaxonEE-N\Settings"; ValueType: string; ValueName: "InstallPath"; ValueData: "{app}";
1578
Root: HKLM; Subkey: "Software\Saxonica"; Flags: uninsdeletekeyifempty
1579
Root: HKLM; Subkey: "Software\Saxonica\SaxonEE-N"; Flags: uninsdeletekey
1580
Root: HKLM; Subkey: "Software\Saxonica\SaxonEE-N\Settings"; ValueType: string; ValueName: "InstallPath"; ValueData: "{app}";
1581
Root: HKCU; Subkey: "Environment"; ValueType: expandsz; ValueName: "Path"; ValueData: "{olddata};{app}\bin"
1582

    
1583
[UninstallDelete]
1584
Type: dirifempty; Name: "{app}";          
1585
                
1586
      </echo>
1587
      <exec executable="./Inno Setup 5/Compil32.exe">
1588
        <arg line="/cc"/>
1589
        <arg line="${temp.dir}/n/installer/ee.iss"/>
1590
      </exec>
1591
    </target> 
1592
    
1593
    <target name="release-n"
1594
        depends="copy-notices, installer-hen, installer-pen, installer-een"/>
1595
           
1596

    
1597
    
1598

    
1599
      
1600
       
1601
    
1602
</project>
(3-3/7)