Commits

tbrugz committed 1ec7891

alterações build: correta geração do epub ; +alt readme

  • Participants
  • Parent commits 8998195

Comments (0)

Files changed (2)

 dependęncias
 ------------
 
-_recomendáveis:_
-
+* JDK
 * [fop](http://xmlgraphics.apache.org/fop/)
-* [xalan-j 2.7.1](xml.apache.org/xalan-j/)
+* [xalan-j 2.7.1](http://xml.apache.org/xalan-j/)
 * ant
 * xml-commons-resolver (versăo utilizada: [1.2](http://www.apache.org/dist/xml/commons/xml-commons-resolver-1.2.zip))
 * [epubckeck](http://code.google.com/p/epubcheck/)
-* JDK
- 
-_opcional:_
-
-* eclipse
+* eclipse (opcional)
 
 
 docbook-xsl-ufrgs-eco-tcc's howto
 
 _para gerar o TCC de teste:_
 
-* rodar ant:
-** build-all: gera PDF, RTF e EPUB
+* ant: build-all: gera PDF, RTF e EPUB
 
 _outras tarefas ant:_
 
 
 referęncias docbook
 -------------------
-- [http://www.docbook.org/](http://www.docbook.org/) - Official home page for `DocBook 5: The Definitive Guide`
-- [http://docbook.sourceforge.net/](http://docbook.sourceforge.net/) - docbook project page
-- [http://www.sagehill.net/docbookxsl/](http://www.sagehill.net/docbookxsl/) - DocBook XSL: The Complete Guide by Bob Stayton
-- [http://tldp.org/HOWTO/DocBook-Demystification-HOWTO/index.html](http://tldp.org/HOWTO/DocBook-Demystification-HOWTO/index.html) - DocBook Demystification HOWTO by Eric Raymond
+- [http://www.docbook.org/](http://www.docbook.org/) - `DocBook 5: The Definitive Guide`
+- [http://docbook.sourceforge.net/](http://docbook.sourceforge.net/) - página do projeto docbook
+- [http://www.sagehill.net/docbookxsl/](http://www.sagehill.net/docbookxsl/) - DocBook XSL: The Complete Guide, por Bob Stayton
+- [http://tldp.org/HOWTO/DocBook-Demystification-HOWTO/index.html](http://tldp.org/HOWTO/DocBook-Demystification-HOWTO/index.html) - DocBook Demystification HOWTO, por Eric Raymond
 - [http://opensource.bureau-cornavin.com/crash-course/](http://opensource.bureau-cornavin.com/crash-course/) - DocBook Crash Course
 		ver:
 		http://www.ibm.com/developerworks/xml/tutorials/x-epubtut/section5.html
 		http://en.wikipedia.org/wiki/EPUB
+		http://inasmuch.as/2010/12/10/ant-for-epub/
 		-->
 		<mkdir dir="${file.epub.outputdir}"/>
 		<copy file="${xsl.dir}/mimetype.epub" tofile="${file.epub.outputdir}/mimetype" />
 		</java>
 		<mkdir dir="${file.epub.outputdir}/OEBPS/figures/"/>
 		<copy todir="${file.epub.outputdir}/OEBPS/figures/">
-		  <fileset dir="${testfiles.dir}/figures/" includes="*"/>
+			<fileset dir="${testfiles.dir}/figures/" includes="*"/>
 		</copy>
 		<delete file="${file.epub.output}" />
-		<zip destfile="${file.epub.output}" basedir="${file.epub.outputdir}" includes="mimetype" defaultexcludes="true" compress="false"/>
-		<echo message="now updating zip..."/>
-		<zip destfile="${file.epub.output}" basedir="${file.epub.outputdir}" update="true" duplicate="preserve" excludes="tcc-output-epub.xml"/>
+
+		<echo message="temp zip n. 1..."/>
+		<zip destfile="${file.epub.output}.mime.zip" basedir="${file.epub.outputdir}" includes="mimetype" defaultexcludes="true" compress="false"/>
+
+		<echo message="temp zip n. 2..."/>
+		<zip destfile="${file.epub.output}.rest.zip" basedir="${file.epub.outputdir}" update="true" duplicate="preserve" excludes="tcc-output-epub.xml,mimetype"/>
+		
+		<zip destfile="${file.epub.output}"
+			update="true"
+			keepcompression="true"
+			encoding="UTF-8">
+			<zipfileset src="${file.epub.output}.mime.zip" />
+			<zipfileset src="${file.epub.output}.rest.zip" />
+		</zip>
+		
+		<!-- Delete the temporary Zip files. -->
+		<delete file="${file.epub.output}.mime.zip" />
+		<delete file="${file.epub.output}.rest.zip" />		
+		
+		<!-- check generated epub -->
 		<java jar="${epubcheck-dir}/epubcheck-1.2.jar" classpathref="epubcheckpath" fork="true">
 		    <arg value="${file.epub.output}"/>
 		</java>