build.xml 5.15 KB
Newer Older
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
<?xml version="1.0"?>

<project name="movie" default="build" basedir=".">

   <target name="getjjmpeg-windows-i586" if="use.win32.jjmpeg">
      <delete dir="jjmpeg"/>
      <mkdir dir="jjmpeg"/>
      <get dest="jjmpeg">
         <url url="http://jjmpeg.googlecode.com/files/jjmpeg-0.0-bin.tar.bz2"/> 
      </get>
      <untar src="jjmpeg/jjmpeg-0.0-bin.tar.bz2" compression="bzip2" dest="jjmpeg"/>
   </target>

   <target name="getffmpeg-windows-i586" if="use.win32.ffmpeg">
      <delete dir="ffmpeg"/>
      <mkdir dir="ffmpeg"/>
      <get dest="ffmpeg">
         <url url="http://ffmpeg.zeranoe.com/builds/win32/shared/ffmpeg-git-9c2651a-win32-shared.7z"/> 
      </get>
      <exec dir="ffmpeg" executable="C:\Program Files\7-Zip\7z.exe">
         <arg value="x"/>
         <arg value="ffmpeg-git-9c2651a-win32-shared.7z"/>
      </exec>
   </target>
 <target name="getjjmpeg-windows-amd64" if="use.win64.jjmpeg">
      <delete dir="jjmpeg"/>
      <mkdir dir="jjmpeg"/>
      <get dest="jjmpeg">
         <url url="http://jjmpeg.googlecode.com/files/jjmpeg-0.0-bin.tar.bz2"/> 
      </get>
      <untar src="jjmpeg/jjmpeg-0.0-bin.tar.bz2" compression="bzip2" dest="jjmpeg"/>
   </target>
    <target name="getffmpeg-windows-amd64" if="use.win64.ffmpeg">
      <delete dir="ffmpeg"/>
      <mkdir dir="ffmpeg"/>
      <get dest="ffmpeg">
         <url url="http://ffmpeg.zeranoe.com/builds/win64/shared/ffmpeg-git-9c2651a-win64-shared.7z"/> 
      </get>
      <exec dir="ffmpeg" executable="C:\Program Files\7-Zip\7z.exe">
         <arg value="x"/>
         <arg value="ffmpeg-git-9c2651a-win64-shared.7z"/>
      </exec>
   </target>

   <target name="checkos">
      <condition property="use.win32.jjmpeg">
         <and>
            <os family="windows" />
            <or>
               <os arch="x86" />
               <os arch="i386" />
            </or>
            <not><available file="jjmpeg/jjmpeg-0.0/native/mswin-i386/jjmpeg.dll"/> </not>
            <not><available file="jjmpeg/jjmpeg-0.0/dist/jjmpeg.jar"/> </not>
         </and>
      </condition>
      <condition property="use.win32.ffmpeg">
         <and>
            <os family="windows" />
            <or>
               <os arch="x86" />
               <os arch="i386" />
            </or>
            <not><available file="ffmpeg\ffmpeg-git-9c2651a-win32-shared\bin\avcodec-53.dll"/> </not>
            <not><available file="ffmpeg\ffmpeg-git-9c2651a-win32-shared\bin\avdevice-53.dll"/> </not>
            <not><available file="ffmpeg\ffmpeg-git-9c2651a-win32-shared\bin\avfilter-53.dll"/> </not>
            <not><available file="ffmpeg\ffmpeg-git-9c2651a-win32-shared\bin\avformat-53.dll"/> </not>
            <not><available file="ffmpeg\ffmpeg-git-9c2651a-win32-shared\bin\avutil-51.dll"/> </not>
            <not><available file="ffmpeg\ffmpeg-git-9c2651a-win32-shared\bin\postproc-51.dll"/> </not>
            <not><available file="ffmpeg\ffmpeg-git-9c2651a-win32-shared\bin\swscale-2.dll"/> </not>
         </and>
      </condition>
      <condition property="use.win64.jjmpeg">
         <and>
            <os family="windows" />
            <not>
               <or>
                  <os arch="x86" />
                  <os arch="i386" />
               </or>
            </not>
            <not><available file="jjmpeg/jjmpeg-0.0/native/mswin-amd64/jjmpeg.dll"/> </not>
            <not><available file="jjmpeg/jjmpeg-0.0/dist/jjmpeg.jar"/> </not>
         </and>
      </condition>

       <condition property="use.win64.ffmpeg">
         <and>
            <os family="windows" />
            <not>
               <or>
                  <os arch="x86" />
                  <os arch="i386" />
               </or>
            </not>
            <not><available file="ffmpeg\ffmpeg-git-9c2651a-win64-shared\bin\avcodec-53.dll"/> </not>
            <not><available file="ffmpeg\ffmpeg-git-9c2651a-win64-shared\bin\avdevice-53.dll"/> </not>
            <not><available file="ffmpeg\ffmpeg-git-9c2651a-win64-shared\bin\avfilter-53.dll"/> </not>
            <not><available file="ffmpeg\ffmpeg-git-9c2651a-win64-shared\bin\avformat-53.dll"/> </not>
            <not><available file="ffmpeg\ffmpeg-git-9c2651a-win64-shared\bin\avutil-51.dll"/> </not>
            <not><available file="ffmpeg\ffmpeg-git-9c2651a-win64-shared\bin\postproc-51.dll"/> </not>
            <not><available file="ffmpeg\ffmpeg-git-9c2651a-win64-shared\bin\swscale-2.dll"/> </not>
         </and>
      </condition>
   </target>

   <target name="getstuff" depends="checkos, getjjmpeg-windows-i586, getffmpeg-windows-i586, getjjmpeg-windows-amd64, getffmpeg-windows-amd64"/>

   <target name="build" depends="getstuff,clean">
      <mkdir dir="classes"/>
      <javac srcdir="src" destdir="classes" debug="on" includeantruntime="false" >
         <classpath>
            <pathelement path="..\..\com.aparapi\dist\aparapi.jar"/>
            <pathelement path="jjmpeg\jjmpeg-0.0\dist\jjmpeg.jar/"/>
            <pathelement path="..\jviolajones\jviolajones.jar/"/>
         </classpath>
      </javac>
      <jar jarfile="${ant.project.name}.jar" basedir="classes"/>
   </target>

   <target name="clean">
      <delete dir="classes"/>
      <delete file="${ant.project.name}.jar"/>
   </target>


</project>