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.9 ::

build.xml

<project name="SoundHelix" default="jar" basedir=".">
    <tstamp>
        <format property="TODAY" pattern="yyyy-MM-dd"/>
        <format property="NOW" pattern="HH:mm:ss"/>
    </tstamp>

    <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="svnbaseurl" value="https://svn.code.sf.net/p/soundhelix/code"/>
    <property file="VERSION.txt"/>
    <property name="binzip" location="SoundHelix-${version}-bin.zip"/>
    <property name="binzip_with_date" location="SoundHelix-${version}-bin-${TODAY}.zip"/>
    <property name="srczip" location="SoundHelix-${version}-src.zip"/>
    <property name="srczip_with_date" location="SoundHelix-${version}-src-${TODAY}.zip"/>
    <property name="binfiles" value="SoundHelix.jar,run.bat,run.sh,examples/SoundHelix-Piano.xml,examples/SoundHelix-Piano2.xml,examples/SoundHelix-Percussion.xml,examples/SoundHelix-Popcorn.xml,includes/*.xml,doc/*,lib/*.jar,log4j.*"/>
    <property name="srcfiles" value=".checkstyle,.classpath,.pmd,.project,.settings/**/*,src/**/*,javadoc/**/*,build.xml,VERSION.txt,SoundHelix.jar,run.bat,run.sh,examples/SoundHelix-Piano.xml,examples/SoundHelix-Piano2.xml,examples/SoundHelix-Percussion.xml,examples/SoundHelix-Popcorn.xml,includes/*.xml,doc/*,lib/*.jar,log4j.*"/>

    <path id="class.path">
        <fileset dir="${basedir}/lib" >
            <include name="**/*.jar"/>
        </fileset>
    </path>
    <pathconvert property="manifest-classpath" dirsep="/" pathsep=" " refid="class.path">
        <map from="${basedir}/lib" to="lib" />
    </pathconvert>

    <target name="-createBuildConstants">
        <exec executable="svn" outputproperty="revision">
             <env key="LANG" value="en_US"/>
             <arg line="info"/>
             <redirector>
                 <outputfilterchain>
                     <linecontainsregexp>
                         <regexp pattern='^Revision|is not a working copy' />
                     </linecontainsregexp>
                     <tokenfilter>
                         <replaceregex pattern=".*is not a working copy.*" replace="???" />
                         <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>    Time: ${NOW}</echo>
        <echo>Revision: ${revision}</echo>
    </target>

    <target name="compile" depends="-createBuildConstants" description="compile the source">
        <mkdir dir="${build}"/>
        <javac encoding="UTF-8" classpathref="class.path" destdir="${build}" debug="yes" source="1.7" target="1.7" includeantruntime="false">
            <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="${manifest-classpath}"/>
                <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="all" depends="jar" description="generate the JAR"/>

    <target name="javadoc" depends="-createBuildConstants" description="generate javadoc">
        <delete dir="${javadoc}"/>
        <condition property="javadoc-version" value="${version} (r${revision})" else="${version}">
            <matches pattern="u$$" string="${version}"/>
        </condition>
        <javadoc sourcepath="${src}"
                 classpathref="class.path"
                 defaultexcludes="yes"
                 destdir="${javadoc}"
                 author="true"
                 version="true"
                 use="true"
                 overview="src/overview.html"
                 charset="UTF-8"
                 windowtitle="SoundHelix ${version} API">
            <doctitle><![CDATA[<h1>SoundHelix ${javadoc-version} API</h1>]]></doctitle>
            <link href="http://java.sun.com/javase/6/docs/api/"/>
            <link href="http://logging.apache.org/log4j/1.2/apidocs/"/>
            <link href="http://www.gnu.org/software/gnuprologjava/api/"/>
        </javadoc>
    </target>

    <target name="deploycurrentjavadoc" depends="javadoc" description="deploy current javadoc">
       <echo>Compressing javadoc</echo>
       <exec executable="bash">
            <arg line="-c 'cd javadoc;tar -zcf ../javadoc.tar.gz .'"/>
       </exec>
       <echo>Copying compressed javadoc</echo>
       <exec executable="scp">
            <arg line="javadoc.tar.gz soundhelix.com:"/>
       </exec>
       <echo>Extracting compressed javadoc</echo>
       <exec executable="ssh">
            <arg line="soundhelix.com 'cd soundhelix.com/public_html/javadoc/current &amp;&amp; \\rm -rf *;tar -zxvf ~/javadoc.tar.gz --warning=no-timestamp &amp;&amp; find . -type f -exec chmod a+r {} \\; &amp;&amp; find . -type d -exec chmod a+rx {} \\;'"/>
       </exec>
    </target>

    <target name="deployreleasejavadoc" depends="javadoc" description="deploy release javadoc">
       <echo>Compressing javadoc</echo>
       <exec executable="bash">
            <arg line="-c 'cd javadoc;tar -zcf ../javadoc.tar.gz .'"/>
       </exec>
       <echo>Copying compressed javadoc</echo>
       <exec executable="scp">
            <arg line="javadoc.tar.gz soundhelix.com:"/>
       </exec>
       <echo>Extracting compressed javadoc</echo>
       <exec executable="ssh">
            <arg line="soundhelix.com 'cd soundhelix.com/public_html/javadoc/release &amp;&amp; \\rm -rf *;tar -zxvf ~/javadoc.tar.gz --warning=no-timestamp &amp;&amp; find . -type f -exec chmod a+r {} \\; &amp;&amp; find . -type d -exec chmod a+rx {} \\;'"/>
       </exec>
    </target>

    <target name="packagebin" description="build binary zip" depends="jar">
        <zip destfile="${binzip}">
            <zipfileset dir="." includes="${binfiles}" prefix="soundhelix-${version}"/>
        </zip>
    </target>

    <target name="packagenightlybin" description="build nightly binary zip" depends="jar">
        <zip destfile="${binzip_with_date}">
            <zipfileset dir="." includes="${binfiles}" prefix="soundhelix-${version}"/>
        </zip>
    </target>

    <target name="packagesrc" description="build source zip including binary, sources and javadoc" depends="jar,javadoc">
        <zip destfile="${srczip}">
             <zipfileset dir="." includes="${srcfiles}" prefix="soundhelix-${version}"/>
        </zip>
    </target>

    <target name="packagenightlysrc" description="build nightly source zip including binary, sources and javadoc" depends="jar,javadoc">
        <zip destfile="${srczip_with_date}">
             <zipfileset dir="." includes="${srcfiles}" prefix="soundhelix-${version}"/>
        </zip>
    </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>

    <target name="createsvntag" description="create SVN tag for current trunk">
        <exec executable="svn">
            <arg line="copy -m 'Created tag for release ${version}.' ${svnbaseurl}/trunk/soundhelix ${svnbaseurl}/tags/soundhelix-${version}"/>
        </exec>
    </target>
</project>

[See repo JSON]