annotate build.xml @ 43:8aada13933c6

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