1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181
|
<?xml version="1.0"?>
<!-- build file for entagged distribution-->
<!-- $Id: build.xml,v 1.1 2007/03/23 14:25:25 nicov1 Exp $ -->
<!--
* ******************************************************************** **
* Copyright notice **
* ** **
* (c) 2003 Entagged Developpement Team **
* http://www.sourceforge.net/projects/entagged **
* ** **
* All rights reserved **
* ** **
* This script is part of the Entagged project. The Entagged **
* project is free software; you can redistribute it and/or modify **
* it under the terms of the GNU General Public License as published by **
* the Free Software Foundation; either version 2 of the License, or **
* (at your option) any later version. **
* ** **
* The GNU General Public License can be found at **
* http://www.gnu.org/copyleft/gpl.html. **
* ** **
* This copyright notice MUST APPEAR in all copies of the file! **
* ********************************************************************
-->
<project name="entagged-tageditor" default="package" basedir=".">
<description>Entagged compile/build/package script</description>
<!-- set global properties -->
<property name="entagged_dir" location="."/>
<property name="entagged_base_dir" location=".."/>
<property name="tageditor_dir" location="tageditor"/>
<property name="tageditor_version" value="0.21"/>
<property name="tageditor_jar" value="entagged-tageditor-${tageditor_version}.jar"/>
<property name="tageditor_zip" value="entagged-tageditor-${tageditor_version}.zip"/>
<property name="tageditor_tar" value="entagged-tageditor-${tageditor_version}.tar"/>
<property name="tageditor_gz" value="entagged-tageditor-${tageditor_version}.tar.gz"/>
<property name="tageditor_jar_classpath" value="squareness.jar" />
<property name="tageditor_jar_mainclass" value="entagged.tageditor.TagEditorFrameSplash" />
<property name="build_dir" location="build/entagged"/>
<!-- Create dirs, and delete what needs to be -->
<target name="clean">
<delete>
<fileset dir="${entagged_dir}" includes="**/*.class"/>
</delete>
<delete file="${tageditor_jar}" />
<delete dir="${build_dir}/../" />
<delete dir="${project_resources}/build/" />
</target>
<!-- Compile the sources -->
<target name="compile" depends="clean">
<javac srcdir="${entagged_dir}" classpath="${entagged_base_dir}" excludes="entagged/junit/*" source="1.4"/>
<echo>
Entagged Tag editor is now fully compiled.
You can use either:
entagged.bat (windows)
or
entagged.sh (linux)
to launch entagged from sources you just compiled !
(Linux : Remember to set correct permissions (executable))
</echo>
</target>
<!-- Prepares the classes to be packaged -->
<target name="build" depends="compile">
<!-- Jar the classes files -->
<jar destfile="${tageditor_jar}" basedir="${entagged_base_dir}" includes="entagged/**/*.class entagged/**/*.xsl entagged/**/*.dtd entagged/**/*.properties entagged/**/*.html entagged/tageditor/resources/**/*" excludes="**/*.java" >
<manifest>
<attribute name="Class-Path" value="${tageditor_jar_classpath}"/>
<attribute name="Main-Class" value="${tageditor_jar_mainclass}"/>
</manifest>
</jar>
</target>
<target name="build-dir" depends="build">
<mkdir dir="${build_dir}" />
<copy todir="${build_dir}/docs">
<fileset dir="entagged-doc" includes="**/*.html **/*.png **/*.txt **/*.jpg" />
<fileset dir="lib" includes="*.txt" />
</copy>
<copy todir="${build_dir}" file="lib/squareness.jar" />
<move todir="${build_dir}" file="${tageditor_jar}" />
<exec executable="jar" dir="${build_dir}" >
<arg line="-i ${tageditor_jar}"/>
</exec>
</target>
<!-- Package the jar files for distribution in a source tarball and an easy to deploy zip file -->
<target name="package" depends="build-dir">
<zip destfile="${tageditor_zip}" basedir="${build_dir}/../" />
<tar tarfile="${tageditor_tar}" basedir="${entagged_base_dir}" includes="entagged/**/*" excludes="**/*.zip **/*.exe **/*.tar.gz **/*.class **/build/**/* **/entagged-website/**/*" />
<gzip zipfile="${tageditor_gz}" src="${tageditor_tar}" />
<delete file="${tageditor_tar}" />
<echo>
I have created two files in this directory:
${tageditor_gz}
${tageditor_zip}
The first one contains a snapshot of the entagged sources (with all resources, as well as other random docs/libs, etc)
The second one is a zip file to be distributed, containing the entagged tageditor executable jar file, the needed libraries, and documentation
</echo>
</target>
<!-- Print out a little help message on available targets -->
<target name="help" >
<echo>
You can choose to:
Compile entagged tag editor:
$ ant compile
Build the distributions files:
$ ant package
</echo>
</target>
<property name="project_resources" location="entagged-build-resources"/>
<property name="makensis_path" location="c:/program files/nsis/makensis.exe"/>
<property name="linux_makensis_path" value="'/home/kikidonk/.wine/drive_c/Program Files/NSIS/makensis.exe'"/>
<property name="wine_path_to_project" value="Z:/home/kikidonk/Devel/entagged"/>
<property name="wine_project_resources" value="${wine_path_to_project}/entagged-build-resources" />
<!-- ***a Create NSIS Win32 Directory Structure -->
<target name="prepare-win32" > <!-- depends="package" > -->
<mkdir dir="${project_resources}/build/" />
<copy todir="${project_resources}/build/">
<fileset dir="${build_dir}" />
</copy>
</target>
<!-- ***b Create NSIS Win32 Tag Editor Wrapper -->
<target name="win32-tageditor-wrapper" depends="prepare-win32">
<exec dir="${project_resources}" executable="${makensis_path}" os="Windows XP">
<arg line="/DMUI_PRODUCT=TagEditor /DMUI_VERSION=${tageditor_version} /DJARFILE='${tageditor_jar}' /DICO=entagged-32x32.ico '${project_resources}\Entagged-Launcher.nsi'"/>
</exec>
<exec dir="${project_resources}" executable="wine" os="Linux">
<arg line="${linux_makensis_path} /DMUI_PRODUCT=TagEditor /DMUI_VERSION=${tageditor_version} /DJARFILE=${tageditor_jar} /DICO=entagged-32x32.ico '${wine_project_resources}/entagged-launcher.nsi'"/>
</exec>
<exec dir="${project_resources}" executable="${makensis_path}" os="Windows XP">
<arg line="/DMUI_PRODUCT='TagEditor-Debug' /DMUI_VERSION=${tageditor_version} /DJARFILE='${tageditor_jar}' /DICO=entagged-32x32.ico /DCONSOLE '${project_resources}\entagged-launcher.nsi'"/>
</exec>
<exec dir="${project_resources}" executable="wine" os="Linux">
<arg line="${linux_makensis_path} /DMUI_PRODUCT='TagEditor-Debug' /DMUI_VERSION=${tageditor_version} /DJARFILE=${tageditor_jar} /DICO=entagged-32x32.ico /DCONSOLE '${wine_project_resources}/entagged-launcher.nsi'"/>
</exec>
<move file="${project_resources}/TagEditor.exe" todir="${project_resources}/build/" />
<move file="${project_resources}/TagEditor-Debug.exe" todir="${project_resources}/build/" />
</target>
<!-- ***c Create NSIS Win32 Installer -->
<target name="win32-installer" depends="win32-tageditor-wrapper">
<exec dir="${project_resources}" executable="${makensis_path}" os="Windows XP">
<arg line="/DVERSION=${tageditor_version} '${project_resources}/Entagged-Installer.nsi'"/>
</exec>
<exec dir="${project_resources}" executable="wine" os="Linux">
<arg line="${linux_makensis_path} /DVERSION=${tageditor_version} ${wine_project_resources}/entagged-installer.nsi"/>
</exec>
<move todir="." file="${project_resources}/Entagged-install-w32-${tageditor_version}.exe" />
</target>
<target name="update-doc">
<exec executable="sh" dir="entagged-doc/xml">
<arg line="process-xml.sh" />
</exec>
<exec executable="sh" dir="entagged-website/pages/xml">
<arg line="process-xml.sh" />
</exec>
</target>
</project>
|