1 |
<project name="JSampler" default="build-fantasia" basedir="."> |
2 |
<description>This buildfile is used to build JSampler distributions</description> |
3 |
|
4 |
<property name="jlscp.version" value="0.8"/> |
5 |
<property name="jlscp.srcdir" value="lib/required/jlscp/src"/> |
6 |
<property name="juife.version" value="0.4a"/> |
7 |
<property name="juife.srcdir" value="lib/required/juife/src"/> |
8 |
<property name="JSampler.version" value="0.9"/> |
9 |
|
10 |
<target name="build-jsclassic" depends="clean-jsclassic,build-manifest"> |
11 |
<manifest file="dist/build/views.mf"> |
12 |
<attribute name="JS-Views" value="classic"/> |
13 |
<attribute name="JS-Default-View" value="classic"/> |
14 |
|
15 |
<section name="classic"> |
16 |
<attribute name="View-Name" value="JS Classic"/> |
17 |
<attribute name="View-Config" value="org.jsampler.view.classic.ViewConfig"/> |
18 |
<attribute name="Main-Frame" value="org.jsampler.view.classic.MainFrame"/> |
19 |
<attribute name="Progress-Indicator" value="org.jsampler.view.classic.ProgressDlg"/> |
20 |
</section> |
21 |
</manifest> |
22 |
|
23 |
<copy todir="./dist/build/org/jsampler/view"> |
24 |
<fileset file="./dist/build/views.mf"/> |
25 |
</copy> |
26 |
|
27 |
<unjar src="lib/required/jlscp.jar" dest="dist/build"> |
28 |
<patternset> |
29 |
<include name="org/**"/> |
30 |
</patternset> |
31 |
</unjar> |
32 |
|
33 |
<unjar src="lib/required/juife.jar" dest="dist/build"> |
34 |
<patternset> |
35 |
<include name="net/**"/> |
36 |
</patternset> |
37 |
</unjar> |
38 |
|
39 |
<javac debug="true" debuglevel="source,lines" srcdir="src" destdir="dist/build" excludes="org/jsampler/view/fantasia/**" /> |
40 |
<copy todir="./dist/build/org/jsampler/langprops"> |
41 |
<fileset dir="./src/org/jsampler/langprops"/> |
42 |
</copy> |
43 |
<copy todir="./dist/build/org/jsampler/view/std/langprops"> |
44 |
<fileset dir="./src/org/jsampler/view/std/langprops"/> |
45 |
</copy> |
46 |
<copy todir="./dist/build/org/jsampler/view/classic/langprops"> |
47 |
<fileset dir="./src/org/jsampler/view/classic/langprops"/> |
48 |
</copy> |
49 |
<copy todir="./dist/build/licenses"> |
50 |
<fileset dir="licenses"/> |
51 |
</copy> |
52 |
<copy todir="./dist/build/org/jsampler/view/classic/res"> |
53 |
<fileset dir="res/js-classic"/> |
54 |
</copy> |
55 |
<delete dir="./dist/build/org/jsampler/view/fantasia"/> |
56 |
<jar basedir="./dist/build" excludes="Manifest" destfile="./dist/JS_Classic-${JSampler.version}.jar" manifest="./dist/build/Manifest"/> |
57 |
<delete dir="./dist/build"/> |
58 |
</target> |
59 |
|
60 |
<target name="build-fantasia" depends="clean-fantasia,build-manifest"> |
61 |
<manifest file="dist/build/views.mf"> |
62 |
<attribute name="JS-Views" value="fantasia"/> |
63 |
<attribute name="JS-Default-View" value="fantasia"/> |
64 |
|
65 |
<section name="fantasia"> |
66 |
<attribute name="View-Name" value="Fantasia"/> |
67 |
<attribute name="View-Config" value="org.jsampler.view.fantasia.ViewConfig"/> |
68 |
<attribute name="Main-Frame" value="org.jsampler.view.fantasia.MainFrame"/> |
69 |
<attribute name="Progress-Indicator" value="org.jsampler.view.fantasia.ProgressDlg"/> |
70 |
</section> |
71 |
</manifest> |
72 |
|
73 |
<copy todir="./dist/build/org/jsampler/view"> |
74 |
<fileset file="./dist/build/views.mf"/> |
75 |
</copy> |
76 |
|
77 |
<unjar src="lib/required/jlscp.jar" dest="dist/build"> |
78 |
<patternset> |
79 |
<include name="org/**"/> |
80 |
</patternset> |
81 |
</unjar> |
82 |
|
83 |
<unjar src="lib/required/juife.jar" dest="dist/build"> |
84 |
<patternset> |
85 |
<include name="net/**"/> |
86 |
</patternset> |
87 |
</unjar> |
88 |
|
89 |
<unjar src="lib/required/substance.jar" dest="dist/build"> |
90 |
</unjar> |
91 |
|
92 |
<unjar src="lib/required/swingx.jar" dest="dist/build"> |
93 |
</unjar> |
94 |
|
95 |
<condition property="mac-src" value="org/jsampler/view/fantasia/MacOSApplicationHandler.java" else=""> |
96 |
<not><os name="mac" /></not> |
97 |
</condition> |
98 |
|
99 |
<javac debug="true" debuglevel="source,lines" srcdir="src" destdir="dist/build" excludes="org/jsampler/view/classic/** ${mac-src}"/> |
100 |
|
101 |
<copy todir="./dist/build/org/jsampler/langprops"> |
102 |
<fileset dir="./src/org/jsampler/langprops"/> |
103 |
</copy> |
104 |
<copy todir="./dist/build/org/jsampler/view/std/langprops"> |
105 |
<fileset dir="./src/org/jsampler/view/std/langprops"/> |
106 |
</copy> |
107 |
<copy todir="./dist/build/org/jsampler/view/fantasia/langprops"> |
108 |
<fileset dir="./src/org/jsampler/view/fantasia/langprops"/> |
109 |
</copy> |
110 |
<copy todir="./dist/build/licenses"> |
111 |
<fileset dir="licenses"/> |
112 |
</copy> |
113 |
<copy todir="./dist/build/org/jsampler/view/fantasia/res"> |
114 |
<fileset dir="res/fantasia"/> |
115 |
</copy> |
116 |
<delete dir="./dist/build/org/jsampler/view/classic"/> |
117 |
<jar basedir="./dist/build" excludes="Manifest" destfile="./dist/Fantasia-${JSampler.version}.jar" manifest="./dist/build/Manifest"/> |
118 |
<delete dir="./dist/build"/> |
119 |
</target> |
120 |
|
121 |
<target name="build-fantasia-osx" depends="build-fantasia"> |
122 |
<copy todir="./dist/Fantasia.app/Contents"> |
123 |
<fileset file="./res/fantasia/osx/Info.plist"/> |
124 |
</copy> |
125 |
<copy todir="./dist/Fantasia.app/Contents"> |
126 |
<fileset file="./res/fantasia/osx/PkgInfo"/> |
127 |
</copy> |
128 |
<copy todir="./dist/Fantasia.app/Contents/MacOS"> |
129 |
<fileset file="/System/Library/Frameworks/JavaVM.framework/Versions/Current/Resources/MacOS/JavaApplicationStub"/> |
130 |
</copy> |
131 |
<chmod file="./dist/Fantasia.app/Contents/MacOS/JavaApplicationStub" perm="755" /> |
132 |
<copy todir="./dist/Fantasia.app/Contents/Resources/Java"> |
133 |
<fileset file="./dist/Fantasia-${JSampler.version}.jar"/> |
134 |
</copy> |
135 |
<copy todir="./dist/Fantasia.app/Contents/Resources"> |
136 |
<fileset file="./res/fantasia/osx/Fantasia.icns"/> |
137 |
</copy> |
138 |
<copy todir="./dist/Fantasia.app/Contents/Resources"> |
139 |
<fileset file="./res/fantasia/osx/LSCPScript.icns"/> |
140 |
</copy> |
141 |
</target> |
142 |
|
143 |
<target name="build-coredoc" depends="clean-coredoc"> |
144 |
<mkdir dir="doc/api"/> |
145 |
<javadoc sourcepath="./src" destdir="./doc/api" windowtitle="JSampler ${JSampler.version} API specification" overview="./src/overview.html" Author="false" splitindex="true" use="true"> |
146 |
<fileset dir="${jlscp.srcdir}" defaultexcludes="yes"></fileset> |
147 |
<fileset dir="${juife.srcdir}" defaultexcludes="yes"></fileset> |
148 |
<package name="org.jsampler"/> |
149 |
<package name="org.jsampler.event"/> |
150 |
<package name="org.jsampler.task "/> |
151 |
<package name="org.jsampler.view"/> |
152 |
<doctitle>JSampler ${JSampler.version} API specification</doctitle> |
153 |
<header><![CDATA[<b>JSampler</b><br><font size=-1>v${JSampler.version}</font>]]></header> |
154 |
<bottom><![CDATA[<font size=-1>Copyright © 2009 Grigor Iliev. All rights reserved.</font>]]></bottom> |
155 |
</javadoc> |
156 |
</target> |
157 |
|
158 |
<target name="clean-jsclassic"> |
159 |
<delete file="dist/JS_Classic-${JSampler.version}.jar"/> |
160 |
|
161 |
|
162 |
</target> |
163 |
|
164 |
<target name="clean-fantasia"> |
165 |
<delete file="dist/Fantasia-${JSampler.version}.jar"/> |
166 |
<delete dir="dist/Fantasia.app"/> |
167 |
|
168 |
</target> |
169 |
|
170 |
<target name="clean-coredoc"> |
171 |
<delete dir="doc"/> |
172 |
</target> |
173 |
|
174 |
<target name="clean-all" depends="clean-coredoc"> |
175 |
<delete dir="dist"/> |
176 |
|
177 |
|
178 |
</target> |
179 |
|
180 |
<target name="build-manifest"> |
181 |
<mkdir dir="dist/build"/> |
182 |
<manifest file="dist/build/Manifest"> |
183 |
<attribute name="Main-Class" value="org.jsampler.JSampler"/> |
184 |
|
185 |
<section name="org/linuxsampler/lscp/"> |
186 |
<attribute name="Specification-Title" value="A java LinuxSampler control protocol API"/> |
187 |
<attribute name="Specification-Version" value="1.4"/> |
188 |
<attribute name="Specification-Vendor" value="Grigor Iliev"/> |
189 |
<attribute name="Implementation-Title" value="org.linuxsampler.lscp"/> |
190 |
<attribute name="Implementation-Version" value="${jlscp.version}"/> |
191 |
<attribute name="Implementation-Vendor" value="Grigor Iliev"/> |
192 |
</section> |
193 |
|
194 |
<section name="net/sf/juife/"> |
195 |
<attribute name="Specification-Title" value="Java User Interface Framework Extensions"/> |
196 |
<attribute name="Specification-Version" value="0.4"/> |
197 |
<attribute name="Specification-Vendor" value="Grigor Iliev"/> |
198 |
<attribute name="Implementation-Title" value="net.sf.juife"/> |
199 |
<attribute name="Implementation-Version" value="${juife.version}"/> |
200 |
<attribute name="Implementation-Vendor" value="Grigor Iliev"/> |
201 |
</section> |
202 |
|
203 |
<section name="org/jsampler/"> |
204 |
<attribute name="Specification-Title" value="A java front-end for LinuxSampler"/> |
205 |
<attribute name="Specification-Version" value="0.9"/> |
206 |
<attribute name="Specification-Vendor" value="Grigor Iliev"/> |
207 |
<attribute name="Implementation-Title" value="org.jsampler"/> |
208 |
<attribute name="Implementation-Version" value="${JSampler.version}"/> |
209 |
<attribute name="Implementation-Vendor" value="Grigor Iliev"/> |
210 |
</section> |
211 |
</manifest> |
212 |
</target> |
213 |
|
214 |
</project> |
215 |
|