-
Notifications
You must be signed in to change notification settings - Fork 8
/
build.xml
130 lines (112 loc) · 3.99 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
<project name="msp-viewer" default="launch" basedir=".">
<description>
MS Project Viewer
</description>
<!-- set global properties for this build -->
<property name="src" location="src"/>
<property name="lib" location="lib"/>
<property name="sample" location="sample"/>
<property name="mui.src.dir" location="../mui/src"/>
<property name="build" location="build"/>
<property name="dist" location="dist"/>
<property name="dist.all" location="${dist}/${ant.project.name}"/>
<property name="mui.dst.dir" location="${dist.all}/resources/mui"/>
<property name="resources" location="resources"/>
<property name="dist.resources" location="${dist}/resources"/>
<property name="dist.lib" location="${dist}/lib"/>
<property name="browser" value="chromium-browser"/>
<target name="init">
<tstamp/>
<mkdir dir="${build}"/>
</target>
<target name="mui">
<delete dir="${mui.dst.dir}"/>
<mkdir dir="${mui.dst.dir}"/>
<mkdir dir="${mui.dst.dir}/js"/>
<copy todir="${mui.dst.dir}/js" >
<fileset dir="${mui.src.dir}/js">
<include name="utilities.js"/>
<include name="dateutils.js"/>
<include name="dom.js"/>
<include name="event.js"/>
<include name="observable.js"/>
<include name="dnd.js"/>
<include name="displayed.js"/>
<include name="disabled.js"/>
<include name="spinner.js"/>
<include name="toolbar.js"/>
<include name="contentarea.js"/>
<include name="contentpane.js"/>
<include name="splitpane.js"/>
<include name="parseXml.js"/>
<include name="timer.js"/>
<include name="cascadingstylesheet.js"/>
</fileset>
</copy>
<mkdir dir="${mui.dst.dir}/css"/>
<copy todir="${mui.dst.dir}/css" >
<fileset dir="${mui.src.dir}/css">
<include name="contentarea.css"/>
<include name="contentpane.css"/>
<include name="dnd.css"/>
<include name="spinner.css"/>
<include name="splitpane.css"/>
<include name="toolbar.css"/>
<include name="tooltip.css"/>
</fileset>
</copy>
<mkdir dir="${mui.dst.dir}/images"/>
<copy todir="${mui.dst.dir}/images" >
<fileset dir="${mui.src.dir}/images">
<include name="arrow-down-16x16.png"/>
<include name="arrow-left-16x16.png"/>
<include name="arrow-right-16x16.png"/>
<include name="arrow-up-16x16.png"/>
<include name="folder-16x16.png"/>
<include name="spinner.gif"/>
</fileset>
</copy>
</target>
<target name="dist" depends="clean,init,mui" description="generate the distribution" >
<mkdir dir="${dist}"/>
<mkdir dir="${dist.all}"/>
<mkdir dir="${dist.all}/lib"/>
<copy todir="${dist.all}/lib">
<fileset dir="${lib}"/>
</copy>
<mkdir dir="${dist.all}/sample"/>
<copy todir="${dist.all}/sample">
<fileset dir="${sample}"/>
</copy>
<mkdir dir="${dist.all}/resources"/>
<mkdir dir="${dist.all}/resources/html"/>
<copy todir="${dist.all}/resources/html">
<fileset dir="${src}/html"/>
</copy>
<mkdir dir="${dist.all}/resources/js"/>
<copy todir="${dist.all}/resources/js">
<fileset dir="${src}/js"/>
</copy>
<mkdir dir="${dist.all}/resources/css"/>
<copy todir="${dist.all}/resources/css">
<fileset dir="${src}/css"/>
</copy>
<mkdir dir="${dist.all}/resources/images"/>
<copy todir="${dist.all}/resources/images">
<fileset dir="${src}/images"/>
</copy>
<delete file="${dist}/${ant.project.name}.zip"/>
<zip destfile="${dist}/${ant.project.name}.zip">
<zipfileset dir="${dist}/${ant.project.name}" prefix="${ant.project.name}"/>
</zip>
</target>
<target name="launch" depends="dist">
<exec executable="${browser}" spawn="true">
<arg value="${dist.all}/resources/html/index.html"/>
</exec>
</target>
<target name="clean" description="clean up" >
<delete dir="${build}"/>
<delete dir="${dist}"/>
</target>
</project>