-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.xml
105 lines (103 loc) · 4.98 KB
/
build.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
<?xml version="1.0" encoding="UTF-8"?><!--ant-->
<project name="zvrGUI" basedir="." default="compile_release">
<!-- set up a prefix for all environment variables -->
<property environment="env."/>
<!-- load user properties to override defaults -->
<property file="user.properties"/>
<!-- System environment must contain FLEX_HOME variable that points to Flex SDK -->
<property name="FLEX_HOME" location="${env.FLEX_HOME}"/>
<!-- identify properties file -->
<property file="build.properties"/>
<!-- Clean Build and Report files -->
<target name="clean">
<!-- Remove all directories created during the build process -->
<echo>[clean] Removing Build and Report directories</echo>
<delete includeemptydirs="true" failonerror="false">
<fileset dir="${report.loc}" defaultexcludes="false">
<include name="**/*"/>
</fileset>
<fileset dir="${dist.loc}" defaultexcludes="false">
<include name="**/*"/>
</fileset>
</delete>
<echo>[clean] Build and Report directories removed</echo>
</target>
<!-- Create directories needed for the build process -->
<target name="init" depends="clean">
<echo>[init] Creating Bin and Report directories</echo>
<mkdir dir="${bin.loc}"/>
<mkdir dir="${report.loc}"/>
<echo>[init] Bin and Report directories created</echo>
</target>
<!-- Compile Release SWC -->
<target name="compile_debug" depends="init">
<echo>[compile] Compiling release SWC</echo>
<echo>[compile] Using Flex SDK at: ${FLEX_HOME}</echo>
<java jar="${FLEX_HOME}/lib/compc.jar" dir="${FLEX_HOME}/frameworks" fork="true" failonerror="true">
<!-- Build our SWC with a versioned name. -->
<arg value="-output=${bin.loc}/${project.name.versioned}_debug.swc"/>
<!-- Include classes from SWCs in this folder, but only the ones we use. -->
<arg value="-library-path+=${lib.loc}"/>
<!-- We want all the zvrGUI package classes in the SWC being built. -->
<arg value="-source-path=${main.src.loc}"/>
<arg value="-external-library-path+=${FLEX_HOME}/frameworks/libs/framework.swc"/>
<arg value="-include-classes+=zvr.zvrComps.zvrTool.ZvrTool"/>
<arg value="-define=CONFIG::debug,true"/>
<arg value="-define=CONFIG::release,false"/>
<!-- Boolean mosh pit! -->
<arg value="-incremental=true"/>
<arg value="-static-link-runtime-shared-libraries=true"/>
<arg value="-verbose-stacktraces=true"/>
<arg value="-headless-server=true"/>
<!-- Include manifests and such -->
<arg line="-source-path+='./','${main.src.loc}'"/>
</java>
<echo>[compile] Release SWC ${project.name.versioned}.swc created successfully</echo>
</target>
<!-- Compile Release SWC -->
<target name="compile_release" depends="compile_debug">
<echo>[compile] Compiling release SWC</echo>
<echo>[compile] Using Flex SDK at: ${FLEX_HOME}</echo>
<java jar="${FLEX_HOME}/lib/compc.jar" dir="${FLEX_HOME}/frameworks" fork="true" failonerror="true">
<!-- Build our SWC with a versioned name. -->
<arg value="-output=${bin.loc}/${project.name.versioned}_release.swc"/>
<!-- Include classes from SWCs in this folder, but only the ones we use. -->
<arg value="-library-path+=${lib.loc}"/>
<!-- We want all the zvrGUI package classes in the SWC being built. -->
<arg value="-source-path=${main.src.loc}"/>
<arg value="-external-library-path+=${FLEX_HOME}/frameworks/libs/framework.swc"/>
<arg value="-include-classes+=zvr.zvrComps.zvrTool.ZvrTool"/>
<arg value="-define=CONFIG::debug,false"/>
<arg value="-define=CONFIG::release,true"/>
<!-- Boolean mosh pit! -->
<arg value="-incremental=true"/>
<arg value="-static-link-runtime-shared-libraries=true"/>
<arg value="-verbose-stacktraces=true"/>
<arg value="-headless-server=true"/>
<!-- Include manifests and such -->
<arg line="-source-path+='./','${main.src.loc}'"/>
</java>
<echo>[compile] Release SWC ${project.name.versioned}.swc created successfully</echo>
</target>
<!-- Build Documentation -->
<target name="asdoc" depends="compile_release">
<echo>[asdoc] Generating ASDOC documentation</echo>
<tstamp>
<format property="docgen.time" pattern="MM/dd/yyyy hh:mm aa" unit="hour"/>
</tstamp>
<java jar="${FLEX_HOME}/lib/asdoc.jar" dir="${FLEX_HOME}/frameworks" fork="true" failonerror="true">
<arg line="-external-library-path+=${lib.loc}"/>
<arg line="-doc-sources+=${main.src.loc}"/>
<arg line="-doc-classes tr trc wch dot zvr.zvrGUI.test.Main"/>
<arg line="-source-path+=${main.src.loc}"/>
<arg line="-output ${doc.loc}"/>
<arg value="-keep-xml=true"/>
<arg value="-lenient=true"/>
<arg value="-warnings=false"/>
<arg line="-exclude-classes zvr.zvrGUI.test.Main fl.motion.Color fl.motion.MatrixTransformer utils.*"/>
<arg line="-window-title '${project.name} ${zvrgui.ver.num}'"/>
<arg line="-main-title '${project.name} ${zvrgui.ver.num}'"/>
</java>
<echo>[asdoc] ASDOC documentation generated successfully</echo>
</target>
</project>