forked from tinymce/tinymce
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.xml
382 lines (342 loc) · 22.3 KB
/
build.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
<?xml version="1.0" encoding="UTF-8"?>
<project name="TinyMCE" default="build" basedir=".">
<!-- Path properties -->
<property description="Classes directory" name="classes_dir" value="jscripts/tiny_mce/classes" />
<property description="Build directory" name="build_dir" value="jscripts/tiny_mce" />
<property description="Temp directory" name="temp_dir" value="tmp" />
<!-- Allow any user specific values to override the defaults -->
<property file="${user.home}/tinymce_build.properties" />
<!-- Setup classpath for js-build-tools ant tasks -->
<path id="tasks.classpath">
<pathelement location="."/>
<fileset dir="tools/ant">
<include name="**/*.jar"/>
</fileset>
</path>
<!-- Register new js-build-tools ant tasks -->
<taskdef name="preprocess" classname="com.moxiecode.ant.tasks.PreProcessTask" classpathref="tasks.classpath" loaderref="tasks.classpath.loader" />
<taskdef name="yuicompress" classname="com.moxiecode.ant.tasks.YuiCompressTask" classpathref="tasks.classpath" loaderref="tasks.classpath.loader" />
<taskdef name="moxiedoc" classname="com.moxiecode.ant.tasks.MoxieDocTask" classpathref="tasks.classpath" loaderref="tasks.classpath.loader" />
<taskdef resource="net/sf/antcontrib/antcontrib.properties" classpathref="tasks.classpath" loaderref="tasks.classpath.loader" />
<!-- Generate JS documentation -->
<target name="moxiedoc" depends="" description="Generates HTML documentation out of js source">
<mkdir dir="docs"/>
<delete quiet="true">
<fileset dir="docs\api" includes="**/*"/>
</delete>
<moxiedoc outdir="docs\api" templatedir="tools\templates" msintellisense="docs\api\tinymce.vsdoc.js" eventclass="tinymce.util.Dispatcher" title="TinyMCE API">
<fileset dir="jscripts\tiny_mce\classes">
<include name="**/*.js" />
</fileset>
<fileset dir="jscripts\tiny_mce\themes">
<include name="**/editor_template_src.js" />
</fileset>
<fileset dir="jscripts\tiny_mce\plugins">
<include name="**/editor_plugin_src.js" />
</fileset>
</moxiedoc>
</target>
<!-- Cleanup the build -->
<target name="clean" depends="" description="Cleans up the project from temporary files">
<delete dir="${temp_dir}" quiet="true" />
</target>
<!-- Concat and minify classes and scripts -->
<target name="build" depends="" description="Builds the project">
<!-- Combine all class files into one single script file -->
<concat destfile="${build_dir}/tiny_mce_tmp.js" fixlastline="yes">
<fileset dir="${classes_dir}" includes="tinymce.js" />
<fileset dir="${classes_dir}" includes="adapter/jquery/adapter.js" />
<fileset dir="${classes_dir}" includes="adapter/prototype/adapter.js" />
<fileset dir="${classes_dir}" includes="util/Dispatcher.js" />
<fileset dir="${classes_dir}" includes="util/URI.js" />
<fileset dir="${classes_dir}" includes="util/Cookie.js" />
<fileset dir="${classes_dir}" includes="util/JSON.js" />
<fileset dir="${classes_dir}" includes="util/XHR.js" />
<fileset dir="${classes_dir}" includes="util/JSONRequest.js" />
<fileset dir="${classes_dir}" includes="dom/DOMUtils.js" />
<fileset dir="${classes_dir}" includes="dom/Range.js" />
<fileset dir="${classes_dir}" includes="dom/TridentSelection.js" />
<fileset dir="${classes_dir}" includes="dom/Sizzle.js" />
<fileset dir="${classes_dir}" includes="dom/EventUtils.js" />
<fileset dir="${classes_dir}" includes="dom/Element.js" />
<fileset dir="${classes_dir}" includes="dom/Selection.js" />
<fileset dir="${classes_dir}" includes="dom/XMLWriter.js" />
<fileset dir="${classes_dir}" includes="dom/StringWriter.js" />
<fileset dir="${classes_dir}" includes="dom/Serializer.js" />
<fileset dir="${classes_dir}" includes="dom/ScriptLoader.js" />
<fileset dir="${classes_dir}" includes="dom/TreeWalker.js" />
<fileset dir="${classes_dir}" includes="dom/Schema.js" />
<fileset dir="${classes_dir}" includes="dom/RangeUtils.js" />
<fileset dir="${classes_dir}" includes="ui/Control.js" />
<fileset dir="${classes_dir}" includes="ui/Container.js" />
<fileset dir="${classes_dir}" includes="ui/Separator.js" />
<fileset dir="${classes_dir}" includes="ui/MenuItem.js" />
<fileset dir="${classes_dir}" includes="ui/Menu.js" />
<fileset dir="${classes_dir}" includes="ui/DropMenu.js" />
<fileset dir="${classes_dir}" includes="ui/Button.js" />
<fileset dir="${classes_dir}" includes="ui/ListBox.js" />
<fileset dir="${classes_dir}" includes="ui/NativeListBox.js" />
<fileset dir="${classes_dir}" includes="ui/MenuButton.js" />
<fileset dir="${classes_dir}" includes="ui/SplitButton.js" />
<fileset dir="${classes_dir}" includes="ui/ColorSplitButton.js" />
<fileset dir="${classes_dir}" includes="ui/Toolbar.js" />
<fileset dir="${classes_dir}" includes="AddOnManager.js" />
<fileset dir="${classes_dir}" includes="EditorManager.js" />
<fileset dir="${classes_dir}" includes="Editor.js" />
<fileset dir="${classes_dir}" includes="EditorCommands.js" />
<fileset dir="${classes_dir}" includes="UndoManager.js" />
<fileset dir="${classes_dir}" includes="ForceBlocks.js" />
<fileset dir="${classes_dir}" includes="ControlManager.js" />
<fileset dir="${classes_dir}" includes="WindowManager.js" />
<fileset dir="${classes_dir}" includes="CommandManager.js" />
<fileset dir="${classes_dir}" includes="Formatter.js" />
<fileset dir="${classes_dir}" includes="LegacyInput.js" />
</concat>
<!-- Remove all jsdoc style comments -->
<replaceregexp match="/\*\*(.*?)\*\/\s*" replace="" flags="gs" byline="false" file="${build_dir}/tiny_mce_tmp.js" />
<!-- Preprocess core -->
<preprocess infile="${build_dir}/tiny_mce_tmp.js" outfile="${build_dir}/tiny_mce_src.js" />
<preprocess infile="${build_dir}/tiny_mce_tmp.js" outfile="${build_dir}/tiny_mce_prototype_src.js" defines="prototype,prototype_adapter" />
<preprocess infile="${build_dir}/tiny_mce_tmp.js" outfile="${build_dir}/tiny_mce_jquery_src.js" defines="jquery,jquery_adapter" />
<!-- Compress core -->
<yuicompress infile="${build_dir}/tiny_mce_src.js" outfile="${build_dir}/tiny_mce.js" />
<yuicompress infile="${build_dir}/tiny_mce_prototype_src.js" outfile="${build_dir}/tiny_mce_prototype.js" />
<yuicompress infile="${build_dir}/tiny_mce_jquery_src.js" outfile="${build_dir}/tiny_mce_jquery.js" />
<!-- Compress popup -->
<yuicompress infile="${build_dir}/classes/Popup.js" outfile="${build_dir}/tiny_mce_popup.js" />
<concat destfile="${build_dir}/tiny_mce_popup.js.tmp">
<header filtering="no" trimleading="yes">
// Uncomment and change this document.domain value if you are loading the script cross subdomains
// document.domain = 'moxiecode.com';
</header>
<fileset file="${build_dir}/tiny_mce_popup.js" />
</concat>
<move file="${build_dir}/tiny_mce_popup.js.tmp" tofile="${build_dir}/tiny_mce_popup.js" overwrite="true" />
<!-- Compress themes -->
<yuicompress infile="${build_dir}/themes/simple/editor_template_src.js" outfile="${build_dir}/themes/simple/editor_template.js" />
<yuicompress infile="${build_dir}/themes/advanced/editor_template_src.js" outfile="${build_dir}/themes/advanced/editor_template.js" />
<!-- Compress plugins -->
<yuicompress infile="${build_dir}/plugins/advhr/editor_plugin_src.js" outfile="${build_dir}/plugins/advhr/editor_plugin.js" />
<yuicompress infile="${build_dir}/plugins/advimage/editor_plugin_src.js" outfile="${build_dir}/plugins/advimage/editor_plugin.js" />
<yuicompress infile="${build_dir}/plugins/advlink/editor_plugin_src.js" outfile="${build_dir}/plugins/advlink/editor_plugin.js" />
<yuicompress infile="${build_dir}/plugins/advlist/editor_plugin_src.js" outfile="${build_dir}/plugins/advlist/editor_plugin.js" />
<yuicompress infile="${build_dir}/plugins/emotions/editor_plugin_src.js" outfile="${build_dir}/plugins/emotions/editor_plugin.js" />
<yuicompress infile="${build_dir}/plugins/example/editor_plugin_src.js" outfile="${build_dir}/plugins/example/editor_plugin.js" />
<yuicompress infile="${build_dir}/plugins/iespell/editor_plugin_src.js" outfile="${build_dir}/plugins/iespell/editor_plugin.js" />
<yuicompress infile="${build_dir}/plugins/insertdatetime/editor_plugin_src.js" outfile="${build_dir}/plugins/insertdatetime/editor_plugin.js" />
<yuicompress infile="${build_dir}/plugins/preview/editor_plugin_src.js" outfile="${build_dir}/plugins/preview/editor_plugin.js" />
<yuicompress infile="${build_dir}/plugins/print/editor_plugin_src.js" outfile="${build_dir}/plugins/print/editor_plugin.js" />
<yuicompress infile="${build_dir}/plugins/save/editor_plugin_src.js" outfile="${build_dir}/plugins/save/editor_plugin.js" />
<yuicompress infile="${build_dir}/plugins/searchreplace/editor_plugin_src.js" outfile="${build_dir}/plugins/searchreplace/editor_plugin.js" />
<yuicompress infile="${build_dir}/plugins/table/editor_plugin_src.js" outfile="${build_dir}/plugins/table/editor_plugin.js" />
<yuicompress infile="${build_dir}/plugins/contextmenu/editor_plugin_src.js" outfile="${build_dir}/plugins/contextmenu/editor_plugin.js" />
<yuicompress infile="${build_dir}/plugins/paste/editor_plugin_src.js" outfile="${build_dir}/plugins/paste/editor_plugin.js" />
<yuicompress infile="${build_dir}/plugins/fullscreen/editor_plugin_src.js" outfile="${build_dir}/plugins/fullscreen/editor_plugin.js" />
<yuicompress infile="${build_dir}/plugins/directionality/editor_plugin_src.js" outfile="${build_dir}/plugins/directionality/editor_plugin.js" />
<yuicompress infile="${build_dir}/plugins/inlinepopups/editor_plugin_src.js" outfile="${build_dir}/plugins/inlinepopups/editor_plugin.js" />
<yuicompress infile="${build_dir}/plugins/autosave/editor_plugin_src.js" outfile="${build_dir}/plugins/autosave/editor_plugin.js" />
<yuicompress infile="${build_dir}/plugins/noneditable/editor_plugin_src.js" outfile="${build_dir}/plugins/noneditable/editor_plugin.js" />
<yuicompress infile="${build_dir}/plugins/fullpage/editor_plugin_src.js" outfile="${build_dir}/plugins/fullpage/editor_plugin.js" />
<yuicompress infile="${build_dir}/plugins/layer/editor_plugin_src.js" outfile="${build_dir}/plugins/layer/editor_plugin.js" />
<yuicompress infile="${build_dir}/plugins/style/editor_plugin_src.js" outfile="${build_dir}/plugins/style/editor_plugin.js" />
<yuicompress infile="${build_dir}/plugins/media/editor_plugin_src.js" outfile="${build_dir}/plugins/media/editor_plugin.js" />
<yuicompress infile="${build_dir}/plugins/visualchars/editor_plugin_src.js" outfile="${build_dir}/plugins/visualchars/editor_plugin.js" />
<yuicompress infile="${build_dir}/plugins/nonbreaking/editor_plugin_src.js" outfile="${build_dir}/plugins/nonbreaking/editor_plugin.js" />
<yuicompress infile="${build_dir}/plugins/xhtmlxtras/editor_plugin_src.js" outfile="${build_dir}/plugins/xhtmlxtras/editor_plugin.js" />
<yuicompress infile="${build_dir}/plugins/template/editor_plugin_src.js" outfile="${build_dir}/plugins/template/editor_plugin.js" />
<yuicompress infile="${build_dir}/plugins/bbcode/editor_plugin_src.js" outfile="${build_dir}/plugins/bbcode/editor_plugin.js" />
<yuicompress infile="${build_dir}/plugins/pagebreak/editor_plugin_src.js" outfile="${build_dir}/plugins/pagebreak/editor_plugin.js" />
<yuicompress infile="${build_dir}/plugins/spellchecker/editor_plugin_src.js" outfile="${build_dir}/plugins/spellchecker/editor_plugin.js" />
<yuicompress infile="${build_dir}/plugins/tabfocus/editor_plugin_src.js" outfile="${build_dir}/plugins/tabfocus/editor_plugin.js" />
<yuicompress infile="${build_dir}/plugins/autoresize/editor_plugin_src.js" outfile="${build_dir}/plugins/autoresize/editor_plugin.js" />
<yuicompress infile="${build_dir}/plugins/wordcount/editor_plugin_src.js" outfile="${build_dir}/plugins/wordcount/editor_plugin.js" />
<yuicompress infile="${build_dir}/plugins/legacyoutput/editor_plugin_src.js" outfile="${build_dir}/plugins/legacyoutput/editor_plugin.js" />
<!-- Compress jQuery plugin -->
<yuicompress infile="${classes_dir}/adapter/jquery/jquery.tinymce.js" outfile="${build_dir}/jquery.tinymce.js" />
<!-- Process dialogs -->
<!--
<jswrap infile="plugins/advhr/rule.htm" outfile="plugins/advhr/rule.htm.js" />
<jswrap infile="plugins/advimage/image.htm" outfile="plugins/advimage/image.htm.js" />
<jswrap infile="plugins/advlink/link.htm" outfile="plugins/advlink/link.htm.js" />
<jswrap infile="plugins/emotions/emotions.htm" outfile="plugins/emotions/emotions.htm.js" />
<jswrap infile="plugins/example/dialog.htm" outfile="plugins/example/dialog.htm.js" />
<jswrap infile="plugins/fullpage/fullpage.htm" outfile="plugins/fullpage/fullpage.htm.js" />
<jswrap infile="plugins/media/media.htm" outfile="plugins/media/media.htm.js" />
<jswrap infile="plugins/searchreplace/searchreplace.htm" outfile="plugins/searchreplace/searchreplace.htm.js" />
<jswrap infile="plugins/style/props.htm" outfile="plugins/style/props.htm.js" />
<jswrap infile="plugins/table/cell.htm" outfile="plugins/table/cell.htm.js" />
<jswrap infile="plugins/table/merge_cells.htm" outfile="plugins/table/merge_cells.htm.js" />
<jswrap infile="plugins/table/row.htm" outfile="plugins/table/row.htm.js" />
<jswrap infile="plugins/table/table.htm" outfile="plugins/table/table.htm.js" />
<jswrap infile="plugins/template/template.htm" outfile="plugins/template/template.htm.js" />
<jswrap infile="plugins/xhtmlxtras/abbr.htm" outfile="plugins/xhtmlxtras/abbr.htm.js" />
<jswrap infile="plugins/xhtmlxtras/acronym.htm" outfile="plugins/xhtmlxtras/acronym.htm.js" />
<jswrap infile="plugins/xhtmlxtras/attributes.htm" outfile="plugins/xhtmlxtras/attributes.htm.js" />
<jswrap infile="plugins/xhtmlxtras/cite.htm" outfile="plugins/xhtmlxtras/cite.htm.js" />
<jswrap infile="plugins/xhtmlxtras/del.htm" outfile="plugins/xhtmlxtras/del.htm.js" />
<jswrap infile="plugins/xhtmlxtras/ins.htm" outfile="plugins/xhtmlxtras/ins.htm.js" />
<jswrap infile="themes/advanced/about.htm" outfile="themes/advanced/about.htm.js" />
<jswrap infile="themes/advanced/anchor.htm" outfile="themes/advanced/anchor.htm.js" />
<jswrap infile="themes/advanced/charmap.htm" outfile="themes/advanced/charmap.htm.js" />
<jswrap infile="themes/advanced/color_picker.htm" outfile="themes/advanced/color_picker.htm.js" />
<jswrap infile="themes/advanced/image.htm" outfile="themes/advanced/image.htm.js" />
<jswrap infile="themes/advanced/link.htm" outfile="themes/advanced/link.htm.js" />
<jswrap infile="themes/advanced/source_editor.htm" outfile="themes/advanced/source_editor.htm.js" />
-->
<!-- Cleanup -->
<delete file="${build_dir}/tiny_mce_tmp.js" quiet="true"/>
</target>
<target name="release" depends="build" description="Builds release packages">
<!-- Copy the current repos and start processing it -->
<delete dir="${temp_dir}" quiet="true" />
<copy todir="${temp_dir}/tinymce">
<fileset dir=".">
<include name="**"/>
<exclude name="**/.git/**"/>
<exclude name="**/.*"/>
</fileset>
</copy>
<!-- Parse minor version, major version and release date from changelog -->
<loadfile property="changelog" srcFile="${temp_dir}/tinymce/changelog.txt" />
<propertyregex property="version" input="${changelog}" regexp="^Version ([0-9xabrc.]+)" select="\1" />
<propertyregex property="release_date" input="${changelog}" regexp="^Version [^\(]+\(([^\)]+)\)" select="\1" />
<propertyregex property="version.major" input="${version}" regexp="^([0-9]+)\." select="\1" />
<propertyregex property="version.minor" input="${version}" regexp="^[^\.]+.([0-9xabrc.]+)" select="\1" />
<propertyregex property="file_version" input="${version}" regexp="\." replace="_" />
<!-- Replace major version -->
<replaceregexp byline="true">
<regexp pattern="@@tinymce_major_version@@" />
<substitution expression="${version.major}" />
<fileset dir="${temp_dir}/tinymce">
<include name="jscripts/tiny_mce/tiny_mce.js" />
<include name="jscripts/tiny_mce/tiny_mce_src.js" />
<include name="jscripts/tiny_mce/tiny_mce_jquery.js" />
<include name="jscripts/tiny_mce/tiny_mce_jquery_src.js" />
<include name="jscripts/tiny_mce/tiny_mce_prototype.js" />
<include name="jscripts/tiny_mce/tiny_mce_prototype_src.js" />
</fileset>
</replaceregexp>
<!-- Replace minor version -->
<replaceregexp byline="true">
<regexp pattern="@@tinymce_minor_version@@" />
<substitution expression="${version.minor}" />
<fileset dir="${temp_dir}/tinymce">
<include name="jscripts/tiny_mce/tiny_mce.js" />
<include name="jscripts/tiny_mce/tiny_mce_src.js" />
<include name="jscripts/tiny_mce/tiny_mce_jquery.js" />
<include name="jscripts/tiny_mce/tiny_mce_jquery_src.js" />
<include name="jscripts/tiny_mce/tiny_mce_prototype.js" />
<include name="jscripts/tiny_mce/tiny_mce_prototype_src.js" />
</fileset>
</replaceregexp>
<!-- Replace release date -->
<replaceregexp byline="true">
<regexp pattern="@@tinymce_release_date@@" />
<substitution expression="${release_date}" />
<fileset dir="${temp_dir}/tinymce">
<include name="jscripts/tiny_mce/tiny_mce.js" />
<include name="jscripts/tiny_mce/tiny_mce_src.js" />
<include name="jscripts/tiny_mce/tiny_mce_jquery.js" />
<include name="jscripts/tiny_mce/tiny_mce_jquery_src.js" />
<include name="jscripts/tiny_mce/tiny_mce_prototype.js" />
<include name="jscripts/tiny_mce/tiny_mce_prototype_src.js" />
</fileset>
</replaceregexp>
<!-- Replaces the tiny_mce_dev.js with tiny_mce.js in examples -->
<replaceregexp match="tiny_mce_(dev|jquery)\.js" replace="tiny_mce.js" flags="g" byline="true">
<fileset dir="${temp_dir}/tinymce/examples">
<include name="**/*.htm*" />
</fileset>
</replaceregexp>
<!-- Add or remove version queries -->
<if>
<equals arg1="${version_queries}" arg2="true" />
<then>
<!-- Add version suffix to all file requests -->
<replaceregexp match="\?v=\{tinymce_version\}" replace="?v=${file_version}" flags="g" byline="true">
<fileset dir="${temp_dir}/tinymce">
<include name="**/*.htm*" />
<include name="**/*.css" />
</fileset>
</replaceregexp>
</then>
<else>
<!-- Remove version suffixes, so that it won't break Lotus Notes -->
<replaceregexp match="\?v=\{tinymce_version\}" replace="" flags="g" byline="true">
<fileset dir="${temp_dir}/tinymce">
<include name="**/*.htm*" />
<include name="**/*.css" />
</fileset>
</replaceregexp>
</else>
</if>
<!-- Compress development package -->
<delete file="${temp_dir}/tinymce_${file_version}_dev.zip" quiet="true" />
<zip destfile="${temp_dir}/tinymce_${file_version}_dev.zip">
<zipfileset dir="${temp_dir}/tinymce" prefix="tinymce" />
</zip>
<!-- Compress production package -->
<delete file="${temp_dir}/tinymce_${file_version}.zip" quiet="true" />
<zip destfile="${temp_dir}/tinymce_${file_version}.zip" excludes="**/classes">
<fileset dir="${temp_dir}">
<include name="tinymce/jscripts/**" />
<include name="tinymce/examples/**" />
<include name="tinymce/changelog.txt" />
<exclude name="tinymce/examples/full_jquery.html" />
<exclude name="tinymce/jscripts/tiny_mce/classes/**" />
<exclude name="tinymce/jscripts/tiny_mce/jquery.tinymce.js" />
<exclude name="tinymce/jscripts/tiny_mce/tiny_mce_dev.js" />
<exclude name="tinymce/jscripts/tiny_mce/tiny_mce_jquery.js" />
<exclude name="tinymce/jscripts/tiny_mce/tiny_mce_jquery_src.js" />
<exclude name="tinymce/jscripts/tiny_mce/tiny_mce_prototype.js" />
<exclude name="tinymce/jscripts/tiny_mce/tiny_mce_prototype_src.js" />
</fileset>
</zip>
<!-- Compress production package for jquery -->
<delete file="${temp_dir}/tinymce_${file_version}_jquery.zip" quiet="true" />
<zip destfile="${temp_dir}/tinymce_${file_version}_jquery.zip" excludes="**/classes">
<fileset dir="${temp_dir}">
<include name="tinymce/jscripts/**" />
<include name="tinymce/examples/**" />
<include name="tinymce/changelog.txt" />
<exclude name="tinymce/examples/**" />
<exclude name="tinymce/jscripts/tiny_mce/classes/**" />
<exclude name="tinymce/jscripts/tiny_mce/tiny_mce.js" />
<exclude name="tinymce/jscripts/tiny_mce/tiny_mce_src.js" />
<exclude name="tinymce/jscripts/tiny_mce/tiny_mce_dev.js" />
<exclude name="tinymce/jscripts/tiny_mce/tiny_mce_jquery.js" />
<exclude name="tinymce/jscripts/tiny_mce/tiny_mce_jquery_src.js" />
<exclude name="tinymce/jscripts/tiny_mce/tiny_mce_prototype.js" />
<exclude name="tinymce/jscripts/tiny_mce/tiny_mce_prototype_src.js" />
</fileset>
<zipfileset dir="${temp_dir}" includes="tinymce/examples/full_jquery.html" fullpath="tinymce/examples/index.html"/>
<zipfileset dir="${temp_dir}" includes="tinymce/jscripts/tiny_mce/tiny_mce_jquery.js" fullpath="tinymce/jscripts/tiny_mce/tiny_mce.js"/>
<zipfileset dir="${temp_dir}" includes="tinymce/jscripts/tiny_mce/tiny_mce_jquery_src.js" fullpath="tinymce/jscripts/tiny_mce/tiny_mce_src.js"/>
</zip>
<!-- Remove copyright headers for commerical version -->
<replaceregexp match="^/\*(.*?)\*\/\s*" replace="" flags="gs" byline="false">
<fileset dir="${temp_dir}/tinymce">
<include name="**/*.js" />
</fileset>
</replaceregexp>
<echo file="${temp_dir}/tinymce/license_info.txt" append="false">
TinyMCE Commercial Application License
--------------------------------------
This copy of TinyMCE is under a commercial license, the LGPL headers are removed.
A signed agreement from Moxiecode Systems AB is required in order to use this specific copy of TinyMCE.
If you have any questions regarding your license, contact Moxiecode Systems AB (www.moxiecode.com).
</echo>
<!-- Compress development package (commercial) -->
<delete file="${temp_dir}/tinymce_${file_version}_dev_commercial.zip" quiet="true" />
<zip destfile="${temp_dir}/tinymce_${file_version}_dev_commercial.zip" excludes="**/license.txt">
<fileset dir="${temp_dir}">
<include name="tinymce/**" />
<exclude name="tinymce/**/license.txt" />
<exclude name="tinymce/**/advanced/about.htm" />
</fileset>
</zip>
</target>
<target name="addsuffixes" description="Adds version suffixes to all requests">
<property name="version_queries" value="true" />
</target>
</project>