annotate build.xml @ 25:a495f9ea498b mac-open

Initial attempts to make it respond to MacOS open message (not working).
author David Barts <n5jrn@me.com>
date Sun, 13 Dec 2020 10:29:08 -0800
parents 92afaa27f40a
children 9bf3d8de6904
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
1 <?xml version="1.0" encoding="UTF-8"?>
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
2 <project name="ImagePrep" default="help" basedir=".">
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
3 <!-- import all environment variables as env.* -->
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
4 <property environment="env"/>
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
5
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
6 <!-- ensure required environment variables are set -->
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
7 <macrodef name="env-require">
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
8 <attribute name="name"/>
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
9 <sequential>
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
10 <fail message="Environment variable @{name} not set!">
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
11 <condition>
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
12 <not><isset property="env.@{name}"/></not>
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
13 </condition>
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
14 </fail>
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
15 </sequential>
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
16 </macrodef>
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
17 <env-require name="JRE_HOME"/>
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
18 <env-require name="KOTLIN_HOME"/>
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
19 <env-require name="OSDEP_HOME"/>
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
20
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
21 <!-- cribbed from https://stackoverflow.com/questions/7129672/uppercase-lowercase-capitalize-an-ant-property -->
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
22 <scriptdef language="javascript" name="toLowerCase">
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
23 <attribute name="value" />
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
24 <attribute name="target" />
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
25 <![CDATA[
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
26 "use strict";
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
27 project.setProperty( attributes.get( "target" ),
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
28 attributes.get( "value" ).toLowerCase() );
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
29 ]]>
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
30 </scriptdef>
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
31
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
32 <!-- Define the properties used by the build -->
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
33 <property name="app.name" value="${ant.project.name}"/>
2
a6f9b51d5e8d Got jar building.
David Barts <n5jrn@me.com>
parents: 0
diff changeset
34 <toLowerCase target="lc.app.name" value="${app.name}"/>
0
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
35 <property name="app.version" value="1.00"/>
2
a6f9b51d5e8d Got jar building.
David Barts <n5jrn@me.com>
parents: 0
diff changeset
36 <property name="app.domain" value="name.blackcap.${lc.app.name}"/>
0
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
37 <property name="app.entry" value="${app.domain}.MainKt"/>
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
38 <property name="app.copyright" value="Copyright © 2020, David W. Barts."/>
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
39 <property name="jar.name" value="${basedir}/${lc.app.name}.jar"/>
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
40 <property name="work.jar" value="${basedir}/work.jar"/>
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
41 <property name="lib.home" value="${basedir}/lib"/>
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
42 <property name="src.home" value="${basedir}/src"/>
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
43 <property name="dist.home" value="${basedir}/dist"/>
23
92afaa27f40a Mac app support.
David Barts <n5jrn@me.com>
parents: 4
diff changeset
44 <property name="pf.home" value="${basedir}/package-files"/>
0
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
45 <property name="jvm.version" value="1.8"/>
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
46
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
47 <!-- define the kotlin task -->
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
48 <property name="kotlin.lib" value="${env.KOTLIN_HOME}/lib"/>
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
49 <typedef resource="org/jetbrains/kotlin/ant/antlib.xml"
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
50 classpath="${kotlin.lib}/kotlin-ant.jar"/>
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
51
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
52 <!-- help message -->
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
53 <target name="help">
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
54 <echo>You can use the following targets:</echo>
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
55 <echo> </echo>
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
56 <echo> help : (default) Prints this message </echo>
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
57 <echo> all : Cleans, compiles, and stages application</echo>
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
58 <echo> clean : Deletes work directories</echo>
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
59 <echo> compile : Compiles servlets into class files</echo>
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
60 <echo> jar : Make JAR file.</echo>
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
61 <echo> </echo>
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
62 <echo>For example, to clean, compile, and package all at once, run:</echo>
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
63 <echo>prompt> ant all </echo>
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
64 </target>
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
65
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
66 <!-- Define the CLASSPATH -->
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
67 <target name="classpath">
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
68 <path id="compile.classpath">
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
69 <pathelement location="${src.home}"/>
4
5234e4500d45 Command-line arguments (only partially tested).
David Barts <n5jrn@me.com>
parents: 2
diff changeset
70 <fileset dir="${lib.home}">
5234e4500d45 Command-line arguments (only partially tested).
David Barts <n5jrn@me.com>
parents: 2
diff changeset
71 <include name="*.jar"/>
5234e4500d45 Command-line arguments (only partially tested).
David Barts <n5jrn@me.com>
parents: 2
diff changeset
72 </fileset>
0
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
73 </path>
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
74 </target>
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
75
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
76 <!-- make needed directories -->
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
77 <target name="mkdirs">
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
78 <mkdir dir="${dist.home}"/>
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
79 </target>
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
80
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
81 <!-- remove old cruft -->
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
82 <target name="clean">
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
83 <delete includeEmptyDirs="true" failonerror="false">
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
84 <fileset dir="${dist.home}" includes="**/*"/>
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
85 </delete>
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
86 </target>
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
87
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
88 <!-- rename files containing OS-dependant code -->
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
89 <target name="osdep">
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
90 <exec executable="${env.JRE_HOME}/bin/java" failonerror="true">
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
91 <arg value="-jar"/>
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
92 <arg file="${env.OSDEP_HOME}/osdep.jar"/>
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
93 <arg value="${src.home}"/>
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
94 </exec>
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
95 </target>
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
96
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
97 <!-- do everything but install -->
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
98 <target name="all" depends="jar"
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
99 description="Clean work dirs, compile, make JAR."/>
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
100
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
101 <!-- compile *.kt to *.class -->
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
102 <target name="compile" depends="mkdirs,osdep,classpath"
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
103 description="Compile Java sources to ${work.home}">
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
104 <kotlinc src="${src.home}" output="${work.jar}"
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
105 classpathref="compile.classpath">
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
106 <compilerarg line="-jvm-target ${jvm.version}"/>
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
107 </kotlinc>
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
108 </target>
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
109
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
110 <!-- make .jar file -->
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
111 <target name="jar" depends="compile" description="Create JAR file.">
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
112 <jar destfile="${jar.name}">
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
113 <manifest>
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
114 <attribute name="Main-Class" value="${app.entry}"/>
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
115 </manifest>
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
116 <!-- <zipgroupfileset dir="${lib.home}" includes="*.jar"/> -->
4
5234e4500d45 Command-line arguments (only partially tested).
David Barts <n5jrn@me.com>
parents: 2
diff changeset
117 <zipgroupfileset dir="${lib.home}" includes="*.jar"/>
0
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
118 <zipfileset src="${work.jar}"/>
2
a6f9b51d5e8d Got jar building.
David Barts <n5jrn@me.com>
parents: 0
diff changeset
119 <zipfileset dir="${src.home}" includes="**/*.properties,**/*.html"/>
0
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
120 </jar>
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
121 </target>
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
122
23
92afaa27f40a Mac app support.
David Barts <n5jrn@me.com>
parents: 4
diff changeset
123 <target name="macapp" depends="jar" description="Create MacOS app bundle.">
92afaa27f40a Mac app support.
David Barts <n5jrn@me.com>
parents: 4
diff changeset
124 <fail message="Macintosh packages can only be built on a Mac.">
92afaa27f40a Mac app support.
David Barts <n5jrn@me.com>
parents: 4
diff changeset
125 <condition>
92afaa27f40a Mac app support.
David Barts <n5jrn@me.com>
parents: 4
diff changeset
126 <not><os family="mac"/></not>
92afaa27f40a Mac app support.
David Barts <n5jrn@me.com>
parents: 4
diff changeset
127 </condition>
92afaa27f40a Mac app support.
David Barts <n5jrn@me.com>
parents: 4
diff changeset
128 </fail>
92afaa27f40a Mac app support.
David Barts <n5jrn@me.com>
parents: 4
diff changeset
129 <sequential>
92afaa27f40a Mac app support.
David Barts <n5jrn@me.com>
parents: 4
diff changeset
130 <property name="mac.disk.image.filename"
92afaa27f40a Mac app support.
David Barts <n5jrn@me.com>
parents: 4
diff changeset
131 value="${lc.app.name}_${app.version}.dmg"/>
92afaa27f40a Mac app support.
David Barts <n5jrn@me.com>
parents: 4
diff changeset
132 <property name="app.bundle" value="${dist.home}/${app.name}.app"/>
92afaa27f40a Mac app support.
David Barts <n5jrn@me.com>
parents: 4
diff changeset
133 <mkdir dir="${app.bundle}/Contents"/>
92afaa27f40a Mac app support.
David Barts <n5jrn@me.com>
parents: 4
diff changeset
134 <copy todir="${app.bundle}/Contents" encoding="UTF-8" overwrite="true">
92afaa27f40a Mac app support.
David Barts <n5jrn@me.com>
parents: 4
diff changeset
135 <fileset file="${pf.home}/osx/Info.plist"/>
92afaa27f40a Mac app support.
David Barts <n5jrn@me.com>
parents: 4
diff changeset
136 <!-- XXX will break if any tokens contain <, >, or & -->
92afaa27f40a Mac app support.
David Barts <n5jrn@me.com>
parents: 4
diff changeset
137 <filterset>
92afaa27f40a Mac app support.
David Barts <n5jrn@me.com>
parents: 4
diff changeset
138 <filter token="app.copyright" value="${app.copyright}"/>
92afaa27f40a Mac app support.
David Barts <n5jrn@me.com>
parents: 4
diff changeset
139 <filter token="app.domain" value="${app.domain}"/>
92afaa27f40a Mac app support.
David Barts <n5jrn@me.com>
parents: 4
diff changeset
140 <filter token="app.entry" value="${app.entry}"/>
92afaa27f40a Mac app support.
David Barts <n5jrn@me.com>
parents: 4
diff changeset
141 <filter token="app.name" value="${app.name}"/>
92afaa27f40a Mac app support.
David Barts <n5jrn@me.com>
parents: 4
diff changeset
142 <filter token="app.version" value="${app.version}"/>
92afaa27f40a Mac app support.
David Barts <n5jrn@me.com>
parents: 4
diff changeset
143 <filter token="jar.filename" value="${lc.app.name}.jar"/>
92afaa27f40a Mac app support.
David Barts <n5jrn@me.com>
parents: 4
diff changeset
144 <filter token="jvm.version" value="${jvm.version}"/>
92afaa27f40a Mac app support.
David Barts <n5jrn@me.com>
parents: 4
diff changeset
145 <filter token="lc.app.name" value="${lc.app.name}"/>
92afaa27f40a Mac app support.
David Barts <n5jrn@me.com>
parents: 4
diff changeset
146 </filterset>
92afaa27f40a Mac app support.
David Barts <n5jrn@me.com>
parents: 4
diff changeset
147 </copy>
92afaa27f40a Mac app support.
David Barts <n5jrn@me.com>
parents: 4
diff changeset
148 <mkdir dir="${app.bundle}/Contents/MacOS"/>
92afaa27f40a Mac app support.
David Barts <n5jrn@me.com>
parents: 4
diff changeset
149 <copy todir="${app.bundle}/Contents/MacOS" encoding="UTF-8"
92afaa27f40a Mac app support.
David Barts <n5jrn@me.com>
parents: 4
diff changeset
150 overwrite="true">
92afaa27f40a Mac app support.
David Barts <n5jrn@me.com>
parents: 4
diff changeset
151 <fileset file="${pf.home}/osx/JavaApplicationStub"/>
92afaa27f40a Mac app support.
David Barts <n5jrn@me.com>
parents: 4
diff changeset
152 <filterset>
92afaa27f40a Mac app support.
David Barts <n5jrn@me.com>
parents: 4
diff changeset
153 <filter token="app.domain" value="${app.domain}"/>
92afaa27f40a Mac app support.
David Barts <n5jrn@me.com>
parents: 4
diff changeset
154 <filter token="app.name" value="${app.name}"/>
92afaa27f40a Mac app support.
David Barts <n5jrn@me.com>
parents: 4
diff changeset
155 </filterset>
92afaa27f40a Mac app support.
David Barts <n5jrn@me.com>
parents: 4
diff changeset
156 </copy>
92afaa27f40a Mac app support.
David Barts <n5jrn@me.com>
parents: 4
diff changeset
157 <chmod file="${app.bundle}/Contents/MacOS/JavaApplicationStub"
92afaa27f40a Mac app support.
David Barts <n5jrn@me.com>
parents: 4
diff changeset
158 perm="755"/>
92afaa27f40a Mac app support.
David Barts <n5jrn@me.com>
parents: 4
diff changeset
159 <mkdir dir="${app.bundle}/Contents/Resources"/>
92afaa27f40a Mac app support.
David Barts <n5jrn@me.com>
parents: 4
diff changeset
160 <copy file="${basedir}/${app.name}.icns"
92afaa27f40a Mac app support.
David Barts <n5jrn@me.com>
parents: 4
diff changeset
161 todir="${app.bundle}/Contents/Resources"/>
92afaa27f40a Mac app support.
David Barts <n5jrn@me.com>
parents: 4
diff changeset
162 <mkdir dir="${app.bundle}/Contents/Java"/>
92afaa27f40a Mac app support.
David Barts <n5jrn@me.com>
parents: 4
diff changeset
163 <copy file="${jar.name}" todir="${app.bundle}/Contents/Java"/>
92afaa27f40a Mac app support.
David Barts <n5jrn@me.com>
parents: 4
diff changeset
164 <echo file="${app.bundle}/Contents/PkgInfo" message="APPL????"/>
92afaa27f40a Mac app support.
David Barts <n5jrn@me.com>
parents: 4
diff changeset
165 <exec executable="hdiutil" failonerror="true">
92afaa27f40a Mac app support.
David Barts <n5jrn@me.com>
parents: 4
diff changeset
166 <arg value="create"/>
92afaa27f40a Mac app support.
David Barts <n5jrn@me.com>
parents: 4
diff changeset
167 <arg value="-volname"/>
92afaa27f40a Mac app support.
David Barts <n5jrn@me.com>
parents: 4
diff changeset
168 <arg value="${app.name}"/>
92afaa27f40a Mac app support.
David Barts <n5jrn@me.com>
parents: 4
diff changeset
169 <arg value="-srcfolder"/>
92afaa27f40a Mac app support.
David Barts <n5jrn@me.com>
parents: 4
diff changeset
170 <arg file="${app.bundle}"/>
92afaa27f40a Mac app support.
David Barts <n5jrn@me.com>
parents: 4
diff changeset
171 <arg file="${dist.home}/orig-${mac.disk.image.filename}"/>
92afaa27f40a Mac app support.
David Barts <n5jrn@me.com>
parents: 4
diff changeset
172 </exec>
92afaa27f40a Mac app support.
David Barts <n5jrn@me.com>
parents: 4
diff changeset
173 <exec executable="hdiutil" failonerror="true">
92afaa27f40a Mac app support.
David Barts <n5jrn@me.com>
parents: 4
diff changeset
174 <arg value="convert"/>
92afaa27f40a Mac app support.
David Barts <n5jrn@me.com>
parents: 4
diff changeset
175 <arg file="${dist.home}/orig-${mac.disk.image.filename}"/>
92afaa27f40a Mac app support.
David Barts <n5jrn@me.com>
parents: 4
diff changeset
176 <arg value="-format"/>
92afaa27f40a Mac app support.
David Barts <n5jrn@me.com>
parents: 4
diff changeset
177 <arg value="UDRW"/>
92afaa27f40a Mac app support.
David Barts <n5jrn@me.com>
parents: 4
diff changeset
178 <arg value="-o"/>
92afaa27f40a Mac app support.
David Barts <n5jrn@me.com>
parents: 4
diff changeset
179 <arg file="${dist.home}/udrw-${mac.disk.image.filename}"/>
92afaa27f40a Mac app support.
David Barts <n5jrn@me.com>
parents: 4
diff changeset
180 </exec>
92afaa27f40a Mac app support.
David Barts <n5jrn@me.com>
parents: 4
diff changeset
181 <exec executable="hdiutil" failonerror="true">
92afaa27f40a Mac app support.
David Barts <n5jrn@me.com>
parents: 4
diff changeset
182 <arg value="convert"/>
92afaa27f40a Mac app support.
David Barts <n5jrn@me.com>
parents: 4
diff changeset
183 <arg file="${dist.home}/udrw-${mac.disk.image.filename}"/>
92afaa27f40a Mac app support.
David Barts <n5jrn@me.com>
parents: 4
diff changeset
184 <arg value="-format"/>
92afaa27f40a Mac app support.
David Barts <n5jrn@me.com>
parents: 4
diff changeset
185 <arg value="UDZO"/>
92afaa27f40a Mac app support.
David Barts <n5jrn@me.com>
parents: 4
diff changeset
186 <arg value="-imagekey"/>
92afaa27f40a Mac app support.
David Barts <n5jrn@me.com>
parents: 4
diff changeset
187 <arg value="zlib-level=9"/>
92afaa27f40a Mac app support.
David Barts <n5jrn@me.com>
parents: 4
diff changeset
188 <arg value="-o"/>
92afaa27f40a Mac app support.
David Barts <n5jrn@me.com>
parents: 4
diff changeset
189 <arg file="${dist.home}/${mac.disk.image.filename}"/>
92afaa27f40a Mac app support.
David Barts <n5jrn@me.com>
parents: 4
diff changeset
190 </exec>
92afaa27f40a Mac app support.
David Barts <n5jrn@me.com>
parents: 4
diff changeset
191 </sequential>
92afaa27f40a Mac app support.
David Barts <n5jrn@me.com>
parents: 4
diff changeset
192 </target>
92afaa27f40a Mac app support.
David Barts <n5jrn@me.com>
parents: 4
diff changeset
193
0
e0efe7848130 Initial commit. Untested!
David Barts <davidb@stashtea.com>
parents:
diff changeset
194 </project>