Files
moonlight-embedded/build.xml
2014-01-08 21:56:36 +01:00

74 lines
2.2 KiB
XML

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project default="all" name="Create Runnable Jar for Limelight">
<property name="src.dir" location="${basedir}/src"/>
<property name="libs.dir" location="${basedir}/libs"/>
<property name="libs.opus.dir" location="${basedir}/jni/nv_opus_dec/"/>
<property name="libs.omx.dir" location="${basedir}/jni/nv_omx_dec/"/>
<property name="lib.dir" location="${basedir}/lib"/>
<property name="build.dir" location="${basedir}/build"/>
<property name="one-jar.dist.dir" value="${libs.dir}/build"/>
<property name="classes.dir" location="${basedir}/classes"/>
<target name="init">
<mkdir dir="${classes.dir}"/>
<mkdir dir="${classes.dir}/lib"/>
<mkdir dir="${classes.dir}/src"/>
<mkdir dir="${build.dir}"/>
</target>
<import file="${one-jar.dist.dir}/one-jar-ant-task.xml"/>
<target name="clean">
<delete dir="${build.dir}"/>
<delete dir="${classes.dir}"/>
</target>
<target name="all" depends="clean, dist"/>
<target name="build" depends="compile-native, compile-java"/>
<target name="compile-native">
<exec executable="./build.sh" dir="/home/iwan/Development/limelight/limelight-pi/jni/nv_omx_dec/"/>
<exec executable="./build.sh" dir="/home/iwan/Development/limelight/limelight-pi/jni/nv_opus_dec/"/>
</target>
<target name="compile-java" depends="init">
<!-- compile limelight -->
<javac includeantruntime="false" destdir="${classes.dir}/src">
<src path="${src.dir}"/>
<classpath path="${build.dir}"/>
<classpath>
<fileset dir="${libs.dir}" includes="*.jar"/>
</classpath>
</javac>
</target>
<target name="dist" depends="build">
<!-- construct one-jar file -->
<one-jar destfile="${build.dir}/limelight-pi.jar">
<manifest>
<attribute name="One-Jar-Main-Class" value="com.limelight.Limelight"/>
</manifest>
<main>
<!-- construct limelight.jar -->
<fileset dir="${classes.dir}/src"/>
</main>
<lib>
<fileset dir="${libs.dir}" includes="*.jar"/>
</lib>
<binlib>
<fileset dir="${libs.opus.dir}" includes="*.so"/>
<fileset dir="${libs.omx.dir}" includes="*.so"/>
</binlib>
</one-jar>
</target>
</project>