forked from apache/flex-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pixelbender.xml
124 lines (98 loc) · 4.62 KB
/
pixelbender.xml
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
<?xml version="1.0"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<project name="pixel bender" default="main" basedir=".">
<property file="${basedir}/env.properties"/>
<property environment="env"/>
<property file="${basedir}/local.properties"/>
<property file="${basedir}/build.properties"/>
<target name="main" depends="clean-pixelbender,build-pixelbender"/>
<target name="build-pixelbender" depends="check-pixelbender-home">
<ant dir="${basedir}/frameworks/projects/framework" target="pixelbender-compile"/>
<ant dir="${basedir}/frameworks/projects/spark" target="pixelbender-compile"/>
</target>
<target name="clean" depends="clean-pixelbender" description="Cleans Pixel Bender PBJ files." />
<target name="clean-pixelbender" >
<delete>
<fileset dir="${basedir}/frameworks/projects/framework">
<include name="**/*.pbj" />
</fileset>
<fileset dir="${basedir}/frameworks/projects/spark">
<include name="**/*.pbj" />
</fileset>
</delete>
</target>
<target name="check-pixelbender-home" unless="pbutil.exe.exists"
description="Check PIXELBENDER_HOME for both a directory and an exe file">
<echo message="PIXELBENDER_HOME is ${env.PIXELBENDER_HOME}"/>
<available file="${env.PIXELBENDER_HOME}"
type="dir"
property="PIXELBENDER_HOME.set"/>
<fail message="The environment variable PIXELBENDER_HOME is not set to a directory"
unless="PIXELBENDER_HOME.set"/>
<condition property="pbutil.exe.exists">
<and>
<os family="mac"/>
<available file="${env.PIXELBENDER_HOME}/pbutil" type="file"/>
</and>
</condition>
<condition property="pbutil.exe.exists">
<and>
<os family="unix"/>
<available file="${env.PIXELBENDER_HOME}/pb.tar.gz" type="file"/>
</and>
</condition>
<condition property="pbutil.exe.exists">
<and>
<os family="windows"/>
<available file="${env.PIXELBENDER_HOME}/pbutil.exe" type="file"/>
</and>
</condition>
<fail message="The directory ${env.PIXELBENDER_HOME} does not contain the pbutil executable or pb files"
unless="pbutil.exe.exists"/>
</target>
<target name="copy-to-flex-sdk" depends="check-flex-home"
description="copies PBK and PBJ files to Flex SDK folder">
<copy todir="${FLEX_HOME}" >
<fileset dir="${basedir}">
<include name="**/*.pbk" />
<include name="**/*.pbj" />
</fileset>
</copy>
</target>
<target name="check-flex-home" unless="FLEX_HOME"
description="Check FLEX_HOME for both a directory and an exe file">
<echo message="FLEX_HOME is ${env.FLEX_HOME}"/>
<available file="${env.FLEX_HOME}"
type="dir"
property="FLEX_HOME" value="${env.FLEX_HOME}"/>
<fail message="The environment variable FLEX_HOME is not set to a directory"
unless="FLEX_HOME"/>
<fail message="The directory ${env.FLEX_HOME} does not contain a frameworks/projects/framework directory">
<condition>
<not>
<available file="${env.FLEX_HOME}/frameworks/projects/framework" type="dir"/>
</not>
</condition>
</fail>
<fail message="The directory ${env.FLEX_HOME} does not contain a frameworks/projects/spark directory">
<condition>
<not>
<available file="${env.FLEX_HOME}/frameworks/projects/spark" type="dir"/>
</not>
</condition>
</fail>
</target>
</project>