A mirror of SoundHelix, the software MadHelix is based on.

[[ 🗃 ^zoKmE soundhelix ]] :: [📥 Inbox] [📤 Outbox] [🐤 Followers] [🤝 Collaborators] [🛠 Commits]

Clone

HTTPS: git clone https://vervis.peers.community/repos/zoKmE

SSH: git clone USERNAME@vervis.peers.community:zoKmE

Branches

Tags

soundhelix-0.0.4 ::

build.xml

<project name="SoundHelix" default="jar" basedir=".">
    <property name="src" location="src"/>
    <property name="tmpsrc" location="tmpsrc"/>
    <property name="build" location="bin"/>
    <property name="constants" location="${src}/com/soundhelix/constants/BuildConstants.java"/>
    <property name="tmpconstants" location="${tmpsrc}/com/soundhelix/constants/BuildConstants.java"/>
    <property name="constantsclass" location="${build}/com/soundhelix/constants/BuildConstants.class"/>
    <property name="jar" location="SoundHelix.jar"/>
    <property name="javadoc" location="javadoc"/>
    <property name="classpath" location="lib/log4j.jar"/>

    <property file="VERSION.txt"/>
    <property name="binzip" location="SoundHelix-${version}-bin.zip"/>
    <property name="srczip" location="SoundHelix-${version}-src.zip"/>
	
    <target name="init">
        <tstamp>
            <format property="TODAY" pattern="yyyy-MM-dd"/>
            <format property="NOW" pattern="HH:mm:ss"/>
        </tstamp>
    </target>
    
    <target name="-createBuildConstants">
        <exec executable="svn" outputproperty="revision">
        	 <env key="LANG" value="en_US"/>
             <arg line="info"/>
             <redirector>
                 <outputfilterchain>
                     <linecontainsregexp>
                         <regexp pattern='^Revision' />
                     </linecontainsregexp>
                     <tokenfilter>
                         <replaceregex pattern='[\D]+([\d]+)' replace="\1" />
                     </tokenfilter>
                  </outputfilterchain>
              </redirector>
           </exec>

        <copy file="${constants}" tofile="${tmpconstants}" overwrite="true"/>    	
    	
    	<replaceregexp file="${tmpconstants}"
    	               match="(\sVERSION\s*=\s*&quot;)[^&quot;]+?(&quot;)"
                       replace="\1${version}\2"/>

        <replaceregexp file="${tmpconstants}"
                       match="(\sREVISION\s*=\s*&quot;)[^&quot;]+?(&quot;)"
                       replace="\1${revision}\2"/>
 
        <replaceregexp file="${tmpconstants}"
                       match="(\sBUILD_DATE\s*=\s*&quot;)[^&quot;]+?(&quot;)"
                       replace="\1${TODAY}\2"/>

        <replaceregexp file="${tmpconstants}"
                       match="(\sBUILD_TIME\s*=\s*&quot;)[^&quot;]+?(&quot;)"
                       replace="\1${NOW}\2"/>

    	<echo> Version: ${version}</echo>
        <echo>    Date: ${TODAY}</echo>
        <echo>Revision: ${revision}</echo> 	
    </target> 
	
    <target name="compile" depends="init,-createBuildConstants" description="compile the source">
        <mkdir dir="${build}"/>
        <javac encoding="UTF-8" classpath="${classpath}" destdir="${build}" debug="yes" target="1.5">
            <src path="${tmpsrc}"/>
            <src path="${src}"/>
            <include name="**/*.java"/>
            <exclude name="com/soundhelix/constants/BuildConstants.java"/>
        </javac>
    </target>

    <target name="jar" depends="compile" description="generate the JAR">
        <jar jarfile="${jar}" basedir="${build}" includes="**/*.class">
        	<manifest>
        	    <attribute name="Main-Class" value="com.soundhelix.SoundHelix"/>
                <attribute name="Class-Path" value="lib/log4j.jar"/>
                <section name="common">
        	        <attribute name="Specification-Title" value="SoundHelix"/>
        	        <attribute name="Specification-Version" value="${version}"/>
        	        <attribute name="Specification-Vendor" value="soundhelix.com"/>
        	        <attribute name="Implementation-Title" value="SoundHelix"/>
        	        <attribute name="Implementation-Version" value="${version} r${revision} ${TODAY}"/> 
        	        <attribute name="Implementation-Vendor" value="soundhelix.com"/>
        	    </section>
            </manifest>
        </jar>
    </target>

    <target name="javadoc" depends="init" description="generate javadoc">
        <javadoc sourcepath="${src}"
                 classpath="${classpath}"
                 defaultexcludes="yes"
                 destdir="${javadoc}"
                 author="true"
                 version="true"
                 use="true"
                 overview="src/overview.html"
                 charset="UTF-8"
                 windowtitle="SoundHelix API">
            <doctitle><![CDATA[<h1>SoundHelix</h1>]]></doctitle>
            <link offline="true" href="http://java.sun.com/javase/6/docs/api/" packagelistLoc="C:/tmp"/>
            <link href="http://java.sun.com/javase/6/docs/api/"/>
        </javadoc>
    </target>

	<target name="packagebin" depends="init,jar">
		<zip destfile="${binzip}"
		     basedir=".."
		     includes="soundhelix/SoundHelix.jar,soundhelix/run.bat,soundhelix/run.sh,soundhelix/examples/SoundHelix-Piano.xml,soundhelix/includes/*,soundhelix/doc/*,soundhelix/lib/*,soundhelix/log4j.*"/>		     
	</target>

    <target name="packagesrc" depends="init,jar,javadoc">
	    <zip destfile="${srczip}"
             basedir=".."
             includes="soundhelix/src/*,soundhelix/javadoc/*,soundhelix/build.xml,soundhelix/SoundHelix.jar,soundhelix/run.bat,soundhelix/run.sh,soundhelix/examples/*,soundhelix/includes/*,soundhelix/doc/*,soundhelix/lib/*,,soundhelix/log4j.*"/>
	</target>
  
    <target name="clean" description="clean up">
        <delete dir="${tmpsrc}"/>
        <delete dir="${build}"/>
        <delete file="${jar}"/>
        <delete dir="${javadoc}"/>
    	<delete file="${binzip}"/>
        <delete file="${srczip}"/>
    </target>
</project>

[See repo JSON]