annotate build.xml @ 34:d175593317a8

Add a bunch of packaging stuff, NOT WORKING YET,
author David Barts <n5jrn@me.com>
date Wed, 29 Apr 2020 21:49:21 -0700
parents 3d86f0391168
children bcbc92ffe0d0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
1 <?xml version="1.0" encoding="UTF-8"?>
33
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
2 <project name="JpegWasher" default="help" basedir="."
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
3 xmlns:contrib="antlib:net.sf.antcontrib"
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
4 xmlns:jarbundler="antlib:com.ultramixer.jarbundler"
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
5 xmlns:launch4j="antlib:net.sf.launch4j.ant"
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
6 xmlns:mod="antlib:de.masters_of_disaster.ant.tasks">
0
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
7 <!-- import all environment variables as env.* -->
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
8 <property environment="env"/>
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
9
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
10 <!-- ensure required environment variables are set -->
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
11 <macrodef name="env-require">
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
12 <attribute name="name"/>
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
13 <sequential>
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
14 <fail message="Environment variable @{name} not set!">
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
15 <condition>
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
16 <not><isset property="env.@{name}"/></not>
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
17 </condition>
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
18 </fail>
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
19 </sequential>
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
20 </macrodef>
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
21 <env-require name="JRE_HOME"/>
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
22 <env-require name="KOTLIN_HOME"/>
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
23
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
24 <!-- cribbed from https://stackoverflow.com/questions/7129672/uppercase-lowercase-capitalize-an-ant-property -->
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
25 <scriptdef language="javascript" name="toLowerCase">
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
26 <attribute name="value" />
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
27 <attribute name="target" />
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
28 <![CDATA[
34
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
29 "use strict";
0
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
30 project.setProperty( attributes.get( "target" ),
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
31 attributes.get( "value" ).toLowerCase() );
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
32 ]]>
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
33 </scriptdef>
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
34
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
35 <!-- Define the properties used by the build -->
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
36 <property name="app.name" value="${ant.project.name}"/>
23
5cac95c17fef More Windows stuff. Attempts to get Windows packages working.
davidb
parents: 22
diff changeset
37 <property name="app.version" value="1.03"/>
0
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
38 <property name="app.entry" value="name.blackcap.exifwasher.MainKt"/>
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
39 <toLowerCase target="lc.app.name" value="${app.name}"/>
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
40 <property name="jar.name" value="${basedir}/${lc.app.name}.jar"/>
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
41 <property name="work.jar" value="${basedir}/work.jar"/>
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
42 <property name="lib.home" value="${basedir}/lib"/>
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
43 <property name="src.home" value="${basedir}/src"/>
34
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
44 <property name="dist.home" value="${basedir}/dist"/>
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
45 <property name="pf.home" value="${basedir}/package-files"/>
0
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
46 <property name="nat.dir" value="${src.home}/name/blackcap/exifwasher/exiv2"/>
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
47 <property name="bin.dir" value="${src.home}/name/blackcap/exifwasher/binaries"/>
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
48
33
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
49 <!-- load the ant-contrib tasks -->
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
50 <taskdef resource="net/sf/antcontrib/antlib.xml"
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
51 uri="antlib:net.sf.antcontrib">
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
52 <classpath>
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
53 <fileset dir="${lib.home}/ant-contrib" includes="*.jar"/>
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
54 </classpath>
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
55 </taskdef>
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
56
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
57 <!-- load jarbundler (Mac app bundler) tasks -->
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
58 <contrib:if>
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
59 <os family="mac"/>
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
60 <contrib:then>
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
61 <taskdef name="create"
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
62 classname="com.ultramixer.jarbundler.JarBundler"
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
63 classpath="${lib.home}/jarbundler-core-3.3.0.jar"
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
64 uri="antlib:com.ultramixer.jarbundler">
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
65 </taskdef>
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
66 </contrib:then>
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
67 </contrib:if>
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
68
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
69 <!-- load launch4j (Windows app bundler) tasks -->
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
70 <contrib:if>
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
71 <os family="windows"/>
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
72 <contrib:then>
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
73 <taskdef name="create"
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
74 classname="net.sf.launch4j.ant.Launch4jTask"
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
75 uri="antlib:net.sf.launch4j.ant">
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
76 <classpath>
34
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
77 <fileset dir="${lib.home}/launch4j" includes="*.jar"/>
33
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
78 </classpath>
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
79 </taskdef>
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
80 </contrib:then>
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
81 </contrib:if>
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
82
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
83 <!-- load mod (Gnome app bundler) tasks -->
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
84 <contrib:if>
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
85 <os family="unix"/>
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
86 <contrib:then>
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
87 <taskdef name="calculatesize"
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
88 classname="de.masters_of_disaster.ant.tasks.calculatesize.CalculateSize"
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
89 uri="antlib:de.masters_of_disaster.ant.tasks">
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
90 <classpath>
34
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
91 <fileset dir="${lib.home}/mod" includes="*.jar"/>
33
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
92 </classpath>
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
93 </taskdef>
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
94 <taskdef name="deb"
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
95 classname="de.masters_of_disaster.ant.tasks.deb.Deb"
34
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
96 uri="antlib:de.masters_of_disaster.ant.tasks">
33
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
97 <classpath>
34
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
98 <fileset dir="${lib.home}/mod" includes="*.jar"/>
33
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
99 </classpath>
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
100 </taskdef>
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
101 </contrib:then>
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
102 </contrib:if>
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
103
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
104 <!-- define the kotlin task -->
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
105 <property name="kotlin.lib" value="${env.KOTLIN_HOME}/lib"/>
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
106 <typedef resource="org/jetbrains/kotlin/ant/antlib.xml"
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
107 classpath="${kotlin.lib}/kotlin-ant.jar"/>
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
108
0
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
109 <!-- help message -->
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
110 <target name="help">
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
111 <echo>You can use the following targets:</echo>
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
112 <echo> </echo>
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
113 <echo> help : (default) Prints this message </echo>
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
114 <echo> all : Cleans, compiles, and stages application</echo>
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
115 <echo> clean : Deletes work directories</echo>
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
116 <echo> compile : Compiles servlets into class files</echo>
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
117 <echo> jar : Make JAR file.</echo>
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
118 <echo> </echo>
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
119 <echo>For example, to clean, compile, and package all at once, run:</echo>
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
120 <echo>prompt> ant all </echo>
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
121 </target>
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
122
33
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
123 <!-- Determine OS type -->
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
124 <condition property="os.type" value="mac">
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
125 <os family="mac"/>
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
126 </condition>
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
127 <condition property="os.type" value="windows">
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
128 <os family="windows"/>
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
129 </condition>
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
130 <condition property="os.type" value="linux">
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
131 <!-- notes: 1) XXX not all non-mac UNIX systems are Linux, but this assumes
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
132 so; 2) this clause MUST appear AFTER the "mac" one -->
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
133 <os family="unix"/>
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
134 </condition>
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
135 <property name="os.type" value="unknown"/>
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
136
0
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
137 <!-- Define the CLASSPATH -->
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
138 <target name="classpath">
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
139 <path id="compile.classpath">
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
140 <pathelement location="${src.home}"/>
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
141 </path>
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
142 </target>
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
143
26
985d5b82a882 Make needed dirs.
davidb
parents: 25
diff changeset
144 <!-- make needed directories -->
985d5b82a882 Make needed dirs.
davidb
parents: 25
diff changeset
145 <target name="mkdirs">
34
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
146 <mkdir dir="${bin.dir}/${os.type}"/>
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
147 <mkdir dir="${dist.home}"/>
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
148 </target>
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
149
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
150 <!-- remove old cruft -->
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
151 <target name="clean">
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
152 <delete includeEmptyDirs="true">
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
153 <fileset dir="${dist.home}" includes="**/*"/>
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
154 <fileset dir="${bin.dir}"/>
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
155 </delete>
33
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
156 </target>
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
157
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
158 <!-- rename files containing OS-dependant code -->
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
159 <target name="osdep">
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
160 <exec executable="${env.JRE_HOME}/bin/java">
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
161 <arg value="-jar"/>
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
162 <arg value="../Osdep/osdep.jar"/>
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
163 <arg value="${src.home}"/>
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
164 </exec>
26
985d5b82a882 Make needed dirs.
davidb
parents: 25
diff changeset
165 </target>
985d5b82a882 Make needed dirs.
davidb
parents: 25
diff changeset
166
0
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
167 <!-- do everything but install -->
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
168 <target name="all" depends="jar"
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
169 description="Clean work dirs, compile, make JAR."/>
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
170
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
171 <!-- compile *.kt to *.class -->
33
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
172 <target name="compile" depends="mkdirs,osdep,classpath"
0
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
173 description="Compile Java sources to ${work.home}">
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
174 <kotlinc src="${src.home}" output="${work.jar}"
5
dc1f4359659d Got it compiling.
David Barts <n5jrn@me.com>
parents: 0
diff changeset
175 classpathref="compile.classpath">
dc1f4359659d Got it compiling.
David Barts <n5jrn@me.com>
parents: 0
diff changeset
176 <compilerarg line="-jvm-target 1.8"/>
dc1f4359659d Got it compiling.
David Barts <n5jrn@me.com>
parents: 0
diff changeset
177 </kotlinc>
0
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
178 </target>
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
179
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
180 <!-- make .jar file -->
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
181 <target name="jar" depends="compile" description="Create JAR file.">
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
182 <jar destfile="${jar.name}">
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
183 <manifest>
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
184 <attribute name="Main-Class" value="${app.entry}"/>
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
185 </manifest>
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
186 <zipgroupfileset dir="${lib.home}" includes="*.jar"/>
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
187 <zipfileset src="${work.jar}"/>
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
188 <zipfileset dir="${src.home}" includes="**/*.properties,**/*.dll,**/*.so,**/*.dylib"/>
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
189 </jar>
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
190 </target>
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
191
34
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
192 <!-- the packaging logic here is cribbed from what jEdit does -->
0
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
193
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
194 <target name="macapp" depends="jar" description="Create MacOS app bundle.">
34
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
195 <!-- not finished -->
23
5cac95c17fef More Windows stuff. Attempts to get Windows packages working.
davidb
parents: 22
diff changeset
196 </target>
5cac95c17fef More Windows stuff. Attempts to get Windows packages working.
davidb
parents: 22
diff changeset
197
34
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
198 <target name="winapp" depends="jar" description="Create app bundle.">
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
199 <!-- not finished -->
0
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
200 </target>
34
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
201
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
202 <target name="gunk">
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
203 <sequential>
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
204 <mkdir dir="${dist.home}/classes/package-files/linux/deb"/>
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
205 <copy todir="${dist.home}/classes/package-files/linux/deb">
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
206 <fileset file="${pf.home}/linux/deb/control"/>
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
207 </copy>
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
208 <exec executable="ls">
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
209 <arg value="-ld"/>
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
210 <arg value="${dist.home}/classes/package-files/linux/deb"/>
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
211 </exec>
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
212 </sequential>
0
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
213 </target>
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
214
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
215 <target name="deb" depends="jar" description="Create Debian package.">
34
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
216 <sequential>
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
217 <mod:calculatesize realsizeproperty="deb.installed.size">
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
218 <fileset file="${jar.name}"/>
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
219 </mod:calculatesize>
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
220 <mkdir dir="${dist.home}/classes/package-files/linux/deb"/>
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
221 <copy todir="${dist.home}/classes/package-files/linux/deb" encoding="UTF-8"
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
222 overwrite="true">
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
223 <fileset file="${pf.home}/linux/deb/control"/>
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
224 <filterset>
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
225 <filter token="app.version" value="${app.version}"/>
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
226 <filter token="deb.installed.size" value="${deb.installed.size}"/>
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
227 </filterset>
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
228 </copy>
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
229 <copy todir="${dist.home}/classes/package-files/linux">
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
230 <filelist dir="${pf.home}/linux" files="jpegwasher,jpegwasher.1"/>
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
231 <filterset>
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
232 <filter token="jar.filename" value="${lc.app.name}.jar"/>
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
233 </filterset>
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
234 </copy>
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
235 <mkdir dir="${dist.home}/doc"/>
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
236 <copy todir="${dist.home}/doc">
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
237 <filelist dir="${basedir}" files="Readme.html,Readme.rst"/>
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
238 </copy>
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
239 <copy todir="${dist.home}">
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
240 <filelist dir="${basedir}" files="${jar.name}"/>
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
241 </copy>
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
242 <property name="deb.file" value="${dist.home}/${lc.app.name}_${app.version}.deb"/>
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
243 <mod:deb destfile="${deb.file}"
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
244 tempDir="${dist.home}/classes/deb"
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
245 deleteTempFiles="false"
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
246 includeMd5sums="true">
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
247 <controlfileset file="${dist.home}/classes/package-files/linux/deb/control"/>
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
248 <controlfileset dir="${dist.home}/classes/package-files/linux/deb"
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
249 includes="postinst,postrm" mode="755"/>
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
250 <datafileset file="." fullpath="usr/"/>
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
251 <datafileset file="." fullpath="usr/bin/"/>
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
252 <datafileset file="${dist.home}/classes/package-files/linux/jpegwasher"
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
253 fullpath="usr/bin/jpegwasher" mode="755"/>
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
254 <datafileset file="." fullpath="usr/lib/"/>
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
255 <datafileset file="." fullpath="usr/lib/menu/"/>
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
256 <datafileset file="${dist.home}/classes/package-files/linux/deb/jedit"
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
257 fullpath="usr/lib/menu/jedit"/>
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
258 <datafileset file="." fullpath="usr/share/"/>
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
259 <datafileset file="." fullpath="usr/share/applications/"/>
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
260 <datafileset file="${dist.home}/classes/package-files/linux/deb/jedit.desktop"
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
261 fullpath="usr/share/applications/jedit.desktop"/>
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
262 <datafileset file="." fullpath="usr/share/doc/"/>
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
263 <datafileset file="." fullpath="usr/share/doc/JpegWasher/"/>
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
264 <datafileset dir="${dist.home}/doc" includes="*.html,*.rst"
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
265 prefix="usr/share/doc/JpegWasher/"/>
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
266 <datafileset file="." fullpath="usr/share/JpegWasher/"/>
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
267 <datafileset dir="${dist.home}"
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
268 includes="doc/**,keymaps/**,macros/**,modes/**,properties/**,startup/**,${jar.name}"
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
269 prefix="usr/share/JpegWasher/"/>
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
270 <datafileset file="." fullpath="/usr/share/JpegWasher/jars"/>
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
271 <datafileset file="${jar.name}"
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
272 fullpath="/usr/share/JpegWasher/jars/${lc.app.name}.jar"/>
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
273 <datafileset file="."
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
274 fullpath="usr/share/man/"/>
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
275 <datafileset file="."
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
276 fullpath="usr/share/man/man1/"/>
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
277 <datafileset file="${dist.home}/classes/package-files/linux/jpegwasher.1"
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
278 fullpath="usr/share/man/man1/jpegwasher.1"/>
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
279 </mod:deb>
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
280 <length property="deb.size" file="${deb.file}"/>
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
281 <checksum file="${deb.file}" algorithm="MD5" property="deb.md5"/>
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
282 <checksum file="${deb.file}" algorithm="SHA1" property="deb.sha1"/>
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
283 <checksum file="${deb.file}" algorithm="SHA-256" property="deb.sha256"/>
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
284 <copy todir="${dist.home}" encoding="UTF-8" overwrite="true">
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
285 <fileset file="${pf.home}/linux/deb/Packages"/>
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
286 <filterset>
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
287 <filter token="app.version" value="${app.version}"/>
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
288 <filter token="deb.installed.size" value="${deb.installed.size}"/>
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
289 <filter token="deb.repository.file" value="${deb.file}"/>
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
290 <filter token="deb.size" value="${deb.size}"/>
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
291 <filter token="deb.md5" value="${deb.md5}"/>
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
292 <filter token="deb.sha1" value="${deb.sha1}"/>
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
293 <filter token="deb.sha256" value="${deb.sha256}"/>
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
294 </filterset>
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
295 </copy>
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
296 <gzip src="${dist.home}/Packages" destfile="${dist.home}/Packages.gz"/>
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
297 <bzip2 src="${dist.home}/Packages" destfile="${dist.home}/Packages.bz2"/>
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
298 <length property="packages.size" file="${dist.home}/Packages"/>
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
299 <checksum file="${dist.home}/Packages"
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
300 algorithm="MD5" property="packages.md5"/>
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
301 <checksum file="${dist.home}/Packages"
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
302 algorithm="SHA1" property="packages.sha1"/>
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
303 <checksum file="${dist.home}/Packages"
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
304 algorithm="SHA-256" property="packages.sha256"/>
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
305 <length property="packages.gz.size"
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
306 file="${dist.home}/Packages.gz"/>
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
307 <checksum file="${dist.home}/Packages.gz"
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
308 algorithm="MD5" property="packages.gz.md5"/>
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
309 <checksum file="${dist.home}/Packages.gz"
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
310 algorithm="SHA1" property="packages.gz.sha1"/>
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
311 <checksum file="${dist.home}/Packages.gz"
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
312 algorithm="SHA-256" property="packages.gz.sha256"/>
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
313 <length property="packages.bz2.size"
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
314 file="${dist.home}/Packages.bz2"/>
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
315 <checksum file="${dist.home}/Packages.bz2"
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
316 algorithm="MD5" property="packages.bz2.md5"/>
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
317 <checksum file="${dist.home}/Packages.bz2"
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
318 algorithm="SHA1" property="packages.bz2.sha1"/>
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
319 <checksum file="${dist.home}/Packages.bz2"
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
320 algorithm="SHA-256" property="packages.bz2.sha256"/>
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
321 <script language="javascript">
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
322 <![CDATA[
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
323 "use strict";
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
324 var Calendar = Java.type('java.util.Calendar');
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
325 var File = Java.type('java.io.File');
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
326 var Formatter = Java.type('java.util.Formatter');
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
327 var Locale = Java.type('java.util.Locale');
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
328 var TimeZone = Java.type('java.util.TimeZone');
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
329 new Formatter(new File(project.getProperty("dist.home"), "Release"), "UTF-8", Locale.ENGLISH)
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
330 .format("Date: %1$ta, %1$td %1$tb %1$tY %1$tT %1$tZ\n",
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
331 Calendar.getInstance(TimeZone.getTimeZone("UTC")))
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
332 .format("MD5Sum:\n")
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
333 .format(" %s %16s %s\n", project.getProperty("packages.md5"),
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
334 project.getProperty("packages.size"), "Packages")
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
335 .format(" %s %16s %s\n", project.getProperty("packages.bz2.md5"),
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
336 project.getProperty("packages.bz2.size"), "Packages.bz2")
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
337 .format(" %s %16s %s\n", project.getProperty("packages.gz.md5"),
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
338 project.getProperty("packages.gz.size"), "Packages.gz")
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
339 .format("SHA1:\n")
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
340 .format(" %s %16s %s\n", project.getProperty("packages.sha1"),
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
341 project.getProperty("packages.size"), "Packages")
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
342 .format(" %s %16s %s\n", project.getProperty("packages.bz2.sha1"),
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
343 project.getProperty("packages.bz2.size"), "Packages.bz2")
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
344 .format(" %s %16s %s\n", project.getProperty("packages.gz.sha1"),
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
345 project.getProperty("packages.gz.size"), "Packages.gz")
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
346 .format("SHA256:\n")
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
347 .format(" %s %16s %s\n", project.getProperty("packages.sha256"),
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
348 project.getProperty("packages.size"), "Packages")
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
349 .format(" %s %16s %s\n", project.getProperty("packages.bz2.sha256"),
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
350 project.getProperty("packages.bz2.size"), "Packages.bz2")
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
351 .format(" %s %16s %s\n", project.getProperty("packages.gz.sha256"),
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
352 project.getProperty("packages.gz.size"), "Packages.gz")
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
353 .close();
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
354 ]]>
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
355 <!-- gpg reads from tty, so can't be used inside ant -->
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
356 </script>
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
357 <echo message="Use gpg(1) to sign the Release file, if desired:"/>
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
358 <echo message=" gpg --sign ${dist.home}/Release"/>
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
359 </sequential>
0
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
360 </target>
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
361
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
362 </project>