annotate build.xml @ 62:c56a0747c256 default tip

Add make plain feature.
author David Barts <n5jrn@me.com>
date Thu, 28 Apr 2022 20:53:39 -0700
parents 066f05ebcc00
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
be282c48010a Incomplete; checking it in as a backup.
David Barts <n5jrn@me.com>
parents:
diff changeset
1 <?xml version="1.0" encoding="UTF-8"?>
25
3129d0e24086 Use ant tasks, not <exec>.
David Barts <n5jrn@me.com>
parents: 23
diff changeset
2 <project name="ClipMan" default="help" basedir="." xmlns:fx="javafx:com.sun.javafx.tools.ant">
0
be282c48010a Incomplete; checking it in as a backup.
David Barts <n5jrn@me.com>
parents:
diff changeset
3 <!-- import all environment variables as env.* -->
be282c48010a Incomplete; checking it in as a backup.
David Barts <n5jrn@me.com>
parents:
diff changeset
4 <property environment="env"/>
be282c48010a Incomplete; checking it in as a backup.
David Barts <n5jrn@me.com>
parents:
diff changeset
5
be282c48010a Incomplete; checking it in as a backup.
David Barts <n5jrn@me.com>
parents:
diff changeset
6 <!-- ensure required environment variables are set -->
be282c48010a Incomplete; checking it in as a backup.
David Barts <n5jrn@me.com>
parents:
diff changeset
7 <macrodef name="env-require">
be282c48010a Incomplete; checking it in as a backup.
David Barts <n5jrn@me.com>
parents:
diff changeset
8 <attribute name="name"/>
be282c48010a Incomplete; checking it in as a backup.
David Barts <n5jrn@me.com>
parents:
diff changeset
9 <sequential>
be282c48010a Incomplete; checking it in as a backup.
David Barts <n5jrn@me.com>
parents:
diff changeset
10 <fail message="Environment variable @{name} not set!">
be282c48010a Incomplete; checking it in as a backup.
David Barts <n5jrn@me.com>
parents:
diff changeset
11 <condition>
be282c48010a Incomplete; checking it in as a backup.
David Barts <n5jrn@me.com>
parents:
diff changeset
12 <not><isset property="env.@{name}"/></not>
be282c48010a Incomplete; checking it in as a backup.
David Barts <n5jrn@me.com>
parents:
diff changeset
13 </condition>
be282c48010a Incomplete; checking it in as a backup.
David Barts <n5jrn@me.com>
parents:
diff changeset
14 </fail>
be282c48010a Incomplete; checking it in as a backup.
David Barts <n5jrn@me.com>
parents:
diff changeset
15 </sequential>
be282c48010a Incomplete; checking it in as a backup.
David Barts <n5jrn@me.com>
parents:
diff changeset
16 </macrodef>
be282c48010a Incomplete; checking it in as a backup.
David Barts <n5jrn@me.com>
parents:
diff changeset
17 <env-require name="JRE_HOME"/>
be282c48010a Incomplete; checking it in as a backup.
David Barts <n5jrn@me.com>
parents:
diff changeset
18 <env-require name="KOTLIN_HOME"/>
be282c48010a Incomplete; checking it in as a backup.
David Barts <n5jrn@me.com>
parents:
diff changeset
19
be282c48010a Incomplete; checking it in as a backup.
David Barts <n5jrn@me.com>
parents:
diff changeset
20 <!-- define the kotlin task -->
51
e8d2a7e6f6c7 So it builds under Windoze (at last!)
davidb
parents: 47
diff changeset
21 <property name="kotlin.lib" value="${env.KOTLIN_HOME}/lib"/>
25
3129d0e24086 Use ant tasks, not <exec>.
David Barts <n5jrn@me.com>
parents: 23
diff changeset
22 <typedef resource="org/jetbrains/kotlin/ant/antlib.xml"
3129d0e24086 Use ant tasks, not <exec>.
David Barts <n5jrn@me.com>
parents: 23
diff changeset
23 classpath="${kotlin.lib}/kotlin-ant.jar"/>
3129d0e24086 Use ant tasks, not <exec>.
David Barts <n5jrn@me.com>
parents: 23
diff changeset
24
3129d0e24086 Use ant tasks, not <exec>.
David Barts <n5jrn@me.com>
parents: 23
diff changeset
25 <!-- define the package-building tasks -->
57
c6cccbe2f393 Port to OpenJDK 15 (mostly done).
David Barts <n5jrn@me.com>
parents: 53
diff changeset
26 <!-- <taskdef resource="com/sun/javafx/tools/ant/antlib.xml"
25
3129d0e24086 Use ant tasks, not <exec>.
David Barts <n5jrn@me.com>
parents: 23
diff changeset
27 uri="javafx:com.sun.javafx.tools.ant"
57
c6cccbe2f393 Port to OpenJDK 15 (mostly done).
David Barts <n5jrn@me.com>
parents: 53
diff changeset
28 classpath="${env.JRE_HOME}/lib/ant-javafx.jar"/> -->
0
be282c48010a Incomplete; checking it in as a backup.
David Barts <n5jrn@me.com>
parents:
diff changeset
29
be282c48010a Incomplete; checking it in as a backup.
David Barts <n5jrn@me.com>
parents:
diff changeset
30 <!-- Define the properties used by the build -->
be282c48010a Incomplete; checking it in as a backup.
David Barts <n5jrn@me.com>
parents:
diff changeset
31 <property name="app.name" value="${ant.project.name}"/>
60
066f05ebcc00 Fix a few more build bugs.
David Barts <n5jrn@me.com>
parents: 59
diff changeset
32 <property name="lc.app.name" value="clipman"/>
22
829769cb1c13 Add some support for making bundled apps to build.xml.
David Barts <n5jrn@me.com>
parents: 0
diff changeset
33 <property name="app.entry" value="name.blackcap.clipman.MainKt"/>
60
066f05ebcc00 Fix a few more build bugs.
David Barts <n5jrn@me.com>
parents: 59
diff changeset
34 <property name="app.domain" value="name.blackcap.${lc.app.name}"/>
066f05ebcc00 Fix a few more build bugs.
David Barts <n5jrn@me.com>
parents: 59
diff changeset
35 <property name="app.copyright" value="Copyright © 2020–2022, David W. Barts."/>
59
8b707fa0a4fc Convert to new-style mac app.
David Barts <n5jrn@me.com>
parents: 57
diff changeset
36 <property name="app.version" value="1.10"/>
0
be282c48010a Incomplete; checking it in as a backup.
David Barts <n5jrn@me.com>
parents:
diff changeset
37 <property name="jar.name" value="${basedir}/${lc.app.name}.jar"/>
22
829769cb1c13 Add some support for making bundled apps to build.xml.
David Barts <n5jrn@me.com>
parents: 0
diff changeset
38 <property name="work.jar" value="${basedir}/work.jar"/>
0
be282c48010a Incomplete; checking it in as a backup.
David Barts <n5jrn@me.com>
parents:
diff changeset
39 <property name="lib.home" value="${basedir}/lib"/>
be282c48010a Incomplete; checking it in as a backup.
David Barts <n5jrn@me.com>
parents:
diff changeset
40 <property name="src.home" value="${basedir}/src"/>
51
e8d2a7e6f6c7 So it builds under Windoze (at last!)
davidb
parents: 47
diff changeset
41 <property name="work.home" value="${basedir}/work"/>
59
8b707fa0a4fc Convert to new-style mac app.
David Barts <n5jrn@me.com>
parents: 57
diff changeset
42 <property name="dist.home" value="${basedir}/dist"/>
8b707fa0a4fc Convert to new-style mac app.
David Barts <n5jrn@me.com>
parents: 57
diff changeset
43 <property name="pf.home" value="${basedir}/package-files"/>
8b707fa0a4fc Convert to new-style mac app.
David Barts <n5jrn@me.com>
parents: 57
diff changeset
44 <property name="jvm.version" value="1.8"/>
0
be282c48010a Incomplete; checking it in as a backup.
David Barts <n5jrn@me.com>
parents:
diff changeset
45
be282c48010a Incomplete; checking it in as a backup.
David Barts <n5jrn@me.com>
parents:
diff changeset
46 <!-- help message -->
be282c48010a Incomplete; checking it in as a backup.
David Barts <n5jrn@me.com>
parents:
diff changeset
47 <target name="help">
be282c48010a Incomplete; checking it in as a backup.
David Barts <n5jrn@me.com>
parents:
diff changeset
48 <echo>You can use the following targets:</echo>
be282c48010a Incomplete; checking it in as a backup.
David Barts <n5jrn@me.com>
parents:
diff changeset
49 <echo> </echo>
be282c48010a Incomplete; checking it in as a backup.
David Barts <n5jrn@me.com>
parents:
diff changeset
50 <echo> help : (default) Prints this message </echo>
be282c48010a Incomplete; checking it in as a backup.
David Barts <n5jrn@me.com>
parents:
diff changeset
51 <echo> all : Cleans, compiles, and stages application</echo>
be282c48010a Incomplete; checking it in as a backup.
David Barts <n5jrn@me.com>
parents:
diff changeset
52 <echo> clean : Deletes work directories</echo>
be282c48010a Incomplete; checking it in as a backup.
David Barts <n5jrn@me.com>
parents:
diff changeset
53 <echo> compile : Compiles servlets into class files</echo>
be282c48010a Incomplete; checking it in as a backup.
David Barts <n5jrn@me.com>
parents:
diff changeset
54 <echo> jar : Make JAR file.</echo>
be282c48010a Incomplete; checking it in as a backup.
David Barts <n5jrn@me.com>
parents:
diff changeset
55 <echo> </echo>
be282c48010a Incomplete; checking it in as a backup.
David Barts <n5jrn@me.com>
parents:
diff changeset
56 <echo>For example, to clean, compile, and package all at once, run:</echo>
be282c48010a Incomplete; checking it in as a backup.
David Barts <n5jrn@me.com>
parents:
diff changeset
57 <echo>prompt> ant all </echo>
be282c48010a Incomplete; checking it in as a backup.
David Barts <n5jrn@me.com>
parents:
diff changeset
58 </target>
be282c48010a Incomplete; checking it in as a backup.
David Barts <n5jrn@me.com>
parents:
diff changeset
59
be282c48010a Incomplete; checking it in as a backup.
David Barts <n5jrn@me.com>
parents:
diff changeset
60 <!-- Define the CLASSPATH -->
be282c48010a Incomplete; checking it in as a backup.
David Barts <n5jrn@me.com>
parents:
diff changeset
61 <target name="classpath">
be282c48010a Incomplete; checking it in as a backup.
David Barts <n5jrn@me.com>
parents:
diff changeset
62 <path id="std.classpath">
be282c48010a Incomplete; checking it in as a backup.
David Barts <n5jrn@me.com>
parents:
diff changeset
63 <fileset dir="${lib.home}">
be282c48010a Incomplete; checking it in as a backup.
David Barts <n5jrn@me.com>
parents:
diff changeset
64 <include name="*.jar"/>
be282c48010a Incomplete; checking it in as a backup.
David Barts <n5jrn@me.com>
parents:
diff changeset
65 </fileset>
be282c48010a Incomplete; checking it in as a backup.
David Barts <n5jrn@me.com>
parents:
diff changeset
66 </path>
be282c48010a Incomplete; checking it in as a backup.
David Barts <n5jrn@me.com>
parents:
diff changeset
67 <path id="compile.classpath">
be282c48010a Incomplete; checking it in as a backup.
David Barts <n5jrn@me.com>
parents:
diff changeset
68 <path refid="std.classpath"/>
be282c48010a Incomplete; checking it in as a backup.
David Barts <n5jrn@me.com>
parents:
diff changeset
69 <pathelement location="${src.home}"/>
be282c48010a Incomplete; checking it in as a backup.
David Barts <n5jrn@me.com>
parents:
diff changeset
70 </path>
be282c48010a Incomplete; checking it in as a backup.
David Barts <n5jrn@me.com>
parents:
diff changeset
71 <path id="test.classpath">
be282c48010a Incomplete; checking it in as a backup.
David Barts <n5jrn@me.com>
parents:
diff changeset
72 <path refid="std.classpath"/>
be282c48010a Incomplete; checking it in as a backup.
David Barts <n5jrn@me.com>
parents:
diff changeset
73 <pathelement location="${work.home}"/>
be282c48010a Incomplete; checking it in as a backup.
David Barts <n5jrn@me.com>
parents:
diff changeset
74 </path>
be282c48010a Incomplete; checking it in as a backup.
David Barts <n5jrn@me.com>
parents:
diff changeset
75 </target>
be282c48010a Incomplete; checking it in as a backup.
David Barts <n5jrn@me.com>
parents:
diff changeset
76
59
8b707fa0a4fc Convert to new-style mac app.
David Barts <n5jrn@me.com>
parents: 57
diff changeset
77 <!-- make needed directories -->
8b707fa0a4fc Convert to new-style mac app.
David Barts <n5jrn@me.com>
parents: 57
diff changeset
78 <target name="mkdirs">
8b707fa0a4fc Convert to new-style mac app.
David Barts <n5jrn@me.com>
parents: 57
diff changeset
79 <mkdir dir="${dist.home}"/>
8b707fa0a4fc Convert to new-style mac app.
David Barts <n5jrn@me.com>
parents: 57
diff changeset
80 </target>
8b707fa0a4fc Convert to new-style mac app.
David Barts <n5jrn@me.com>
parents: 57
diff changeset
81
8b707fa0a4fc Convert to new-style mac app.
David Barts <n5jrn@me.com>
parents: 57
diff changeset
82 <!-- remove old cruft -->
8b707fa0a4fc Convert to new-style mac app.
David Barts <n5jrn@me.com>
parents: 57
diff changeset
83 <target name="clean">
8b707fa0a4fc Convert to new-style mac app.
David Barts <n5jrn@me.com>
parents: 57
diff changeset
84 <delete includeEmptyDirs="true" failonerror="false">
8b707fa0a4fc Convert to new-style mac app.
David Barts <n5jrn@me.com>
parents: 57
diff changeset
85 <fileset dir="${dist.home}" includes="**/*"/>
62
c56a0747c256 Add make plain feature.
David Barts <n5jrn@me.com>
parents: 60
diff changeset
86 <fileset file="${work.jar}"/>
c56a0747c256 Add make plain feature.
David Barts <n5jrn@me.com>
parents: 60
diff changeset
87 <fileset file="${jar.name}"/>
59
8b707fa0a4fc Convert to new-style mac app.
David Barts <n5jrn@me.com>
parents: 57
diff changeset
88 </delete>
8b707fa0a4fc Convert to new-style mac app.
David Barts <n5jrn@me.com>
parents: 57
diff changeset
89 </target>
8b707fa0a4fc Convert to new-style mac app.
David Barts <n5jrn@me.com>
parents: 57
diff changeset
90
0
be282c48010a Incomplete; checking it in as a backup.
David Barts <n5jrn@me.com>
parents:
diff changeset
91 <!-- do everything but install -->
be282c48010a Incomplete; checking it in as a backup.
David Barts <n5jrn@me.com>
parents:
diff changeset
92 <target name="all" depends="jar"
be282c48010a Incomplete; checking it in as a backup.
David Barts <n5jrn@me.com>
parents:
diff changeset
93 description="Clean work dirs, compile, make JAR."/>
be282c48010a Incomplete; checking it in as a backup.
David Barts <n5jrn@me.com>
parents:
diff changeset
94
be282c48010a Incomplete; checking it in as a backup.
David Barts <n5jrn@me.com>
parents:
diff changeset
95 <!-- compile *.kt to *.class -->
be282c48010a Incomplete; checking it in as a backup.
David Barts <n5jrn@me.com>
parents:
diff changeset
96 <target name="compile" depends="classpath"
be282c48010a Incomplete; checking it in as a backup.
David Barts <n5jrn@me.com>
parents:
diff changeset
97 description="Compile Java sources to ${work.home}">
be282c48010a Incomplete; checking it in as a backup.
David Barts <n5jrn@me.com>
parents:
diff changeset
98 <kotlinc src="${src.home}" output="${work.jar}"
57
c6cccbe2f393 Port to OpenJDK 15 (mostly done).
David Barts <n5jrn@me.com>
parents: 53
diff changeset
99 noStdlib="false" includeRuntime="true"
47
19d9da731c43 Recoded; cleaned up root namespace, removed race conditions.
David Barts <n5jrn@me.com>
parents: 42
diff changeset
100 classpathref="compile.classpath">
59
8b707fa0a4fc Convert to new-style mac app.
David Barts <n5jrn@me.com>
parents: 57
diff changeset
101 <compilerarg line="-jvm-target ${jvm.version}"/>
47
19d9da731c43 Recoded; cleaned up root namespace, removed race conditions.
David Barts <n5jrn@me.com>
parents: 42
diff changeset
102 </kotlinc>
0
be282c48010a Incomplete; checking it in as a backup.
David Barts <n5jrn@me.com>
parents:
diff changeset
103 </target>
be282c48010a Incomplete; checking it in as a backup.
David Barts <n5jrn@me.com>
parents:
diff changeset
104
be282c48010a Incomplete; checking it in as a backup.
David Barts <n5jrn@me.com>
parents:
diff changeset
105 <!-- make .jar file -->
be282c48010a Incomplete; checking it in as a backup.
David Barts <n5jrn@me.com>
parents:
diff changeset
106 <target name="jar" depends="compile" description="Create JAR file.">
be282c48010a Incomplete; checking it in as a backup.
David Barts <n5jrn@me.com>
parents:
diff changeset
107 <jar destfile="${jar.name}">
be282c48010a Incomplete; checking it in as a backup.
David Barts <n5jrn@me.com>
parents:
diff changeset
108 <manifest>
22
829769cb1c13 Add some support for making bundled apps to build.xml.
David Barts <n5jrn@me.com>
parents: 0
diff changeset
109 <attribute name="Main-Class" value="${app.entry}"/>
0
be282c48010a Incomplete; checking it in as a backup.
David Barts <n5jrn@me.com>
parents:
diff changeset
110 </manifest>
be282c48010a Incomplete; checking it in as a backup.
David Barts <n5jrn@me.com>
parents:
diff changeset
111 <zipgroupfileset dir="${lib.home}" includes="*.jar"/>
be282c48010a Incomplete; checking it in as a backup.
David Barts <n5jrn@me.com>
parents:
diff changeset
112 <zipfileset src="${work.jar}"/>
42
99220aa136d9 Add default.properties.
David Barts <n5jrn@me.com>
parents: 27
diff changeset
113 <zipfileset dir="${src.home}" includes="**/*.properties"/>
0
be282c48010a Incomplete; checking it in as a backup.
David Barts <n5jrn@me.com>
parents:
diff changeset
114 </jar>
be282c48010a Incomplete; checking it in as a backup.
David Barts <n5jrn@me.com>
parents:
diff changeset
115 </target>
be282c48010a Incomplete; checking it in as a backup.
David Barts <n5jrn@me.com>
parents:
diff changeset
116
22
829769cb1c13 Add some support for making bundled apps to build.xml.
David Barts <n5jrn@me.com>
parents: 0
diff changeset
117 <!-- for making bundled apps -->
829769cb1c13 Add some support for making bundled apps to build.xml.
David Barts <n5jrn@me.com>
parents: 0
diff changeset
118 <macrodef name="bundle">
829769cb1c13 Add some support for making bundled apps to build.xml.
David Barts <n5jrn@me.com>
parents: 0
diff changeset
119 <attribute name="type"/>
51
e8d2a7e6f6c7 So it builds under Windoze (at last!)
davidb
parents: 47
diff changeset
120 <element name="args" optional="true"/>
22
829769cb1c13 Add some support for making bundled apps to build.xml.
David Barts <n5jrn@me.com>
parents: 0
diff changeset
121 <sequential>
25
3129d0e24086 Use ant tasks, not <exec>.
David Barts <n5jrn@me.com>
parents: 23
diff changeset
122 <fx:deploy nativeBundles="@{type}" outdir="${basedir}" outfile="${app.name}"
3129d0e24086 Use ant tasks, not <exec>.
David Barts <n5jrn@me.com>
parents: 23
diff changeset
123 signBundle="false">
3129d0e24086 Use ant tasks, not <exec>.
David Barts <n5jrn@me.com>
parents: 23
diff changeset
124 <fx:application mainClass="${app.entry}" name="${app.name}" toolkit="swing"
47
19d9da731c43 Recoded; cleaned up root namespace, removed race conditions.
David Barts <n5jrn@me.com>
parents: 42
diff changeset
125 version="1.01"/>
25
3129d0e24086 Use ant tasks, not <exec>.
David Barts <n5jrn@me.com>
parents: 23
diff changeset
126 <fx:info description="ClipMan, a clipboard manager." title="${app.name}"
27
8aa2dfac27eb Big reorg; compiled but untested.
David Barts <n5jrn@me.com>
parents: 25
diff changeset
127 vendor="David Barts &lt;n5jrn@me.com&gt;"
8aa2dfac27eb Big reorg; compiled but untested.
David Barts <n5jrn@me.com>
parents: 25
diff changeset
128 copyright="© MMXX, David W. Barts"/>
25
3129d0e24086 Use ant tasks, not <exec>.
David Barts <n5jrn@me.com>
parents: 23
diff changeset
129 <fx:resources>
3129d0e24086 Use ant tasks, not <exec>.
David Barts <n5jrn@me.com>
parents: 23
diff changeset
130 <fx:fileset dir="${basedir}" includes="${lc.app.name}.jar"/>
3129d0e24086 Use ant tasks, not <exec>.
David Barts <n5jrn@me.com>
parents: 23
diff changeset
131 </fx:resources>
3129d0e24086 Use ant tasks, not <exec>.
David Barts <n5jrn@me.com>
parents: 23
diff changeset
132 <fx:bundleArgument arg="runtime" value="${env.JRE_HOME}"/>
23
14049bc97a7c More package stuff.
David Barts <n5jrn@me.com>
parents: 22
diff changeset
133 <args/>
25
3129d0e24086 Use ant tasks, not <exec>.
David Barts <n5jrn@me.com>
parents: 23
diff changeset
134 </fx:deploy>
3129d0e24086 Use ant tasks, not <exec>.
David Barts <n5jrn@me.com>
parents: 23
diff changeset
135 </sequential>
22
829769cb1c13 Add some support for making bundled apps to build.xml.
David Barts <n5jrn@me.com>
parents: 0
diff changeset
136 </macrodef>
829769cb1c13 Add some support for making bundled apps to build.xml.
David Barts <n5jrn@me.com>
parents: 0
diff changeset
137
59
8b707fa0a4fc Convert to new-style mac app.
David Barts <n5jrn@me.com>
parents: 57
diff changeset
138 <target name="macapp" depends="mkdirs,jar" description="Create MacOS app bundle.">
8b707fa0a4fc Convert to new-style mac app.
David Barts <n5jrn@me.com>
parents: 57
diff changeset
139 <fail message="Macintosh packages can only be built on a Mac.">
8b707fa0a4fc Convert to new-style mac app.
David Barts <n5jrn@me.com>
parents: 57
diff changeset
140 <condition>
8b707fa0a4fc Convert to new-style mac app.
David Barts <n5jrn@me.com>
parents: 57
diff changeset
141 <not><os family="mac"/></not>
8b707fa0a4fc Convert to new-style mac app.
David Barts <n5jrn@me.com>
parents: 57
diff changeset
142 </condition>
8b707fa0a4fc Convert to new-style mac app.
David Barts <n5jrn@me.com>
parents: 57
diff changeset
143 </fail>
8b707fa0a4fc Convert to new-style mac app.
David Barts <n5jrn@me.com>
parents: 57
diff changeset
144 <sequential>
8b707fa0a4fc Convert to new-style mac app.
David Barts <n5jrn@me.com>
parents: 57
diff changeset
145 <property name="mac.disk.image.filename"
8b707fa0a4fc Convert to new-style mac app.
David Barts <n5jrn@me.com>
parents: 57
diff changeset
146 value="${lc.app.name}_${app.version}.dmg"/>
8b707fa0a4fc Convert to new-style mac app.
David Barts <n5jrn@me.com>
parents: 57
diff changeset
147 <property name="app.bundle" value="${dist.home}/${app.name}.app"/>
8b707fa0a4fc Convert to new-style mac app.
David Barts <n5jrn@me.com>
parents: 57
diff changeset
148 <mkdir dir="${app.bundle}/Contents"/>
8b707fa0a4fc Convert to new-style mac app.
David Barts <n5jrn@me.com>
parents: 57
diff changeset
149 <copy todir="${app.bundle}/Contents" encoding="UTF-8" overwrite="true">
8b707fa0a4fc Convert to new-style mac app.
David Barts <n5jrn@me.com>
parents: 57
diff changeset
150 <fileset file="${pf.home}/osx/Info.plist"/>
8b707fa0a4fc Convert to new-style mac app.
David Barts <n5jrn@me.com>
parents: 57
diff changeset
151 <!-- XXX will break if any tokens contain <, >, or & -->
8b707fa0a4fc Convert to new-style mac app.
David Barts <n5jrn@me.com>
parents: 57
diff changeset
152 <filterset>
8b707fa0a4fc Convert to new-style mac app.
David Barts <n5jrn@me.com>
parents: 57
diff changeset
153 <filter token="app.copyright" value="${app.copyright}"/>
8b707fa0a4fc Convert to new-style mac app.
David Barts <n5jrn@me.com>
parents: 57
diff changeset
154 <filter token="app.domain" value="${app.domain}"/>
8b707fa0a4fc Convert to new-style mac app.
David Barts <n5jrn@me.com>
parents: 57
diff changeset
155 <filter token="app.entry" value="${app.entry}"/>
8b707fa0a4fc Convert to new-style mac app.
David Barts <n5jrn@me.com>
parents: 57
diff changeset
156 <filter token="app.name" value="${app.name}"/>
8b707fa0a4fc Convert to new-style mac app.
David Barts <n5jrn@me.com>
parents: 57
diff changeset
157 <filter token="app.version" value="${app.version}"/>
8b707fa0a4fc Convert to new-style mac app.
David Barts <n5jrn@me.com>
parents: 57
diff changeset
158 <filter token="jar.filename" value="${lc.app.name}.jar"/>
8b707fa0a4fc Convert to new-style mac app.
David Barts <n5jrn@me.com>
parents: 57
diff changeset
159 <filter token="jvm.version" value="${jvm.version}"/>
8b707fa0a4fc Convert to new-style mac app.
David Barts <n5jrn@me.com>
parents: 57
diff changeset
160 <filter token="lc.app.name" value="${lc.app.name}"/>
8b707fa0a4fc Convert to new-style mac app.
David Barts <n5jrn@me.com>
parents: 57
diff changeset
161 </filterset>
8b707fa0a4fc Convert to new-style mac app.
David Barts <n5jrn@me.com>
parents: 57
diff changeset
162 </copy>
8b707fa0a4fc Convert to new-style mac app.
David Barts <n5jrn@me.com>
parents: 57
diff changeset
163 <mkdir dir="${app.bundle}/Contents/MacOS"/>
8b707fa0a4fc Convert to new-style mac app.
David Barts <n5jrn@me.com>
parents: 57
diff changeset
164 <copy todir="${app.bundle}/Contents/MacOS" encoding="UTF-8"
8b707fa0a4fc Convert to new-style mac app.
David Barts <n5jrn@me.com>
parents: 57
diff changeset
165 overwrite="true">
8b707fa0a4fc Convert to new-style mac app.
David Barts <n5jrn@me.com>
parents: 57
diff changeset
166 <fileset file="${pf.home}/osx/JavaApplicationStub"/>
8b707fa0a4fc Convert to new-style mac app.
David Barts <n5jrn@me.com>
parents: 57
diff changeset
167 <filterset>
8b707fa0a4fc Convert to new-style mac app.
David Barts <n5jrn@me.com>
parents: 57
diff changeset
168 <filter token="app.domain" value="${app.domain}"/>
8b707fa0a4fc Convert to new-style mac app.
David Barts <n5jrn@me.com>
parents: 57
diff changeset
169 <filter token="app.name" value="${app.name}"/>
8b707fa0a4fc Convert to new-style mac app.
David Barts <n5jrn@me.com>
parents: 57
diff changeset
170 </filterset>
8b707fa0a4fc Convert to new-style mac app.
David Barts <n5jrn@me.com>
parents: 57
diff changeset
171 </copy>
8b707fa0a4fc Convert to new-style mac app.
David Barts <n5jrn@me.com>
parents: 57
diff changeset
172 <chmod file="${app.bundle}/Contents/MacOS/JavaApplicationStub"
8b707fa0a4fc Convert to new-style mac app.
David Barts <n5jrn@me.com>
parents: 57
diff changeset
173 perm="755"/>
8b707fa0a4fc Convert to new-style mac app.
David Barts <n5jrn@me.com>
parents: 57
diff changeset
174 <mkdir dir="${app.bundle}/Contents/Resources"/>
8b707fa0a4fc Convert to new-style mac app.
David Barts <n5jrn@me.com>
parents: 57
diff changeset
175 <copy file="${basedir}/${app.name}.icns"
8b707fa0a4fc Convert to new-style mac app.
David Barts <n5jrn@me.com>
parents: 57
diff changeset
176 todir="${app.bundle}/Contents/Resources"/>
8b707fa0a4fc Convert to new-style mac app.
David Barts <n5jrn@me.com>
parents: 57
diff changeset
177 <mkdir dir="${app.bundle}/Contents/Java"/>
8b707fa0a4fc Convert to new-style mac app.
David Barts <n5jrn@me.com>
parents: 57
diff changeset
178 <copy file="${jar.name}" todir="${app.bundle}/Contents/Java"/>
8b707fa0a4fc Convert to new-style mac app.
David Barts <n5jrn@me.com>
parents: 57
diff changeset
179 <echo file="${app.bundle}/Contents/PkgInfo" message="APPL????"/>
8b707fa0a4fc Convert to new-style mac app.
David Barts <n5jrn@me.com>
parents: 57
diff changeset
180 <exec executable="hdiutil" failonerror="true">
8b707fa0a4fc Convert to new-style mac app.
David Barts <n5jrn@me.com>
parents: 57
diff changeset
181 <arg value="create"/>
8b707fa0a4fc Convert to new-style mac app.
David Barts <n5jrn@me.com>
parents: 57
diff changeset
182 <arg value="-volname"/>
8b707fa0a4fc Convert to new-style mac app.
David Barts <n5jrn@me.com>
parents: 57
diff changeset
183 <arg value="${app.name}"/>
8b707fa0a4fc Convert to new-style mac app.
David Barts <n5jrn@me.com>
parents: 57
diff changeset
184 <arg value="-srcfolder"/>
8b707fa0a4fc Convert to new-style mac app.
David Barts <n5jrn@me.com>
parents: 57
diff changeset
185 <arg file="${app.bundle}"/>
8b707fa0a4fc Convert to new-style mac app.
David Barts <n5jrn@me.com>
parents: 57
diff changeset
186 <arg file="${dist.home}/orig-${mac.disk.image.filename}"/>
8b707fa0a4fc Convert to new-style mac app.
David Barts <n5jrn@me.com>
parents: 57
diff changeset
187 </exec>
8b707fa0a4fc Convert to new-style mac app.
David Barts <n5jrn@me.com>
parents: 57
diff changeset
188 <exec executable="hdiutil" failonerror="true">
8b707fa0a4fc Convert to new-style mac app.
David Barts <n5jrn@me.com>
parents: 57
diff changeset
189 <arg value="convert"/>
8b707fa0a4fc Convert to new-style mac app.
David Barts <n5jrn@me.com>
parents: 57
diff changeset
190 <arg file="${dist.home}/orig-${mac.disk.image.filename}"/>
8b707fa0a4fc Convert to new-style mac app.
David Barts <n5jrn@me.com>
parents: 57
diff changeset
191 <arg value="-format"/>
8b707fa0a4fc Convert to new-style mac app.
David Barts <n5jrn@me.com>
parents: 57
diff changeset
192 <arg value="UDRW"/>
8b707fa0a4fc Convert to new-style mac app.
David Barts <n5jrn@me.com>
parents: 57
diff changeset
193 <arg value="-o"/>
8b707fa0a4fc Convert to new-style mac app.
David Barts <n5jrn@me.com>
parents: 57
diff changeset
194 <arg file="${dist.home}/udrw-${mac.disk.image.filename}"/>
8b707fa0a4fc Convert to new-style mac app.
David Barts <n5jrn@me.com>
parents: 57
diff changeset
195 </exec>
8b707fa0a4fc Convert to new-style mac app.
David Barts <n5jrn@me.com>
parents: 57
diff changeset
196 <exec executable="hdiutil" failonerror="true">
8b707fa0a4fc Convert to new-style mac app.
David Barts <n5jrn@me.com>
parents: 57
diff changeset
197 <arg value="convert"/>
8b707fa0a4fc Convert to new-style mac app.
David Barts <n5jrn@me.com>
parents: 57
diff changeset
198 <arg file="${dist.home}/udrw-${mac.disk.image.filename}"/>
8b707fa0a4fc Convert to new-style mac app.
David Barts <n5jrn@me.com>
parents: 57
diff changeset
199 <arg value="-format"/>
8b707fa0a4fc Convert to new-style mac app.
David Barts <n5jrn@me.com>
parents: 57
diff changeset
200 <arg value="UDZO"/>
8b707fa0a4fc Convert to new-style mac app.
David Barts <n5jrn@me.com>
parents: 57
diff changeset
201 <arg value="-imagekey"/>
8b707fa0a4fc Convert to new-style mac app.
David Barts <n5jrn@me.com>
parents: 57
diff changeset
202 <arg value="zlib-level=9"/>
8b707fa0a4fc Convert to new-style mac app.
David Barts <n5jrn@me.com>
parents: 57
diff changeset
203 <arg value="-o"/>
8b707fa0a4fc Convert to new-style mac app.
David Barts <n5jrn@me.com>
parents: 57
diff changeset
204 <arg file="${dist.home}/${mac.disk.image.filename}"/>
8b707fa0a4fc Convert to new-style mac app.
David Barts <n5jrn@me.com>
parents: 57
diff changeset
205 </exec>
8b707fa0a4fc Convert to new-style mac app.
David Barts <n5jrn@me.com>
parents: 57
diff changeset
206 </sequential>
22
829769cb1c13 Add some support for making bundled apps to build.xml.
David Barts <n5jrn@me.com>
parents: 0
diff changeset
207 </target>
829769cb1c13 Add some support for making bundled apps to build.xml.
David Barts <n5jrn@me.com>
parents: 0
diff changeset
208
51
e8d2a7e6f6c7 So it builds under Windoze (at last!)
davidb
parents: 47
diff changeset
209 <target name="dummywork" description="dummy dir to make javapackager happy">
e8d2a7e6f6c7 So it builds under Windoze (at last!)
davidb
parents: 47
diff changeset
210 <mkdir dir="${work.home}"/>
e8d2a7e6f6c7 So it builds under Windoze (at last!)
davidb
parents: 47
diff changeset
211 <copy file="${jar.name}" tofile="${work.home}/${app.name}.jar"/>
e8d2a7e6f6c7 So it builds under Windoze (at last!)
davidb
parents: 47
diff changeset
212 </target>
e8d2a7e6f6c7 So it builds under Windoze (at last!)
davidb
parents: 47
diff changeset
213
e8d2a7e6f6c7 So it builds under Windoze (at last!)
davidb
parents: 47
diff changeset
214 <!-- fx:deploy is broken on Windoze, must run javapackager command -->
53
b1198e4bec25 app -> winapp
davidb
parents: 51
diff changeset
215 <target name="winapp" depends="jar,dummywork" description="Create app bundle.">
51
e8d2a7e6f6c7 So it builds under Windoze (at last!)
davidb
parents: 47
diff changeset
216 <exec executable="${env.JRE_HOME}/bin/javapackager">
e8d2a7e6f6c7 So it builds under Windoze (at last!)
davidb
parents: 47
diff changeset
217 <arg value="-deploy"/>
e8d2a7e6f6c7 So it builds under Windoze (at last!)
davidb
parents: 47
diff changeset
218 <arg value="-title"/> <arg value="${app.name}"/>
e8d2a7e6f6c7 So it builds under Windoze (at last!)
davidb
parents: 47
diff changeset
219 <arg value="-appclass"/> <arg value="${app.entry}"/>
e8d2a7e6f6c7 So it builds under Windoze (at last!)
davidb
parents: 47
diff changeset
220 <arg value="-native"/> <arg value="image"/>
e8d2a7e6f6c7 So it builds under Windoze (at last!)
davidb
parents: 47
diff changeset
221 <arg value="-name"/> <arg value="${app.name}"/>
e8d2a7e6f6c7 So it builds under Windoze (at last!)
davidb
parents: 47
diff changeset
222 <arg value="-outdir"/> <arg value="."/>
e8d2a7e6f6c7 So it builds under Windoze (at last!)
davidb
parents: 47
diff changeset
223 <arg value="-outfile"/> <arg value="${app.name}"/>
e8d2a7e6f6c7 So it builds under Windoze (at last!)
davidb
parents: 47
diff changeset
224 <arg value="-srcdir"/> <arg value="${work.home}"/>
e8d2a7e6f6c7 So it builds under Windoze (at last!)
davidb
parents: 47
diff changeset
225 </exec>
22
829769cb1c13 Add some support for making bundled apps to build.xml.
David Barts <n5jrn@me.com>
parents: 0
diff changeset
226 </target>
829769cb1c13 Add some support for making bundled apps to build.xml.
David Barts <n5jrn@me.com>
parents: 0
diff changeset
227
25
3129d0e24086 Use ant tasks, not <exec>.
David Barts <n5jrn@me.com>
parents: 23
diff changeset
228 <target name="rpm" depends="jar" description="Create RPM package.">
22
829769cb1c13 Add some support for making bundled apps to build.xml.
David Barts <n5jrn@me.com>
parents: 0
diff changeset
229 <bundle type="rpm"/>
829769cb1c13 Add some support for making bundled apps to build.xml.
David Barts <n5jrn@me.com>
parents: 0
diff changeset
230 </target>
829769cb1c13 Add some support for making bundled apps to build.xml.
David Barts <n5jrn@me.com>
parents: 0
diff changeset
231
25
3129d0e24086 Use ant tasks, not <exec>.
David Barts <n5jrn@me.com>
parents: 23
diff changeset
232 <target name="deb" depends="jar" description="Create Debian package.">
22
829769cb1c13 Add some support for making bundled apps to build.xml.
David Barts <n5jrn@me.com>
parents: 0
diff changeset
233 <bundle type="deb"/>
829769cb1c13 Add some support for making bundled apps to build.xml.
David Barts <n5jrn@me.com>
parents: 0
diff changeset
234 </target>
829769cb1c13 Add some support for making bundled apps to build.xml.
David Barts <n5jrn@me.com>
parents: 0
diff changeset
235
0
be282c48010a Incomplete; checking it in as a backup.
David Barts <n5jrn@me.com>
parents:
diff changeset
236 </project>