<?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="Export directory" name="export_dir" value="export" />
	<property description="Package directory" name="package_dir" value="export" />

	<!-- 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" />
	<typedef resource="org/tigris/subversion/svnant/svnantlib.xml" 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">
		<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>
		</moxiedoc>
	</target>

	<!-- Cleanup the build -->
	<target name="clean" depends="" description="Cleans up the project from temporary files">
		<delete dir="${export_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">
			<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="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="commands/RemoveFormat.js" />
			<fileset dir="${classes_dir}" includes="commands/BlockQuote.js" />
			<fileset dir="${classes_dir}" includes="commands/CutCopyPaste.js" />
			<fileset dir="${classes_dir}" includes="commands/InsertHorizontalRule.js" />
			<fileset dir="${classes_dir}" includes="commands/UndoRedo.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/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/safari/editor_plugin_src.js" outfile="${build_dir}/plugins/safari/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" />

		<!-- 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="export" depends="" description="Exports the SVN trunk">
		<delete dir="${export_dir}" quiet="true" />

		<svn javahl="${javahl}">
			<export srcUrl="https://tinymce.svn.sourceforge.net/svnroot/tinymce/tinymce/trunk" destPath="${export_dir}/tinymce_trunk" />
		</svn>
	</target>

	<target name="package" depends="" description="Compresses the exported SVN trunks">
		<!-- Copy expored trunk and start processing it -->
		<delete dir="${export_dir}/tinymce" quiet="true" />
		<copy todir="${export_dir}/tinymce">
			<fileset dir="${export_dir}/tinymce_trunk" />
		</copy>

		<!-- Parse minor version, major version and release date from changelog -->
		<loadfile property="changelog" srcFile="${export_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="${export_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="${export_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="${export_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>

		<!-- 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="${export_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="${export_dir}/tinymce">
						<include name="**/*.htm*" />
						<include name="**/*.css" />
					</fileset>
				</replaceregexp>
			</else>
		</if>

		<!-- Compress development package -->
		<delete file="${package_dir}/tinymce_${file_version}_dev.zip" quiet="true" />
		<zip destfile="${package_dir}/tinymce_${file_version}_dev.zip">
			<zipfileset dir="${export_dir}/tinymce" prefix="tinymce" />
		</zip>

		<!-- Compress production package -->
		<delete file="${package_dir}/tinymce_${file_version}.zip" quiet="true" />
		<zip destfile="${package_dir}/tinymce_${file_version}.zip" excludes="**/classes">
			<fileset dir="${export_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="${package_dir}/tinymce_${file_version}_jquery.zip" quiet="true" />
		<zip destfile="${package_dir}/tinymce_${file_version}_jquery.zip" excludes="**/classes">
			<fileset dir="${export_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="${export_dir}" includes="tinymce/examples/full_jquery.html" fullpath="tinymce/examples/index.html"/>
			<zipfileset dir="${export_dir}" includes="tinymce/jscripts/tiny_mce/tiny_mce_jquery.js" fullpath="tinymce/jscripts/tiny_mce/tiny_mce.js"/>
			<zipfileset dir="${export_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="${export_dir}/tinymce">
				<include name="**/*.js" />
			</fileset>
		</replaceregexp>

		<echo file="${export_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="${package_dir}/tinymce_${file_version}_dev_commercial.zip" quiet="true" />
		<zip destfile="${package_dir}/tinymce_${file_version}_dev_commercial.zip" excludes="**/license.txt">
			<fileset dir="${export_dir}">
				<include name="tinymce/**" />
				<exclude name="tinymce/**/license.txt" />
				<exclude name="tinymce/**/advanced/about.htm" />
			</fileset>
		</zip>
	</target>

	<target name="release" depends="export,package" description="Builds release packages"></target>

	<target name="addsuffixes" description="Adds version suffixes to all requests">
		<property name="version_queries" value="true" />
	</target>
</project>
