| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345 |
- <?xml version="1.0" encoding="UTF-8" ?>
- <project name="build-chm-pdf" default="all" basedir="../../.">
- <!--<property name="dita.dir" location="${basedir}/../../.."/>-->
-
- <tstamp>
- <format property="dita-ot.last.hour" pattern="MM/dd/yyyy hh:mm a" offset="-1" unit="hour"/>
- <format property="dita-ot.truncate_queue_if_spammed.condition.timestamp" pattern="MM/dd/yyyy hh:mm a" offset="-100" unit="minute"/>
- <format property="dita-ot.current.timestamp" pattern="yyyy-dd-MM-hh-mm-a" />
- </tstamp>
-
- <include file="build_dita-ot.input.xml" as="input" />
- <!--<include file="../system_ui_info_speech/build_system_ui_info_speech.xml" as="p5suis"/>-->
- <include file="../ant-contrib/build_ant-contrib.xml" as="ant-contrib"/>
-
- <target name="all" description="build CHM and PDF" depends="input.input,chm,pdf"/>
-
-
-
- <target name="finally" unless="finally_exception.cond" depends="finally_cond">
- <input addproperty="dita-ot.resultproperty.PARAM"/>
- <echo>Finally #16 $finally_exception.cond = ${finally_exception.cond}
- $dita-ot.resultproperty = ${dita-ot.resultproperty}
- $dita-ot.resultproperty.PARAM = ${dita-ot.resultproperty.PARAM} Wykonano pdf z mapy p5:file ${dita-ot.args.input.input} to ${dita-ot.output.dir.input}</echo>
- <antcall target="p5suis.p5suis:say_to_queue.PL">
- <param name="p5suis:say_text" value=" Wykonano pdf ${dita-ot.args.input.ditamap.title.info} z mapy p5:file ${dita-ot.args.input.input}"/>
- </antcall>
- <echo append="true" file="${dita-ot.output.complete.touch}">#144 Completed ${dita-ot.NOW} </echo>
- <delete dir="${dita-ot.temp.input}" verbose="yes" failonerror="no"/>
- <echo>#29 Copying file="${dita-ot.repository.pdf}" tofile="${dita-ot.local.pdf}" </echo>
- <copy file="${dita-ot.repository.pdf}" tofile="${dita-ot.local.pdf}" failonerror="no"/>
- </target>
-
-
- <target name="finally_cond">
- <condition property="finally_exception.cond">
- <not>
- <equals arg1="${dita-ot.resultproperty}" arg2="0" />
- </not>
- </condition>
- </target>
-
-
- <target name="finally_exception" if="finally_exception.cond" depends="finally_cond">
- <input addproperty="dita-ot.resultproperty.PARAM"/>
- <echo>Finally #279999 $finally_exception.cond = ${finally_exception.cond}
- repo src $dita-ot.repository.pdf = ${dita-ot.repository.pdf}
- local dst $dita-ot.local.pdf ${dita-ot.local.pdf}
- $dita-ot.resultproperty = ${dita-ot.resultproperty}
- $dita-ot.outputproperty = {dita-ot.outputproperty}
- $dita-ot.resultproperty.PARAM = ${dita-ot.resultproperty.PARAM} nie wykonano pdf z mapy p5:file ${dita-ot.args.input.input} to ${dita-ot.output.dir.input}</echo>
- <antcall target="p5suis.p5suis:say_to_queue.PL">
- <param name="p5suis:say_text" value="Błąd tworzenia pdf ${dita-ot.args.input.ditamap.title.info} z mapy p5:file ${dita-ot.args.input.input}
-
- "/>
- </antcall>
-
- <!--SSS<exec executable="open">
- <arg file="${dita-ot.temp}/${dita-ot.args.input.input}"/>
- </exec>-->
- <!--SSS<exec executable="open">
- <arg file="${dita-ot.temp.input.topic.fo}"/>
- </exec>-->
- <!--
- <echoxml file="${dita-ot.temp.input.errorproperty.xml}">
- <dita-ot.temp.input.errorproperty.xml>
- ${dita-ot.errorproperty}
- </dita-ot.temp.input.errorproperty.xml>
- </echoxml>
- <echoxml file="${dita-ot.temp.input.resultproperty.xml}">
- <dita-ot.temp.input.resultproperty.xml>
- ${dita-ot.resultproperty}
- </dita-ot.temp.input.resultproperty.xml>
- </echoxml>
- <echoxml file="${dita-ot.temp.input.outputproperty.xml}">
- <dita-ot.temp.input.outputproperty.xml>
- ${dita-ot.outputproperty}
- </dita-ot.temp.input.outputproperty.xml>
- </echoxml>-->
-
-
- <!--<echo append="true" file="${output.complete.touch}">#144 Completed ${dita-ot.NOW} </echo>-->
- </target>
-
- <!--<target name="input">
-
- </target>-->
-
- <target name="chm" depends="input.input" description="build CHM">
- <ant antfile="${dita-ot.current-dita-ot.build}">
- <property name="args.input" location="${dita-ot.args.input.input}"/>
- <property name="transtype" value="htmlhelp"/>
- <property name="output.dir" location="../out/chm"/>
- <property name="args.gen.task.lbl" value="YES"/>
- </ant>
- </target>
-
-
- <target name="dita-ot.output.preparing.touch.if_exists">
- <condition property="dita-ot.output.preparing.touch.if_exists">
- <available file="${dita-ot.output.preparing.touch}"/>
- </condition>
- </target>
-
- <target name="dita-ot.output.error.touch.if_exists">
- <condition property="dita-ot.output.error.touch.if_exists">
- <available file="${dita-ot.output.error.touch}"/>
- </condition>
- </target>
-
-
- <target name="dita-ot.output.complete.touch.if_exists.message" if="dita-ot.output.complete.touch.if_exists">
- <echo>#86 already exists ${dita-ot.output.complete.touch} pdf generated</echo>
- </target>
-
- <target name="dita-ot.output.complete.touch.if_exists">
- <condition property="dita-ot.output.complete.touch.if_exists">
- <available file="${dita-ot.output.complete.touch}"/>
- </condition>
- </target>
-
- <target name="dita-ot.output.complete.touch.if_uptodate.delete" if="dita-ot.output.complete.touch.if_uptodate.cond">
- <echo>#85 deleting ${dita-ot.output.complete.touch} because dita-ot.output.complete.touch.if_uptodate.cond = ${dita-ot.output.complete.touch.if_uptodate.cond}</echo>
- <delete file="${dita-ot.output.complete.touch}"/>
- </target>
-
- <target name="dita-ot.output.complete.touch.if_uptodate" if="dita-ot.output.complete.touch.if_uptodate.if_exists" >
- <uptodate property="dita-ot.output.complete.touch.if_uptodate.cond" targetfile="${dita-ot.output.preparing.touch}" >
- <srcfiles file="${dita-ot.output.complete.touch}"/>
- </uptodate>
- </target>
- <target name="dita-ot.output.complete.touch.if_uptodate.if_exists" >
- <condition property="dita-ot.output.complete.touch.if_uptodate.if_exists">
- <available file="${dita-ot.output.complete.touch}"/>
- </condition>
- </target>
-
-
-
-
- <target name="dita-ot.output.preparing.touch">
- <echo append="true" file="${dita-ot.output.preparing.touch}">#114 Start Building Delivery ${dita-ot.NOW}
- dita-ot.temp.input.resultproperty.xml = ${dita-ot.temp.input.resultproperty.xml}
- dita-ot.temp.input.errorproperty.xml = ${dita-ot.temp.input.errorproperty.xml}
- </echo>
- </target>
-
-
-
- <target name="pdf" depends="input.input,
- dita-ot.output.complete.touch.if_uptodate.if_exists,
- dita-ot.output.preparing.touch,
- dita-ot.output.complete.touch.if_uptodate,
- dita-ot.output.complete.touch.if_uptodate.delete,
- dita-ot.output.complete.touch.if_exists,
- dita-ot.output.preparing.touch.if_exists,
- dita-ot.output.error.touch.if_exists,
- dita-ot.output.complete.touch.if_exists.message" unless="dita-ot.output.complete.touch.if_exists" description="build PDF" > <!-- ant-contrib.init -->
- <tstamp>
- <format property="dita-ot.NOW" pattern="yyyy MMMM dd HH:mm:ss" locale="en"/>
- </tstamp>
- <echo>#20 will use settings
- $dita-ot.output.complete.touch = ${dita-ot.output.complete.touch}
- repo src $dita-ot.repository.pdf = ${dita-ot.repository.pdf}
- local dst $dita-ot.local.pdf ${dita-ot.local.pdf}
- $dita-ot.output.error.touch.if_exists = ${dita-ot.output.error.touch.if_exists} - ${dita-ot.output.error.touch}
- $dita-ot.output.preparing.touch.if_exists = ${dita-ot.output.preparing.touch.if_exists} - ${dita-ot.output.preparing.touch}
- $dita-ot.output.complete.touch.if_uptodate.cond = ${dita-ot.output.complete.touch.if_uptodate.cond}
- $dita-ot.output.complete.touch.if_exists = ${dita-ot.output.complete.touch.if_exists}
- $dita-ot.output.complete.touch.if_uptodate = ${dita-ot.output.complete.touch.if_uptodate}
- $dita-ot.temp.input = ${dita-ot.temp.input}
- $dita-ot.args.input.input = ${dita-ot.args.input.input}
-
- #### $dita-ot.output.dir.input = ${dita-ot.output.dir.input} ####
-
- $dita-ot.output.preparing.touch = ${dita-ot.output.preparing.touch}
- $dita-ot.output.error.touch = ${dita-ot.output.error.touch}
- $dita-ot.current-dita-ot.toolkit = ${dita-ot.current-dita-ot.toolkit}
- $dita-ot.current-dita-ot.lib = ${dita-ot.current-dita-ot.lib}
- ####
- </echo>
- <!-- The class which could not be loaded (org.dita.dost.module.GenMapAndTopicListModule)
- should be inside the dost.jar file. I don't have DITA-OT 1.6.3 installed,
- can you check please if [DITA-OT-1.6.3-install-dir]/lib/dost.jar includes this class?
- -->
- <!--<path id="dost.class.path">
- <pathelement location="${dita.dir}${file.separator}plugins/org.dita.odt/lib/odt.jar"/>
- <pathelement location="${dita.dir}${file.separator}plugins/org.dita.pdf2/lib/fo.jar"/>
- <pathelement location="${dita.dir}${file.separator}plugins/org.dita.pdf2.axf/lib/axf.jar"/>
- <pathelement location="${dita.dir}${file.separator}plugins/org.dita.pdf2.xep/lib/xep.jar"/>
- <pathelement location="${dita.dir}${file.separator}plugins/org.dita.wordrtf/lib/wordrtf.jar"/>
- <pathelement location="${dita.dir}/lib/dost.jar"/>
- <pathelement location="${dita.dir}/lib/dost-configuration.jar"/>
- <pathelement location="${dita-ot.current-dita-ot.resolver.jar}"/>
- <pathelement location="${dita-ot.current-dita-ot.commons-codec-1.4.jar}"/>
- <pathelement location="${dita-ot.current-dita-ot.dost.jar}"/>
- <pathelement location="${dita-ot.current-dita-ot.icu4j.jar}"/>
- <pathelement location="${dita-ot.current-dita-ot.resolver.jar}"/>
- </path>-->
-
- <!-- <classloader classpath="${dita-ot.current-dita-ot.dost.jar}" /> <!-\- -\->
- <classloader classpath="${dita-ot.current-dita-ot.commons-codec-1.4.jar}" />
-
- <classloader classpath="${dita-ot.current-dita-ot.icu4j.jar}" />
- <classloader classpath="${dita-ot.current-dita-ot.resolver.jar}" />-->
- <echo>#54 adding taskdef antcontrib to add childs
- ${dita-ot.current-dita-ot.lib}
- ${dita-ot.current-dita-ot.dost.jar}
- ${dita-ot.current-dita-ot.commons-codec-1.4.jar}
- ${dita-ot.current-dita-ot.icu4j.jar}
- ${dita-ot.current-dita-ot.resolver.jar}
- </echo>
-
-
- <!-- <available classname="org.apache.commons.logging.LogConfigurationException" property="org.apache.commons.logging.LogConfigurationException.present"/>
- <available classname="org.dita.dost.module.GenMapAndTopicListModule" property="org.dita.dost.module.GenMapAndTopicListModule.present"/>
- <available classname="net.sf.antcontrib.properties" property="net.sf.antcontrib.properties.present"/>
- <available classname="net.sf.antcontrib.logic.AntCallBack" property="net.sf.antcontrib.logic.AntCallBack.present"/>
- <available classname="org/apache/xerces/xni/grammars/XMLGrammarPool" property="org.apache.xerces.xni.grammars.XMLGrammarPool.present"/>
- -->
- <!--<echo>
- #71 dostepne klasy
- $dita-ot.current-dita-ot.lib = ${dita-ot.current-dita-ot.lib}
- $org.apache.commons.logging.LogConfigurationException.present = ${org.apache.commons.logging.LogConfigurationException.present}
- $org.dita.dost.module.GenMapAndTopicListModule.present = ${org.dita.dost.module.GenMapAndTopicListModule.present}
- $net.sf.antcontrib.properties ${net.sf.antcontrib.properties.present}
- $net.sf.antcontrib.logic.AntCallBack.present = ${net.sf.antcontrib.logic.AntCallBack.present}
- dost.jar = ${dost.jar}
- org/apache/xerces/xni/grammars/XMLGrammarPool = ${org.apache.xerces.xni.grammars.XMLGrammarPool.present}
- </echo>-->
-
- <!-- jar="${ant-launcher.jar}" -->
-
- <taskdef resource="net/sf/antcontrib/antlib.xml"/>
-
- <!--
- <trycatch reference="exception_ref">
- <try>-->
- <echo>#113 Start Building Delivery</echo>
-
- <antcall target="p5suis.p5suis:say_to_queue.PL">
- <param name="p5suis:say_text" value="Tworzę pdf ${dita-ot.args.input.ditamap.title.info} z mapy p5:file ${dita-ot.args.input.input}"/>
- </antcall>
- <java dir="${dita-ot.current-dita-ot.toolkit}"
- classname="org.apache.tools.ant.launch.Launcher"
- classpath="${ant-launcher.jar}"
- fork="true"
- errorproperty="dita-ot.errorproperty"
- resultproperty="dita-ot.resultproperty"
- outputproperty="dita-ot.outputproperty"
- failonerror="true"
- maxmemory="1128m">
- <!--<arg value="-h"/>-->
-
- <arg value="-Dargs.input=${dita-ot.args.input.input}"/>
- <arg value="-Dtranstype=pdf"/>
- <arg value="-Doutput.dir=${dita-ot.output.dir.input}"/>
- <arg value="-Dargs.rellinks=nofamily"/>
- <arg value="-Dclean.temp=no"/>
- <arg value="-Ddita.temp.dir=${dita-ot.temp.input}"/>
- <!--<arg value="-lib ${dita-ot.current-dita-ot.lib}"/>-->
- <arg value="-S"/>
- <arg value="-q"/>
- <classpath>
- <fileset dir="${dita-ot.current-dita-ot.lib}">
- <include name="**/*.jar"/>
- <include name="*.jar"/>
- <exclude name="**/commons-logging-1.0.4.jar"/>
- <exclude name=".commons-logging-1.0.4.jar"/>
- <exclude name="**/commons-logging-1.0.4.jar"/>
- </fileset>
- </classpath>
- </java>
-
- <echoxml file="${dita-ot.temp.input.errorproperty.xml}">
- <dita-ot.temp.input.errorproperty.xml>
- ${dita-ot.errorproperty}
- </dita-ot.temp.input.errorproperty.xml>
- </echoxml>
- <echoxml file="${dita-ot.temp.input.resultproperty.xml}">
- <dita-ot.temp.input.resultproperty.xml>
- ${dita-ot.resultproperty}
- </dita-ot.temp.input.resultproperty.xml>
- </echoxml>
- <echoxml file="${dita-ot.temp.input.outputproperty.xml}">
- <dita-ot.temp.input.outputproperty.xml>
- ${dita-ot.outputproperty}
- </dita-ot.temp.input.outputproperty.xml>
- </echoxml>
-
- <!-- </try>-->
- <!--<catch>
- <property name="exception" refid="exception_ref" />
- <property name="message" value="#178XXX Error ${dita-ot.NOW} in trycatch block:${line.separator}${exception}" />
- <echo message="${message}" />
- <echo message="${message}" append="true" file="${dita-ot.output.error.touch}" />
- <antcall target="p5suis.p5suis:say_to_queue.PL">
- <param name="p5suis:say_text" value="Błąd tworzenia mapy p5:file ${dita-ot.args.input.input} - sprawdź otwierany plik."/>
- </antcall>
- <exec executable="open">
- <arg file="${dita-ot.temp.input.topic.fo}"/>
- </exec>
- <antcall target="finally">
- <param name="exception_param" value="${exception}"/>
- </antcall>
- <antcall target="finally_exception">
- <param name="exception_param" value="${exception}"/>
- </antcall>
- <fail message="${message}" />
-
- </catch>-->
- <!--<finally>-->
-
- <echo>Finally $exception = ${exception} Wykonano pdf z mapy p5:file ${dita-ot.args.input.input} to ${dita-ot.output.dir.input}
- $dita-ot.errorproperty = ${dita-ot.errorproperty}
- $dita-ot.resultproperty = ${dita-ot.resultproperty}
- </echo>
-
- <antcall target="chm-pdf.finally">
- <param name="dita-ot.resultproperty.PARAM" value="${dita-ot.resultproperty}"/>
- </antcall>
- <antcall target="chm-pdf.finally_exception">
- <param name="dita-ot.resultproperty.PARAM" value="${dita-ot.resultproperty}"/>
- </antcall>
-
-
-
- <!--</finally>-->
- <!--</trycatch>-->
-
-
-
- </target>
-
-
-
- <!-- <pathelement path="${dita-ot.current-dita-ot.lib}"/>
-
- <pathelement path="${java.class.path}"/>
- <pathelement location="${dita-ot.current-dita-ot.dost.jar}" />
- <pathelement location="${dita-ot.current-dita-ot.commons-codec-1.4.jar}" />
- <pathelement location="${dita-ot.current-dita-ot.icu4j.jar}" />
- <pathelement location="${dita-ot.current-dita-ot.resolver.jar}" />
- -->
-
- </project>
|