forked from kyoji2/HanFont
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
148 lines (127 loc) · 4.76 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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
<project name="HanFont" basedir=".">
<!-- set up a prefix for all environment variables -->
<property environment="env."/>
<!-- SDK properties -->
<!-- System environment must contain FLEX_HOME variable that points to Flex SDK -->
<property name="FLEX_HOME" location="${env.FLEX_HOME}"/>
<property name="ADL" value="${FLEX_HOME}/bin/adl"/>
<property name="mxmlc" value="${FLEX_HOME}/lib/mxmlc.jar"/>
<property name="ADT" value="${FLEX_HOME}/lib/adt.jar"/>
<!-- Project properties -->
<property name="src" location="src" />
<property name="lib" location="lib" />
<property name="bin" location="bin" />
<property name="icons" location="icons"/>
<property name="APP_NAME" value="HanFont"/>
<property name="APP_ROOT_FILE" value="${APP_NAME}.swf"/>
<property name="APP_DESCRIPTOR" value="${APP_NAME}-app.xml"/>
<property name="APP_TEST_DESCRIPTOR" value="${APP_NAME}-test.xml"/>
<property name="STORETYPE" value="pkcs12"/>
<property name="KEYSTORE" value="cert.p12"/>
<property name="PASSWORD" value="8fe#6bep!"/>
<condition property="isWindows">
<os family="windows"/>
</condition>
<condition property="isMac">
<os family="mac"/>
</condition>
<taskdef resource="flexTasks.tasks" classpath="${FLEX_HOME}/ant/lib/flexTasks.jar" />
<target name="test" description="test" depends="compile">
<antcall target="test-win"/>
<antcall target="test-mac"/>
</target>
<target name="test-win" if="isWindows">
<echo message="Windows"/>
<exec executable="${ADL}.exe">
<arg value="-profile"/>
<arg value="extendedDesktop"/>
<arg value="${APP_TEST_DESCRIPTOR}"/>
<arg value="${bin}"/>
</exec>
</target>
<target name="test-mac" if="isMac">
<echo message="Mac"/>
<exec executable="${ADL}">
<arg value="-profile"/>
<arg value="extendedDesktop"/>
<arg value="${APP_TEST_DESCRIPTOR}"/>
<arg value="${bin}"/>
</exec>
</target>
<target name="keystore" description="make keystore">
<java jar="${ADT}" fork="true" failonerror="true">
<arg value="-certificate"/>
<arg value="-cn"/>
<arg value="SelfSigned"/>
<arg value="1024-RSA"/>
<arg value="${KEYSTORE}"/>
<arg value="${PASSWORD}"/>
</java>
</target>
<target name="package" description="make package" depends="compile">
<java jar="${ADT}" fork="true" failonerror="true">
<arg value="-package"/>
<arg value="-storetype"/>
<arg value="${STORETYPE}"/>
<arg value="-keystore"/>
<arg value="${KEYSTORE}"/>
<arg value="-storepass"/>
<arg value="${PASSWORD}"/>
<arg value="${bin}/${APP_NAME}.air"/>
<arg value="${APP_DESCRIPTOR}"/>
<arg value="${icons}"/>
<arg value="-C"/>
<arg value="${bin}"/>
<arg value="${APP_ROOT_FILE}"/>
</java>
</target>
<target name="native-app" depends="package" description="make native-app">
<antcall target="native-app-win"/>
<antcall target="native-app-mac"/>
</target>
<target name="native-app-win" if="isWindows">
<echo message="Windows"/>
<java jar="${ADT}" fork="true" failonerror="true">
<arg value="-package"/>
<arg value="-target"/>
<arg value="native"/>
<arg value="${bin}/${APP_NAME}.exe"/>
<arg value="${bin}/${APP_NAME}.air"/>
</java>
</target>
<target name="native-app-mac" if="isMac">
<echo message="Mac"/>
<java jar="${ADT}" fork="true" failonerror="true">
<arg value="-package"/>
<arg value="-target"/>
<arg value="native"/>
<arg value="${bin}/${APP_NAME}.dmg"/>
<arg value="${bin}/${APP_NAME}.air"/>
</java>
</target>
<target name="compile" description="compile">
<!--
<java jar="${mxmlc}" fork="true" failonerror="true">
<arg value="+flexlib"/>
<arg value="${FLEX_HOME}/frameworks"/>
<arg value="+configname=air"/>
<arg value="-o"/>
<arg value="${bin}/${APP_NAME}.swf"/>
<arg value="- -"/>
<arg value="${src}/Main.as"/>
</java>
-->
<mxmlc file="${src}/Main.as"
output="${bin}/${APP_NAME}.swf"
debug="false"
target-player="10"
optimize="true">
<compiler.library-path dir="${lib}">
<include name="*.swc" />
</compiler.library-path>
<load-config filename="${FLEX_HOME}/frameworks/air-config.xml"/>
<source-path path-element="${FLEX_HOME}/frameworks"/>
<source-path path-element="${src}"/>
</mxmlc>
</target>
</project>