annotate build.xml @ 60:d0b83fc1d62a default tip

Remember our input directory on a per-invocation basis.
author David Barts <n5jrn@me.com>
date Sun, 26 Jul 2020 15:14:03 -0700
parents 39895d44a287
children
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="."
37
4fdd2f7e2cec Prune out more deadwood.
David Barts <n5jrn@me.com>
parents: 36
diff changeset
3 xmlns:launch4j="antlib:net.sf.launch4j.ant">
0
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
4 <!-- import all environment variables as env.* -->
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
5 <property environment="env"/>
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
6
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
7 <!-- ensure required environment variables are set -->
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
8 <macrodef name="env-require">
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
9 <attribute name="name"/>
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
10 <sequential>
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
11 <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
12 <condition>
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
13 <not><isset property="env.@{name}"/></not>
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
14 </condition>
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
15 </fail>
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
16 </sequential>
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
17 </macrodef>
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
18 <env-require name="JRE_HOME"/>
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
19 <env-require name="KOTLIN_HOME"/>
44
6999afa6fff3 Update Building instructions; minor build system bug fixes.
David Barts <davidb@stashtea.com>
parents: 43
diff changeset
20 <env-require name="OSDEP_HOME"/>
0
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
21
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
22 <!-- 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
23 <scriptdef language="javascript" name="toLowerCase">
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
24 <attribute name="value" />
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
25 <attribute name="target" />
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
26 <![CDATA[
34
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
27 "use strict";
0
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
28 project.setProperty( attributes.get( "target" ),
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
29 attributes.get( "value" ).toLowerCase() );
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
30 ]]>
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
31 </scriptdef>
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
32
42
4076f1bbf21d Got ant winapp working!
davidb
parents: 39
diff changeset
33 <!-- estimate disk usage -->
35
bcbc92ffe0d0 Makes a .deb file at long last, but Duke still shows up as an icon in the dock.
David Barts <n5jrn@me.com>
parents: 34
diff changeset
34 <scriptdef language="javascript" name="du">
bcbc92ffe0d0 Makes a .deb file at long last, but Duke still shows up as an icon in the dock.
David Barts <n5jrn@me.com>
parents: 34
diff changeset
35 <attribute name="path" />
bcbc92ffe0d0 Makes a .deb file at long last, but Duke still shows up as an icon in the dock.
David Barts <n5jrn@me.com>
parents: 34
diff changeset
36 <attribute name="target" />
bcbc92ffe0d0 Makes a .deb file at long last, but Duke still shows up as an icon in the dock.
David Barts <n5jrn@me.com>
parents: 34
diff changeset
37 <![CDATA[
bcbc92ffe0d0 Makes a .deb file at long last, but Duke still shows up as an icon in the dock.
David Barts <n5jrn@me.com>
parents: 34
diff changeset
38 "use strict";
bcbc92ffe0d0 Makes a .deb file at long last, but Duke still shows up as an icon in the dock.
David Barts <n5jrn@me.com>
parents: 34
diff changeset
39 var File = Java.type('java.io.File');
bcbc92ffe0d0 Makes a .deb file at long last, but Duke still shows up as an icon in the dock.
David Barts <n5jrn@me.com>
parents: 34
diff changeset
40 function du(fp) {
bcbc92ffe0d0 Makes a .deb file at long last, but Duke still shows up as an icon in the dock.
David Barts <n5jrn@me.com>
parents: 34
diff changeset
41 if (fp.isDirectory()) {
bcbc92ffe0d0 Makes a .deb file at long last, but Duke still shows up as an icon in the dock.
David Barts <n5jrn@me.com>
parents: 34
diff changeset
42 var files = fp.listFiles();
bcbc92ffe0d0 Makes a .deb file at long last, but Duke still shows up as an icon in the dock.
David Barts <n5jrn@me.com>
parents: 34
diff changeset
43 if (!files) return 0;
bcbc92ffe0d0 Makes a .deb file at long last, but Duke still shows up as an icon in the dock.
David Barts <n5jrn@me.com>
parents: 34
diff changeset
44 var total = 0;
37
4fdd2f7e2cec Prune out more deadwood.
David Barts <n5jrn@me.com>
parents: 36
diff changeset
45 for (var i=0; i<files.length; i++)
35
bcbc92ffe0d0 Makes a .deb file at long last, but Duke still shows up as an icon in the dock.
David Barts <n5jrn@me.com>
parents: 34
diff changeset
46 total += du(files[i]);
bcbc92ffe0d0 Makes a .deb file at long last, but Duke still shows up as an icon in the dock.
David Barts <n5jrn@me.com>
parents: 34
diff changeset
47 return total;
bcbc92ffe0d0 Makes a .deb file at long last, but Duke still shows up as an icon in the dock.
David Barts <n5jrn@me.com>
parents: 34
diff changeset
48 } else {
bcbc92ffe0d0 Makes a .deb file at long last, but Duke still shows up as an icon in the dock.
David Barts <n5jrn@me.com>
parents: 34
diff changeset
49 return fp.length();
bcbc92ffe0d0 Makes a .deb file at long last, but Duke still shows up as an icon in the dock.
David Barts <n5jrn@me.com>
parents: 34
diff changeset
50 }
bcbc92ffe0d0 Makes a .deb file at long last, but Duke still shows up as an icon in the dock.
David Barts <n5jrn@me.com>
parents: 34
diff changeset
51 }
bcbc92ffe0d0 Makes a .deb file at long last, but Duke still shows up as an icon in the dock.
David Barts <n5jrn@me.com>
parents: 34
diff changeset
52 var path = new File(attributes.get("path"));
bcbc92ffe0d0 Makes a .deb file at long last, but Duke still shows up as an icon in the dock.
David Barts <n5jrn@me.com>
parents: 34
diff changeset
53 project.setProperty(attributes.get("target"),
bcbc92ffe0d0 Makes a .deb file at long last, but Duke still shows up as an icon in the dock.
David Barts <n5jrn@me.com>
parents: 34
diff changeset
54 Math.round(du(path) / 1024) + "");
bcbc92ffe0d0 Makes a .deb file at long last, but Duke still shows up as an icon in the dock.
David Barts <n5jrn@me.com>
parents: 34
diff changeset
55 ]]>
bcbc92ffe0d0 Makes a .deb file at long last, but Duke still shows up as an icon in the dock.
David Barts <n5jrn@me.com>
parents: 34
diff changeset
56 </scriptdef>
bcbc92ffe0d0 Makes a .deb file at long last, but Duke still shows up as an icon in the dock.
David Barts <n5jrn@me.com>
parents: 34
diff changeset
57
42
4076f1bbf21d Got ant winapp working!
davidb
parents: 39
diff changeset
58 <!-- launch4j demands 4-part version numbers, grumble... -->
4076f1bbf21d Got ant winapp working!
davidb
parents: 39
diff changeset
59 <scriptdef language="javascript" name="l4jversion">
4076f1bbf21d Got ant winapp working!
davidb
parents: 39
diff changeset
60 <attribute name="value" />
4076f1bbf21d Got ant winapp working!
davidb
parents: 39
diff changeset
61 <attribute name="target" />
4076f1bbf21d Got ant winapp working!
davidb
parents: 39
diff changeset
62 <![CDATA[
4076f1bbf21d Got ant winapp working!
davidb
parents: 39
diff changeset
63 "use strict";
4076f1bbf21d Got ant winapp working!
davidb
parents: 39
diff changeset
64 var IllegalArgumentException = Java.type('java.lang.IllegalArgumentException');
4076f1bbf21d Got ant winapp working!
davidb
parents: 39
diff changeset
65 var value = attributes.get("value");
4076f1bbf21d Got ant winapp working!
davidb
parents: 39
diff changeset
66 var ret = null;
4076f1bbf21d Got ant winapp working!
davidb
parents: 39
diff changeset
67 if (value.match(/\d+\.\d+\.\d+\.\d+/))
4076f1bbf21d Got ant winapp working!
davidb
parents: 39
diff changeset
68 ret = value;
4076f1bbf21d Got ant winapp working!
davidb
parents: 39
diff changeset
69 else if(value.match(/\d+\.\d+\.\d+/))
4076f1bbf21d Got ant winapp working!
davidb
parents: 39
diff changeset
70 ret = value + ".0";
4076f1bbf21d Got ant winapp working!
davidb
parents: 39
diff changeset
71 else if(value.match(/\d+\.\d+/))
4076f1bbf21d Got ant winapp working!
davidb
parents: 39
diff changeset
72 ret = value + ".0.0";
4076f1bbf21d Got ant winapp working!
davidb
parents: 39
diff changeset
73 else
4076f1bbf21d Got ant winapp working!
davidb
parents: 39
diff changeset
74 throw new IllegalArgumentException("invalid version: " + value);
4076f1bbf21d Got ant winapp working!
davidb
parents: 39
diff changeset
75 project.setProperty(attributes.get("target"), ret);
4076f1bbf21d Got ant winapp working!
davidb
parents: 39
diff changeset
76 ]]>
4076f1bbf21d Got ant winapp working!
davidb
parents: 39
diff changeset
77 </scriptdef>
4076f1bbf21d Got ant winapp working!
davidb
parents: 39
diff changeset
78
0
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
79 <!-- 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
80 <property name="app.name" value="${ant.project.name}"/>
60
d0b83fc1d62a Remember our input directory on a per-invocation basis.
David Barts <n5jrn@me.com>
parents: 52
diff changeset
81 <property name="app.version" value="1.05"/>
39
89d7f4d91f67 Got a working, non-bloated Apple Mac bundle!
David Barts <n5jrn@me.com>
parents: 37
diff changeset
82 <property name="app.domain" value="name.blackcap.exifwasher"/>
89d7f4d91f67 Got a working, non-bloated Apple Mac bundle!
David Barts <n5jrn@me.com>
parents: 37
diff changeset
83 <property name="app.entry" value="${app.domain}.MainKt"/>
42
4076f1bbf21d Got ant winapp working!
davidb
parents: 39
diff changeset
84 <property name="app.copyright" value="Copyright © 2020, David W. Barts."/>
0
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
85 <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
86 <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
87 <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
88 <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
89 <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
90 <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
91 <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
92 <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
93 <property name="bin.dir" value="${src.home}/name/blackcap/exifwasher/binaries"/>
39
89d7f4d91f67 Got a working, non-bloated Apple Mac bundle!
David Barts <n5jrn@me.com>
parents: 37
diff changeset
94 <property name="jvm.version" value="1.8"/>
0
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
95
33
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
96 <!-- define the kotlin task -->
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
97 <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
98 <typedef resource="org/jetbrains/kotlin/ant/antlib.xml"
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
99 classpath="${kotlin.lib}/kotlin-ant.jar"/>
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
100
0
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
101 <!-- help message -->
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
102 <target name="help">
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
103 <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
104 <echo> </echo>
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
105 <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
106 <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
107 <echo> clean : Deletes work directories</echo>
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
108 <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
109 <echo> jar : Make JAR file.</echo>
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
110 <echo> </echo>
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
111 <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
112 <echo>prompt> ant all </echo>
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
113 </target>
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
114
33
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
115 <!-- Determine OS type -->
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
116 <condition property="os.type" value="mac">
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
117 <os family="mac"/>
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
118 </condition>
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
119 <condition property="os.type" value="windows">
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
120 <os family="windows"/>
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
121 </condition>
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
122 <condition property="os.type" value="linux">
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
123 <!-- 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
124 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
125 <os family="unix"/>
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 <property name="os.type" value="unknown"/>
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
128
0
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
129 <!-- Define the CLASSPATH -->
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
130 <target name="classpath">
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
131 <path id="compile.classpath">
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
132 <pathelement location="${src.home}"/>
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
133 </path>
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
134 </target>
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
135
26
985d5b82a882 Make needed dirs.
davidb
parents: 25
diff changeset
136 <!-- make needed directories -->
985d5b82a882 Make needed dirs.
davidb
parents: 25
diff changeset
137 <target name="mkdirs">
34
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
138 <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
139 <mkdir dir="${dist.home}"/>
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
140 </target>
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
141
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
142 <!-- remove old cruft -->
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
143 <target name="clean">
39
89d7f4d91f67 Got a working, non-bloated Apple Mac bundle!
David Barts <n5jrn@me.com>
parents: 37
diff changeset
144 <delete includeEmptyDirs="true" failonerror="false">
34
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
145 <fileset dir="${dist.home}" includes="**/*"/>
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
146 <fileset dir="${bin.dir}"/>
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
147 </delete>
33
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
148 </target>
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
149
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
150 <!-- rename files containing OS-dependant code -->
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
151 <target name="osdep">
39
89d7f4d91f67 Got a working, non-bloated Apple Mac bundle!
David Barts <n5jrn@me.com>
parents: 37
diff changeset
152 <exec executable="${env.JRE_HOME}/bin/java" failonerror="true">
33
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
153 <arg value="-jar"/>
44
6999afa6fff3 Update Building instructions; minor build system bug fixes.
David Barts <davidb@stashtea.com>
parents: 43
diff changeset
154 <arg file="${env.OSDEP_HOME}/osdep.jar"/>
33
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
155 <arg value="${src.home}"/>
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
156 </exec>
26
985d5b82a882 Make needed dirs.
davidb
parents: 25
diff changeset
157 </target>
985d5b82a882 Make needed dirs.
davidb
parents: 25
diff changeset
158
0
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
159 <!-- do everything but install -->
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
160 <target name="all" depends="jar"
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
161 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
162
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
163 <!-- compile *.kt to *.class -->
33
3d86f0391168 Work on improving the build system.
David Barts <davidb@stashtea.com>
parents: 26
diff changeset
164 <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
165 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
166 <kotlinc src="${src.home}" output="${work.jar}"
5
dc1f4359659d Got it compiling.
David Barts <n5jrn@me.com>
parents: 0
diff changeset
167 classpathref="compile.classpath">
39
89d7f4d91f67 Got a working, non-bloated Apple Mac bundle!
David Barts <n5jrn@me.com>
parents: 37
diff changeset
168 <compilerarg line="-jvm-target ${jvm.version}"/>
5
dc1f4359659d Got it compiling.
David Barts <n5jrn@me.com>
parents: 0
diff changeset
169 </kotlinc>
0
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
170 </target>
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
171
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
172 <!-- make .jar file -->
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
173 <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
174 <jar destfile="${jar.name}">
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
175 <manifest>
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
176 <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
177 </manifest>
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
178 <zipgroupfileset dir="${lib.home}" includes="*.jar"/>
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
179 <zipfileset src="${work.jar}"/>
52
39895d44a287 Get help working on Linux.
David Barts <n5jrn@me.com>
parents: 50
diff changeset
180 <zipfileset dir="${src.home}" includes="**/*.properties,**/*.html,**/*.dll,**/*.so,**/*.dylib"/>
36
aa9ab6cbaa26 Duke has been banished from the dock.
David Barts <n5jrn@me.com>
parents: 35
diff changeset
181 <zipfileset file="${pf.home}/linux/icon_48x48.png"
aa9ab6cbaa26 Duke has been banished from the dock.
David Barts <n5jrn@me.com>
parents: 35
diff changeset
182 fullpath="name/blackcap/exifwasher/icon_48x48.png"/>
0
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
183 </jar>
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
184 </target>
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
185
34
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
186 <!-- 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
187
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
188 <target name="macapp" depends="jar" description="Create MacOS app bundle.">
39
89d7f4d91f67 Got a working, non-bloated Apple Mac bundle!
David Barts <n5jrn@me.com>
parents: 37
diff changeset
189 <fail message="Macintosh packages can only be built on a Mac.">
89d7f4d91f67 Got a working, non-bloated Apple Mac bundle!
David Barts <n5jrn@me.com>
parents: 37
diff changeset
190 <condition>
89d7f4d91f67 Got a working, non-bloated Apple Mac bundle!
David Barts <n5jrn@me.com>
parents: 37
diff changeset
191 <not><os family="mac"/></not>
89d7f4d91f67 Got a working, non-bloated Apple Mac bundle!
David Barts <n5jrn@me.com>
parents: 37
diff changeset
192 </condition>
89d7f4d91f67 Got a working, non-bloated Apple Mac bundle!
David Barts <n5jrn@me.com>
parents: 37
diff changeset
193 </fail>
89d7f4d91f67 Got a working, non-bloated Apple Mac bundle!
David Barts <n5jrn@me.com>
parents: 37
diff changeset
194 <sequential>
89d7f4d91f67 Got a working, non-bloated Apple Mac bundle!
David Barts <n5jrn@me.com>
parents: 37
diff changeset
195 <property name="mac.disk.image.filename"
89d7f4d91f67 Got a working, non-bloated Apple Mac bundle!
David Barts <n5jrn@me.com>
parents: 37
diff changeset
196 value="${lc.app.name}_${app.version}.dmg"/>
89d7f4d91f67 Got a working, non-bloated Apple Mac bundle!
David Barts <n5jrn@me.com>
parents: 37
diff changeset
197 <property name="app.bundle" value="${dist.home}/${app.name}.app"/>
89d7f4d91f67 Got a working, non-bloated Apple Mac bundle!
David Barts <n5jrn@me.com>
parents: 37
diff changeset
198 <mkdir dir="${app.bundle}/Contents"/>
89d7f4d91f67 Got a working, non-bloated Apple Mac bundle!
David Barts <n5jrn@me.com>
parents: 37
diff changeset
199 <copy todir="${app.bundle}/Contents" encoding="UTF-8" overwrite="true">
89d7f4d91f67 Got a working, non-bloated Apple Mac bundle!
David Barts <n5jrn@me.com>
parents: 37
diff changeset
200 <fileset file="${pf.home}/osx/Info.plist"/>
89d7f4d91f67 Got a working, non-bloated Apple Mac bundle!
David Barts <n5jrn@me.com>
parents: 37
diff changeset
201 <!-- XXX will break if any tokens contain <, >, or & -->
89d7f4d91f67 Got a working, non-bloated Apple Mac bundle!
David Barts <n5jrn@me.com>
parents: 37
diff changeset
202 <filterset>
42
4076f1bbf21d Got ant winapp working!
davidb
parents: 39
diff changeset
203 <filter token="app.copyright" value="${app.copyright}"/>
39
89d7f4d91f67 Got a working, non-bloated Apple Mac bundle!
David Barts <n5jrn@me.com>
parents: 37
diff changeset
204 <filter token="app.domain" value="${app.domain}"/>
89d7f4d91f67 Got a working, non-bloated Apple Mac bundle!
David Barts <n5jrn@me.com>
parents: 37
diff changeset
205 <filter token="app.entry" value="${app.entry}"/>
89d7f4d91f67 Got a working, non-bloated Apple Mac bundle!
David Barts <n5jrn@me.com>
parents: 37
diff changeset
206 <filter token="app.name" value="${app.name}"/>
89d7f4d91f67 Got a working, non-bloated Apple Mac bundle!
David Barts <n5jrn@me.com>
parents: 37
diff changeset
207 <filter token="app.version" value="${app.version}"/>
89d7f4d91f67 Got a working, non-bloated Apple Mac bundle!
David Barts <n5jrn@me.com>
parents: 37
diff changeset
208 <filter token="jar.filename" value="${lc.app.name}.jar"/>
89d7f4d91f67 Got a working, non-bloated Apple Mac bundle!
David Barts <n5jrn@me.com>
parents: 37
diff changeset
209 <filter token="jvm.version" value="${jvm.version}"/>
89d7f4d91f67 Got a working, non-bloated Apple Mac bundle!
David Barts <n5jrn@me.com>
parents: 37
diff changeset
210 <filter token="lc.app.name" value="${lc.app.name}"/>
89d7f4d91f67 Got a working, non-bloated Apple Mac bundle!
David Barts <n5jrn@me.com>
parents: 37
diff changeset
211 </filterset>
89d7f4d91f67 Got a working, non-bloated Apple Mac bundle!
David Barts <n5jrn@me.com>
parents: 37
diff changeset
212 </copy>
89d7f4d91f67 Got a working, non-bloated Apple Mac bundle!
David Barts <n5jrn@me.com>
parents: 37
diff changeset
213 <mkdir dir="${app.bundle}/Contents/MacOS"/>
89d7f4d91f67 Got a working, non-bloated Apple Mac bundle!
David Barts <n5jrn@me.com>
parents: 37
diff changeset
214 <copy todir="${app.bundle}/Contents/MacOS" encoding="UTF-8"
89d7f4d91f67 Got a working, non-bloated Apple Mac bundle!
David Barts <n5jrn@me.com>
parents: 37
diff changeset
215 overwrite="true">
89d7f4d91f67 Got a working, non-bloated Apple Mac bundle!
David Barts <n5jrn@me.com>
parents: 37
diff changeset
216 <fileset file="${pf.home}/osx/JavaApplicationStub"/>
89d7f4d91f67 Got a working, non-bloated Apple Mac bundle!
David Barts <n5jrn@me.com>
parents: 37
diff changeset
217 <filterset>
89d7f4d91f67 Got a working, non-bloated Apple Mac bundle!
David Barts <n5jrn@me.com>
parents: 37
diff changeset
218 <filter token="app.domain" value="${app.domain}"/>
89d7f4d91f67 Got a working, non-bloated Apple Mac bundle!
David Barts <n5jrn@me.com>
parents: 37
diff changeset
219 <filter token="app.name" value="${app.name}"/>
89d7f4d91f67 Got a working, non-bloated Apple Mac bundle!
David Barts <n5jrn@me.com>
parents: 37
diff changeset
220 </filterset>
89d7f4d91f67 Got a working, non-bloated Apple Mac bundle!
David Barts <n5jrn@me.com>
parents: 37
diff changeset
221 </copy>
89d7f4d91f67 Got a working, non-bloated Apple Mac bundle!
David Barts <n5jrn@me.com>
parents: 37
diff changeset
222 <chmod file="${app.bundle}/Contents/MacOS/JavaApplicationStub"
89d7f4d91f67 Got a working, non-bloated Apple Mac bundle!
David Barts <n5jrn@me.com>
parents: 37
diff changeset
223 perm="755"/>
89d7f4d91f67 Got a working, non-bloated Apple Mac bundle!
David Barts <n5jrn@me.com>
parents: 37
diff changeset
224 <mkdir dir="${app.bundle}/Contents/Resources"/>
89d7f4d91f67 Got a working, non-bloated Apple Mac bundle!
David Barts <n5jrn@me.com>
parents: 37
diff changeset
225 <copy file="${basedir}/${app.name}.icns"
89d7f4d91f67 Got a working, non-bloated Apple Mac bundle!
David Barts <n5jrn@me.com>
parents: 37
diff changeset
226 todir="${app.bundle}/Contents/Resources"/>
89d7f4d91f67 Got a working, non-bloated Apple Mac bundle!
David Barts <n5jrn@me.com>
parents: 37
diff changeset
227 <mkdir dir="${app.bundle}/Contents/Java"/>
89d7f4d91f67 Got a working, non-bloated Apple Mac bundle!
David Barts <n5jrn@me.com>
parents: 37
diff changeset
228 <copy file="${jar.name}" todir="${app.bundle}/Contents/Java"/>
89d7f4d91f67 Got a working, non-bloated Apple Mac bundle!
David Barts <n5jrn@me.com>
parents: 37
diff changeset
229 <echo file="${app.bundle}/Contents/PkgInfo" message="APPL????"/>
89d7f4d91f67 Got a working, non-bloated Apple Mac bundle!
David Barts <n5jrn@me.com>
parents: 37
diff changeset
230 <exec executable="hdiutil" failonerror="true">
89d7f4d91f67 Got a working, non-bloated Apple Mac bundle!
David Barts <n5jrn@me.com>
parents: 37
diff changeset
231 <arg value="create"/>
89d7f4d91f67 Got a working, non-bloated Apple Mac bundle!
David Barts <n5jrn@me.com>
parents: 37
diff changeset
232 <arg value="-volname"/>
89d7f4d91f67 Got a working, non-bloated Apple Mac bundle!
David Barts <n5jrn@me.com>
parents: 37
diff changeset
233 <arg value="${app.name}"/>
89d7f4d91f67 Got a working, non-bloated Apple Mac bundle!
David Barts <n5jrn@me.com>
parents: 37
diff changeset
234 <arg value="-srcfolder"/>
89d7f4d91f67 Got a working, non-bloated Apple Mac bundle!
David Barts <n5jrn@me.com>
parents: 37
diff changeset
235 <arg file="${app.bundle}"/>
89d7f4d91f67 Got a working, non-bloated Apple Mac bundle!
David Barts <n5jrn@me.com>
parents: 37
diff changeset
236 <arg file="${dist.home}/orig-${mac.disk.image.filename}"/>
89d7f4d91f67 Got a working, non-bloated Apple Mac bundle!
David Barts <n5jrn@me.com>
parents: 37
diff changeset
237 </exec>
89d7f4d91f67 Got a working, non-bloated Apple Mac bundle!
David Barts <n5jrn@me.com>
parents: 37
diff changeset
238 <exec executable="hdiutil" failonerror="true">
89d7f4d91f67 Got a working, non-bloated Apple Mac bundle!
David Barts <n5jrn@me.com>
parents: 37
diff changeset
239 <arg value="convert"/>
89d7f4d91f67 Got a working, non-bloated Apple Mac bundle!
David Barts <n5jrn@me.com>
parents: 37
diff changeset
240 <arg file="${dist.home}/orig-${mac.disk.image.filename}"/>
89d7f4d91f67 Got a working, non-bloated Apple Mac bundle!
David Barts <n5jrn@me.com>
parents: 37
diff changeset
241 <arg value="-format"/>
89d7f4d91f67 Got a working, non-bloated Apple Mac bundle!
David Barts <n5jrn@me.com>
parents: 37
diff changeset
242 <arg value="UDRW"/>
89d7f4d91f67 Got a working, non-bloated Apple Mac bundle!
David Barts <n5jrn@me.com>
parents: 37
diff changeset
243 <arg value="-o"/>
89d7f4d91f67 Got a working, non-bloated Apple Mac bundle!
David Barts <n5jrn@me.com>
parents: 37
diff changeset
244 <arg file="${dist.home}/udrw-${mac.disk.image.filename}"/>
89d7f4d91f67 Got a working, non-bloated Apple Mac bundle!
David Barts <n5jrn@me.com>
parents: 37
diff changeset
245 </exec>
89d7f4d91f67 Got a working, non-bloated Apple Mac bundle!
David Barts <n5jrn@me.com>
parents: 37
diff changeset
246 <exec executable="hdiutil" failonerror="true">
89d7f4d91f67 Got a working, non-bloated Apple Mac bundle!
David Barts <n5jrn@me.com>
parents: 37
diff changeset
247 <arg value="convert"/>
89d7f4d91f67 Got a working, non-bloated Apple Mac bundle!
David Barts <n5jrn@me.com>
parents: 37
diff changeset
248 <arg file="${dist.home}/udrw-${mac.disk.image.filename}"/>
89d7f4d91f67 Got a working, non-bloated Apple Mac bundle!
David Barts <n5jrn@me.com>
parents: 37
diff changeset
249 <arg value="-format"/>
89d7f4d91f67 Got a working, non-bloated Apple Mac bundle!
David Barts <n5jrn@me.com>
parents: 37
diff changeset
250 <arg value="UDZO"/>
89d7f4d91f67 Got a working, non-bloated Apple Mac bundle!
David Barts <n5jrn@me.com>
parents: 37
diff changeset
251 <arg value="-imagekey"/>
89d7f4d91f67 Got a working, non-bloated Apple Mac bundle!
David Barts <n5jrn@me.com>
parents: 37
diff changeset
252 <arg value="zlib-level=9"/>
89d7f4d91f67 Got a working, non-bloated Apple Mac bundle!
David Barts <n5jrn@me.com>
parents: 37
diff changeset
253 <arg value="-o"/>
89d7f4d91f67 Got a working, non-bloated Apple Mac bundle!
David Barts <n5jrn@me.com>
parents: 37
diff changeset
254 <arg file="${dist.home}/${mac.disk.image.filename}"/>
89d7f4d91f67 Got a working, non-bloated Apple Mac bundle!
David Barts <n5jrn@me.com>
parents: 37
diff changeset
255 </exec>
89d7f4d91f67 Got a working, non-bloated Apple Mac bundle!
David Barts <n5jrn@me.com>
parents: 37
diff changeset
256 </sequential>
23
5cac95c17fef More Windows stuff. Attempts to get Windows packages working.
davidb
parents: 22
diff changeset
257 </target>
5cac95c17fef More Windows stuff. Attempts to get Windows packages working.
davidb
parents: 22
diff changeset
258
34
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
259 <target name="winapp" depends="jar" description="Create app bundle.">
42
4076f1bbf21d Got ant winapp working!
davidb
parents: 39
diff changeset
260 <fail message="The Windows application can only be built on Windows.">
4076f1bbf21d Got ant winapp working!
davidb
parents: 39
diff changeset
261 <condition>
4076f1bbf21d Got ant winapp working!
davidb
parents: 39
diff changeset
262 <not><os family="windows"/></not>
4076f1bbf21d Got ant winapp working!
davidb
parents: 39
diff changeset
263 </condition>
4076f1bbf21d Got ant winapp working!
davidb
parents: 39
diff changeset
264 </fail>
4076f1bbf21d Got ant winapp working!
davidb
parents: 39
diff changeset
265 <sequential>
4076f1bbf21d Got ant winapp working!
davidb
parents: 39
diff changeset
266 <env-require name="LAUNCH4J_HOME"/>
4076f1bbf21d Got ant winapp working!
davidb
parents: 39
diff changeset
267 <taskdef name="create"
4076f1bbf21d Got ant winapp working!
davidb
parents: 39
diff changeset
268 classname="net.sf.launch4j.ant.Launch4jTask"
4076f1bbf21d Got ant winapp working!
davidb
parents: 39
diff changeset
269 uri="antlib:net.sf.launch4j.ant">
4076f1bbf21d Got ant winapp working!
davidb
parents: 39
diff changeset
270 <classpath>
4076f1bbf21d Got ant winapp working!
davidb
parents: 39
diff changeset
271 <fileset dir="${env.LAUNCH4J_HOME}" includes="launch4j.jar"/>
4076f1bbf21d Got ant winapp working!
davidb
parents: 39
diff changeset
272 </classpath>
4076f1bbf21d Got ant winapp working!
davidb
parents: 39
diff changeset
273 </taskdef>
4076f1bbf21d Got ant winapp working!
davidb
parents: 39
diff changeset
274 <l4jversion value="${app.version}" target="l4j.version"/>
4076f1bbf21d Got ant winapp working!
davidb
parents: 39
diff changeset
275 <copy todir="${dist.home}/" encoding="UTF-8" overwrite="true">
43
8aada13933c6 exif -> jpeg
davidb
parents: 42
diff changeset
276 <fileset file="${pf.home}/windows/jpegwasher_l4j.xml"/>
42
4076f1bbf21d Got ant winapp working!
davidb
parents: 39
diff changeset
277 <filterset>
4076f1bbf21d Got ant winapp working!
davidb
parents: 39
diff changeset
278 <filter token="app.copyright" value="${app.copyright}"/>
4076f1bbf21d Got ant winapp working!
davidb
parents: 39
diff changeset
279 <filter token="app.entry" value="${app.entry}"/>
4076f1bbf21d Got ant winapp working!
davidb
parents: 39
diff changeset
280 <filter token="app.name" value="${app.name}"/>
4076f1bbf21d Got ant winapp working!
davidb
parents: 39
diff changeset
281 <filter token="app.version" value="${app.version}"/>
4076f1bbf21d Got ant winapp working!
davidb
parents: 39
diff changeset
282 <filter token="base.dir" value="${basedir}"/>
4076f1bbf21d Got ant winapp working!
davidb
parents: 39
diff changeset
283 <filter token="dist.home" value="${dist.home}"/>
4076f1bbf21d Got ant winapp working!
davidb
parents: 39
diff changeset
284 <filter token="jar.filename" value="${jar.name}"/>
4076f1bbf21d Got ant winapp working!
davidb
parents: 39
diff changeset
285 <filter token="l4j.version" value="${l4j.version}"/>
4076f1bbf21d Got ant winapp working!
davidb
parents: 39
diff changeset
286 <filter token="target.java.version" value="${jvm.version}"/>
4076f1bbf21d Got ant winapp working!
davidb
parents: 39
diff changeset
287 </filterset>
4076f1bbf21d Got ant winapp working!
davidb
parents: 39
diff changeset
288 </copy>
43
8aada13933c6 exif -> jpeg
davidb
parents: 42
diff changeset
289 <launch4j:create configFile="${dist.home}/jpegwasher_l4j.xml"/>
42
4076f1bbf21d Got ant winapp working!
davidb
parents: 39
diff changeset
290 </sequential>
0
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
291 </target>
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
292
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
293 <target name="deb" depends="jar" description="Create Debian package.">
39
89d7f4d91f67 Got a working, non-bloated Apple Mac bundle!
David Barts <n5jrn@me.com>
parents: 37
diff changeset
294 <fail message="Linux packages can only be built on Linux.">
89d7f4d91f67 Got a working, non-bloated Apple Mac bundle!
David Barts <n5jrn@me.com>
parents: 37
diff changeset
295 <condition>
89d7f4d91f67 Got a working, non-bloated Apple Mac bundle!
David Barts <n5jrn@me.com>
parents: 37
diff changeset
296 <not><os family="unix"/></not>
89d7f4d91f67 Got a working, non-bloated Apple Mac bundle!
David Barts <n5jrn@me.com>
parents: 37
diff changeset
297 </condition>
89d7f4d91f67 Got a working, non-bloated Apple Mac bundle!
David Barts <n5jrn@me.com>
parents: 37
diff changeset
298 </fail>
34
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
299 <sequential>
35
bcbc92ffe0d0 Makes a .deb file at long last, but Duke still shows up as an icon in the dock.
David Barts <n5jrn@me.com>
parents: 34
diff changeset
300 <mkdir dir="${dist.home}/data/usr/share/applications"/>
bcbc92ffe0d0 Makes a .deb file at long last, but Duke still shows up as an icon in the dock.
David Barts <n5jrn@me.com>
parents: 34
diff changeset
301 <copy file="${pf.home}/linux/deb/jpegwasher.desktop"
bcbc92ffe0d0 Makes a .deb file at long last, but Duke still shows up as an icon in the dock.
David Barts <n5jrn@me.com>
parents: 34
diff changeset
302 tofile="${dist.home}/data/usr/share/applications/jpegwasher.desktop"/>
bcbc92ffe0d0 Makes a .deb file at long last, but Duke still shows up as an icon in the dock.
David Barts <n5jrn@me.com>
parents: 34
diff changeset
303 <mkdir dir="${dist.home}/data/usr/share/icons/hicolor/48x48/apps"/>
bcbc92ffe0d0 Makes a .deb file at long last, but Duke still shows up as an icon in the dock.
David Barts <n5jrn@me.com>
parents: 34
diff changeset
304 <copy file="${pf.home}/linux/icon_48x48.png"
bcbc92ffe0d0 Makes a .deb file at long last, but Duke still shows up as an icon in the dock.
David Barts <n5jrn@me.com>
parents: 34
diff changeset
305 tofile="${dist.home}/data/usr/share/icons/hicolor/48x48/apps/jpegwasher.png"/>
bcbc92ffe0d0 Makes a .deb file at long last, but Duke still shows up as an icon in the dock.
David Barts <n5jrn@me.com>
parents: 34
diff changeset
306 <mkdir dir="${dist.home}/data/usr/share/jpegwasher"/>
bcbc92ffe0d0 Makes a .deb file at long last, but Duke still shows up as an icon in the dock.
David Barts <n5jrn@me.com>
parents: 34
diff changeset
307 <copy file="${jar.name}" todir="${dist.home}/data/usr/share/jpegwasher"/>
bcbc92ffe0d0 Makes a .deb file at long last, but Duke still shows up as an icon in the dock.
David Barts <n5jrn@me.com>
parents: 34
diff changeset
308 <mkdir dir="${dist.home}/data/usr/share/doc/jpegwasher"/>
bcbc92ffe0d0 Makes a .deb file at long last, but Duke still shows up as an icon in the dock.
David Barts <n5jrn@me.com>
parents: 34
diff changeset
309 <copy todir="${dist.home}/data/usr/share/doc/jpegwasher">
bcbc92ffe0d0 Makes a .deb file at long last, but Duke still shows up as an icon in the dock.
David Barts <n5jrn@me.com>
parents: 34
diff changeset
310 <filelist dir="${basedir}" files="Readme.html,Readme.rst"/>
42
4076f1bbf21d Got ant winapp working!
davidb
parents: 39
diff changeset
311 </copy>
4076f1bbf21d Got ant winapp working!
davidb
parents: 39
diff changeset
312 <copy todir="${dist.home}/data/usr/share/doc/jpegwasher" encoding="UTF-8" overwrite="true">
35
bcbc92ffe0d0 Makes a .deb file at long last, but Duke still shows up as an icon in the dock.
David Barts <n5jrn@me.com>
parents: 34
diff changeset
313 <fileset file="${pf.home}/linux/deb/copyright"/>
42
4076f1bbf21d Got ant winapp working!
davidb
parents: 39
diff changeset
314 <filterset>
4076f1bbf21d Got ant winapp working!
davidb
parents: 39
diff changeset
315 <filter token="app.copyright" value="${app.copyright}"/>
4076f1bbf21d Got ant winapp working!
davidb
parents: 39
diff changeset
316 </filterset>
35
bcbc92ffe0d0 Makes a .deb file at long last, but Duke still shows up as an icon in the dock.
David Barts <n5jrn@me.com>
parents: 34
diff changeset
317 </copy>
bcbc92ffe0d0 Makes a .deb file at long last, but Duke still shows up as an icon in the dock.
David Barts <n5jrn@me.com>
parents: 34
diff changeset
318 <gzip src="${pf.home}/linux/deb/changelog"
bcbc92ffe0d0 Makes a .deb file at long last, but Duke still shows up as an icon in the dock.
David Barts <n5jrn@me.com>
parents: 34
diff changeset
319 destfile="${dist.home}/data/usr/share/doc/jpegwasher/changelog.gz"/>
bcbc92ffe0d0 Makes a .deb file at long last, but Duke still shows up as an icon in the dock.
David Barts <n5jrn@me.com>
parents: 34
diff changeset
320 <mkdir dir="${dist.home}/data/usr/share/man/man1"/>
bcbc92ffe0d0 Makes a .deb file at long last, but Duke still shows up as an icon in the dock.
David Barts <n5jrn@me.com>
parents: 34
diff changeset
321 <gzip src="${pf.home}/linux/jpegwasher.1"
bcbc92ffe0d0 Makes a .deb file at long last, but Duke still shows up as an icon in the dock.
David Barts <n5jrn@me.com>
parents: 34
diff changeset
322 destfile="${dist.home}/data/usr/share/man/man1/jpegwasher.1.gz"/>
bcbc92ffe0d0 Makes a .deb file at long last, but Duke still shows up as an icon in the dock.
David Barts <n5jrn@me.com>
parents: 34
diff changeset
323 <mkdir dir="${dist.home}/data/usr/bin"/>
bcbc92ffe0d0 Makes a .deb file at long last, but Duke still shows up as an icon in the dock.
David Barts <n5jrn@me.com>
parents: 34
diff changeset
324 <copy todir="${dist.home}/data/usr/bin" encoding="UTF-8" overwrite="true">
bcbc92ffe0d0 Makes a .deb file at long last, but Duke still shows up as an icon in the dock.
David Barts <n5jrn@me.com>
parents: 34
diff changeset
325 <fileset file="${pf.home}/linux/jpegwasher"/>
bcbc92ffe0d0 Makes a .deb file at long last, but Duke still shows up as an icon in the dock.
David Barts <n5jrn@me.com>
parents: 34
diff changeset
326 <filterset>
bcbc92ffe0d0 Makes a .deb file at long last, but Duke still shows up as an icon in the dock.
David Barts <n5jrn@me.com>
parents: 34
diff changeset
327 <filter token="jar.filename" value="${lc.app.name}.jar"/>
bcbc92ffe0d0 Makes a .deb file at long last, but Duke still shows up as an icon in the dock.
David Barts <n5jrn@me.com>
parents: 34
diff changeset
328 </filterset>
bcbc92ffe0d0 Makes a .deb file at long last, but Duke still shows up as an icon in the dock.
David Barts <n5jrn@me.com>
parents: 34
diff changeset
329 </copy>
bcbc92ffe0d0 Makes a .deb file at long last, but Duke still shows up as an icon in the dock.
David Barts <n5jrn@me.com>
parents: 34
diff changeset
330 <chmod file="${dist.home}/data/usr/bin/jpegwasher" perm="755"/>
bcbc92ffe0d0 Makes a .deb file at long last, but Duke still shows up as an icon in the dock.
David Barts <n5jrn@me.com>
parents: 34
diff changeset
331 <du path="${dist.home}/data" target="deb.installed.size"/>
bcbc92ffe0d0 Makes a .deb file at long last, but Duke still shows up as an icon in the dock.
David Barts <n5jrn@me.com>
parents: 34
diff changeset
332 <mkdir dir="${dist.home}/control"/>
bcbc92ffe0d0 Makes a .deb file at long last, but Duke still shows up as an icon in the dock.
David Barts <n5jrn@me.com>
parents: 34
diff changeset
333 <copy todir="${dist.home}/control" encoding="UTF-8" overwrite="true">
34
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
334 <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
335 <filterset>
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
336 <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
337 <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
338 </filterset>
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
339 </copy>
35
bcbc92ffe0d0 Makes a .deb file at long last, but Duke still shows up as an icon in the dock.
David Barts <n5jrn@me.com>
parents: 34
diff changeset
340 <copy todir="${dist.home}/control">
bcbc92ffe0d0 Makes a .deb file at long last, but Duke still shows up as an icon in the dock.
David Barts <n5jrn@me.com>
parents: 34
diff changeset
341 <filelist dir="${pf.home}/linux/deb" files="postinst,postrm"/>
34
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
342 </copy>
35
bcbc92ffe0d0 Makes a .deb file at long last, but Duke still shows up as an icon in the dock.
David Barts <n5jrn@me.com>
parents: 34
diff changeset
343 <chmod perm="755">
bcbc92ffe0d0 Makes a .deb file at long last, but Duke still shows up as an icon in the dock.
David Barts <n5jrn@me.com>
parents: 34
diff changeset
344 <filelist dir="${dist.home}/control" files="postinst,postrm"/>
bcbc92ffe0d0 Makes a .deb file at long last, but Duke still shows up as an icon in the dock.
David Barts <n5jrn@me.com>
parents: 34
diff changeset
345 </chmod>
39
89d7f4d91f67 Got a working, non-bloated Apple Mac bundle!
David Barts <n5jrn@me.com>
parents: 37
diff changeset
346 <exec executable="${basedir}/make-debian-package" failonerror="true">
35
bcbc92ffe0d0 Makes a .deb file at long last, but Duke still shows up as an icon in the dock.
David Barts <n5jrn@me.com>
parents: 34
diff changeset
347 <arg value="${dist.home}"/>
bcbc92ffe0d0 Makes a .deb file at long last, but Duke still shows up as an icon in the dock.
David Barts <n5jrn@me.com>
parents: 34
diff changeset
348 <arg value="${lc.app.name}_${app.version}.deb"/>
bcbc92ffe0d0 Makes a .deb file at long last, but Duke still shows up as an icon in the dock.
David Barts <n5jrn@me.com>
parents: 34
diff changeset
349 </exec>
34
d175593317a8 Add a bunch of packaging stuff, NOT WORKING YET,
David Barts <n5jrn@me.com>
parents: 33
diff changeset
350 </sequential>
0
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
351 </target>
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
352
db63d01a23c6 JNI calls and test case (finally!) seem to work.
David Barts <n5jrn@me.com>
parents:
diff changeset
353 </project>