PageRenderTime 74ms CodeModel.GetById 54ms app.highlight 11ms RepoModel.GetById 0ms app.codeStats 1ms

/jEdit/tags/jedit-4-5-pre1/build.xml

#
XML | 1924 lines | 1841 code | 73 blank | 10 comment | 0 complexity | 947a102c3949652dd1aceda724ac255a MD5 | raw file
Possible License(s): BSD-3-Clause, AGPL-1.0, Apache-2.0, LGPL-2.0, LGPL-3.0, GPL-2.0, CC-BY-SA-3.0, LGPL-2.1, GPL-3.0, MPL-2.0-no-copyleft-exception, IPL-1.0

Large files files are truncated, but you can click here to view the full file

   1<?xml version="1.0"?>
   2<project name="jedit"
   3	 default="build"
   4	 xmlns:mod="antlib:de.masters_of_disaster.ant.tasks"
   5	 xmlns:contrib="antlib:net.sf.antcontrib"
   6	 xmlns:launch4j="antlib:net.sf.launch4j.ant"
   7	 xmlns:jarbundler="antlib:net.sourceforge.jarbundler"
   8	 xmlns:fop="antlib:org.apache.fop.tools.anttasks"
   9	 xmlns:ivy="antlib:org.apache.ivy.ant">
  10	<description>
  11		This is an ant build.xml file for building jEdit - Programmer's Text Editor.
  12	</description>
  13
  14	<property file="build.properties"
  15		  prefix="config"/>
  16
  17	<!-- jEdit Version -->
  18	<property name="jedit.version"
  19		  value="4.5pre1"/>
  20	<property name="jedit.build.number"
  21		  value="04.05.01.00"/>
  22	<property name="jedit.version.final"
  23		  value="false"/>
  24
  25	<!-- Target Java Versions -->
  26	<property name="target.java.version"
  27		  value="1.6"/>
  28	<property name="mac.target.java.version"
  29		  value="1.6+"/>
  30	<!-- based on http://packages.slackverse.org/?v=1&p=92 -->
  31	<property name="slackware.target.java.version"
  32		  value="1_6_0_20-i586-1"/>
  33
  34	<!-- Various Paths -->
  35	<property name="config.lib.dir"
  36		  value="lib"/>
  37	<property name="config.build.dir"
  38		  value="build"/>
  39	<property name="config.dist.dir"
  40		  value="dist"/>
  41	<property name="lib.dir"
  42		  location="${config.lib.dir}"/>
  43	<property name="build.dir"
  44		  location="${config.build.dir}"/>
  45	<property name="dist.dir"
  46		  location="${config.dist.dir}"/>
  47	<property name="classes.dir"
  48		  location="${build.dir}/classes"/>
  49	<property name="jar.location"
  50		  location="${build.dir}"/>
  51	<property name="textAreaPackage"
  52		  location="../textarea"/>
  53
  54	<!-- Various Filenames -->
  55	<property name="jar.filename"
  56		  value="${ant.project.name}.jar"/>
  57	<property name="dist.jar.filename"
  58		  value="jedit${jedit.version}install.jar"/>
  59	<property name="manual.filename.prefix"
  60		  value="jedit${jedit.version}manual-"/>
  61	<property name="src.archive.filename"
  62		  value="jedit${jedit.version}source.tar.bz2"/>
  63	<property name="win.filename"
  64		  value="jedit${jedit.version}install"/>
  65	<property name="mac.disk.image.filename"
  66		  value="jedit${jedit.version}install.dmg"/>
  67
  68	<!-- Ivy Properties -->
  69	<property name="config.ivy.version"
  70		  value="2.2.0"/>
  71	<property name="ivy.jar.dir"
  72		  location="${lib.dir}/ivy"/>
  73	<property name="ivy.jar.filename"
  74		  value="ivy-${config.ivy.version}.jar"/>
  75	<property name="ivy.jar.file"
  76		  location="${ivy.jar.dir}/${ivy.jar.filename}"/>
  77
  78	<!-- Miscellaneous -->
  79	<property name="config.build.debuglevel"
  80		  value="lines,vars,source"/>
  81	<property name="config.build.nowarn"
  82		  value="false"/>
  83	<property name="config.build.deprecation"
  84		  value="true"/>
  85	<property name="config.build.compilerarg"
  86		  value="-Xlint:unchecked"/>
  87
  88	<target name="init"
  89		unless="init.done">
  90		<echo message="Buildfile for ${ant.project.name} (${ant.file})"
  91		      level="info"/>
  92		<fail message="Ant 1.8 or newer (1.8.1 excluded due to a bug) is needed for jEdit to build, please install it and rerun">
  93			<condition>
  94				<or>
  95					<not>
  96						<antversion atleast="1.8"/>
  97					</not>
  98					<antversion exactly="1.8.1"/>
  99				</or>
 100			</condition>
 101		</fail>
 102		<fail message="The ant-optional package is needed for jEdit to build, please install it and rerun">
 103			<condition>
 104				<not>
 105					<and>
 106						<available classname="org.apache.tools.ant.taskdefs.optional.depend.Depend"/>
 107						<available classname="org.apache.tools.ant.taskdefs.optional.TraXLiaison"/>
 108					</and>
 109				</not>
 110			</condition>
 111		</fail>
 112		<property name="init.done"
 113			  value="true"/>
 114	</target>
 115
 116	<target name="check-ivy"
 117		depends="init">
 118		<available property="ivy.jar.present"
 119			   file="${ivy.jar.file}"
 120			   type="file"/>
 121	</target>
 122
 123	<target name="download-ivy"
 124		depends="init,check-ivy"
 125		unless="ivy.jar.present">
 126		<mkdir dir="${ivy.jar.dir}"/>
 127		<get src="http://repo2.maven.org/maven2/org/apache/ivy/ivy/${config.ivy.version}/ivy-${config.ivy.version}.jar"
 128		     dest="${ivy.jar.file}"
 129		     usetimestamp="true"/>
 130	</target>
 131
 132	<target name="init-ivy"
 133		depends="init,download-ivy"
 134		unless="ivy.done">
 135		<property name="ivy.retrieve.pattern"
 136			  value="${lib.dir}/[conf]/[artifact](-[classifier]).[ext]"/>
 137		<taskdef resource="org/apache/ivy/ant/antlib.xml"
 138			 classpath="${ivy.jar.file}"
 139			 loaderref="ivy.loader"
 140			 uri="antlib:org.apache.ivy.ant"/>
 141		<ivy:settings file="ivysettings.xml"/>
 142	</target>
 143
 144	<target name="retrieve"
 145		description="retrieve the dependencies"
 146		depends="init,init-ivy"
 147		unless="ivy.done">
 148		<ivy:retrieve sync="true"/>
 149		<ivy:retrieve pattern="${lib.dir}/ivy/[artifact]-[revision].[ext]"
 150			      organisation="org.apache.ivy"
 151			      module="ivy"
 152			      revision="${config.ivy.version}"
 153			      conf="default"
 154			      inline="true"/>
 155		<property name="ivy.done"
 156			  value="true"/>
 157	</target>
 158
 159	<target name="setup"
 160		depends="init,retrieve">
 161		<taskdef resource="net/sf/antcontrib/antlib.xml"
 162			 uri="antlib:net.sf.antcontrib">
 163			<classpath>
 164				<fileset dir="${lib.dir}/ant-contrib"
 165					 includes="*.jar"/>
 166			</classpath>
 167		</taskdef>
 168	</target>
 169
 170	<target name="clean"
 171		depends="init"
 172		description="clean up intermediate files">
 173		<delete includeemptydirs="true"
 174			failonerror="false">
 175			<fileset dir="${build.dir}/classes"
 176				 defaultexcludes="false"/>
 177			<fileset dir="${dist.dir}/classes"
 178				 defaultexcludes="false"/>
 179		</delete>
 180	</target>
 181
 182	<target name="clean-all"
 183		depends="init"
 184		description="clean up lib.dir, build.dir and dist.dir completely">
 185		<delete includeemptydirs="true"
 186			failonerror="false">
 187			<fileset dir="${lib.dir}"
 188				 defaultexcludes="false"/>
 189			<fileset dir="${build.dir}"
 190				 defaultexcludes="false"/>
 191			<fileset dir="${dist.dir}"
 192				 defaultexcludes="false"/>
 193			<fileset dir="${textAreaPackage}/build"
 194				 defaultexcludes="false"/>
 195		</delete>
 196	</target>
 197
 198	<target name="compile"
 199		depends="init">
 200		<mkdir dir="${classes.dir}/core"/>
 201		<depend srcDir="${basedir}"
 202			destDir="${classes.dir}/core"
 203			cache="${classes.dir}"/>
 204		<dependset>
 205			<srcfilelist files="build.xml"/>
 206			<targetfileset dir="${classes.dir}/core"/>
 207		</dependset>
 208		<javac srcdir="${basedir}"
 209		       destdir="${classes.dir}/core"
 210		       debug="true"
 211		       debuglevel="${config.build.debuglevel}"
 212		       nowarn="${config.build.nowarn}"
 213		       deprecation="${config.build.deprecation}"
 214		       source="${target.java.version}"
 215		       target="${target.java.version}"
 216		       compiler="modern"
 217		       encoding="UTF-8"
 218		       includeAntRuntime="false">
 219			<include name="org/**"/>
 220			<compilerarg line="${config.build.compilerarg}"/>
 221		</javac>
 222	</target>
 223
 224	<target name="prepare-textArea"
 225		depends="init">
 226		<delete includeemptydirs="true"
 227			failonerror="false">
 228			<fileset dir="${textAreaPackage}/src"/>
 229		</delete>
 230
 231		<mkdir dir="${textAreaPackage}/src"/>
 232		<copy todir="${textAreaPackage}/src">
 233			<fileset dir="${basedir}">
 234				<include name="modes/*"/>
 235				<include name="org/gjt/sp/jedit/bsh/*"/>
 236				<include name="org/gjt/sp/jedit/bsh/**/*"/>
 237
 238				<include name="org/gjt/sp/jedit/buffer/BufferAdapter.java"/>
 239				<include name="org/gjt/sp/jedit/buffer/BufferListener.java"/>
 240				<include name="org/gjt/sp/jedit/buffer/BufferSegment.java"/>
 241				<include name="org/gjt/sp/jedit/buffer/ContentManager.java"/>
 242				<include name="org/gjt/sp/jedit/buffer/DefaultFoldHandlerProvider.java"/>
 243				<include name="org/gjt/sp/jedit/buffer/DummyFoldHandler.java"/>
 244				<include name="org/gjt/sp/jedit/buffer/ExplicitFoldHandler.java"/>
 245				<include name="org/gjt/sp/jedit/buffer/FoldHandler.java"/>
 246				<include name="org/gjt/sp/jedit/buffer/FoldHandlerProvider.java"/>
 247				<include name="org/gjt/sp/jedit/buffer/IndentFoldHandler.java"/>
 248				<include name="org/gjt/sp/jedit/buffer/JEditBuffer.java"/>
 249				<include name="org/gjt/sp/jedit/buffer/KillRing.java"/>
 250				<include name="org/gjt/sp/jedit/buffer/LineManager.java"/>
 251				<include name="org/gjt/sp/jedit/buffer/PositionManager.java"/>
 252				<include name="org/gjt/sp/jedit/buffer/UndoManager.java"/>
 253
 254				<include name="org/gjt/sp/jedit/gui/KeyEventTranslator.java"/>
 255				<include name="org/gjt/sp/jedit/gui/KeyEventWorkaround.java"/>
 256				<include name="org/gjt/sp/jedit/gui/MutableListModel.java"/>
 257				<include name="org/gjt/sp/jedit/gui/ShortcutPrefixActiveEvent.java"/>
 258				<include name="org/gjt/sp/jedit/gui/HistoryModel.java"/>
 259				<include name="org/gjt/sp/jedit/gui/HistoryModelSaver.java"/>
 260
 261				<include name="org/gjt/sp/jedit/indent/*.java"/>
 262
 263				<include name="org/gjt/sp/jedit/input/AbstractInputHandler.java"/>
 264				<include name="org/gjt/sp/jedit/input/DefaultInputHandlerProvider.java"/>
 265				<include name="org/gjt/sp/jedit/input/InputHandlerProvider.java"/>
 266				<include name="org/gjt/sp/jedit/input/TextAreaInputHandler.java"/>
 267
 268				<include name="org/gjt/sp/jedit/syntax/*.java"/>
 269				<include name="org/gjt/sp/jedit/syntax/xmode.dtd"/>
 270
 271				<include name="org/gjt/sp/jedit/datatransfer/JEditDataFlavor.java"/>
 272				<include name="org/gjt/sp/jedit/datatransfer/JEditRichText.java"/>
 273				<include name="org/gjt/sp/jedit/datatransfer/JEditTransferable.java"/>
 274				<include name="org/gjt/sp/jedit/datatransfer/JEditTransferableService.java"/>
 275				<include name="org/gjt/sp/jedit/datatransfer/RichJEditTextTransferableService.java"/>
 276				<include name="org/gjt/sp/jedit/datatransfer/RichTextTransferable.java"/>
 277				<include name="org/gjt/sp/jedit/datatransfer/StringTransferableService.java"/>
 278				<include name="org/gjt/sp/jedit/datatransfer/TransferHandler.java"/>
 279
 280				<include name="org/gjt/sp/jedit/textarea/Anchor.java"/>
 281				<include name="org/gjt/sp/jedit/textarea/AntiAlias.java"/>
 282				<include name="org/gjt/sp/jedit/textarea/BufferHandler.java"/>
 283				<include name="org/gjt/sp/jedit/textarea/ChunkCache.java"/>
 284				<include name="org/gjt/sp/jedit/textarea/ColumnBlock.java"/>
 285				<include name="org/gjt/sp/jedit/textarea/ColumnBlockLine.java"/>
 286				<include name="org/gjt/sp/jedit/textarea/DisplayManager.java"/>
 287				<include name="org/gjt/sp/jedit/textarea/ElasticTabStopBufferListener.java"/>
 288				<include name="org/gjt/sp/jedit/textarea/ElasticTabstopsTabExpander.java"/>
 289				<include name="org/gjt/sp/jedit/textarea/ExtensionManager.java"/>
 290				<include name="org/gjt/sp/jedit/textarea/FastRepaintManager.java"/>
 291				<include name="org/gjt/sp/jedit/textarea/FirstLine.java"/>
 292				<include name="org/gjt/sp/jedit/textarea/FoldPainter.java"/>
 293				<include name="org/gjt/sp/jedit/textarea/Gutter.java"/>
 294				<include name="org/gjt/sp/jedit/textarea/GutterPopupHandler.java"/>
 295				<include name="org/gjt/sp/jedit/textarea/InputMethodSupport.java"/>
 296				<include name="org/gjt/sp/jedit/textarea/MouseActions.java"/>
 297				<include name="org/gjt/sp/jedit/textarea/MouseActionsProvider.java"/>
 298				<include name="org/gjt/sp/jedit/textarea/Node.java"/>
 299				<include name="org/gjt/sp/jedit/textarea/RangeMap.java"/>
 300				<include name="org/gjt/sp/jedit/textarea/Selection.java"/>
 301				<include name="org/gjt/sp/jedit/textarea/SelectionManager.java"/>
 302				<include name="org/gjt/sp/jedit/textarea/ScreenLineManager.java"/>
 303				<include name="org/gjt/sp/jedit/textarea/ScrollLayout.java"/>
 304				<include name="org/gjt/sp/jedit/textarea/ScrollLineCount.java"/>
 305				<include name="org/gjt/sp/jedit/textarea/ScrollListener.java"/>
 306				<include name="org/gjt/sp/jedit/textarea/StandaloneTextArea.java"/>
 307				<include name="org/gjt/sp/jedit/textarea/StatusListener.java"/>
 308				<include name="org/gjt/sp/jedit/textarea/StructureMatcher.java"/>
 309				<include name="org/gjt/sp/jedit/textarea/TextArea.java"/>
 310				<include name="org/gjt/sp/jedit/textarea/TextAreaBorder.java"/>
 311				<include name="org/gjt/sp/jedit/textarea/TextAreaDropHandler.java"/>
 312				<include name="org/gjt/sp/jedit/textarea/TextAreaException.java"/>
 313				<include name="org/gjt/sp/jedit/textarea/TextAreaExtension.java"/>
 314				<include name="org/gjt/sp/jedit/textarea/TextAreaMouseHandler.java"/>
 315				<include name="org/gjt/sp/jedit/textarea/TextAreaPainter.java"/>
 316				<include name="org/gjt/sp/jedit/textarea/textarea.actions.xml"/>
 317				<include name="org/gjt/sp/jedit/textarea/TriangleFoldPainter.java"/>
 318
 319				<include name="org/gjt/sp/jedit/ActionListHandler.java"/>
 320				<include name="org/gjt/sp/jedit/BeanShellFacade.java"/>
 321				<include name="org/gjt/sp/jedit/Debug.java"/>
 322				<include name="org/gjt/sp/jedit/IPropertyManager.java"/>
 323				<include name="org/gjt/sp/jedit/JEditAbstractEditAction.java"/>
 324				<include name="org/gjt/sp/jedit/JEditActionSet.java"/>
 325				<include name="org/gjt/sp/jedit/JEditActionContext.java"/>
 326				<include name="org/gjt/sp/jedit/JEditBeanShellAction.java"/>
 327				<include name="org/gjt/sp/jedit/Mode.java"/>
 328				<include name="org/gjt/sp/jedit/OperatingSystem.java"/>
 329				<include name="org/gjt/sp/jedit/RegistersListener.java"/>
 330				<include name="org/gjt/sp/jedit/Registers.java"/>
 331				<include name="org/gjt/sp/jedit/RegisterSaver.java"/>
 332				<include name="org/gjt/sp/jedit/SelectionManager.java"/>
 333				<include name="org/gjt/sp/jedit/TextUtilities.java"/>
 334				<include name="org/gjt/sp/jedit/actions.dtd"/>
 335				<include name="org/gjt/sp/jedit/jedit.props"/>
 336				<include name="org/gjt/sp/jedit/jedit_keys.props"/>
 337
 338				<include name="modes/*"/>
 339
 340				<include name="org/gjt/sp/util/Log*.java"/>
 341				<include name="org/gjt/sp/util/IntegerArray.java"/>
 342				<include name="org/gjt/sp/util/IOUtilities.java"/>
 343				<include name="org/gjt/sp/util/ProgressObserver.java"/>
 344				<include name="org/gjt/sp/util/SegmentCharSequence.java"/>
 345				<include name="org/gjt/sp/util/StandardUtilities.java"/>
 346				<include name="org/gjt/sp/util/Task.java"/>
 347				<include name="org/gjt/sp/util/TaskManager.java"/>
 348				<include name="org/gjt/sp/util/TaskListener.java"/>
 349				<include name="org/gjt/sp/util/ThreadUtilities.java"/>
 350				<include name="org/gjt/sp/util/SyntaxUtilities.java"/>
 351				<include name="org/gjt/sp/util/XMLUtilities.java"/>
 352			</fileset>
 353		</copy>
 354
 355	</target>
 356
 357	<target name="compile-textArea"
 358		depends="init,prepare-textArea">
 359		<mkdir dir="${textAreaPackage}/build"/>
 360		<javac srcdir="${textAreaPackage}/src"
 361		       destdir="${textAreaPackage}/build"
 362		       debug="true"
 363		       debuglevel="${config.build.debuglevel}"
 364		       nowarn="${config.build.nowarn}"
 365		       deprecation="${config.build.deprecation}"
 366		       source="${target.java.version}"
 367		       target="${target.java.version}"
 368		       compiler="modern"
 369		       encoding="UTF-8"
 370		       includeAntRuntime="false">
 371			<compilerarg line="${config.build.compilerarg}"/>
 372		</javac>
 373	</target>
 374
 375	<target name="build"
 376		depends="init,retrieve,setup,compile"
 377		description="build the jEdit JAR-file with full debug-information">
 378		<mkdir dir="${jar.location}"/>
 379		<jar destfile="${jar.location}/${jar.filename}"
 380		     basedir="${classes.dir}/core"
 381		     compress="false"
 382		     manifest="org/gjt/sp/jedit/jedit.manifest"
 383		     duplicate="fail"
 384		     index="true">
 385			<fileset dir="${basedir}">
 386				<include name="org/gjt/sp/jedit/bsh/commands/*.bsh"/>
 387				<include name="org/gjt/sp/jedit/**/*.dtd"/>
 388				<include name="org/gjt/sp/jedit/default.abbrevs"/>
 389				<include name="org/gjt/sp/jedit/*.props"/>
 390				<include name="org/gjt/sp/jedit/*.xml"/>
 391				<include name="org/gjt/sp/jedit/textarea/*.xml"/>
 392				<include name="org/gjt/sp/jedit/icons/**/*.gif"/>
 393				<include name="org/gjt/sp/jedit/icons/**/*.jpg"/>
 394				<include name="org/gjt/sp/jedit/icons/**/*.png"/>
 395			</fileset>
 396		</jar>
 397		<copy todir="${jar.location}">
 398			<fileset dir="${basedir}">
 399				<include name="macros/**"/>
 400				<include name="modes/**"/>
 401				<include name="properties/**"/>
 402				<include name="startup/**"/>
 403			</fileset>
 404		</copy>
 405		<copy todir="${jar.location}/jars">
 406			<fileset dir="${lib.dir}/default-plugins">
 407				<exclude name="MacOSX.jar"/>
 408			</fileset>
 409		</copy>
 410		<contrib:if>
 411			<os family="mac"/>
 412			<contrib:then>
 413				<copy todir="${jar.location}/jars">
 414					<fileset dir="${lib.dir}/default-plugins">
 415						<include name="MacOSX.jar"/>
 416					</fileset>
 417				</copy>
 418			</contrib:then>
 419		</contrib:if>
 420	</target>
 421
 422	<target name="build-exe-launcher"
 423		depends="init,retrieve,setup,filter-package-files"
 424		description="build the EXE launcher">
 425		<contrib:if>
 426			<os family="windows"/>
 427			<contrib:then>
 428				<property name="osfamily"
 429					  value="windows"/>
 430			</contrib:then>
 431		</contrib:if>
 432		<contrib:if>
 433			<os family="mac"/>
 434			<contrib:then>
 435				<property name="osfamily"
 436					  value="mac"/>
 437			</contrib:then>
 438		</contrib:if>
 439		<contrib:if>
 440			<os family="unix"/>
 441			<contrib:then>
 442				<property name="osfamily"
 443					  value="unix"/>
 444			</contrib:then>
 445		</contrib:if>
 446		<contrib:switch value="${osfamily}">
 447			<contrib:case value="windows">
 448				<unzip src="${lib.dir}/launch4j/launch4j-win32.zip"
 449				       dest="${build.dir}/"/>
 450			</contrib:case>
 451			<contrib:case value="unix">
 452				<untar src="${lib.dir}/launch4j/launch4j-linux.tgz"
 453				       dest="${build.dir}/"
 454				       compression="gzip"/>
 455				<chmod dir="${build.dir}/launch4j/bin/"
 456				       perm="+x"
 457				       includes="**"/>
 458			</contrib:case>
 459			<contrib:case value="mac">
 460				<untar src="${lib.dir}/launch4j/launch4j-macosx.tgz"
 461				       dest="${build.dir}/"
 462				       compression="gzip"/>
 463				<chmod dir="${build.dir}/launch4j/bin/"
 464				       perm="+x"
 465				       includes="**"
 466				       osfamily="mac"/>
 467			</contrib:case>
 468			<contrib:default>
 469				<fail message="Unsupported OS family (${osfamily}). If you are on Windows, *nix or MacOS, please report this as bug, if not, please report it as a feature request"/>
 470			</contrib:default>
 471		</contrib:switch>
 472		<taskdef name="create"
 473			 classname="net.sf.launch4j.ant.Launch4jTask"
 474			 classpath="${build.dir}/launch4j/launch4j.jar"
 475			 uri="antlib:net.sf.launch4j.ant"/>
 476		<launch4j:create configFile="${classes.dir}/package-files/windows/jedit.launch4j.xml"
 477				 outfile="${jar.location}/jedit.exe"/>
 478	</target>
 479
 480	<target name="build-textArea"
 481		depends="init,compile-textArea"
 482		description="build the textArea JAR-file with full debug-information">
 483		<mkdir dir="${jar.location}"/>
 484		<jar destfile="${jar.location}/${ant.project.name}-textArea.jar"
 485		     compress="false"
 486		     duplicate="fail"
 487		     index="true">
 488			<fileset dir="${textAreaPackage}/build/"/>
 489			<fileset dir="${textAreaPackage}/src">
 490				<include name="org/gjt/sp/jedit/textarea/*.xml"/>
 491				<include name="org/gjt/sp/jedit/syntax/xmode.dtd"/>
 492				<include name="org/gjt/sp/jedit/actions.dtd"/>
 493				<include name="org/gjt/sp/jedit/jedit.props"/>
 494				<include name="org/gjt/sp/jedit/jedit_keys.props"/>
 495				<include name="modes/*"/>
 496			</fileset>
 497			<manifest>
 498				<attribute name="Main-Class"
 499					   value="org.gjt.sp.jedit.textarea.StandaloneTextArea"/>
 500			</manifest>
 501		</jar>
 502	</target>
 503
 504	<target name="run"
 505		depends="init,build"
 506		description="run jEdit">
 507		<java jar="${jar.location}/${jar.filename}"
 508		      fork="true"
 509		      spawn="true"
 510		      maxmemory="192M">
 511			<arg value="-settings=${build.dir}/settings"/>
 512		</java>
 513	</target>
 514
 515	<target name="run-debug"
 516		depends="init,build"
 517		description="run jEdit with debug listening enabled">
 518		<java jar="${jar.location}/${jar.filename}"
 519		      fork="true"
 520		      spawn="true"
 521		      maxmemory="192M">
 522			<jvmarg value="-agentlib:jdwp=transport=dt_socket,server=y,address=localhost:5005,timeout=60000"/>
 523			<arg value="-settings=${build.dir}/settings"/>
 524		</java>
 525	</target>
 526
 527	<target name="unpack-docbook-xsl"
 528		depends="init,retrieve">
 529		<unzip src="${lib.dir}/docbook/docbook-xsl-resources.zip"
 530		       dest="${build.dir}/docbook-xsl/"/>
 531	</target>
 532
 533	<presetdef name="dependset.build">
 534		<dependset>
 535			<srcfilelist dir="${basedir}">
 536				<file name="build.xml"/>
 537				<file name="ivy.xml"/>
 538				<file name="ivysettings.xml"/>
 539			</srcfilelist>
 540		</dependset>
 541	</presetdef>
 542
 543	<presetdef name="dependset.html">
 544		<dependset.build>
 545			<srcfileset dir="${lib.dir}/docbook"/>
 546			<srcfilelist files="doc/jedithtml.xsl"/>
 547		</dependset.build>
 548	</presetdef>
 549
 550	<presetdef name="xslt.doc">
 551		<xslt>
 552			<classpath>
 553				<fileset dir="${lib.dir}/docbook"
 554					 includes="*.jar"/>
 555			</classpath>
 556			<xmlcatalog>
 557				<entity publicid="http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl"
 558					location="${build.dir}/docbook-xsl/docbook/html/chunk.xsl"/>
 559				<entity publicid="http://docbook.sourceforge.net/release/xsl/current/fo/docbook.xsl"
 560					location="${build.dir}/docbook-xsl/docbook/fo/docbook.xsl"/>
 561			</xmlcatalog>
 562			<sysproperty key="javax.xml.parsers.DocumentBuilderFactory"
 563				     value="org.apache.xerces.jaxp.DocumentBuilderFactoryImpl"/>
 564			<sysproperty key="javax.xml.parsers.SAXParserFactory"
 565				     value="org.apache.xerces.jaxp.SAXParserFactoryImpl"/>
 566			<sysproperty key="org.apache.xerces.xni.parser.XMLParserConfiguration"
 567				     value="org.apache.xerces.parsers.XIncludeParserConfiguration"/>
 568		</xslt>
 569	</presetdef>
 570
 571	<target name="generate-doc-faq"
 572		depends="init,retrieve,setup,unpack-docbook-xsl">
 573		<dependset.html>
 574			<srcfileset dir="doc/FAQ"/>
 575			<targetfileset dir="${jar.location}/doc/FAQ"/>
 576		</dependset.html>
 577		<contrib:if>
 578			<available file="${jar.location}/doc/FAQ/toc.xml"
 579				   type="file"/>
 580			<contrib:then>
 581				<echo message="FAQ is up-to-date"
 582				      level="info"/>
 583			</contrib:then>
 584			<contrib:else>
 585				<xslt.doc style="doc/jedithtml.xsl"
 586					  in="doc/FAQ/faq.xml"
 587					  out="${jar.location}/doc/FAQ/index.html">
 588					<param name="base.dir"
 589					       expression="${jar.location}/doc/FAQ/"/>
 590				</xslt.doc>
 591			</contrib:else>
 592		</contrib:if>
 593	</target>
 594
 595	<target name="generate-doc-news"
 596		depends="init,retrieve,setup,unpack-docbook-xsl">
 597		<dependset.html>
 598			<srcfileset dir="doc/news45"/>
 599			<targetfileset dir="${jar.location}/doc/news45"/>
 600		</dependset.html>
 601		<contrib:if>
 602			<available file="${jar.location}/doc/news45/toc.xml"
 603				   type="file"/>
 604			<contrib:then>
 605				<echo message="News is up-to-date"
 606				      level="info"/>
 607			</contrib:then>
 608			<contrib:else>
 609				<xslt.doc style="doc/jedithtml.xsl"
 610					  in="doc/news45/news.xml"
 611					  out="${jar.location}/doc/news45/index.html">
 612					<param name="base.dir"
 613					       expression="${jar.location}/doc/news45/"/>
 614				</xslt.doc>
 615			</contrib:else>
 616		</contrib:if>
 617	</target>
 618
 619	<target name="generate-doc-users-guide"
 620		depends="init,retrieve,setup,unpack-docbook-xsl">
 621		<dependset.html>
 622			<srcfileset dir="doc/users-guide"/>
 623			<targetfileset dir="${jar.location}/doc/users-guide"/>
 624		</dependset.html>
 625		<contrib:if>
 626			<available file="${jar.location}/doc/users-guide/toc.xml"
 627				   type="file"/>
 628			<contrib:then>
 629				<echo message="User's Guide is up-to-date"
 630				      level="info"/>
 631			</contrib:then>
 632			<contrib:else>
 633				<xslt.doc style="doc/jedithtml.xsl"
 634					  in="doc/users-guide/users-guide.xml"
 635					  out="${jar.location}/doc/users-guide/index.html">
 636					<param name="base.dir"
 637					       expression="${jar.location}/doc/users-guide/"/>
 638				</xslt.doc>
 639			</contrib:else>
 640		</contrib:if>
 641	</target>
 642
 643	<target name="docs-html"
 644		depends="init,generate-doc-faq,generate-doc-news,generate-doc-users-guide"
 645		description="generate HTML docs">
 646		<copy todir="${jar.location}/doc">
 647			<fileset dir="doc">
 648				<include name="*.txt"/>
 649				<include name="*.html"/>
 650				<include name="*.png"/>
 651				<include name="tips/**"/>
 652			</fileset>
 653		</copy>
 654	</target>
 655
 656	<target name="generate-javadoc"
 657		depends="init,setup,compile">
 658		<dependset>
 659			<srcfileset dir="${basedir}">
 660				<include name="build.xml"/>
 661				<include name="doclet/**/*.java"/>
 662				<include name="org/**/*.java"/>
 663				<include name="org/**/package.html"/>
 664			</srcfileset>
 665			<targetfileset dir="${classes.dir}/javadoc"/>
 666		</dependset>
 667		<contrib:if>
 668			<available file="${classes.dir}/javadoc/api/toc.xml"
 669				   type="file"/>
 670			<contrib:then>
 671				<echo message="JavaDoc is up-to-date"
 672				      level="info"/>
 673			</contrib:then>
 674			<contrib:else>
 675				<mkdir dir="${classes.dir}/javadoc"/>
 676				<javac srcdir="${basedir}"
 677				       destdir="${classes.dir}/javadoc"
 678				       includes="doclet/**"
 679				       debug="true"
 680				       debuglevel="${config.build.debuglevel}"
 681				       nowarn="${config.build.nowarn}"
 682				       deprecation="${config.build.deprecation}"
 683				       source="${target.java.version}"
 684				       target="${target.java.version}"
 685				       compiler="modern"
 686				       encoding="UTF-8"
 687				       includeAntRuntime="true">
 688					<compilerarg line="${config.build.compilerarg}"/>
 689				</javac>
 690				<javadoc sourcepath="${basedir}"
 691					 destdir="${classes.dir}/javadoc/api"
 692					 packagenames="org.*"
 693					 classpath="${classes.dir}/core"
 694					 doclet="doclet.GenerateTocXML"
 695					 docletpath="${classes.dir}/javadoc"
 696					 version="true"
 697					 use="true"
 698					 author="true"
 699					 splitindex="true"
 700					 locale="en"
 701					 windowtitle="jEdit API"
 702					 doctitle="jEdit API"
 703					 failonerror="true"
 704					 source="${target.java.version}">
 705					<group title="jEdit"
 706					       packages="org.gjt.sp*"/>
 707					<group title="BeanShell"
 708					       packages="org.gjt.sp.jedit.bsh*"/>
 709				</javadoc>
 710			</contrib:else>
 711		</contrib:if>
 712	</target>
 713
 714	<target name="docs-javadoc"
 715		depends="init,generate-javadoc"
 716		description="generate JavaDoc API docs">
 717		<copy todir="${jar.location}/doc">
 718			<fileset dir="${classes.dir}/javadoc"
 719				 includes="api/**"
 720				 excludes="api/**/*.html"/>
 721		</copy>
 722		<copy todir="${jar.location}/doc">
 723			<fileset dir="${classes.dir}/javadoc"
 724				 includes="api/**/*.html"/>
 725			<filterchain>
 726				<tokenfilter>
 727					<replacestring
 728						from="&lt;TD BGCOLOR=&quot;#FFFFFF&quot; CLASS=&quot;NavBarCell1Rev&quot;&gt;"
 729						to="&lt;TD BGCOLOR=&quot;#00008B&quot; CLASS=&quot;NavBarCell1Rev&quot;&gt;"/>
 730				</tokenfilter>
 731				<tokenfilter>
 732					<filetokenizer/>
 733					<replaceregex
 734						pattern="(&lt;SCRIPT type=&quot;text/javascript&quot;&gt;.*?&lt;/SCRIPT&gt;|onload=&quot;.*?&quot;)"
 735						flags="gs"/>
 736				</tokenfilter>
 737			</filterchain>
 738		</copy>
 739	</target>
 740
 741	<target name="generate-pdf-users-guide"
 742		depends="init,retrieve,setup,unpack-docbook-xsl">
 743		<fail message="Please set the property &quot;paper.type&quot;"
 744		      unless="paper.type"/>
 745		<contrib:switch value="${paper.type}">
 746			<contrib:case value="A4">
 747				<property name="manual.filename.paper.type"
 748					  value="a4"/>
 749			</contrib:case>
 750			<contrib:case value="USletter">
 751				<property name="manual.filename.paper.type"
 752					  value="letter"/>
 753			</contrib:case>
 754			<contrib:default>
 755				<property name="manual.filename.paper.type"
 756					  value="${paper.type}"/>
 757			</contrib:default>
 758		</contrib:switch>
 759		<dependset.build>
 760			<srcfileset dir="${lib.dir}/docbook"/>
 761			<srcfileset dir="${lib.dir}/fop"/>
 762			<srcfilelist files="doc/jeditfo.xsl"/>
 763			<srcfileset dir="doc/users-guide"/>
 764			<targetfileset file="${classes.dir}/docs-pdf/${manual.filename.prefix}${manual.filename.paper.type}.fot"/>
 765			<targetfileset file="${jar.location}/${manual.filename.prefix}${manual.filename.paper.type}.pdf"/>
 766		</dependset.build>
 767		<contrib:if>
 768			<available file="${jar.location}/${manual.filename.prefix}${manual.filename.paper.type}.pdf"
 769				   type="file"/>
 770			<contrib:then>
 771				<echo message="${paper.type} PDF User's Guide is up-to-date"
 772				      level="info"/>
 773			</contrib:then>
 774			<contrib:else>
 775				<xslt.doc style="doc/jeditfo.xsl"
 776					  in="doc/users-guide/users-guide.xml"
 777					  out="${classes.dir}/docs-pdf/${manual.filename.prefix}${manual.filename.paper.type}.fot">
 778					<param name="paper.type"
 779					       expression="${paper.type}"/>
 780				</xslt.doc>
 781				<taskdef name="transform"
 782					 classname="org.apache.fop.tools.anttasks.Fop"
 783					 uri="antlib:org.apache.fop.tools.anttasks">
 784					<classpath>
 785						<fileset dir="${lib.dir}/fop"
 786							 includes="*.jar"/>
 787					</classpath>
 788				</taskdef>
 789				<fop:transform fofile="${classes.dir}/docs-pdf/${manual.filename.prefix}${manual.filename.paper.type}.fot"
 790					       outfile="${jar.location}/${manual.filename.prefix}${manual.filename.paper.type}.pdf"
 791					       format="application/pdf"
 792					       messagelevel="info"/>
 793			</contrib:else>
 794		</contrib:if>
 795	</target>
 796
 797	<target name="docs-pdf-a4"
 798		depends="init"
 799		description="generate PDF users-guide with A4 paper size">
 800		<antcall target="generate-pdf-users-guide">
 801			<param name="paper.type"
 802			       value="A4"/>
 803		</antcall>
 804	</target>
 805
 806	<target name="docs-pdf-USletter"
 807		depends="init"
 808		description="generate PDF users-guide with US letter paper size">
 809		<antcall target="generate-pdf-users-guide">
 810			<param name="paper.type"
 811			       value="USletter"/>
 812		</antcall>
 813	</target>
 814
 815	<target name="docs-upload"
 816		depends="init,docs-html,docs-javadoc"
 817		description="upload generated documentation to public website (needs rsync)">
 818		<fail message="Please set the property &quot;rsync.executable&quot; in build.properties, you may find example values in build.properties.sample"
 819		      unless="config.rsync.executable"/>
 820		<exec executable="${config.rsync.executable}"
 821		      dir="${jar.location}/doc/"
 822		      failonerror="true">
 823			<arg value="-avz"/>
 824			<arg value="--delete"/>
 825			<arg value="--progress"/>
 826			<arg value="api"/>
 827			<arg value="FAQ"/>
 828			<arg value="users-guide"/>
 829			<arg value="web.sourceforge.net:/home/project-web/jedit/htdocs"/>
 830		</exec>
 831	</target>
 832
 833	<target name="compile-installer"
 834		depends="init">
 835		<mkdir dir="${classes.dir}/installer"/>
 836		<depend srcDir="${basedir}"
 837			destDir="${classes.dir}/installer"
 838			cache="${classes.dir}"/>
 839		<dependset>
 840			<srcfilelist files="build.xml"/>
 841			<targetfileset dir="${classes.dir}/installer"/>
 842		</dependset>
 843		<javac srcdir="${basedir}"
 844		       destdir="${classes.dir}/installer"
 845		       includes="installer/**"
 846		       debug="true"
 847		       debuglevel="${config.build.debuglevel}"
 848		       nowarn="${config.build.nowarn}"
 849		       deprecation="${config.build.deprecation}"
 850		       source="${target.java.version}"
 851		       target="${target.java.version}"
 852		       compiler="modern"
 853		       encoding="UTF-8"
 854		       includeAntRuntime="false">
 855			<compilerarg line="${config.build.compilerarg}"/>
 856		</javac>
 857	</target>
 858
 859	<target name="dist-java"
 860		depends="init,setup,prepare-dist-files"
 861		description="build the Java-installer">
 862		<tar destfile="${dist.dir}/jedit-macros.tar.bz2"
 863		     compression="bzip2">
 864			<tarfileset id="jedit-macros"
 865				    dir="${dist.dir}"
 866				    includes="macros/**"/>
 867		</tar>
 868		<tar destfile="${dist.dir}/jedit-program.tar.bz2"
 869		     compression="bzip2">
 870			<tarfileset id="jedit-program"
 871				    dir="${dist.dir}"
 872				    includes="doc/**
 873					      jars/**
 874					      modes/**
 875					      properties/**
 876					      startup/**
 877					      ${jar.filename}"
 878				    excludes="doc/api/**
 879					      jars/MacOSX.jar"/>
 880		</tar>
 881		<tar destfile="${dist.dir}/jedit-windows.tar.bz2"
 882		     compression="bzip2">
 883			<tarfileset id="jedit-windows"
 884				    dir="${dist.dir}"
 885				    includes="jedit.exe"/>
 886		</tar>
 887		<tar destfile="${dist.dir}/jedit-mac.tar.bz2"
 888		     compression="bzip2">
 889			<tarfileset id="jedit-mac"
 890				    dir="${dist.dir}"
 891				    includes="jars/MacOSX.jar"/>
 892		</tar>
 893		<tar destfile="${dist.dir}/jedit-api.tar.bz2"
 894		     compression="bzip2">
 895			<tarfileset id="jedit-api"
 896				    dir="${dist.dir}"
 897				    includes="doc/api/**"/>
 898		</tar>
 899		<tar destfile="${dist.dir}/jedit-os2.tar.bz2"
 900		     compression="bzip2">
 901			<tarfileset id="jedit-os2"
 902				    dir="${dist.dir}/classes/package-files/os2"
 903				    includes="jedit.cmd"/>
 904		</tar>
 905		<antcall target="compile-installer">
 906			<param name="config.build.debuglevel"
 907			       value="lines,source"/>
 908			<param name="classes.dir"
 909			       location="${dist.dir}/classes"/>
 910		</antcall>
 911		<antcall target="compile-calculatesize">
 912			<param name="config.build.debuglevel"
 913			       value="lines,source"/>
 914			<param name="classes.dir"
 915			       location="${dist.dir}/classes"/>
 916		</antcall>
 917		<taskdef name="calculatesize"
 918			 classname="de.masters_of_disaster.ant.tasks.calculatesize.CalculateSize"
 919			 classpath="${dist.dir}/classes/calculatesize"
 920			 uri="antlib:de.masters_of_disaster.ant.tasks"/>
 921		<mod:calculatesize realsizeproperty="jedit-macros.realsize"
 922				   disksizeproperty="jedit-macros.disksize">
 923			<fileset refid="jedit-macros"/>
 924		</mod:calculatesize>
 925		<mod:calculatesize realsizeproperty="jedit-program.realsize"
 926				   disksizeproperty="jedit-program.disksize">
 927			<fileset refid="jedit-program"/>
 928		</mod:calculatesize>
 929		<mod:calculatesize realsizeproperty="jedit-windows.realsize"
 930				   disksizeproperty="jedit-windows.disksize">
 931			<fileset refid="jedit-windows"/>
 932		</mod:calculatesize>
 933		<mod:calculatesize realsizeproperty="jedit-mac.realsize"
 934				   disksizeproperty="jedit-mac.disksize">
 935			<fileset refid="jedit-mac"/>
 936		</mod:calculatesize>
 937		<mod:calculatesize realsizeproperty="jedit-api.realsize"
 938				   disksizeproperty="jedit-api.disksize">
 939			<fileset refid="jedit-api"/>
 940		</mod:calculatesize>
 941		<mod:calculatesize realsizeproperty="jedit-os2.realsize"
 942				   disksizeproperty="jedit-os2.disksize">
 943			<fileset refid="jedit-os2"/>
 944		</mod:calculatesize>
 945		<copy todir="${dist.dir}/classes/installer/installer"
 946		      encoding="UTF-8"
 947		      overwrite="true">
 948			<fileset file="installer/install.props"/>
 949			<filterset>
 950				<filter token="jedit.version"
 951					value="${jedit.version}"/>
 952				<filter token="jedit-macros.realsize"
 953					value="${jedit-macros.realsize}"/>
 954				<filter token="jedit-macros.disksize"
 955					value="${jedit-macros.disksize}"/>
 956				<filter token="jedit-program.realsize"
 957					value="${jedit-program.realsize}"/>
 958				<filter token="jedit-program.disksize"
 959					value="${jedit-program.disksize}"/>
 960				<filter token="jedit-windows.realsize"
 961					value="${jedit-windows.realsize}"/>
 962				<filter token="jedit-windows.disksize"
 963					value="${jedit-windows.disksize}"/>
 964				<filter token="jedit-mac.realsize"
 965					value="${jedit-mac.realsize}"/>
 966				<filter token="jedit-mac.disksize"
 967					value="${jedit-mac.disksize}"/>
 968				<filter token="jedit-api.realsize"
 969					value="${jedit-api.realsize}"/>
 970				<filter token="jedit-api.disksize"
 971					value="${jedit-api.disksize}"/>
 972				<filter token="jedit-os2.realsize"
 973					value="${jedit-os2.realsize}"/>
 974				<filter token="jedit-os2.disksize"
 975					value="${jedit-os2.disksize}"/>
 976			</filterset>
 977		</copy>
 978		<jar destfile="${dist.dir}/${dist.jar.filename}"
 979		     basedir="${dist.dir}/classes/installer"
 980		     compress="true"
 981		     manifest="installer/install.mf"
 982		     duplicate="fail"
 983		     index="true">
 984			<fileset dir="${basedir}">
 985				<include name="installer/*.html"/>
 986			</fileset>
 987			<fileset dir="${dist.dir}/classes/package-files/linux">
 988				<include name="jedit.1"/>
 989			</fileset>
 990			<zipfileset dir="${dist.dir}"
 991				    includes="jedit-api.tar.bz2
 992					      jedit-mac.tar.bz2
 993					      jedit-macros.tar.bz2
 994					      jedit-os2.tar.bz2
 995					      jedit-windows.tar.bz2
 996					      jedit-program.tar.bz2"
 997				    prefix="installer"/>
 998		</jar>
 999		<property name="wipe.dist.files"
1000			  value="true"/>
1001		<contrib:runtarget target="dist-cleanup"/>
1002	</target>
1003
1004	<target name="dist-manuals"
1005		depends="init,setup"
1006		description="build the PDF-manuals">
1007		<antcall target="docs-pdf-a4">
1008			<param name="classes.dir"
1009			       location="${dist.dir}/classes"/>
1010			<param name="jar.location"
1011			       location="${dist.dir}"/>
1012		</antcall>
1013		<antcall target="docs-pdf-USletter">
1014			<param name="classes.dir"
1015			       location="${dist.dir}/classes"/>
1016			<param name="jar.location"
1017			       location="${dist.dir}"/>
1018		</antcall>
1019		<property name="wipe.dist.files"
1020			  value="true"/>
1021		<contrib:runtarget target="dist-cleanup"/>
1022	</target>
1023
1024	<target name="dist-src"
1025		depends="init"
1026		description="build the src-archive">
1027		<mkdir dir="${dist.dir}"/>
1028		<tar destfile="${dist.dir}/${src.archive.filename}"
1029		     compression="bzip2">
1030			<tarfileset dir="${basedir}"
1031				    excludes="${config.lib.dir}/**
1032					      ${config.build.dir}/**
1033					      ${config.dist.dir}/**
1034					      **/build.properties"
1035				    prefix="jEdit/"/>
1036		</tar>
1037	</target>
1038
1039	<target name="compile-jarbundler"
1040		depends="init,retrieve">
1041		<mkdir dir="${classes.dir}/jarbundler"/>
1042		<depend srcDir="${basedir}"
1043			destDir="${classes.dir}/jarbundler"
1044			cache="${classes.dir}"/>
1045		<dependset>
1046			<srcfilelist files="build.xml"/>
1047			<targetfileset dir="${classes.dir}/jarbundler"/>
1048		</dependset>
1049		<javac srcdir="${basedir}"
1050		       destdir="${classes.dir}/jarbundler"
1051		       includes="net/**"
1052		       debug="true"
1053		       debuglevel="${config.build.debuglevel}"
1054		       nowarn="${config.build.nowarn}"
1055		       deprecation="${config.build.deprecation}"
1056		       source="1.4"
1057		       target="1.4"
1058		       compiler="modern"
1059		       encoding="UTF-8"
1060		       includeAntRuntime="true">
1061			<classpath>
1062				<fileset dir="${lib.dir}/jarbundler"
1063					 includes="*.jar"/>
1064			</classpath>
1065			<compilerarg line="${config.build.compilerarg}"/>
1066		</javac>
1067	</target>
1068
1069	<target name="dist-mac-finish"
1070		depends="init,retrieve,setup"
1071		description="finish building the Mac OS X disk image (DMG-file) on Mac OS X">
1072		<fail message="The disk image (DMG-file) for easy distribution on Mac OS X can only be built on Mac OS X currently">
1073			<condition>
1074				<not>
1075					<os family="mac"/>
1076				</not>
1077			</condition>
1078		</fail>
1079		<taskdef name="create"
1080			 classname="net.sourceforge.jarbundler.JarBundler"
1081			 classpath="${dist.dir}/classes/jarbundler"
1082			 uri="antlib:net.sourceforge.jarbundler">
1083			<classpath>
1084				<fileset dir="${lib.dir}/jarbundler"
1085					 includes="*.jar"/>
1086			</classpath>
1087		</taskdef>
1088		<tstamp>
1089			<format property="current.year"
1090				pattern="yyyy"/>
1091		</tstamp>
1092		<mkdir dir="${dist.dir}/classes/mac"/>
1093		<jarbundler:create dir="${dist.dir}/classes/mac"
1094				   name="jEdit"
1095				   mainclass="org.gjt.sp.jedit.jEdit"
1096				   jar="${dist.dir}/${jar.filename}"
1097				   arguments="-background"
1098				   build="${jedit.build.number}"
1099				   bundleid="org.gjt.sp.jedit"
1100				   extraclasspath="/System/Library/Java"
1101				   icon="icons/icon.icns"
1102				   infostring="jEdit ${jedit.version}, Copyright &#169; 1998-${current.year} Contributors"
1103				   jvmversion="${mac.target.java.version}"
1104				   shortname="jEdit"
1105				   signature="JESP"
1106				   stubfile="jedit"
1107				   version="${jedit.version}"
1108				   vmoptions="-Xmx192M">
1109			<javaproperty name="apple.awt.antialiasing" value="true"/>
1110			<javaproperty name="apple.awt.textantialiasing" value="true"/>
1111			<javaproperty name="apple.laf.useScreenMenuBar" value="true"/>
1112			<!-- Commented due https://sourceforge.net/tracker/?func=detail&atid=100588&aid=2820535&group_id=588 discussion -->
1113			<!--javaproperty name="apple.awt.graphics.UseQuartz" value="true" />
1114			<javaproperty name="apple.awt.rendering"          value="speed" /-->
1115			<javafileset dir="${dist.dir}"
1116				     includes="doc/**
1117					       jars/**
1118					       macros/**
1119					       modes/**
1120					       properties/**
1121					       startup/**"/>
1122			<documenttype name="jEdit TEXT Document"
1123				      extensions="*"
1124				      ostypes="TEXT ****"
1125				      iconfile="icons/file.icns"
1126				      role="Editor"/>
1127			<service message="openFile"
1128				 menuitem="jEdit/Open Files"
1129				 sendtypes="NSStringPboardType,NSFilenamesPboardType"/>
1130			<service message="insertSelection"
1131				 menuitem="jEdit/Insert Text"
1132				 sendtypes="NSStringPboardType"/>
1133			<service message="openSelection"
1134				 menuitem="jEdit/New Buffer with Text"
1135				 sendtypes="NSStringPboardType"/>
1136		</jarbundler:create>
1137		<delete file="${dist.dir}/classes/mac/jEdit.app/Contents/MacOS/jedit" />
1138		<exec executable="ln"
1139		      failonerror="true">
1140			<arg value="-s" />
1141			<arg file="/System/Library/Frameworks/JavaVM.framework/Resources/MacOS/JavaApplicationStub" />
1142			<arg file="${dist.dir}/classes/mac/jEdit.app/Contents/MacOS/jedit" />
1143		</exec>
1144		<delete file="${dist.dir}/${mac.disk.image.filename}"
1145			failonerror="false"/>
1146		<exec executable="hdiutil"
1147		      failonerror="true">
1148			<arg value="create"/>
1149			<arg value="-quiet"/>
1150			<arg value="-volname"/>
1151			<arg value="jEdit ${jedit.version}"/>
1152			<arg value="-srcfolder"/>
1153			<arg file="${dist.dir}/classes/mac/jEdit.app"/>
1154			<arg file="${dist.dir}/${mac.disk.image.filename}"/>
1155		</exec>
1156		<exec executable="hdiutil"
1157		      failonerror="true">
1158			<arg value="internet-enable"/>
1159			<arg value="-quiet"/>
1160			<arg file="${dist.dir}/${mac.disk.image.filename}"/>
1161		</exec>
1162		<property name="wipe.dist.files"
1163			  value="true"/>
1164		<contrib:runtarget target="dist-cleanup"/>
1165	</target>
1166
1167	<target name="dist-mac"
1168		depends="init,retrieve,setup,prepare-dist-files"
1169		description="build the Mac OS X disk image (DMG-file)">
1170		<antcall target="compile-jarbundler">
1171			<param name="config.build.debuglevel"
1172			       value="lines,source"/>
1173			<param name="classes.dir"
1174			       location="${dist.dir}/classes"/>
1175		</antcall>
1176		<contrib:if>
1177			<os family="mac"/>
1178			<contrib:then>
1179				<antcall target="dist-mac-finish">
1180					<param name="wipe.dist.files"
1181					       value="false"/>
1182				</antcall>
1183			</contrib:then>
1184			<contrib:else>
1185				<tar destfile="${dist.dir}/jedit${jedit.version}-dist-mac-finish.tar.bz2"
1186				     basedir="${basedir}"
1187				     includes="build.xml
1188					       ivy.xml
1189					       ivysettings.xml
1190					       icons/file.icns
1191					       icons/icon.icns
1192					       ${config.dist.dir}/${jar.filename}
1193					       ${config.dist.dir}/classes/jarbundler/**
1194					       ${config.dist.dir}/doc/**
1195					       ${config.dist.dir}/jars/**
1196					       ${config.dist.dir}/macros/**
1197					       ${config.dist.dir}/modes/**
1198					       ${config.dist.dir}/properties/**
1199					       ${config.dist.dir}/startup/**"
1200				     compression="bzip2"/>
1201			</contrib:else>
1202		</contrib:if>
1203		<property name="wipe.dist.files"
1204			  value="true"/>
1205		<contrib:runtarget target="dist-cleanup"/>
1206	</target>
1207
1208	<target name="filter-package-files"
1209		depends="init,setup">
1210		<fail message="Please set the property &quot;winepath.executable&quot; in build.properties, you may find example values in build.properties.sample">
1211			<condition>
1212				<and>
1213					<istrue value="${config.innosetup.via.wine}"/>
1214					<not>
1215						<isset property="config.winepath.executable"/>
1216					</not>
1217				</and>
1218			</condition>
1219		</fail>
1220		<contrib:if>
1221			<and>
1222				<istrue value="${config.innosetup.via.wine}"/>
1223				<isset property="config.winepath.executable"/>
1224			</and>
1225			<contrib:then>
1226				<exec executable="${config.winepath.executable}"
1227				      outputproperty="basedir.for.innosetup"
1228				      failonerror="true">
1229					<arg value="-w"/>
1230					<arg value="${basedir}"/>
1231				</exec>
1232				<exec executable="${config.winepath.executable}"
1233				      outputproperty="dist.dir.for.innosetup"
1234				      failonerror="true">
1235					<arg value="-w"/>
1236					<arg value="${dist.dir}"/>
1237				</exec>
1238			</contrib:then>
1239			<contrib:else>
1240				<property name="basedir.for.innosetup"
1241					  value="${basedir}"/>
1242				<property name="dist.dir.for.innosetup"
1243					  value="${dist.dir}"/>
1244			</contrib:else>
1245		</contrib:if>
1246		<tstamp>
1247			<format property="current.year"
1248				pattern="yyyy"/>
1249		</tstamp>
1250		<copy todir="${classes.dir}/package-files"
1251		      encoding="UTF-8"
1252		      overwrite="true">
1253			<fileset dir="package-files"/>
1254			<filterset id="package-files-filter">
1255				<filter token="base.dir"
1256					value="${basedir}"/>
1257				<filter token="base.dir.for.innosetup"
1258					value="${basedir.for.innosetup}"/>
1259				<filter token="current.year"
1260					value="${current.year}"/>
1261				<filter token="dist.dir.for.innosetup"
1262					value="${dist.dir.for.innosetup}"/>
1263				<filter token="jar.filename"
1264					value="${jar.filename}"/>
1265				<filter token="jedit.build.number"
1266					value="${jedit.build.number}"/>
1267				<filter token="jedit.version"
1268					value="${jedit.version}"/>
1269				<filter token="slackware.target.java.version"
1270					value="${slackware.target.java.version}"/>
1271				<filter token="target.java.version"
1272					value="${target.java.version}"/>
1273				<filter token="win.filename"
1274					value="${win.filename}"/>
1275			</filterset>
1276		</copy>
1277	</target>
1278
1279	<target name="prepare-dist-files"
1280		depends="init,retrieve,setup">
1281		<antcall target="build">
1282			<param name="config.build.debuglevel"
1283			       value="lines,source"/>
1284			<param name="classes.dir"
1285			       location="${dist.dir}/classes"/>
1286			<param name="jar.location"
1287			       location="${dist.dir}"/>
1288		</antcall>
1289		<antcall target="docs-html">
1290			<param name="config.build.debuglevel"
1291			       value="lines,source"/>
1292			<param name="classes.dir"
1293			       location="${dist.dir}/classes"/>
1294			<param name="jar.location"
1295			       location="${dist.dir}"/>
1296		</antcall>
1297		<antcall target="docs-javadoc">
1298			<param name="config.build.debuglevel"
1299			       value="lines,source"/>
1300			<param name="classes.dir"
1301			       location="${dist.dir}/classes"/>
1302			<param name="jar.location"
1303			       location="${dist.dir}"/>
1304		</antcall>
1305		<copy todir="${dist.dir}/jars">
1306			<fileset dir="${lib.dir}/default-plugins"/>
1307		</copy>
1308		<antcall target="filter-package-files">
1309			<param name="classes.dir"
1310			       location="${dist.dir}/classes"/>
1311		</antcall>
1312		<antcall target="build-exe-launcher">
1313			<param name="classes.dir"
1314			       location="${dist.dir}/classes"/>
1315			<param name="jar.location"
1316			       location="${dist.dir}"/>
1317		</antcall>
1318		<gzip src="${dist.dir}/classes/package-files/linux/jedit.1"
1319		      destfile="${dist.dir}/classes/package-files/linux/jedit.1.gz"/>
1320	</target>
1321
1322	<target name="dist-slackware"
1323		depends="init,setup,prepare-dist-files"
1324		description="build the Slackware Package">
1325		<tar destfile="${dist.dir}/jedit-${jedit.version}-noarch-1sao.tgz"
1326		     compression="gzip">
1327			<tarfileset file="${basedir}"
1328				    username="root"
1329				    group="root"
1330				    fullpath="./"/>
1331			<tarfileset dir="${dist.dir}/classes/package-files/linux/slackware"
1332				    includes="doinst.sh
1333					      slack-desc
1334					      slack-required"
1335				    username="root"
1336				    group="root"
1337				    prefix="install/"/>
1338			<tarfileset file="${dist.dir}/classes/package-files/linux/jedit"
1339				    mode="755"
1340				    username="root"
1341				    group="bin"
1342				    fullpath="usr/bin/jedit"/>
1343			<tarfileset dir="${dist.dir}/doc"
1344				    includes="*.txt"
1345				    username="root"
1346				    group="root"
1347				    prefix="usr/doc/jedit-${jedit.version}/"/>
1348			<tarfileset file="${dist.dir}/classes/package-files/linux/jedit.1.gz"
1349				    username="root"
1350				    group="root"
1351				    fullpath="usr/man/man1/jedit.1.gz"/>
1352			<tarfileset file="${dist.dir}/classes/package-files/linux/slackware/jEdit.desktop"
1353				    username="root"
1354				    group="root"
1355				    fullpath="usr/share/applications/jEdit.desktop"/>
1356			<tarfileset dir="${dist.dir}"
1357				    includes="doc/**
1358					      jars/**
1359					      macros/**
1360					      modes/**
1361					      properties/**
1362					      startup/**
1363					      ${jar.filename}"
1364				    excludes="jars/MacOSX.jar"
1365				    username="root"
1366				    group="root"
1367				    prefix="usr/share/jedit-${jedit.version}/"/>
1368			<tarfileset dir="icons"
1369				    includes="jedit-file48.png
1370					      jedit-icon48.png"
1371				    username="root"
1372				    group="root"
1373				    prefix="usr/share/pixmaps/"/>
1374		</tar>
1375		<property name="wipe.dist.files"
1376			  value="true"/>
1377		<contrib:runtarget target="dist-cleanup"/>
1378	</target>
1379
1380	<target name="compile-ar"
1381		depends="init">
1382		<mkdir dir="${classes.dir}/ar"/>
1383		<depend srcDir="${basedir}"
1384			destDir="${classes.dir}/ar"
1385			cache="${classes.dir}"/>
1386		<dependset>
1387			<srcfilelist files="build.xml"/>
1388			<targetfileset dir="${classes.dir}/ar"/>
1389		</dependset>
1390		<javac srcdir="${basedir}"
1391		       destdir="${classes.dir}/ar"
1392		       includes="de/masters_of_disaster/ant/tasks/ar/**"
1393		       debug="true"
1394		       debuglevel="${config.build.debuglevel}"
1395		       nowarn="${config.build.nowarn}"
1396		       deprecation="${config.build.deprecation}"
1397		       source="${target.java.version}"
1398		       target="${target.java.version}"
1399		       compiler="modern"
1400		       encoding="UTF-8"
1401		       includeAntRuntime="true">
1402			<compilerarg line="${config.build.compilerarg}"/>
1403		</javac>
1404	</target>
1405
1406	<target name="compile-deb"
1407		depends="init">
1408		<mkdir dir="${classes.dir}/deb"/>
1409		<depend srcDir="${basedir}"
1410			destDir="${classes.dir}/deb"
1411			cache="${classes.dir}"/>
1412		<dependset>
1413			<srcfilelist files="build.xml"/>
1414			<targetfileset dir="${classes.dir}/deb"/>
1415		</dependset>
1416		<javac srcdir="${basedir}"
1417		       destdir="${classes.dir}/deb"
1418		       includes="de/masters_of_disaster/ant/tasks/deb/**"
1419		       debug="true"
1420		       debuglevel="${config.build.debuglevel}"
1421		       nowarn="${config.build.nowarn}"
1422		       deprecation="${config.build.deprecation}"
1423		       source="${target.java.version}"
1424		       target="${target.java.version}"
1425		       compiler="modern"
1426		       encoding="UTF-8"
1427		       includeAntRuntime="true">
1428			<compilerarg line="${config.build.compilerarg}"/>
1429		</javac>
1430	</target>
1431
1432	<target name="compile-calculatesize"
1433		depends="init">
1434		<mkdir dir="${classes.dir}/calculatesize"/>
1435		<depend srcDir="${basedir}"
1436			destDir="${classes.dir}/calculatesize"
1437			cache="${classes.dir}"/>
1438		<dependset>
1439			<srcfilelist files="build.xml"/>
1440			<targetfileset dir="${classes.dir}/calculatesize"/>
1441		</dependset>
1442		<javac srcdir="${basedir}"
1443		       destdir="${classes.dir}/calculatesize"
1444		       includes="de/masters_of_disaster/ant/tasks/calculatesize/**"
1445		       debug="true"
1446		       debuglevel="${config.build.debuglevel}"
1447		       nowarn="${config.build.nowarn}"
1448		       deprecation="${config.build.deprecation}"
1449		       source="${target.java.version}"
1450		       target="${target.java.version}"
1451		       compiler="modern"
1452		       encoding="UTF-8"
1453		       includeAntRuntime="true">
1454			<compilerarg line="${config.build.compilerarg}"/>
1455		</javac>
1456	</target>
1457
1458	<target name="dist-deb"
1459		depends="init,retrieve,setup,prepare-dist-files"
1460		description="build the DEB Package">
1461		<antcall target="compile-ar">
1462			<param name="config.build.debuglevel"
1463			       value="lines,source"/>
1464			<param name="classes.dir"
1465			       location="${dist.dir}/classes"/>
1466		</antcall>
1467		<antcall target="compile-deb">
1468			<param name="config.build.debuglevel"
1469			       value="lines,source"/>
1470			<param name

Large files files are truncated, but you can click here to view the full file